![]()
You can run the Mentor Graphics ModelSim-Altera software, provided with the Quartus II software, from the ModelSim-Altera interface or with command-line commands.
To set up a ModelSim project with the ModelSim-Altera interface:
-
If you have not already done so, set up the ModelSim-Altera working environment.
-
If you are performing a timing simulation, to generate the Verilog Output File (.vo) or VHDL Output File (.vho):
-
Specify EDA tool settings in the Quartus II software.
-
Compile the design with the Quartus II software.
-
|
|
Note: If you have already compiled the design, and want to specify different EDA tools settings and generate a Verilog Output File (.vo), VHDL Output File (.vho), and Standard Delay Format Output File (.sdo) without recompiling the design, you can use the Start EDA Netlist Writer command. You can also use the Start EDA Netlist Writer command to generate the following types of files:
|
|
|
Note: If you want to perform power estimation, make sure you specify appropriate options in the Simulator Settings page of the Settings dialog box. |
-
Start the ModelSim software.
-
To specify the project directory:
-
On the File menu, click Change Directory.
-
In the Directory Name box, type the path to the project directory .
or
In the Look in list, select the project directory.
-
Click Open.

Note: If you are performing a functional simulation, the project directory is the directory that contains the design files. If you are performing a timing simulation, the project directory is the <project directory>\simulation\modelsim directory or the location you specified in the Output directory box of the Simulation page in the Settings dialog box.
-
-
To create a new work library:
-
On the File menu, point to New and click Library. The Create a New Library dialog box appears.
-
Under Create, click a new library and a logical mapping to it.
-
In the Library Name box, type the library name.
-
In the Library Maps to list, select the work library.
-
|
|
Note: When you run the ModelSim software independently from the Quartus II software, you should name your library work. When you run the ModelSim software automatically from the Quartus II software, your library is named ModelSim_work automatically and located in the Quartus II project directory. |
To set up a ModelSim project with command-line commands:
-
If you have not already done so, set up the ModelSim-Altera working environment.
-
If you are performing a timing simulation, to generate the Verilog Output File (.vo) or VHDL Output File (.vho):
-
-
Specify EDA tool settings in the Quartus II software.
-
Compile the design with the Quartus II software.
-
|
|
Note: If you have already compiled the design, and want to specify different EDA tools settings and generate a Verilog Output File (.vo), VHDL Output File (.vho), and Standard Delay Format Output File (.sdo) without recompiling the design, you can use the Start EDA Netlist Writer command. You can also use the Start EDA Netlist Writer command to generate the following types of files:
|
-
Start the ModelSim software.
-
Change to the directory where the ModelSim libraries are located after they are compiled.
-
To create a new work library, type the following command at the ModelSim prompt:
vlib work
ModelSim compiles the design files to library work by default.
-
To change the default library, type the following commands at the ModelSim prompt:
vlib <user defined library>
vmap work <user defined library>
|
|
Note: When you run the ModelSim software automatically from the Quartus II software, your work library is automatically mapped to rtl_work for RTL simulation and gate_work for gate level simulation. The libraries are created in the <project directory>\simulation\modelsim directory or the location you specified in the Output directory box of the Simulation page in the Settings dialog box. |
-
Before performing a functional or timing simulation you should mapping to libraries and compiling design files with the ModelSim-Altera software
To continue the ModelSim-Altera flow you can perform a functional simulation with the ModelSim-Altera software, then you can perform a timing simulation with the ModelSim-Altera software.
