Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussões

Just start learn using ModelSim-Altera for simulation

Altera_Forum
Colaborador honorário II
3.516 Visualizações

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 Respostas
Altera_Forum
Colaborador honorário II
2.484 Visualizações

No one can help me?

Altera_Forum
Colaborador honorário II
2.484 Visualizações

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
Altera_Forum
Colaborador honorário II
2.484 Visualizações

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.
Altera_Forum
Colaborador honorário II
2.484 Visualizações

 

--- 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
Altera_Forum
Colaborador honorário II
2.484 Visualizações

 

--- 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:(
Altera_Forum
Colaborador honorário II
2.484 Visualizações

 

--- 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
Altera_Forum
Colaborador honorário II
2.484 Visualizações

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

Altera_Forum
Colaborador honorário II
2.484 Visualizações

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
Altera_Forum
Colaborador honorário II
2.484 Visualizações

Thanks very much!

Responder