@:~$ xilinx Xilinx tools available tools at /opt/Xilinx :- 1) 2021.2 - Vivado - SDK - Vitis - PetaLinux 0) Exit Please select tools required or exit : 1 Tools are as follows :- vivado @ /opt/Xilinx/Vivado/2021.2/bin/vivado vitis @ /opt/Xilinx/Vitis/2021.2/bin/vitis petalinux-build @ /opt/Xilinx/PetaLinux/2021.2/tool/tools/common/petalinux/bin/petalinux-build
@:~$ cd /zedboard_leds_switches
@:/zedboard_leds_switches$ vivado -nojournal -nolog -notrace fw/vivado/project.xpr &
In the Add Sources dialog select Add or create design sources and then click Next.
In the Add Sources - Add or Create Design Sources dialog click on Create File.
In the Create Source File dialog set File type to Verilog, File name to axi_identification and File location to /zedboard_leds_switches/fw/src/design. Click OK to continue.
In the Add Sources - Add or Create Design Sources dialog click Finish.
In the Define Module dialog click OK to continue.
Edit the newly added axi_identication by double clicking on it within Sources.
Using the AXI4 peripheral generated in the previous tutorial as a starting point a new AXI4 peripheral can be created containing registers that hold textural information. No write access to the registers is required but the write logic is left in to make the AXI interface complete (most of it will be optimised away). Modify axi_identication.v and replace its stub code with something similar to the following.
Direct download available here :-
@:/zedboard_leds_switches$ wget https://spacewire.co.uk/tutorial/shared/repos/0016/zedboard_leds_switches/fw/src/design/axi_identification.v -O fw/src/design/axi_identification.v
icon.
Connect the Register Bank to the rest of the system by clicking on Run Connection Automation.
Make the ID signals external to the Block Design by highlighting them and selecting Make External from the right mouse context menu. Note the reason signals are being used and not parameters is because passing parameters into a Block Design is currently not supported.
Rename the external signals to remove the _0 from their names.
Verify the block design is error free by clicking on the Validate Design
icon. All being well the Validation successful dialog should now appear.
Save the Block Design.
Copy the generated wrapper into the user area outside of Vivado and rename it such that it becomes a System Verilog source.
@:/zedboard_leds_switches$ cp fw/vivado/project.srcs/sources_1/imports/hdl/system_wrapper.v fw/src/diagram/system/hdl/system_wrapper.sv
Add system_wrapper.sv back into the project from its new location /home//projets/zedboard_leds_switches/fw/src/diagram/system/hdl.
@:/zedboard_leds_switches$ wget https://spacewire.co.uk/tutorial/shared/repos/0016/zedboard_leds_switches/fw/src/diagram/system/hdl/system_wrapper.sv -O fw/src/diagram/system/hdl/system_wrapper.sv
@:/zedboard_leds_switches$ subl fw/project.txt
@:/zedboard_leds_switches$ wget https://spacewire.co.uk/tutorial/shared/repos/0016/zedboard_leds_switches/fw/project.txt -O fw/project.txt
@:/zedboard_leds_switches$ subl fw/src/script/pre_synth.tcl
@:/zedboard_leds_switches$ wget https://spacewire.co.uk/tutorial/shared/repos/0016/zedboard_leds_switches/fw/src/script/pre_synth.tcl -O fw/src/script/pre_synth.tcl
@:/zedboard_leds_switches$ subl fw/src/script/post_bit.tcl
@:/zedboard_leds_switches$ wget https://spacewire.co.uk/tutorial/shared/repos/0016/zedboard_leds_switches/fw/src/script/post_bit.tcl -O fw/src/script/post_bit.tcl
In the Select A Tcl Script dialog select New script and set this to /home//projets/zedboard_leds_switches/fw/src/script/pre_synth.tcl. Click OK to continue.
In the Settings dialog select Bitstream under Project Settings and click the ... button across from tcl.post to select the post-bitstream file.
In the Select A Tcl Script dialog select New script and set this to /home//projets/zedboard_leds_switches/fw/src/script/post_bit.tcl. Click OK to continue.
@:/zedboard_leds_switches$ subl fw/src/testbench/testbench.sv
@:/zedboard_leds_switches$ wget https://spacewire.co.uk/tutorial/shared/repos/0016/zedboard_leds_switches/fw/src/testbench/testbench.sv -O fw/src/testbench/testbench.sv
@:/zedboard_leds_switches$ git difftool fw/src/testbench/testbench.sv

In the Export Hardware Platform dialog click Next.
In the Output dialog check Include bitstream and click Next.
In the Files dialog set the Export to field to /zedboard_leds_switches/fw (by removing the last /vivado part of the path). Click Next.
If the Module Already Exported dialog appears click Yes.
In the Exporting Hardware Platform dialog click Fniish.
@:/zedboard_leds_switches$ git add fw/src/design/axi_identification.v @:/zedboard_leds_switches$ git add fw/src/diagram/system/hdl/system_wrapper.sv @:/zedboard_leds_switches$ git add fw/project.txt @:/zedboard_leds_switches$ git add fw/src/script/pre_synth.tcl @:/zedboard_leds_switches$ git add fw/src/script/post_bit.tcl @:/zedboard_leds_switches$ git commit -a -m "Added AXI Identification to the design." @:/zedboard_leds_switches$ git push @:/zedboard_leds_switches$ git tag -a v3.0 -m "ZYNQ, GPIO, Register Bank & Identification" @:/zedboard_leds_switches$ git push origin v3.0
@:/zedboard_leds_switches$ cd ../zedboard_linux
@:/zedboard_linux$ subl os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/files/peekstring.c
@:/zedboard_linux$ wget https://spacewire.co.uk/tutorial/shared/repos/0017/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/files/peekstring.c -O os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/files/peekstring.c
@:/zedboard_linux$ subl os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/files/Makefile
@:/zedboard_linux$ wget https://spacewire.co.uk/tutorial/shared/repos/0017/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/files/Makefile -O os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/files/Makefile
@:/zedboard_linux$ git difftool os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/files/Makefile
@:/zedboard_linux$ subl os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/peekpokecgi.bb
@:/zedboard_linux$ wget https://spacewire.co.uk/tutorial/shared/repos/0017/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/peekpokecgi.bb -O os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/peekpokecgi.bb
@:/zedboard_linux$ git difftool os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/peekpokecgi.bb
@:/zedboard_linux$ subl os/petalinux/project-spec/meta-user/recipes-apps/website/files/cgi-bin/index.cgi
@:/zedboard_linux$ wget https://spacewire.co.uk/tutorial/shared/repos/0017/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/cgi-bin/index.cgi -O os/petalinux/project-spec/meta-user/recipes-apps/website/files/cgi-bin/index.cgi
@:/zedboard_linux$ git difftool os/petalinux/project-spec/meta-user/recipes-apps/website/files/cgi-bin/index.cgi
@:/zedboard_linux$ subl os/petalinux/project-spec/meta-user/recipes-apps/website/files/uptime.js
@:/zedboard_linux$ wget https://spacewire.co.uk/tutorial/shared/repos/0017/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/uptime.js -O os/petalinux/project-spec/meta-user/recipes-apps/website/files/uptime.js
@:/zedboard_linux$ git difftool os/petalinux/project-spec/meta-user/recipes-apps/website/files/uptime.js
@:/zedboard_linux$ cd os/petalinux
@:/zedboard_linux/os/petalinux$ petalinux-config --get-hw-description ../../../zedboard_leds_switches/fw/system_wrapper.xsa
Select Ok to confirm the save.
Select Exit to continue.
Select Exit to exit the menu.
@:/zedboard_linux/os/petalinux$ petalinux-build @:/zedboard_linux/os/petalinux$ petalinux-package --prebuilt --force
@:/zedboard_linux/os/petalinux$ cd ../.. @:/zedboard_linux$ git add os/petalinux/project-spec/meta-user/recipes-apps/peekpokecgi/files/peekstring.c @:/zedboard_linux$ git commit -a -m "Enhanced webpage for website application to have access to product ID strings within PL address space." @:/zedboard_linux$ git push @:/zedboard_linux$ git tag -a v9.0 -m "PetaLinux, Peek/Poke, LED Runner, Webserver, Peek/Poke CGI, PL Access, Style Sheet, Register Bank & ID Strings with XSA from zedboard_leds_switches v3.0" @:/zedboard_linux$ git push origin v9.0 @:/zedboard_linux$ cd os/petalinux
Set the boot mode jumpers on the Zedboard for JTAG.
Power on the Zedboard.
@:~$ minized
Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyACM0, 06:34:25
Press CTRL-A Z for help on special keys
@:/zedboard_linux/os/petalinux$ petalinux-boot --jtag --prebuilt 3
@:~$ cd @:$ git clone -b v3.0 https://bitbucket.org/spacewire_firmware/zedboard_leds_switches @:$ cd zedboard_leds_switches @:/zedboard_leds_switches$ create_vivado_project.sh
@:~$ cd @:$ git clone -b v9.0 https://bitbucket.org/spacewire_firmware/zedboard_linux @:$ cd zedboard_linux/os/petalinux