intel UG-20093 ModelSim FPGA Edition Simulation User Guide
- June 9, 2024
- Intel
Table of Contents
intel UG-20093 ModelSim FPGA Edition Simulation
ModelSim* – Intel® FPGA Edition Simulation Quick-Start Intel® Quartus®
Prime Pro Edition
This document demonstrates how to simulate an Intel® Quartus® Prime Pro
Edition design in the ModelSim* – Intel FPGA Edition simulator. Design
simulation verifies your design before device programming. The Intel Quartus
Prime software generates simulation files for supported EDA simulators during
design compilation.
Figure 1. ModelSim – Intel FPGA Edition
Design simulation involves generating simulation files, compiling simulation models, running the simulation, and viewing the results. The following steps describe this flow:
- Open the Example Design on page 4
- Specify EDA Tool Settings on page 4
- Generate a Simulator Setup Script Template on page 5
- Modify the Simulator Setup Script on page 6
- Compile and Simulate the Design on page 8
- View Signal Waveforms on page 9
- Add Signals to the Simulation on page 11
- Rerun Simulation on page 12
- Modify the Simulation Testbench on page 12
Open the Example Design
The PLL_RAM example design includes Intel FPGA IP cores to demonstrate the
basic simulation flow. Download the example design files and open the project
in the Intel Quartus Prime software.
Note: This Quick-Start requires a basic understanding of hardware
description language syntax and the Intel Quartus Prime design flow, as the
Intel Quartus Prime Pro Edition Foundation Online Training describes.
- Download and unzip the Quartus_Pro_PLL_RAM.zip design example.
- Launch the Intel Quartus Prime Pro Edition software version 19.4 or later.
- To open the example design project, click File ➤ Open Project, select the pll_ram.qpf project file, and then click OK.
Figure 2. pll_ram Project in the Intel Quartus Prime Pro Edition
Specify EDA Tool Settings
Specify EDA tool settings to generate simulation files for supported simulators.
- In the Intel Quartus Prime software, click Assignments ➤ Settings ➤ EDA Tool Settings.
- Under Simulation, select ModelSim-Intel FPGA as the Tool name. Retain the default settings for Format for output netlist and Output directory.
Generate a Simulator Setup Script Template
Simulator setup scripts help you to simulate the IP cores in your design. Follow these steps to generate the vendor-specific simulator setup script template for the IP modules in the example design. You can then customize this template for your specific simulation goals.
- To compile the design, click Processing ➤ Start Compilation. The Messages window indicates when compilation is complete.
- Click Tools ➤ Generate Simulator Setup Script for IP. Retain the default Output directory and Use relative paths whenever possible setting for the setup script file. The setup script template generates in the directory that you specify.
Figure 3. Generate Simulator Setup Scripts IP Dialog Box
Modify the Simulator Setup Script
Modify the generated simulator setup script to enable specific commands that simulate the IP cores in the project.
- In a text editor, open the /PLL_RAM/mentor/msim_setup.tcl file.
- Create a new text file with the name mentor_example.do and save it in the /PLL_RAM/mentor/ directory.
- In the msim_setup.tcl file, copy the section of code enclosed within the TOP-LEVEL TEMPLATE – BEGIN and TOP-LEVEL TEMPLATE – END comments, and then paste this code into the new mentor_example.do file.
- In the mentor_example.do file, delete the single pound (#) characters preceding the following highlighted lines to enable compilation commands:
Figure 4. Uncomment Highlighted Simulation Commands in the Script
- Replace the following lines in the mentor_example.do script:
Table 1. Specify Values in the mentor_example.do Script
Replace this Line | With this Line |
---|
set QSYS_SIMDIR