-
Notifications
You must be signed in to change notification settings - Fork 33
2. Blinky Example
Every FPGA project traditionally begins with a "Blinky" example. This simple exercise is essential for verifying both the functionality of the FPGA board and the efficacy of the development tools. There are two main approaches to running the Blinky example, each with its own advantages and drawbacks.
For quick tests and repeated runs, scripts are highly efficient. You can find the necessary scripts in the 3.build folder of the Blinky example directory. These scripts are designed to run the Blinky example directly from your command line, bypassing the need to open the Vivado GUI. This method is particularly useful for straightforward projects where modifications to the script to adapt to your operating system are minimal. In the next parts the use of the scripts for the Blinky example will be explained.
Within the directory 99.warmup, you'll find three subfolders organized as follows:
-
1.hw: This folder contains the RTL files and constraints. -
2.sim: Here, you'll find the testbench and simulation files. -
3.build: This folder houses the build files and scripts, along with the generated reports and the bitstream file.
Before running the scripts you need to source the Vivado installation so it can be seen from the terminal session. You can do that with the following command:
source /VIVADO_BASE_PATH/Xilinx/Vivado/2024.2/settings64.sh
Note Change the VIVADO_BASE_PATH variable to your Vivado installation path.
To build the Blinky example simply run the build.tcl script located in 3.build with the following command:
vivado -mode batch -source "$SCRIPT_DIR/build.tcl"
To run the Blinky example on the Alinx 7201 board connect the hardware first, connect the JTAG Downloader to the development board, and then power on the development board then run the program-board.tcl script with the command:
vivado -mode batch -source "$SCRIPT_DIR/program-board.tcl"
If you are tired of using these commands all the time there is a run.sh script that automates all of the above mentioned parts. The only thing you need to do is open the run.sh script in the 3.build folder and change the VIVADO_BASE_PATH="/home/user/FPGA/tools/" to your Vivado installation path.
TODO: Add scripts for Windows users
For those seeking a more hands-on approach with greater control over the project details, using the Vivado GUI is the recommended method. Although this approach is more time-consuming, it offers extensive customization options and allows for deeper exploration of the tool's capabilities. This method is ideal for those who wish to thoroughly understand every aspect of the project's setup and execution.
Detailed explanations for how to use the Blinky Example with Vivado directly can be seen on the Xilinx AX7201 Tutorials here
