Questa* Intel® FPGA Edition Simulation User Guide

ID 730191
Date 4/01/2024
Public
Document Table of Contents

3.7.1. Simulating an RTL Design without IP Variants or Platform Designer Systems

The following describes simulation of an RTL design that does not include any IP variants (.ip files) or Platform Designer Systems (.qsys files).

Files Required for RTL Simulation

  • Your HDL design files and testbench files.
    Note: Questa* Intel® FPGA Edition does not require the Quartus® Prime simulation library files because these files are precompiled and included in Questa* Intel® FPGA Edition.

As with any simulation, the RTL simulation flow consists of running simulator specific commands in three stages: compilation, elaboration, and simulation. You can place the compilation commands in one Tcl script, and the elaboration and simulation commands in another Tcl script.

RTL Simulation—Compilation Stage

At the compilation stage, you compile your HDL design files and testbench files using vlog and vcom commands, as Commands to Compile, Elaborate, and Simulate describes.

Do NOT compile the library files using Questa* Intel® FPGA Edition. Instead, use the precompiled Quartus® Prime simulation libraries included in Questa* Intel® FPGA Edition, by specifying their logical names in the elaboration command. For more details, refer to Why You Should Only Use Precompiled Questa Intel FPGA Edition Libraries

RTL Simulation—Elaboration Stage

At the elaboration stage, you add one vsim command to elaborate the top-level testbench and generate an in-memory executable simulation model. Elaboration requires the top-level testbench module name, the logical library names for the precompiled Quartus® Prime simulation libraries, and any logical library names that you may have created when compiling your own design and testbench files.

To identify and use the logical library names for quartus simulation libraries:

  1. Generate a Questasim simulation script for the appropriate device family, by running the Simulation Library Compiler, as Running the Simulation Library Compiler describes. The generated script contains the commands to compile the Quartus® Prime simulation library files into appropriate logical libraries.
  2. Obtain the logical library names of the precompiled Quartus® Prime simulation libraries by inspecting the script generated in step 1, as Viewing Simulation Library Compiler Output describes.
  3. Specify the logical library names to the vsim command using the -L option, along with any other elaboration options, as Elaboration Options describes.

RTL Simulation—Simulation Stage

At the simulation stage, you specify the simulation commands, such as add wave or log, to capture the signal waveforms. You specify the run command to run simulation (that is, to run the executable simulation model for the top-level testbench generated by the elaboration command). Finally you specify the quit command to end the simulation. The following three lines show an example of this:

add wave -r /*
run -all
quit

Refer to examples of common simulation commands in Simulation Command Examples.