![]()
You can perform a timing simulation of a Verilog HDL or VHDL design with the Mentor Graphics ModelSim-Altera software, provided with the Quartus II software, from the ModelSim-Altera interface, or with command-line commands.
To perform a timing simulation of a ModelSim project with the ModelSim-Altera interface:
-
To compile the Verilog HDL or VHDL Output File and test bench files (if you are using a test bench) into the working directory:
-
-
On the Compile menu, click Compile.
-
In the Library list of the Compile HDL Source Files dialog box, select the work library.
-
In the Files of Type list, select All Files (*.*), and in the Look in list, select the name of the Verilog HDL or VHDL Output File.
-
Click Compile.
-
Repeat steps 1b to 1d for the test bench file (if you are using one) that instantiates the Verilog HDL or VHDL Output File.
-
Click Done.
-
-
If your design contains device-wide reset or device power up signals, and if you have not already done so, set up the signals in the Verilog Output File or set up the signals in the VHDL Output File.
-
On the Simulate menu, click Simulate. The Simulate dialog box appears.
-
If you are simulating a Verilog HDL design, click the Verilog tab. Under Pulse Options, type
0in the Error Limit and Rejection Limit boxes. -
If you are simulating a VHDL design, to specify the Standard Delay Format Output File (.sdo):
- Click the SDF tab.
-
Click Add.
-
In the Add SDF Entry dialog box, click Browse. The Select SDF File dialog box appears.
-
In the Files of type list, select All Files (*.*).
-
Select the Standard Delay Format Output File.
-
Click Open.
-
Click OK.
-

Note: If you are using a test bench file to provide simulation stimuli to your design, in the Apply to region box, specify the path to the design instance in the test bench, starting from the top-level design file.
-
If you are simulating a Verilog HDL design, to specify the ModelSim precompiled libraries:
-
-
Click the Libraries tab.
-
In the Search Libraries (-L) box, click Add.
-
Specify the
\<ModelSim-Altera install directory>\altera\verilog\<device family>\directory. -
Click OK.
-
-
Click the Design tab.
-
In the Name list, click the + icon to expand the work directory and select the design entity that corresponds to the Standard Delay Format Output File.
-
Click Add.
-
Select the top-level design file or test bench.
-
Click Add.
-
If you are simulating high-speed circuits (including designs that use HSSI, LVDS, or PLLs):
-
-
Click the Other tab.
-
In the Other options box type +transport_int_delays and +transport_path_delays.
-
Click OK.
-
-
Click Load.
-
To direct the ModelSim-Altera software to generate a Value Change Dump File (.vcd) that you can then use to perform power analysis in the Quartus II PowerPlay Power Analyzer, type the following command at the ModelSim prompt:
source <test bench or design instance name>_dump_all_vcd_nodes.tcl
-
The Tcl Script File directs the ModelSim-Altera software to monitor and write the output signals contained in the Tcl Script File to a Value Change Dump File during simulation.
-
Perform the timing simulation in the ModelSim-Altera software.
To perform a timing simulation of a ModelSim project with command-line commands:
|
|
Note: You can use batch files to set up and compile each of the libraries automatically. Place all the commands displayed in the ModelSim-Altera or ModelSim PE or SE main window into a text file and name the file with a .do extension (that is, <file name>.do). Use this script to recompile the libraries if you update them. To run a macro script:
|
-
If you have not already done so, map to libraries and compile design files with the ModelSim-Altera software.
-
If your design contains device-wide reset or device power up signals, and if you have not already done so, set up the signals in the Verilog Output File or set up the signals in the VHDL Output File.
-
Type the following commands at the ModelSim prompt to load the design with minimum, typical, or maximum timing values.
For VHDL designs:
vsim -t ps -sdf(min | typ | max) +transport_int_delays +transport_path_delays /=<design name>.sdo work.<top-level design entity>
For Verilog HDL designs:
vsim -t ps +transport_int_delays +transport_path_delays -L /<ModelSim-Altera install directory>/altera/verilog/lpm/<Modelsim-Altera install directory>/altera/verilog/<device family>/-sdf(min | typ | max)work.<top-level design entity>
-
To direct the ModelSim-Altera software to generate a Value Change Dump File (.vcd) that you can then use to perform power analysis in the Quartus II PowerPlay Power Analyzer, type the following command at the ModelSim prompt:
source<test bench or design instance name>_dump_all_vcd_nodes.tclThe Tcl Script File directs the ModelSim-Altera software to monitor and write the output signals contained in the Tcl Script File to a Value Change Dump File during simulation.
-
Perform the timing simulation in the ModelSim-Altera software.
-

Note: Refer to ModelSim software documentation to view and the interpret results of your simulation.
|
|
Important: Altera recommends that you set Time scale settings to picoseconds (ps) in the interface or with command-line commands when performing timing simulations of designs with RAM. |
If you want to perform power analysis, proceed to perform power analysis with the PowerPlay Power Analyzer.

