Files
zynq7000-rs/zedboard-fpga-design/README.md
Robin Mueller 5d0f2837d1
Some checks failed
ci / Check build (pull_request) Has been cancelled
ci / Check formatting (pull_request) Has been cancelled
ci / Check Documentation Build (pull_request) Has been cancelled
ci / Clippy (pull_request) Has been cancelled
ci / Check build (push) Has been cancelled
ci / Check formatting (push) Has been cancelled
ci / Check Documentation Build (push) Has been cancelled
ci / Clippy (push) Has been cancelled
Introduce Rust FSBL
This PR introduces some major features while also changing the project structure to be more flexible
for multiple platforms (e.g. host tooling). It also includes a lot of
bugfixes, renamings for consistency purposes and dependency updates.

Added features:

1. Pure Rust FSBL for the Zedboard. This first variant is simplistic. It
   is currently only capable of QSPI boot. It searches for a bitstream
   and ELF file inside the boot binary, flashes them and jumps to them.
2. QSPI flasher for the Zedboard.
3. DDR, QSPI, DEVC, private CPU timer and PLL configuration modules
3. Tooling to auto-generate board specific DDR and DDRIOB config
   parameters from the vendor provided ps7init.tcl file

Changed project structure:

1. All target specific project are inside a dedicated workspace inside
   the `zynq` folder now.
2. All tool intended to be run on a host are inside a `tools` workspace
3. All other common projects are at the project root

Major bugfixes:

1. SPI module: CPOL was not configured properly
2. Logger flush implementation was empty, implemented properly now.
2025-10-08 20:21:04 +02:00

2.6 KiB

Zedboard FPGA design for Rust

This is an example/reference design which was used to verify various components provided by this library. To minimize the amount of HW designs required, one project is provided. The design was kept as generic as possible. In principle, it should be possible to adapt the hardware design to other boards with modifications.

Pre-Requisites

Loading the project and the block design with the GUI

You can load the project using the batch mode of vivado inside the folder where you want to create the zedboard-rust project:

vivado -mode batch -source <path to zedboard-rust.tcl> -tclargs --overwrite

for example, to create the directory directly insdie this directory:

vivado -mode batch -source zedboard-rust.tcl -tclargs --overwrite

This should create a zedboard-rust Vivado project folder containing a zedboard-rust.xpr project file. You can load this project file with Vivado:

vivado zedboard-rust.xpr

You can perform all the steps specified in the Vivado GUI as well using Execute TCL script and Load Project.

Generating the SDT folder from a hardware description

You can generate a hardware description by building the block design by using Generate Bitstream inside the Vivado GUI and then exporting the hardware description via File -> Export -> Export Hardware. This allows to generate a *.xsa file which describes the hardware.

After that, you can generate the SDT output folder which contains various useful files like the ps7_init.tcl script. The provided sdtgen.tcl and stdgen.py script simplify this process.

For example, the following command generates the SDT output folder inside a folder named sdt_out for a hardware description files zedboard-rust/zedboard-rust.xsa, assuming that the Vitis tool suite is installed at /tools/Xilinx/Vitis/2024.1:

export AMD_TOOLS="/tools/Xilinx/Vitis/2024.1"
./sdtgen.py -x ./zedboard-rust/zedboard-rust.xsa

Run stdgen.py -h for more information and configuration options. The stdgen.py is a helper script which will invoke sdtgen.tcl to generate the SDT.