47
ModelSim OverView

Modelsim PPT

Embed Size (px)

Citation preview

Page 1: Modelsim PPT

ModelSim OverView

Page 2: Modelsim PPT

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

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

ModelSim Tutorial

ModelSim Tool OverView

Page 5: Modelsim PPT

ModelSim Flow 1

2

3

4

5

Link

Page 6: Modelsim PPT

Vlog order independent

Page 7: Modelsim PPT

ModelSim use mode

Page 8: Modelsim PPT

Command Mode

Page 9: Modelsim PPT

Batch Run

Page 10: Modelsim PPT

ModelSim Tutorial

Projects

Page 11: Modelsim PPT

ModelSim: New Project File > New > Project

− *.mpf

Page 12: Modelsim PPT

Add Existing File

HDL files 路徑名稱不能有中文

Page 13: Modelsim PPT

Add Existing File

Page 14: Modelsim PPT

File > Add to Project

Page 15: Modelsim PPT

Compile

Mouseright click

Page 16: Modelsim PPT

Load Design

Mouse doubleClick

Simulate > End Simulation.

Page 17: Modelsim PPT

OPEN CLOSE A PROJECT FILE > OPEN

FILE > CLOSE

Page 18: Modelsim PPT

ModelSim Tutorial

Projects Folder

Page 19: Modelsim PPT

Add Folder File > Add to Project > Folder.

Page 20: Modelsim PPT

Add a sub folder File > Add to Project > Folder.

Page 21: Modelsim PPT

Move Files to folder HDL

NOTE:NO actual directories created in the file system.

Page 22: Modelsim PPT

ModelSim Tutorial

Simulation Configuration

Page 23: Modelsim PPT

Simulation Configuration File > Add to Project > Simulation Configuration.

Page 24: Modelsim PPT

Loading

Page 25: Modelsim PPT

ModelSim Tutorial

Project Setting

Page 26: Modelsim PPT

Right Click > Properties...

Page 27: Modelsim PPT

Project Setting

Page 28: Modelsim PPT

ModelSim Tutorial

Waveform Display

Page 29: Modelsim PPT

Waveform Window

Page 30: Modelsim PPT

Add wave

View wave Add wave * OR

VIEW > DEBUG WINDOWS > WAVE

Page 31: Modelsim PPT

Add signals to waveform

Or, Mouse Drag-and-Drop

Page 32: Modelsim PPT

Zoom-in 2X Zoom-in

2X Zoom-out

Full

Page 33: Modelsim PPT

Cursor in Wave Window

Page 34: Modelsim PPT

Rename the Cursor

Mouse Right Click A

Page 35: Modelsim PPT

Add Cursor

Click Rename

Cursor2 to B

Drag Bto measurethe Delta

Page 36: Modelsim PPT

Cursor

CURSOR HERE

Page 37: Modelsim PPT
Page 38: Modelsim PPT

Window Undock & Dock

Page 39: Modelsim PPT

Tools > Combine Signal

Page 40: Modelsim PPT

Save Waveform Format: File > Save

File > LoadSelect wave.do

Page 41: Modelsim PPT
Page 42: Modelsim PPT

ModelSim Tutorial

SDF

Page 43: Modelsim PPT

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

$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

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

ModelSim Tutorial

Library

Page 47: Modelsim PPT

Appendix