Download - Modelsim PPT
![Page 1: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/1.jpg)
ModelSim OverView
![Page 2: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/2.jpg)
What we already learnedWhat we already learned
● Verilog can model: behavioral, RTL structure● Module: basic unit in Verilog● A tutorial: Module instantiation, stimulus, respone● Procedure block: initial, always
![Page 3: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/3.jpg)
ModelSim RTL simulation1. Create libraries.2. Map to libraries.3. Compile source code and testbenches.4. Load the design.5. Add design stimulus.6. View the simulation results.7. Advance the simulator
![Page 4: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/4.jpg)
ModelSim Tutorial
ModelSim Tool OverView
![Page 5: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/5.jpg)
ModelSim Flow 1
2
3
4
5
Link
![Page 6: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/6.jpg)
Vlog order independent
![Page 7: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/7.jpg)
ModelSim use mode
![Page 8: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/8.jpg)
Command Mode
![Page 9: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/9.jpg)
Batch Run
![Page 10: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/10.jpg)
ModelSim Tutorial
Projects
![Page 11: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/11.jpg)
ModelSim: New Project File > New > Project
− *.mpf
![Page 12: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/12.jpg)
Add Existing File
HDL files 路徑名稱不能有中文
![Page 13: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/13.jpg)
Add Existing File
![Page 14: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/14.jpg)
File > Add to Project
![Page 15: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/15.jpg)
Compile
Mouseright click
![Page 16: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/16.jpg)
Load Design
Mouse doubleClick
Simulate > End Simulation.
![Page 17: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/17.jpg)
OPEN CLOSE A PROJECT FILE > OPEN
FILE > CLOSE
![Page 18: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/18.jpg)
ModelSim Tutorial
Projects Folder
![Page 19: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/19.jpg)
Add Folder File > Add to Project > Folder.
![Page 20: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/20.jpg)
Add a sub folder File > Add to Project > Folder.
![Page 21: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/21.jpg)
Move Files to folder HDL
NOTE:NO actual directories created in the file system.
![Page 22: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/22.jpg)
ModelSim Tutorial
Simulation Configuration
![Page 23: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/23.jpg)
Simulation Configuration File > Add to Project > Simulation Configuration.
![Page 24: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/24.jpg)
Loading
![Page 25: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/25.jpg)
ModelSim Tutorial
Project Setting
![Page 26: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/26.jpg)
Right Click > Properties...
![Page 27: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/27.jpg)
Project Setting
![Page 28: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/28.jpg)
ModelSim Tutorial
Waveform Display
![Page 29: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/29.jpg)
Waveform Window
![Page 30: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/30.jpg)
Add wave
View wave Add wave * OR
VIEW > DEBUG WINDOWS > WAVE
![Page 31: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/31.jpg)
Add signals to waveform
Or, Mouse Drag-and-Drop
![Page 32: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/32.jpg)
Zoom-in 2X Zoom-in
2X Zoom-out
Full
![Page 33: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/33.jpg)
Cursor in Wave Window
![Page 34: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/34.jpg)
Rename the Cursor
Mouse Right Click A
![Page 35: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/35.jpg)
Add Cursor
Click Rename
Cursor2 to B
Drag Bto measurethe Delta
![Page 36: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/36.jpg)
Cursor
CURSOR HERE
![Page 37: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/37.jpg)
![Page 38: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/38.jpg)
Window Undock & Dock
![Page 39: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/39.jpg)
Tools > Combine Signal
![Page 40: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/40.jpg)
Save Waveform Format: File > Save
File > LoadSelect wave.do
![Page 41: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/41.jpg)
![Page 42: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/42.jpg)
ModelSim Tutorial
SDF
![Page 43: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/43.jpg)
SDF SDF versions 1.0 through 4.0 vsim
-sdfmin [<instance>=]<filename>-sdftyp [<instance>=]<filename>-sdfmax [<instance>=]<filename>
Exvsim -sdfmax /testbench/u1=myasic.sdf testbench
OrSimulate > Start Simulation> SDF
![Page 44: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/44.jpg)
$sdf_annotate system task $sdf_annotate (["<sdffile>"], [<instance>],
["<config_file>"], ["<log_file>"], ["<mtm_spec>"], ["<scale_factor>"], ["<scale_type>"]);
Ex$sdf_annotate("myasic.sdf", testbench.u1);$sdf_annotate("myasic.sdf", testbench.u1, , , "maximum");
![Page 45: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/45.jpg)
The SDF TIMESCALE construct specifies time units of values in the SDF file. The annotator rounds timing values from the SDF file to the time precision of the module that is annotated. For example, if the SDF TIMESCALE is 1ns and a value of .016 is annotated to a path delay in a module having a time precision of 10ps (from the timescale directive), then the path delay receives a value of 20ps. The SDF value of 16ps is rounded to 20ps. Interconnect delays are rounded to the time precision of the module that contains the annotated MIPD.
![Page 46: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/46.jpg)
ModelSim Tutorial
Library
![Page 47: Modelsim PPT](https://reader033.vdocuments.net/reader033/viewer/2022042501/5501812c4a7959c0558b46a5/html5/thumbnails/47.jpg)
Appendix