5.24.30 Performing Functional Simulation

To perform functional simulation:

  1. Create your testbench.
    1. Right-click the top level module in the Hierarchy tab and choose Organize Stimulus File from the right-click menu.

In the Organize Stimulus dialog box, all the stimulus files in the current Libero IDE project appear in the Stimulus Files in the Project list box. Files already associated with the block appear in the Associated Files list box.

In most cases you will only have one testbench associated with your block. However, if you want simultaneous association of multiple testbench files for one simulation session, as in the case of PCI cores, add multiple files to the Associated Files dialog box.

To add a testbench: Select the testbench you want to associate with the block in the Stimulus Files in the Project list box and click

Add to add it to the Associated Files list.

To remove a testbench: To remove or change the file(s) in the Associated Files list box, select the file(s) and click Remove. To order testbenches: Use the up and down arrows to define the order you want the testbenches compiled.

  1. When you are satisfied with the Associated File(s) list, click OK.
  2. Start ModelSim ME by doing one of the following:
    • Right-click the top level module in the Design Hierarchy window and choose Run Pre-Synthesis Simulation or Run Post-Synthesis Simulation.
    • Click ModelSim Simulation in the Project Flow Window.

ModelSim starts and compiles the appropriate source files. When the compilation completes, the simulator runs for 1 ms and the Wave window opens to display the simulation results.

  1. Scroll in the Wave window to verify that the logic of your design functions as intended. Use the zoom buttons to zoom in and out as necessary.
  1. From the File menu, select Quit.