Using Automated Test Bench Generation on Example Design - 2024.2 English

Vivado Design Suite User Guide: Logic Simulation (UG900)

Document ID
UG900
Release Date
2024-11-13
Version
2024.2 English
For demo purpose, use the BFT example design shipped with Vivado IDE.
  1. Open the BFT example design in Vivado IDE.
  2. Call launch_simulation with Vivado as the selected simulator. You should see the ports shown in the following waveform.

  3. Select the desired scope for which you want to generate test bench as shown in the following figure:

  4. Right-click the selected scope and select Generate VCD Port.

  5. Delete all existing signals on the waveform and select Add to Wave Window for the selected scope.
    Note: Step 5 is used to demonstrate that the generated test bench is driving the design unit correctly.
  6. Use restart, run 2000 ns and close_vcd -ports commands on Tcl console to dump the signal activity. This logs the signal from time 0 to 2000 ns on the waveform as shown in the following figure:

  7. Use create_testbench -name demo_tb -add_to_simset demo_simset -set_as_top command on Tcl console to generate test bench. This creates your test bench with the module name demo_tb and creates a demo_simset with this test bench as top module.

  8. Use launch_simulation command to run the simulation with the newly generated test bench.
  9. Compare the input/output of the waveform with the waveform of your original design; the input/output is the same.

This is how you can create a test bench for your sub-design and use the generated test bench independently with any standard simulator.