Altera Home Page
Literature Licensing
Buy On-Line Download

  Home   |   Products   |   Support   |   End Markets   |   Technology Center   |   Education & Events   |   Corporate   |   Buy On-Line  
  Knowledge Database   |   Devices   |   Design Software   |   Intellectual Property   |   Reference Designs   |   Design Examples   |   mySupport  

 Products
   Quartus II
      SOPC Builder
      MAX+PLUS II
      ModelSim-Altera
  
 Resource Centers
      Overview
      Installation & Licensing
      Scripting
      Board Design & I/O
      Synthesis & Netlist Viewers
      Incremental Compilation
      Optimization
      Power Management
   TimeQuest Timing Analyzer
      Classic Timing Analyzer
      Simulation & Verification
      On-Chip Debugging
      HardCopy Design
  
 Software Resources
      OS Support
      Driver Installation
  
 Download & Licensing
      Download
   Licensing
  
 Quartus II EDA Support
      Quartus II Interface
   Synthesis Tools
   Simulation Tools
          Aldec Active-HDL
          ModelSim
          NCSim
          VCS MX
          VCS
   Formal Verification Tools
   Timing Analysis Tools
   Physical Synthesis Tools
   Board Level Tools
  
 Legacy Sw. EDA Support
      View by Vendor
      View by Tool
      View by Function
  

Compiling Libraries and Design Files with the ModelSim Software

btnshowall.gif

To compile the atom simulation model libraries, Verilog Output File (.vo) or VHDL Output File (.vho), and test bench files in the Mentor Graphics ModelSim PE or SE software:

 

click to expandTo compile libraries and design files with the ModelSim interface:

  1. If you have not already done so, set up a project with the ModelSim software.

  2. On the Compile menu click Compile.

  3. In the Library list of the Compile HDL Source Files dialog box, select the work library.

  4. In the Files of Type list, select All Files (*.*), and in the Look in list, select the appropriate simulation model library.

Note: For VHDL-93 compliant designs, turn on Use 1993 Language Syntax under Default Options.

  1. Click Compile.

  2. Repeat steps 2 to 4 for the Verilog or VHDL Output File and the test bench file (if you are using one) that instantiates the Verilog or VHDL Output File.

Important: If your design contains the altgxb megafunction or the alt2gxb megafunction, please refer to the appropriate megafunction topic for required settings information.

  1. Click Done.

click to expandTo compile libraries and design files for a ModelSim project with command-line commands:

  1. If you have not already done so, perform set up a ModelSim project with command-line commands.

Important: If your design contains the altgxb megafunction or the alt2gxb megafunction, please refer to the appropriate megafunction topic for required settings information.

  1. Enter the following commands to direct the ModelSim software to compile the appropriate libraries and design files for VHDL designs.

If your design contains the altgxb or alt2gxb megafunction, type the following commands at the ModelSim prompt:

vlib lpm
vlib altera

vlib sgate

vmap lpm work

vmap altera work

vmap sgate work

vlib lpm
<path to library>\220pack.vhd 
vmap lpm lpm
<path to library>\220model.vhd 
vcom -work sgate <path to library>
\sgate_pack.vhd 
vcom -work sgate<path to library>\sgate.vhd 
vcom -work stratixiigx_gxb
<path to library>\stratixiigx_hssi_atoms.vhd.vhd 
vcom -work stratixiigx_gxb
<path to library>\stratixiigx_hssi_components.vhd 

or, for a design targetting a Stratix IV device:

vcom -work stratixivgx_gxb<path to library>\stratixivgx_hssi_atoms.vhd.vhd 
vcom -work stratixivgx_gxb
<path to library>\stratixivgx_hssi_components.vhd 

To compile the device-specific simulation models, VHDL Output File, and test bench file (if you are using one), type the following commands at the ModelSim prompt:

vcom -work work<path to library>\altera_primitves.vhd (If your design targets a Stratix III or Cyclone III device.)
vcom -work work<path to library>\altera_primitves_components.vhd (If your design targets a Stratix III or Cyclone III device.)

vcom -work work<path to library>\<device family>_components.vhd 
vcom -work work<path to library>\<device family>_atoms.vhd 
vcom -work work<design name>.vho 
vcom -work work<test bench>.vhd 

 

Note: For VHDL 93-compliant designs for APEX 20KE devices, type the following command to compile the simulation model:

vcom -93 -work work<path to library>\apex20ke_atoms.vhd 

 

  1. Enter the following commands to direct the ModelSim software to compile the appropriate libraries and design files for Verilog designs.

If your design contains the altgxb megafunction, type the following commands at the ModelSim prompt:

vlog -work work<path to library>\220model.v 
vlog -work work
<path to library>\sgate.v 

To compile the device-specific simulation models, Verilog Output File, and test bench file (if you are using one), type the following commands at the ModelSim prompt:

vlog -work work<path to library>/altera_primitives.v (If your design targets a Stratix III, Stratix IV, or Cyclone III device.)
vlog -work work
<path to library>/<device family>_atoms.v 
vlog -work work<design name>
.vo 
vlog -work work<test bench>.v 

 

To continue with the ModelSim simulation flow, perform a timing simulation with the ModelSim software.

 

 

  Please Give Us Feedback