Technical data
8 -
Table of Contents ModelSim EE Tutorial
Adding HDL items in the Wave window . . . . . . . . . . . . . . . . . . . . . . 81
Editing and formatting HDL items in the Wave window . . . . . . . . . . . . . . . . 82
Sorting a group of HDL items . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Finding items by name or value in the Wave window . . . . . . . . . . . . . . . . . 85
Searching for item values in the Wave window . . . . . . . . . . . . . . . . . . . . 85
Using time cursors in the Wave window . . . . . . . . . . . . . . . . . . . . . . 87
Zooming - changing the waveform display range . . . . . . . . . . . . . . . . . . . 88
Wave window keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . 90
3 - ModelSim EE Lessons (p91)
Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
Command, button, and menu equivalents . . . . . . . . . . . . . . . . . . . . . . 92
Commands and their history . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Reusing commands from the Main transcript . . . . . . . . . . . . . . . . . . . . 93
Basic VHDL simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Debugging a VHDL design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Running a batch-mode simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Executing commands at startup . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Tcl/Tk and ModelSim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Examples in this lesson . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
More information on Tcl/Tk . . . . . . . . . . . . . . . . . . . . . . . . . . 115
How Tcl/Tk works with ModelSim . . . . . . . . . . . . . . . . . . . . . . . 116
The custom-traffic-light interface . . . . . . . . . . . . . . . . . . . . . . . . 117
Copies of the original example files . . . . . . . . . . . . . . . . . . . . . . . 119
Solutions to the examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Viewing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
The Tcl source command . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Example shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Preparing for the Tcl/Tk examples . . . . . . . . . . . . . . . . . . . . . . . . 121
Example 1 - create a "hello world" button widget . . . . . . . . . . . . . . . . . . 122
Example 2 - add a procedure that gets called by a button push . . . . . . . . . . . . . 123
Example 3 - The traffic light simulation . . . . . . . . . . . . . . . . . . . . . 124
Example 4 - draw a state machine that represents the simulation . . . . . . . . . . . . 127
Basic Verilog simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Mixed VHDL/Verilog simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Finding names, and searching for values . . . . . . . . . . . . . . . . . . . . . . . 150
Finding items by name in tree windows . . . . . . . . . . . . . . . . . . . . . . 150