Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16597 Discussions

How to simulate IP using Modelsim.


I am new to Quartus Prime Pro 20.1. The last time I used Quartus it was Quartus II 13.1. I generated a dual port ram core and I want to simulate it in Modelsim PE. I generated libraries for modelsim using the EDA simulation library compiler. The last time I did this I loaded a VHDL file generated by the megawizard into modelsim along with my VHDL file containing the dual port ram. When I do this now I get an error in modelsim telling me it cannot find the library ram_2port_2010. It appears the dual port ram VHDL file points to this library. What should I do to fix this? I am not a tcl script user.

0 Kudos
4 Replies

For Quartus Prime Pro Modelsim Simulation, you may checkout the User Guide in the link below:
A design example is attached in the user guide as a tutorial for beginner. Search

Here's are some brief steps: 

1. After you finished the compilation for your project, go to Tools > Generate Simulator Setup Script for IP.  A file will be generated at your <project directory>/../mentor/msim_setup.tcl

2. Create a new Modelsim project at your project directory.  

3. In the Modelsim transcript window, source the msim_setup.tcl file which was generated in Step 1. Then insert the next two commands to compile the library and ip simulation files.

Modelsim> source msim_setup.tcl
Modelsim> dev_com
Modelsim> com

4. Next, compile your design and testbench files in Modelsim. 

Modelsim> vlog -vlog01compat -work work design.v
Modelsim> vlog -vlog01compat -work work testbench.v

5. Lastly, specify the TOP_LEVEL_NAME variable to the design’s simulation top-level file. (The top-level entity of your simulation is often a testbench that instantiates your design) Elaborate the design and run the simulation. 

Modelsim> set TOP_LEVEL_NAME testbench 
Modelsim> elab
Modelsim> add wave *
Modelsim> view structure
Modelsim> view signals
Modelsim> run -all

All of this can be done easier and faster if you pre-write a script template as shown in the user guide Figure 4. Good for repetitive. 

Though, you might need to modify the TOP_LEVEL_NAME and compilation step appropriately as you continue with different design. 

0 Kudos


We do not receive any response from you to the previous question/reply/answer that I have provided. Please post a response in the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you with your follow-up questions.

0 Kudos
New Contributor I

I would like to extend the original question to the case where my design uses multiple IP cores.

For a single IP the answer above works fine, however, how to handle the multiple core case?



0 Kudos

You can use the scripted simulation flow or nativelink simulation flow (Quartus Standard version only). Both should works. 

For further information, you may checkout the supported simulation flow for Quartus Pro.


Best Regards,

Richard Tan


p/s: If you find any answers from the community or Intel Support to be helpful, we encourage you to mark them as the best answer or rate them 4/5 in the survey.

0 Kudos