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 the directory to the AMD
installation area, and run settings64.bat as needed to set up the AMD tool paths for your computer:
cd install_path\2025.x\Vivado\settings64.batNote: The settings64.bat file configures the path on your computer to run the Vivado ML Editions.Tip: When running thexelab,xsc,xsim,xvhdl, orxvlogcommands in batch files or scripts, it might 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>/2025.x/VivadoOn Linux -
setenv XILINX_VIVADO <Vivado_install_area>/2025.x/Vivadoor
export XILINX_VIVADO=<Vivado_install_area>/2025.x/Vivado - Change the directory to the <Extract_Dir>/scripts folder.
The provided
xelabbatch file, xelab_batch.bat, is incomplete and you must modify it using thexelabsyntax 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
xelaboutput as it is transcribed to the Command Prompt window.Note: Thexelabcommand also writes the xelab.log file in the directory from which it is run. The log file contains all of the messages and results of thexelabcommand for you to review.Tip: You can also use thexelabcommand after thexvlogandxvhdlcommands have parsed the HDL design sources to read the specified simulation libraries. Thexelabcommand would be the same as described here, except that it would not require the-prjoption since there would be no simulation project file.