A Vivado® simulator project script specifies design source files and libraries to parse and compile for simulation. This method is useful to create a simulation project script that can be run repeatedly over the course of project development.
The format for a Vivado simulator project script (prj file) is as follows:
verilog | vhdl| sv <library_name> {<file_name>.v|.vhd|.sv
where,
-
verilog | vhdl | sv
specifies whether the design source is a Verilog, VHDL, or SV file. -
<library_name>
specifies the library into which you may compile the source file. If unspecified, the default library for compilation is work. -
<file_name>.v|.vhd|.sv
specifies the name of the design source file to compile.
In this step, you build a Vivado simulator project script by editing an existing project script to add missing source files. The command lines for the project script should be constructed using the syntax described above.
- Browse to the <Extract_Dir>/scripts folder.
- Open the simulate_xsim.prj project script with a text editor.
- Add the following commands to the project
script:
vhdl xil_defaultlib "../sources/sinegen.vhd" vhdl xil_defaultlib "../sources/debounce.vhd" vhdl xil_defaultlib "../sources/fsm.vhd" vhdl xil_defaultlib "../sources/sinegen_demo.vhd" verilog xil_defaultlib "../sim/testbench.v"
- Save and close the file.
You do not need to list the sources based on any specific order of dependency. The
xelab
command resolves the order of dependencies, and automatically
processes the files accordingly.