How to Run a Vivado FPGA Build
Goal: Run synthesis, implementation, and bitstream generation for an existing ruckus-based Vivado project.
Prerequisites
Before running a build, ensure you have:
Linux operating system
Licensed Vivado installation (version ≥ 2018.3 recommended)
A ruckus-based project with a
Makefile,ruckus.tcl, andimages/directoryPRJ_PARTset in the projectMakefile(FPGA part number, e.g.,xcku15p-ffva1760-2-e)Build directory at
$(TOP_DIR)/build/(see Step 1)
Steps
Step 1: Create the build directory (one-time setup)
The Vivado build pipeline writes all intermediate files to $(TOP_DIR)/build/.
Create this directory before running any build target. A symlink to a fast scratch
location works equally well:
mkdir $(TOP_DIR)/build
# or symlink a fast scratch location:
ln -s /scratch/build $(TOP_DIR)/build
Note
TOP_DIR defaults to $(abspath $(PROJ_DIR)/../..), which is two directories
above your project directory. This is the root of your firmware repository.
Step 2: Set the FPGA part number
If PRJ_PART is not already defined in your project Makefile, add it before the
include line:
ifndef PRJ_PART
export PRJ_PART = xcku15p-ffva1760-2-e
endif
include $(TOP_DIR)/submodules/ruckus/system_vivado.mk
Note
PROJECT is auto-detected from the directory name ($(notdir $(PWD))). You do
not need to set it unless you want a different project name.
Step 3: Run the full build
make bit
make bit, make mcs, and make pdi all invoke the same build rule. Use
whichever matches your desired output format. The generated artifacts are placed in
images/ with the naming pattern:
PROJECT-VERSION-TIME-USER-GITHASH.bit
PROJECT-VERSION-TIME-USER-GITHASH.mcs
PROJECT-VERSION-TIME-USER-GITHASH.pdi (Versal only)
Step 4: Open the project in the Vivado GUI (optional)
After a build completes, open the project to inspect timing, utilization, and log reports:
make gui
Available Targets
Target |
Action |
|---|---|
|
Full synthesis + implementation + |
|
Full synthesis + implementation + |
|
Full synthesis + implementation + |
|
Synthesis only (sets |
|
Synthesis to DCP checkpoint (sets |
|
Open existing project in Vivado GUI |
|
Source setup only (creates |
|
Open Vivado in TCL interactive mode |
|
Vivado XSIM simulation |
|
Generate VCS simulation scripts |
|
ModelSim/Questa simulation |
|
Vivado batch mode within existing project |
|
Tag and push firmware release to GitHub |
|
Generate release files without GitHub push |
|
Delete |
Key Variables
Variable |
Default |
Description |
|---|---|---|
|
(none) |
FPGA part number. Must be set by user. |
|
|
Project name; auto-detected from directory. |
|
|
Firmware repository root. |
|
|
Generate |
|
|
Generate |
|
|
Generate |
See the Makefile Reference for the complete variable reference including timing override and git bypass variables.
Troubleshooting
- “Build directory missing!” error
Create
$(TOP_DIR)/build/or symlink it to a scratch location:mkdir $(TOP_DIR)/build
- “PRJ_PART is not set” error
Add
export PRJ_PART = <your-part>to your projectMakefilebefore theincludeline (see Step 2).- Timing violations fail the build
See the timing override variables (
TIG,TIG_SETUP,TIG_HOLD) in the Makefile Reference.- Vivado not found
Ensure Vivado is on your PATH. Source the settings script if needed:
source /path/to/Vivado/2023.1/settings64.sh