I bought a Zybo last year and I activated the software; but it never let me build any of the demo projects. I haven't been able to resolve this or get support, it's been collecting dust. I don't know if I ever want to buy an FPGA dev board without an open source toolchain ever again.
On the other hand, I have a pile of nice iCE40 FPGAs and they are awesome. Thanks to Clifford Wolf, I can go from verilog to bitcode with a quality, free toolchain. I don't need to worry about which machine it's locked to, what random bugs will manifest in the random version of Eclipse required to run it, etc.
I was able to make successful projects with the Zynq a few years ago, but it is a pretty steep challenge - it requires pretty broad knowledge of software, Linux, and hardware design. The general process was very convoluted - requiring HDL to be wrapped in top level components defined in the Vivado GUI. It worked well once you figured out what was going on, but the learning curve is pretty steep. I tried to touch the GUI as least as possible - I did unit tests with Icarus Verilog instead, and had my own script for packaging and live reloading the FPGA bitstream (a pretty neat trick that Xilinx pulls off, there). I did wonder how someone lacking any of the pieces of knowledge would ever get it to work - and indeed, a blog post I made about it working gathered many responses of people having trouble making a similar basic project.
A side note - the Zynq is one of the better documented SoCs out there (aside from the FPGA bitstream itself), so it might be worth considering just for that.
I also have tried Clifford Wolf's tools, and they are absolutely wonderful. It's the way I wish all FPGAs worked. It's amazingly complete - I wouldn't hesitate to ship a product using a bitstream generated from yosys/arachne/icestorm.
Extra extra side note - in some cases that used to require FPGAs, you can now get away with bit-banging from a normal microcontroller. Most newish micros can do single cycle GPIO writes, and can be clocked over 100MHz.
I agree. The learning curve for doing projects with the Zybo is pretty steep, and especially since it was my first foray into FPGAs, the first few days could be very frustrating at times.
I got over it eventually, but I think me having some experience with very low level kernel programming and digital electronics in general probably helped a lot. Since then, it's been great fun.
Overall, I don't think I'm a big fan of Vivado (though it's hard to say without any experience with any competitor's environment), but the Zybo itself it so packed full of fun components, and the Zynq itself such an apparently versatile and well documented chip (though again, not much personal reference in that) that I still recommend it.
Xilinx Vivado Webpack is free. The SDK is free. Petalinux is free. I have professionally done Zynq development where the whole company used those free tools and we didn't have a single paid Xilinx tool. I mean free as in cost, not open source. What problem did you run into exactly?
Maybe it would help to know a bit about your background. I get the feeling that the SDK+Petalinux workflow is aimed at FPGA/Hardware engineers.
I use Vivado to build the bitstream for my Zynq board, but then just treat it as another ARM dev board and build the OS for it myself. Once the OS has booted you can compile your "hello world" application on the board itself.
Yeah, sure! I'm a watchmaking engineer, so clearly not the primary target of those kind of boards.
We had electronic engineering course at school, as we are supposed to also develop quartz watches.
And hardcore user of linux for nearly 12 years. For example, I managed to replace the firmware of my ISP propreitary router nearly without any documentation (not supported by openwrt and co).
But I wasted days to try to understand the xilinx way we are supposed to use.
Every tutorials (I found) just explain how to install the vivado toolchain and stop there. So I assumed they had the same problems...
Which board did you buy? Most of them (Zedboard, Zybo, MicroZed) come with a Linux kernel already burned in QSPI flash. Make sure the jumpers are set for QSPI boot (not SD card). Plug in to the USB serial CDC port to see the prints. The system should boot to a login, password is usually root.
Now, download and install the Xilinx SDK. Write a hello world program. Run the settings64.sh script that was installed to get the toolchain in your path. Compile the code with arm-xilinx-linux-gnueabi-gcc. Put the output ELF file on a SD card. Insert the SD card to your board, mount it, chmod +x your exe, then execute it.
If your board didn't come with Linux, find a prebuilt kernel and put it on a SD card. There are usually just two files you need, BOOT.BIN and image.ub.
Try reading the Xilinx Petalinux documentation. It's quite good. Also try Sven's Zynq tutorials.
Finally, the Zynq has a complex bootloader architecture. If you want to run bare metal, your bare metal app can run in place of the SSBL (U-Boot). And you don't need to load the FPGA at first, the Zynq works fine if the PL is not configured
A Zynq board isn't all that different from your router.
When it powers up, the CPU reads the bootloader, typically u-boot, from somewhere and starts running it. The bootloader then reads the kernel from somewhere, maybe a ramdisk too and starts running Linux. The only difference with the Zynq is that before jumping into the kernel the bootloader will read the FPGA bitstream from somewhere and reconfigure the chip.
The design of the board itself will tell the CPU where to look for the bootloader, the location of the files for subsequent stages will come from what defaults had been compiled into the bootloader or from an external config file.
If you are already comfortable with cross-compiling Linux then you can just build a kernel from the official tree [1] and add it to the sample SDCard image. You may as well download the Xilinx SDK to get a pre-built cross-compiler.
One thing that I find helps is to have a SDCard reader/writer for the desktop or laptop that I'm using as my development machine.
PYNQ actually doesn't require any Xilinx tools - with a free SDCard image online, you power on the PYNQ-Z1 board, it'll boot into Linux and using Jupyter notebooks, you can run any python package or interact with programmable logic.
There are about 20 example notebooks that ship with PYNQ using opencv, HDMI out AND in, wifi, and grove periperals.
16 comments
[ 2.8 ms ] story [ 44.9 ms ] threadOn the other hand, I have a pile of nice iCE40 FPGAs and they are awesome. Thanks to Clifford Wolf, I can go from verilog to bitcode with a quality, free toolchain. I don't need to worry about which machine it's locked to, what random bugs will manifest in the random version of Eclipse required to run it, etc.
A side note - the Zynq is one of the better documented SoCs out there (aside from the FPGA bitstream itself), so it might be worth considering just for that.
I also have tried Clifford Wolf's tools, and they are absolutely wonderful. It's the way I wish all FPGAs worked. It's amazingly complete - I wouldn't hesitate to ship a product using a bitstream generated from yosys/arachne/icestorm.
Extra extra side note - in some cases that used to require FPGAs, you can now get away with bit-banging from a normal microcontroller. Most newish micros can do single cycle GPIO writes, and can be clocked over 100MHz.
I got over it eventually, but I think me having some experience with very low level kernel programming and digital electronics in general probably helped a lot. Since then, it's been great fun.
Overall, I don't think I'm a big fan of Vivado (though it's hard to say without any experience with any competitor's environment), but the Zybo itself it so packed full of fun components, and the Zynq itself such an apparently versatile and well documented chip (though again, not much personal reference in that) that I still recommend it.
I use Vivado to build the bitstream for my Zynq board, but then just treat it as another ARM dev board and build the OS for it myself. Once the OS has booted you can compile your "hello world" application on the board itself.
And hardcore user of linux for nearly 12 years. For example, I managed to replace the firmware of my ISP propreitary router nearly without any documentation (not supported by openwrt and co).
But I wasted days to try to understand the xilinx way we are supposed to use.
Every tutorials (I found) just explain how to install the vivado toolchain and stop there. So I assumed they had the same problems...
Do you have more recommendations, please?
Now, download and install the Xilinx SDK. Write a hello world program. Run the settings64.sh script that was installed to get the toolchain in your path. Compile the code with arm-xilinx-linux-gnueabi-gcc. Put the output ELF file on a SD card. Insert the SD card to your board, mount it, chmod +x your exe, then execute it.
If your board didn't come with Linux, find a prebuilt kernel and put it on a SD card. There are usually just two files you need, BOOT.BIN and image.ub.
Try reading the Xilinx Petalinux documentation. It's quite good. Also try Sven's Zynq tutorials.
Finally, the Zynq has a complex bootloader architecture. If you want to run bare metal, your bare metal app can run in place of the SSBL (U-Boot). And you don't need to load the FPGA at first, the Zynq works fine if the PL is not configured
When it powers up, the CPU reads the bootloader, typically u-boot, from somewhere and starts running it. The bootloader then reads the kernel from somewhere, maybe a ramdisk too and starts running Linux. The only difference with the Zynq is that before jumping into the kernel the bootloader will read the FPGA bitstream from somewhere and reconfigure the chip.
The design of the board itself will tell the CPU where to look for the bootloader, the location of the files for subsequent stages will come from what defaults had been compiled into the bootloader or from an external config file.
If you are already comfortable with cross-compiling Linux then you can just build a kernel from the official tree [1] and add it to the sample SDCard image. You may as well download the Xilinx SDK to get a pre-built cross-compiler.
One thing that I find helps is to have a SDCard reader/writer for the desktop or laptop that I'm using as my development machine.
[1] https://github.com/Xilinx/linux-xlnx
There are about 20 example notebooks that ship with PYNQ using opencv, HDMI out AND in, wifi, and grove periperals.
Also, this is a Zynq-7020 part (same part found on Zedboard) - approximately 2.5x the FPGA resources of low-cost Zynq-7010 boards.