In this step, you use the
xelab
command with the project file completed
in Step 1 to elaborate, compile, and link all the design sources to create the
simulation snapshot. To run the xelab
command, open and configure a
command window.- On Windows, open a Command Prompt window. On Linux, simply skip to the next step.
- Change directory to the Xilinx
installation area, and run settings64.bat as needed to setup the Xilinx tool paths for your computer:
cd install_path\Vivado\2022.x\
settings64.bat
Note: The settings64.bat file configures the path on your computer to run the Vivado ML Editions.Tip: When running thexelab
,xsc
,xsim
,xvhdl
, orxvlog
commands in batch files or scripts, it may also be necessary to define the XILINX_VIVADO environment variable to point to the installation hierarchy of the Vivado ML Editions. To set the XILINX_VIVADO variable, you can add one of the following to your script or batch file:On Windows -
set XILINX_VIVADO=<Vivado_install_area>/Vivado/2022.x
On Linux -
setenv XILINX_VIVADO <Vivado_install_area>/Vivado/2022.x
or
export XILINX_VIVADO=<Vivado_install_area>/Vivado/2022.x
- Change directory to the <Extract_Dir>/scripts folder.
The provided
xelab
batch file, xelab_batch.bat, is incomplete and you must modify it using thexelab
syntax as previously described to produce the correct simulation snapshot. - Edit the xelab_batch.bat file to add
the following options:
- Specify the project file: -prj simulate_xsim.prj
- Specify the output simulation snapshot: -s run_sineGen
- Specify the library and top-level design unit: xil_defaultlib.testbench
For a complete list of available xelab command options, see the Vivado Design Suite User Guide: Logic Simulation (UG900).
- Save and close the batch file.
- In the command window, run the xelab_batch.bat file to
compile and create the simulation
snapshot.
xelab_batch.bat
- Examine the
xelab
output as it is transcribed to the Command Prompt window.Note: Thexelab
command also writes xelab.log file in the directory from which it was run. The log file contains all of the messages and results of thexelab
command for you to review.Tip: You can also use thexelab
command after thexvlog
andxvhdl
commands have parsed the HDL design sources to read the specified simulation libraries. Thexelab
command would be the same as described here, except that it would not require the-prj
option since there would be no simulation project file.