This design example demonstrates post-fit, gate-level timing simulation of an alt_pll megafunction configured using the MegaWizard® Plug-In Manager in Quartus® II software and implemented in an Altera® device. In this example you will:
- Load an existing project in the Quartus II software (the megafunction is already created for you)
- Set up the project to generate the required netlist files for gate-level simulation in ModelSim®-Altera or ModelSim software
- Compile your design in the Quartus II software to generate a gate-level netlist
- Run the simulation with the scripts provided and understand the results
The design is created in Verilog HDL and consists of a top-level module (top) and a phase-locked loop (PLL) megafunction in Verilog named pll_example.v. For details on the alt_pll megafunction, refer to the ALTPLL Megafunction User Guide (PDF). Before running the example, make sure you have ModelSim or ModelSim-Altera software installed on your computer.
Download the pll_example.qar design example.
The use of this design is governed by, and subject to, the terms and conditions of the Altera Hardware Reference Design License Agreement.
Using the Design Example
- Invoke the Quartus II software.
- In the Archive file name box, type the file name of the pll_example.qar file or click Browse to select the above .qar file.
- In the Destination folder box, specify the directory path in which you will restore the contents of the file, or browse to a directory that you wish to save.
- Alternatively, you can double click on the .qar file and the Quartus II software will open and automatically perform the archive file process.
- On the Quartus II software toolbar, click compile. After compilation, the Quartus II software generates a post-fit netlist named top.vo (for use with the ModelSim software) in <project_dir>/simulation/modelsim. The SDF file (top_v.sdo), which is used for annotating delays in the gate-level timing simulation file, is also generated at the same location.
- Run the simulation by doing one of the following:
- To run the simulation using the Quartus II NativeLink feature, on the Tools menu, under EDA Simulation Tool, click Run EDA Gate Level Simulation.
- To run the simulation without the NativeLink feature, invoke the ModelSim-Altera or ModelSim software. Change the directory name to <project_dir>/simulation/modelsim.
To run the <project_dir>/simulation/modelsim/pll_ver.do script, type do pll_ver.tcl in the simulator console window. You must use the+transport_int_delaysand+transport_path_delaysoptions in the pll_ver.tcl script to successfully perform the post-fit timing simulation.
Note: The NativeLink feature in the Quartus II software allows you to launch the ModelSim simulator from within the Quartus II software and start the simulation with just a few clicks of your mouse. To use the Quartus II NativeLink feature, you must also provide the absolute path for the ModelSim software (for example, C:\Modeltech_ae_61d\win32aloem). In the Quartus II software, on the Tools menu, click Options, then General, then EDA Tools Options. For more information on the NativeLink feature in the Quartus II software, refer to the Mentor Graphics ModelSim and QuestaSim Support (PDF) chapter in volume 3 of the Quartus II Development Software Handbook (PDF).
Related Links
Design Examples Disclaimer
These design examples may only be used within Altera Corporation devices and remain the property of Altera. They are being provided on an “as-is” basis and as an accommodation; therefore, all warranties, representations, or guarantees of any kind (whether express, implied, or statutory) including, without limitation, warranties of merchantability, non-infringement, or fitness for a particular purpose, are specifically disclaimed. Altera expressly does not recommend, suggest, or require that these examples be used in combination with any other product not provided by Altera.
