• Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by miguel_rodrigues

  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: { [email protected] { #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/
  16. Hi jkoller, if your end goal is having the Linux on Zybo I would follow this tutorial. If you just want to have Busybox, I would follow this one instead. They are mostly the same. What are you trying to configure that leads to errors when compiling u-boot?
  17. So, I published my tutorial in Instructables (here). If anyone wants to use it as a basis for a better one, it is welcomed to do so Hope it is usefull for someone
  18. Thanks JColvin, that thread gave me that extra information I needed to put the DMA working Since many more people may be wondering how to use AXI DMA inside Linux, I will try to make available as a tutorial what I have done to achieve this. I plan to so this weekend so next week it should be already available. If anyone knows where is the best place to host such tutorial, say something
  19. Hi everybody, I am using the Zybo running with Linux. I have been able to write/read from registers inside the PL from within a custom application, in a similar way as this tutorial does. However, it seems much more complicated to do DMA transfers. I have searched many forums and read lots of threads but still I don't know how to achieve this. I'm a beginner in Zynq so any kind of input is appreciated Thanks in advance
  20. Today I got the chance to work with a decent power supply (5V 3A) and everything worked fine
  21. Just an update on this. Today I noticed that my power source has only 550mA output, which is more or less equivalent to what the USB port can deliver. In the Zybo Reference Manual it says I should have at least 2.5A, so it may be it (even though I am not using HDMI). Whenever I have a decent power supply, I will post an update of my experiments.
  22. Hi there, I solved the problem. The cable was not correctly connected to the router (should have known since the ethernet leds were not blinking). To enable the internet, the sequence of commands is as follows: ifconfig eth0 YOUR_NEW_IP route add default gw ROUTER_IP eth0 echo "nameserver ROUTER_IP" >/etc/resolv.conf ping google.com where to find your ROUTER_IP you may do "route -n" in your host computer. It is the one marked with the UG flag, under Gateway. As an example: ifconfig eth0 route add default gw eth0 echo "nameserver" >/etc/resolv.conf ping google.com Yes it was a dumb mistake lol
  23. Hello everybody, I have been able to complete the "Embedded Linux Tutorial - Zybo" and boot Busybox from the Zybo with a few minor changes (see bottom of the post). I was not able to do the same for the Linaro Ubuntu as the system freezes after a while (more on this in this thread). I don't care using Busybox instead of Linaro, even though its limitations. However I would like to configure Internet and I don't know how to do that. I was able to ping myself by doing: "ifconfig lo" followed by "ping". However I don't know how to communicate with the outside world, I alway get "network unreachable" error. Does anyone know how to do this? PS: The changes I did to the tutorial were -> Use the arm_ramdisk from: http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs change the bootargs in the zynq-zybo.dts to " bootargs = "console=ttyPS0,115200 root=/dev/ram0 rw init=/sbin/init earlyprintk rootwait devtmps.mount=1" "
  24. This is happening to me also. The link for getting Linaro in the tutorial is broken ( this one ) and I used this one instead ( new one ). I will try with different versions but I don't believe the problem is in there, hopefully I'm wrong.
  25. I am in the same situation as johnAbel and currently I'm working with HDMI but I want a cheaper solution. I have seen several cameras (from Basler for instance) that have Gigabit Ethernet interface but, as far as I see, it is not easy to make the decoding and the solution typically involves a microprocessor such as a MicroBlaze. If someone knows any alternative to the HDMI interface for real-time video processing I would really like to know Thanks in advance!