Vivado Gui Simulation Tutorial

The Vivado logic simulator can also be run in GUI mode to view the “waveforms” of your design. This form of simulation allows you to more easily see the behavior of your design over time and is often used when debugging logic errors. This tutorial will describe how you can use the GUI mode of the Vivado simulator to view the waveforms of the example design. This tutorial will demonstrate this process using the binary_adder.sv design from Lab 2.

Before proceeding with this tutorial, you need to ‘analyze’ and ‘elaborate’ your design as described in the command-line simulation tutorial.

Run Simulation Tool in GUI Mode

To run the simulation in GUI mode, add the -gui flag when running xsim as follows:

% xsim binary_adder -gui --nolog

This will open the simulation environment and provide a GUI interface for the simulation. The image below demonstrates what this will look like. This window has several important regions that are described below:

  • Tool Bar: At the top is a toolbar with a number of buttons to help with simulation. This will be discussed in more detail below.
  • Scope Window: The left side of the window is the scope window. This window shows the hierarchy of your design and allows you to select which signals you want to view.
  • Objects Window: The right side of the scope window is the objects window. This window shows the signals that are in the currently selected scope

When in GUI mode we are usually interested in viewing the waveforms of the signals in our design. For this example, we will view all the signals in the ‘binary_adder’ module. Select the ‘binary_adder’ in the scope window. Right click and select “Add to Wave Window” to add all the signals in the ‘binary_adder’ module to the waveform viewer. This will create a new waveform window with all the signals of the module shown. The image below shows what this will look like.

At this point you can run the same simulation commands you ran in the command line simulation tutorial. Commands such as run, set_value, restart, and get_value can be run in the Tcl console at the bottom of the window. Enter the command run 10 ns to advance the simulation time by 10 ns. The waveform viewer will update to show the new values of the signals at the new time. Note that the inputs ‘A’ and ‘B’ are a blue color with the value ‘Z’. This means that the input signals are undefined. The other signals are red with a value ‘X’. This means that the signals are unknown and generally indicates an undesirable simulation value.

Set a value for both ‘A’ and ‘B’ (using set_value) and advance the simulation by 10 ns (using run) to see the waveform update. After running the simulation you will see the colors of the waveforms changed. The waveforms for the switches will now be green with the value you set them to and the waveforms for the other signals (including the LEDs) will be green. Click the ‘zoom out button’ in the toolbar to see the entire waveform. You should see something like the following image:

In addition to manually setting values and running the simulator, you can also create Tcl scripts to automate the simulation process. You can also ‘source’ your Tcl script to perform multiple set/run commands.

When you are done simulating, exit the GUI and click on ‘Discard’ when the dialog box prompts you to save the waveform.