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

Just start learn using ModelSim-Altera for simulation

Altera_Forum
Honored Contributor II
3,254 Views

I just start learn how to use ModelSim-Altera to do simulation for my design in Quartus II. I don't think the brief tutorial with ModelSim-Altera is good:(. It seems even didn't give a examples how to do a timing simulation for a design.  

 

Is anybody can provide a better tutorial, which can provide completed examples from finishing a design, do functional simulation then do timing simulation, during timing simulation how to use corresponding library with device ? 

 

If you can provide a link or some documents, it will be excellent. 

Thanks:)
0 Kudos
9 Replies
Altera_Forum
Honored Contributor II
2,222 Views

No one can help me?

0 Kudos
Altera_Forum
Honored Contributor II
2,222 Views

In my experience; 

 

1) Use Modelsim to perform detailed functional simulation on individual components, and on your hierarchical systems. You can use code coverage and more advanced features to ensure your design is well tested. 

 

2) Synthesize using Quartus with complete timing constraints (SDC) for your design. If your timing constraints are implemented correctly, and the synthesized design passes timing, then it will work in hardware. 

 

3) On rare occasions a timing simulation can help locate an error. However, I cannot think of one case where I have used timing simulation to track down a bug in at least 10 years. 

 

For timing simulation, if the generated .vho file has the same top-level ports as your entity, then you can just recompile the .vho in place of your .vhd and pass the -sdf argument to vsim (-sdftyp, min and max). 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
2,222 Views

Thanks very much, Dave. Since I just start so there are some problems which confused me. 

 

I know when we want to simulate a design in ModelSim, we should build a library, but when I run the ModelSim-Altera, there are large amount of built library like "cyclone", ''hardcopyii'', so what are these libraries used for?  

 

Another question is: if I don't call Modelsim-Altera 6.5b from Quartus II, I finished my design in QuartusII firstly, then how can I do timing simulation (Gate level simulation) in ModelSim? Which files are need? I read the short tutorial with ModeSim-Altera, but it seems didn't give an example to do that. When I wrote a testbench with Verilog, should is be a .vo file?  

 

Thanks very much. Have a good day.
0 Kudos
Altera_Forum
Honored Contributor II
2,222 Views

 

--- Quote Start ---  

 

I know when we want to simulate a design in ModelSim, we should build a library, but when I run the ModelSim-Altera, there are large amount of built library like "cyclone", ''hardcopyii'', so what are these libraries used for?  

 

--- Quote End ---  

 

 

When Quartus writes out a post-synthesis netlist, that netlist contains device specific VHDL or Verilog models so that Modelsim can simulate the netlist. Its those models that are contained in those libraries, and that is why the libraries are named after devices. 

 

 

--- Quote Start ---  

 

Another question is: if I don't call Modelsim-Altera 6.5b from Quartus II, I finished my design in QuartusII firstly, then how can I do timing simulation (Gate level simulation) in ModelSim? Which files are need? I read the short tutorial with ModeSim-Altera, but it seems didn't give an example to do that. When I wrote a testbench with Verilog, should is be a .vo file?  

 

--- Quote End ---  

 

 

vlog file.vo 

 

will compile the netlist 

 

vlog file_tb.v 

 

will compile your testbench, and  

 

vsim -t ps -sdftyp<args> file_tb 

 

will run your testbench. I forget the args to sdf, its something like the hierarchy name of your device under test, and then the sdf filename. The help in Modelsim will tell you. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
2,222 Views

 

--- Quote Start ---  

When Quartus writes out a post-synthesis netlist, that netlist contains device specific VHDL or Verilog models so that Modelsim can simulate the netlist. Its those models that are contained in those libraries, and that is why the libraries are named after devices. 

 

--- Quote End ---  

 

 

 

Thanks very much, Dave. So If I use ModelSim PE instead of ModelSim-Altera, there will be no libraries for Altera's devices in ModelSim. I need to load the libraries by myself, right? Sorry to ask these stupid questions:(
0 Kudos
Altera_Forum
Honored Contributor II
2,222 Views

 

--- Quote Start ---  

If I use ModelSim PE instead of ModelSim-Altera, there will be no libraries for Altera's devices in ModelSim. I need to load the libraries by myself, right? 

 

--- Quote End ---  

Yep. Its not that hard though. You need to compile the source provided by Altera into a library, but you only need to do that once. 

 

 

--- Quote Start ---  

Sorry to ask these stupid questions:( 

--- Quote End ---  

They're not stupid. They're time-saving :) 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
2,222 Views

Thanks so much, Dave. Yes, you are right. Your answers save me a lot of time. I sincerely appreciate these.

0 Kudos
Altera_Forum
Honored Contributor II
2,222 Views

Here you'll find a pair of TCL scripts to compile Altera's libraries into a normal ModelSim instalation. 

 

http://www.altera.com/support/examples/tcl/tcl-modelsim.html
0 Kudos
Altera_Forum
Honored Contributor II
2,222 Views

Thanks very much!

0 Kudos
Reply