## Performing a Timing Simulation with QuickHDL Software

After you have entered a VHDL or Verilog HDL design file and compiled it with the MAX+PLUS® II Compiler, you can use Mentor Graphics QuickHDL software to simulate the MAX+PLUS IIgenerated VHDL Output File (.vhd) or Verilog Output File (.vo) and the Standard Delay Format (SDF) Output File (.sdo).

To simulate your VHDL or Verilog HDL design, go through the following steps:

1. Be sure to set up the working environment correctly, as described in Setting Up the MAX+PLUS II/Mentor Graphics/Exemplar Logic Working Environment.

2. Generate a VHDL or Verilog HDL output file and an SDF output file for your project, as described in Compiling Projects with MAX+PLUS II Software.

3. Change to your project's directory.

4. Copy your quickhdl.ini file to the same directory as your VHDL or Verilog HDL file.

5. Type the following sets of commands at the UNIX prompt to create the work library and compile your project's VHDL or Verilog HDL output file:

VHDL: | Verilog HDL:
`setenv MGC_WD 'pwd'` `qhlib work` `qvhcom` <project name>`.vho` | `setenv MGC_WD 'pwd'` `qhlib work` `qvlcom` <project name>`.vo`

6. Type `qhsim -sdftyp` <project name>`.sdo` at the UNIX prompt to perform timing back-annotation and simulation and to display the QuickHDL simulation window.

If your Verilog HDL design uses memory functions (RAM or ROM) that can be initialized with a hexadecimal file (Intel-format) initialization, you must convert these files into Verilog HDL format using the Programming Language Interface (PLI). To use the Altera-provided source code for PLI, perform the following steps:

1. Download the file http://www.edif.org/lpmweb/convert_hex2ver.c to your project directory.

2. Copy the following two files from the $MGC_HOME/shared/pkgs/quickhdl/include directory into the /usr/maxplus2 directory:

   - $MGC_HOME/shared/pkgs/quickhdl/include/veriuser
   - $MGC_HOME/shared/pkgs/quickhdl/include/acc_user

Refer to the Mentor Graphics QuickHDL User's Reference Manual, version 8.5-4.6i, for information on compiling the PLI application on different platforms and using the Verilog HDL PLI.

| Go to Performing a Functional Simulation with QuickHDL Software in these MAX+PLUS II ACCESSSM Key topics for related information.

Last Updated: August 28, 2000 for MAX+PLUS II version 10.0 |
| Home | List by Vendor | List by Tool | List by Function | Mentor Graphics/Exemplar Logic Topics | QuickHDL Topics | Documentation Conventions Copyright © 2000 Altera Corporation, 101 Innovation Drive, San Jose, California 95134, USA. All rights reserved. By accessing any information on this CD-ROM, you agree to be bound by the terms of Altera's Legal Notice.