MAX+PLUS II ACCESS Key Guidelines
List by VendorList by ToolList by Functionblank

Initializing Registers in VHDL & Verilog Output Files for Power-Up before Simulation

Altera provides the add_dc script, which is availiable in the MAX+PLUS II system directory, to allow you to process MAX+PLUS II-generated Verilog Output Files (.vo) and VHDL Output Files (.vho) to prepare these files for simulation with another EDA tool. The add_dc script runs the add_dclr utility, which inserts a device_clear signal that is used for power-up initialization of all registers or flipflops in the design.

The script adds in a top-level signal named device_clear and connects it to the CLRN pin in all flipflops that should initialize to 0, and to the PRN pin of all flipflops that should initialize to 1. If the CLRN or PRN pin of a flipflop is already being used (i.e., is already connected to a signal), the script modifies the Verilog Output File or VHDL Output File so that the AND of the original signal and the device_clear pin feed the CLRN or PRN pin.

To use the add_dc script to process Verilog Output Files and VHDL Output Files before simulation with another EDA tool, follow these steps:

  1. Make sure that your design file is located in the current directory, or change to the directory in which the design file is located.

  2. Type the following command at the command prompt:

    \<path name of add_dc.bat file>\add_dc <design name> <path name of add_dclr.exe file> Enter

For example, if the both the add_dc.bat and the add_dclr.exe files are located in the d:\maxplus2\exew directory, and the d:\maxplus2\exew directory is specified in the search path, you can type the following command at a command prompt to add a device_clear signal to a design named myfifo in the file myfifo.vo:

add_dc myfifo d:\maxplus2\exew Enter

Note:
  1. The add_dc script gives a message if the directory contains both a VHDL Output File and a Verilog Output File with the same name (<design name>.vo and <design>.vho). You should delete or rename whichever of those files should not have the device_clear signal added. The add_dc script can modify only one design file at a time.

  2. When the add_dc script processes the Verilog Output File or VHDL Output File, it creates a backup copy of the original file, with the extension .ori.

  3. The add_dc script works only for Verilog Output Files and VHDL Output Files that are generated by MAX+PLUS II.

After you have used the add_dc script and are ready to simulate the resulting Verilog Output File or VHDL Output File with another EDA tool, you should assert the active low device_clear pin for a period of time that is long enough for the design to initialize. You can then de-assert the pin, and apply simulation vectors to the design.

Last Updated: March 24, 2000 for MAX+PLUS II version 9.6
border line
| Home | List by Vendor | List by Tool | List by Function |
Documentation Conventions

Copyright © 1995-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.