You can add custom Tcl commands in a batch file to the project so that they are run with the simulation. These commands are run after simulation begins. An example of this process is described in the steps below.
- Create a Tcl script with the simulation commands you want to add to the
simulation source files. For example, if you have a simulation that runs for
1,000 ns, and you want it to run longer, create a file that includes:
Or, if you want to monitor signals that are not at the top level (because, by default, only top-level signals are added to the waveform), you can add them to the post.tcl script. For example:
- Name the file post.tcl and save it.
- Use the Add Sources option in Flow Navigator to invoke the Add Sources wizard, and select Add or Create Simulation Sources.
- Add the post.tcl file to your Vivado Design Suite project as a simulation source. The post.tcl file displays in the Simulation Sources
folder, as shown in the following figure.
the Simulation toolbar, click the Relaunch button .
Simulation runs again, with the additional time you specified in the post.tcl file added to the originally specified time. Notice that the Vivado simulator automatically sources the post.tcl file after invoking all its commands.