miguel_rodrigues

Members
  • Content Count

    25
  • Joined

  • Last visited

  • Days Won

    1

miguel_rodrigues last won the day on March 6 2016

miguel_rodrigues had the most liked content!

About miguel_rodrigues

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yes, that is the correct approach. However, I would note that for the Zybo I had to modify the fdt_high and initrd_high from 0x20000000 to 0x10000000 in u-boot. This is because the DDR in Zybo has 512MB, like the Zedboard. This issue was noted right away as Linux started crashing. The way I did this was build everything from scratch, but maybe it is possible to modify these variables in a u-boot command prompt.
  2. The way I typically do this is reserve the first half of the DDR for the OS (in your case, Petalinux) and the other half for shared memory between CPU and FPGA. You can do that in the device tree, in the bootargs line by adding "mem = 512M". This will cause the OS to only "see" the first 512MB of memory, and you can safely use the remaining DDR for shared memory. In order to access it, you can either mmap it or create a generic-uio driver in the device tree. I recommend the latter. To do this, add the following to your device tree: { scratch_mem@20000000 { #address-cells = <1>; #size-cells = <1>; reg = <0x20000000 0x20000000>; compatible = "generic-uio"; interrupts = < 0 58 0 >; interrupt-parent = <0x1>; }; You will also have to modify your bootargs line in the device tree to enable generic-uio. For instance: bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait mem=256M uio_pdrv_genirq.of_id=generic-uio"; I hope this helps
  3. Hey soha, Yes, if you create a Device Driver that is mapped to 0x10000000 with a 4K memory space, you can only read/write to that space. You can read/write to other memory addresses using /dev/mem but I would not recommend it, as a buggy application could overwrite memory spaces that the kernel is using and then your OS would freeze/hang or worst. The correct way to do what you want is to create a Device Driver for each memory space you want to write to. Hope this helps
  4. Hey there, I had this issue before when I was powering the Zybo via Micro-USB. Powering the Zybo via an external power supply (5V, 3A) using the barrel plug solved the problem How are you powering the board?
  5. Dear tuan, I would suggest you to follow the tutorial first with the Zybo Base System from Digilent first and only if you succeed, try to adapt the tutorial to Xillybus. Regarding your question: "Are there any possibility to make OS reads the second half of memory but still allows user HW writes to it. Problem of read during write might occur but can be controlled if I divide the user HW memory to several banks and swapping them for read and write purpose. " The user can read/write to all memory. But the OS kernel will only use the first half of the memory. You can not control which memory the OS kernel uses and thus, you need to make sure that the OS kernel only sees part of the memory. However, your programs will always be able to use the full memory space, which is what you want I believe. Good luck
  6. Hello Tuan, I was able to reproduce your error if I skipped this line: " source /opt/Xilinx/Vivado/2015.4/settings64.sh ". echo $PATH source /opt/Xilinx/Vivado/2015.4/settings64.sh echo $PATH It should give you different outputs between the first and the second time you echo. If it doesn't. ensure that the file (settings64.sh) is executable. If it is not: chmod +x /opt/Xilinx/Vivado/2015.4/settings64.sh and retry. Hope this helps
  7. Sorry tuan, I have no answer for your question about some HDMI devices working and others not. My experiences with HDMI here were only connecting the output of a laptop into the Zybo and it worked, never tried with other devices. If you want to understand why some work and why some don't, you would need to debug the HDMI IP and understand the details of the HDMI protocol. You will have better luck asking the developers of the HDMI IP (Digilent guys) on why. A possible answer (note I am only guessing) is that your display can read HDMI inputs with variable resolutions while the HDMI IP is expecting a fixed resolution, which is the same of your first 2 devices.
  8. To write data to memory, you use the AXI Stream protocol. The AXI Stream will then be converted by an AXI Interconnect IP which will convert the AXI Stream into an AXI4, which connects to the S_AXI_HP0 of the PS, as you say. With the ILA's, can you confirm that data is being written to the memory AND from the memory correctly? By default, the OS will occupy the whole DDR (512MB). You will need to explicitly tell the OS to just use half of this memory (0x00000000 to 0x0FFFFFFF). The memory zone where the frames will be stored needs to be outside the OS memory zone, i.e., above 0x10000000. For instance, it may be 0x10000000 to 0x100FFFFF for 1MB frame. Yes, you will need to build the OS by yourself in order to restrict the OS to only use the first 256MB of the DDR. You will need to modify the zynq_zybo.h file, as explained in the tutorial. The problem is that you are writing to the OS memory zone. Since the OS may also write into it, not only corruption of data may occur but worst, you may write on top of important system data and cause problems. That is why you should separate memory zones, into OS and shared data. You don't need to ask. As above, the problem is you are trying to write into the OS memory zone and you shouldn't. If you separate things, the AXI interface will behave without influence of the OS. For the OS to read data from the DDR you may use /dev/mem (which is not good as the whole physical memory is available to a buggy application) or you can use generic uio drivers. This implies modifying the system device tree, and is explained in the tutorial. No problem. I know this is all can be a bit overwhelming but you will get there with patience From your post, I believe everything works in bare-metal, the problem is integrating with Linux OS. Is this correct? Feel free to ask more questions
  9. Dear tuan, I have done something similar as what you want to achieve. I will give you some general recommendations and if you have more specific questions, feel free to ask Capture the HDMI input using the IPs provided by Digilent, as in HDMI => VGA converter on ZYBO Use AXI Stream to send such amount of data to the DDR, triggering such DMA transaction using your own custom DMA controller (IP that writes to AXI DMA registers) Every time the DMA transaction ends, trigger a new one, always writing to the same DDR memory location. Use ANOTHER DMA transaction (AXI Stream) to read from the DDR memory location where the frames are being written, using another custom DMA controller. Every time this new DMA transaction ends, trigger a new one, always reading from the same DDR memory location. Have Linux installed on the PS, with the DDR divided in 2 (half for Linux and half for shared PS/PL data). Create device drives in order to access the memory zone where the frames are. Have a program always reading such memory zone and send the frames over the Ethernet. A while ago I created this tutorial that is somewhat related to parts of this (http://www.instructables.com/id/Zybo-AXI-DMA-Inside-Embedded-Linux/). In the end, it has some reference links that should help you better understand some of the things involved in the process. PS: I have this system implemented on Zybo but instead of capturing frames via HDMI, I capture them using an ov7670 image sensor. The flow is exactly the same however
  10. Hi there, I am considering to buy a Zedboard for a UAV project and I would like to know its weight, but I can not find this information anywhere. Do you know where this information is? If not, does someone who has access to a Zedboard can weigh it for me and share the results? Thanks in advance, Miguel
  11. For both the Zynq 7010 and Zynq 7020 commercial grade devices, the maximum operating frequency is 85C (page 23 in here). The Zybo has a Zynq 7010 while the Zedboard and the Pynq have a Zynq 7020. My experience while operating with the Zybo and with Parallella (Zynq 7020) is that they work fine under ambient temperatures of 40C. Never tried above that. Anyway, since the Zynq 7020 (in Parallella) heats a lot more when compared with the Zynq 7010, I have set an alarm for whenever the operating temperature of the chip is above 70C and automatically a fan starts spinning. On the other hand, Zynq 7010 (in Zybo) heats a lot less. EDIT: The operating temperature depends a lot on the amount of computation that is being done, specially in the PL part of the Zynq
  12. Hello again. I am still having trouble while using AXI IIC IP (option 2). I think I connected the AXI IIC IP correctly in the PL but I am having trouble in sending the correct programming sequence to my device. I do not want to use interrupts (I want to use polling) and I can not find examples to do this. I want to know which routines to call and in what order to do the following: Write 0x00 to register 0x6B of device with ID 0x69 while(1) Read 14 bytes, beginning in register 0x3B of device with ID 0x69 Thanks in advance
  13. Thank you very much I have now been able to connect to my I2C device using option 1). Will certainly try option 2) with AXI IIC IP, thanks again
  14. Hello everybody, I want to connect my Zybo to a gyroscope that communicates via I2C but I have not been able to do it. I want to do this in bare-metal. What I gathered so far is that I have 2 options: 1) connect it directly to the MIO, i.e., to JF PMOD or 2) connect it to another PMOD and from the PL, instantiate an AXI IIC IP and access the values via AXI. Either of the options are fine by me. I have many questions regarding both options. Starting with option 1) Where do I physically connect my gyroscope SCL and SDA lines? Does it depend on the MIO configuration? To which MIO should I assign I2C? Should I use I2C 0 or I2C 1? Which functions are available for reading/writing from/to the I2C interface? Could you provide an example for reading/writing from/to a certain memory position? And for option 2) Which are the constraints I need to place on the SCL and SDA signals? How to I connect the SCL and SDA signals to the I2C port that is on the AXI IIC IP? Which functions are available for reading/writing from/to the I2C interface? Could you provide an example for reading/writing from/to a certain memory position? I know this may be simple and intuitive but I have not been able to discover it by myself. Thank you very much in advance Best regards, Miguel
  15. Hello jkoller, I verified just now and it is in master-next. Instead of doing git clone -b master-next https://github.com/Digilent/u-boot-Digilent-Dev.git you should do git clone -b master-next https://github.com/DigilentInc/u-boot-Digilent-Dev.git Then if you run grep -r "zybo" you will find zynq_zybo.h under /include/configs/