-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an example for a Zynq part #26
Comments
@kgugala -- Any thoughts? |
FYI - @andrewb1999 f4pga/f4pga-arch-defs#1506 is related. |
In my opinion, the important part of a zynq example is PS->PL communication. After having 7020 support merged, it would be relatively easy to make an example based off of the zynq blinky example in prjxray. I have a few tests that are more complicated, such as using axi, but they currently use xilinx IP. At a more fundamental level, examples using the PS will be somewhat limited at the moment due a lack of understanding about configuring the PS using assembly. For my more complicated examples I use the first stage boot loader generated by Xilinx, which contains intial PS configuration, and run the test from an SD card using antmicro's zynq-mkbootimage. Eventually I think it will be necessary to fuzz the PS configuration (by checking different options in Vivado and comparing the resulting fsbl), but I'm not sure of the intellectual property concerns of using a Vivado/SDSoC/Vitis generated fsbl for now. |
I think Antmicro have a bunch of examples with that? |
We have this one https://github.com/SymbiFlow/symbiflow-arch-defs/tree/master/xc/xc7/tests/ps7/axi_lite_reg it implements an AXI peripheral which can be then used with this tester https://github.com/SymbiFlow/symbiflow-xc7z-automatic-tester I also implemented a LiteX-Linux design using PS7 DDR in Zynq. I have to find it, though. I'll link it here once I have it.
|
Oh ok that's interesting. Does using U-boot replace using the fsbl? Do you have any examples of running a bare metal application on the PS? |
fsbl simply configures the low level part of the chip (including DDR controller), optionally programs the FPGA and loads the next stage software. Instead of FSBL you can use U-Boot SPL but you need to ensure that is has a correct chip configuration for the board you're using. What you can do, is to export ps7_init_gpl.{c|h} from Vivado and use them with U-Boot SPL. Note that mainline U-Boot has configurations for the most popular Zynq devboards. Also you can integrate the init code with your app (as in blinky emio case). You need to remember about a few things:
|
I have a pynq z2 board with a zynq 7020 if you want some testing. I'm a bit of a noob though lol. |
Hello, I know this is an old thread. I recently got a pynq z1 board. Would love to learn about Symbiflow/yosys workflow (eventually being able to contribute). Wonder if it is a right board for a starter. Thanks! |
Pynq Z1 has an XC7Z020 FPGA chip so I see no reason why in principle it would not work. It definitelty would be an interesting experiment to get Pynq working. |
Hi, im new to the whole FPGA world and i just got myself an Pynq Z2, I wonder what i would need to do to get the bare minimum up and started. LED blink etc. |
I ended up using a Zedboard board. I am familiar with Python, but the whole PYNQ concept really confused me at the beginning. I had hard time to understand what happens at which abstraction layer. If you are new to both FPGA world and the Pynq board. I would say staying with the official toolchain and samples for now. Good thing about Symbiflow and Yosys is one wouldn't need a board to start learning about the toolchain. |
The official toolchain is fine, but if i where to get started with using the f4pga toolchain what whould be a good place to start? I want to write my own example like blinking LED etc for the pynq z2. I think there should be support already for the chip aswell. How would i go about to start using the toolchain? What docs would be good to read to get started? I looked around a little bit but im a little confused. |
There was support for the Zybo Z7 in F4PGA examples but they seem to have disappeared? The using the board section still exists -> https://f4pga-examples.readthedocs.io/en/latest/running-examples.html#zybo-z7-board |
Thank you, im looking around inside arch-defs and i can find support for the xc7z020 chip, how do i add a board for arch-defs and a test case for it? or how can i find appropiate F4PGA_PACKAGES packages for my board in the f4pga-examples so i can tweak the example package and scripts to run for my zynq board. |
In 'Building example designs' > 'Xilinx 7-Series' there is a list of examples: https://f4pga-examples.readthedocs.io/en/latest/building-examples.html#xilinx-7-series. @Asoftyn, in order to adapt the example, I guess you'd need to:
As you saw, although 7z020 is found in arch-defs, (see https://github.com/f4pga/f4pga-arch-defs/tree/main/xilinx/xc7/archs/zynq7_z020), it seems that a different packages is available only: https://github.com/f4pga/f4pga-arch-defs/blob/main/xilinx/xc7/archs/zynq7_z020/devices/CMakeLists.txt. Actually, f4pga/f4pga-arch-defs#1260 included Hence, I recommend to open an issue in arch-defs in order to add the missing package to the definition artifacts/assets (which are then to be used in this repo). Related: f4pga/f4pga-arch-defs#2737. When the arch-defs artifacts/assets are updated, either test the "Latest" workflow in this repo or edit the F4PGA_TIMESTAMP and F4PGA_HASH in https://f4pga-examples.readthedocs.io/en/latest/getting.html#setup-and-download-assets. |
Thank you for taking the time to help me, I will try and do this and then update with my progress, when I succeed I'll share what I've done so others can use it as well. |
@Asoftyn The support for Zynq 7020 has been added to arch-defs in f4pga/f4pga-arch-defs#1506 from @andrewb1999. Hence, to use it in f4pga-examples you could add a target for pynq to the https://github.com/chipsalliance/f4pga-examples/blob/main/common/common.mk#L7-L40 file as suggested by @umarcor |
I got the First during the Getting F4PGA steps i changed a few small things, in the mkdir -p $F4PGA_INSTALL_DIR/$FPGA_FAM
for PKG in $F4PGA_PACKAGES; do
wget -qO- $(wget -qO- https://github.com/SymbiFlow/f4pga-arch-defs/releases/download/latest/symbiflow-${PKG}-latest) \
| tar -xJC ${F4PGA_INSTALL_DIR}/${FPGA_FAM}
done Now inside the F4PGA_EXAMPLES counter_test i added the following:
In else ifeq ($(TARGET),pynq_z2)
XDC := ${current_dir}/pynq_z2.xdc
endif Added the file
Now entering the conda enviroment according to the F4PGA_EXAMPLES i was able to build it using And my board is blinking nice and beautifully. Thank you all for the guidance and help. |
@Asoftyn that's great. Since you have already done and tested the modifications feel free to open a PR. |
Im not really sure how to make a PR on github and i dont wanna screw things up |
You can look at other PRs. Basically just create your own fork, create a branch with your changes and open a PR from this branch. |
It appears we don't have any examples / demos which run on Zynq parts at the moment?
I don't know which board should be targeted?
The text was updated successfully, but these errors were encountered: