ModelSim EE/PLUS Tutorial The ModelSim Elite Edition for VHDL, Verilog, and Mixed-HDL Simulation
ModelSim /VHDL, ModelSim /VLOG, ModelSim /LNL, and ModelSim /PLUS are produced by Model Technology Incorporated. Unauthorized copying, duplication, or other reproduction is prohibited without the written consent of Model Technology. The information in this manual is subject to change without notice and does not represent a commitment on the part of Model Technology.
Software License Agreement This is a legal agreement between you, the end user, and Model Technology Incorporated (MTI). By opening the sealed package, or by signing this form, you are agreeing to be bound by the terms of this agreement. If you do not agree to the terms of this agreement, promptly return the unopened package and all accompanying items to the place you obtained them for a full refund. Model Technology Software License 1. LICENSE.
from MTI. All copies of the SOFTWARE, whether provided by MTI or made by you, shall remain the property of MTI or its licensors. You will maintain a record of the number and location of all copies of the SOFTWARE made, including copes that have been merged with other software, and will make those records available to MTI or its applicable licensor upon request. 5. TRADE SECRET. The source code of the SOFTWARE is trade secret or confidential information of MTI or its licensors.
Limited Warranty LIMITED WARRANTY. MTI warrants that the SOFTWARE will perform substantially in accordance with the accompanying written materials for a period of 30 days from the date of receipt. Any implied warranties on the SOFTWARE are limited to 30 days. Some states do not allow limitations on duration of an implied warranty, so the above limitation may not apply to you. CUSTOMER REMEDIES.
Table of Contents Software License Agreement . . . . Model Technology Software License . Important Notice . . . . . . . . . Limited Warranty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii iii iv v 1 - Introduction (p11) Software versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Editing the command line, the current source file, and notepads . . . . . . . . . . . . . 33 Dataflow window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 The Dataflow window menu bar . . . . . . . . . . . . . . . . . . . . . . . . . 36 Tracing HDL items with the Dataflow window . . . . . . . . . . . . . . . . . . . . 37 List window . . . . . . . . . . . . . . . . . . List window action list . . . . . . . . . . . . The List window menu bar . . . . . . . . . . .
Adding HDL items in the Wave window . . . . . . Editing and formatting HDL items in the Wave window Sorting a group of HDL items . . . . . . . . . . Finding items by name or value in the Wave window . Searching for item values in the Wave window . . . . Using time cursors in the Wave window . . . . . . Zooming - changing the waveform display range . . . Wave window keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Searching for item values in the List and Wave windows . . . . . . . . . . . . . . . 150 Using the Wave window . . . . . . . . . . . Using time cursors in the Wave window . . . Zooming - changing the waveform display range Wave window keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 153 155 157 Continuing with ModelSim EE . . . . . . . . . . . . . . . . . . .
- Table of Contents ModelSim EE Tutorial
1 - Introduction Chapter contents Software versions . . . . . . . . . . . . . . . . . . . 11 Standards supported . . . . . . . . . . . . . . . . . . . 12 Assumptions . . . . . . . . . . . . . . . . . . . 13 Sections in this document . . . . . . . . . . . . . . . . . 13 HDL and HDL item defined . . . . . . . . . . . . . . . . . 14 Where to find our documentation . . . . . . . . . . . . . . . 15 . .
ModelSim’s graphic interface ModelSim’s graphic interface While your operating system interface provides the window-management frame, ModelSim controls all internal-window features including menus, buttons, and scroll bars.
Assumptions Assumptions We assume that you are familiar with the use of your operating system. You should be familiar with the window management functions of your graphic interface: either OpenWindows, OSF/Motif, or Microsoft Windows NT/95/98. We also assume that you have a working knowledge of VHDL and Verilog. Although ModelSim is an excellent tool to use while learning HDL concepts and practices, this document is not written to support that goal. If you need more information about HDLs, check out our.
Text conventions Text conventions Text conventions used in this manual include: italic text provides emphasis and sets off file and path names bold text indicates commands, command options, and menu choices, as well as package and library logical names monospaced type monospace type is used for program and command examples The right angle (>) is used to connect menu choices when traversing menus as in: File > Save path separators examples will show either UNIX or Windows path separators - use sepa
Where to find our documentation Where to find our documentation Model Technology’s documentation is available in the following formats and locations: Document Format How to get it Start Here for ModelSim (installation & support reference) paper shipped with the product PDF online find "ee_start_here.pdf" in the "/ /docs" directory; also available from the Support page of our web site: www.model.com Documentation Index PDF online find "ee_doc_index.
Comments Download a free PDF reader Model Technology’s PDF documentation requires an Adobe Acrobat Reader for viewing. The Reader may be installed from the ModelSim CD. It is also available without cost from Adobe at http://www.adobe.com. Be sure to download the Acrobat Reader with Search to take advantage of the index file supplied with our reference manuals; the index makes searching the documentation much faster. Comments Comments and questions about this manual and ModelSim software are welcome.
2 - ModelSim EE Graphic Interface Chapter contents Window overview . Window features. . Main window . Dataflow window List window . . Process window . Signals window . Source window . Structure window Variables window Wave window . . . . . . . . . . . . . . . . . . . 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Window overview Window overview The ModelSim simulation environment consists of nine window types. Multiple windows of each type may be used during simulation (with the exception of the Main window) A brief description of each window follows: • Main window (p24) The main window from which all subsequent VSIM windows are available. • Dataflow window (p35) Lets you trace signals and nets through your design by showing related processes.
Window features Window features ModelSim’s graphic interface provides many features that add to its usability; features common to many of the windows are described below.
Window features Drag and Drop Drag and drop of HDL items is possible between the following windows. Using the left mouse button, click and release to select an item, then click and hold to drag it. • Drag items from these windows: Dataflow, List, Signals, Source, Structure, Variables, and Wave windows • Drop items in these windows: List and Wave windows Note: Drag and drop works to move items within the List and Wave windows as well.
Window features Finding names, and searching for values • Find HDL item names with the Edit > Find menu selection in these windows: List, Process, Signals, Source, Structure, Variables, and Wave windows. • Search for HDL item values with the Edit > Search menu selection in these windows: List, and Wave windows. You can also: • Locate time markers in the List window with the Markers > Goto menu selection. • Locate time cursors in the Wave window with the Cursor > Goto menu selection.
Window features Tree window hierarchical view ModelSim provides a hierarchical, or "tree view" of some aspect of your design in the Structure, Signals, Variables, and Wave windows.
Window features Tree window action list Action Use Do expand a level left mouse button click on a "+" box/circle collapse a level left mouse button click on a "-" box/circle select a single item left mouse button click on the HDL item name (not the box/circle prefix) select multiple contiguous items (not in Structure window) left mouse button click on the HDL item name and drag to complete selection select a range of contiguous items (not in Structure window) shift + left mouse button sele
Main window Main window The Main window is pictured below as it appears when VSIM is first invoked. Note that your operating system graphic interface provides the windowmanagement frame only; ModelSim handles all internal-window features including menus, buttons, and scroll bars. The menu bar at the top of the window provides access to a wide variety of simulation commands and ModelSim preferences.
Main window The Main window menu bar The menu bar at the top of the Main window lets you access many ModelSim commands and features. The menus are listed below with brief descriptions of the command’s use.
Main window Edit menu Copy copy the selected text Paste paste the previously cut or copied item to the left of the currently selected item Select All delete the selected item field Unselect All combine the selected fields into a user-defined bus; keep copies of the original items rather than moving them Find search the transcript forward or backward for the specified text string Library menu Browse Libraries browse all libraries within the scope of the design Create a New Library create a new
Main window Run menu Run run simulation for one default run length; change the run length with Options > Simulation, or use the Run Length list on the tool bar Run -All run simulation until you stop it Continue continue the simulation Run -Next run to the next event time Step single-step the simulator Step-Over execute without single-stepping through a subprogram call Macro menu Execute Macro allows you to browse for and execute a DO file (macro) Macro Helper Unix only - invokes th
Main window Window menu Initial Layout restore all windows to the size and placement of the initial full-screen layout Cascade cascade all open windows Tile Horizontally tile all open windows horizontally Tile Vertically tile all open windows vertically Icon Children icon all but the Main window Icon All icon all windows Deicon All deicon all windows Customize use the Button Adder to define and add a button to either the menu bar, tool bar, or status bar of the specified window
Main window Saving the transcript file Variable settings determine the filename used for saving the Main window transcript. If either PrefMain(file) in modelsim.tcl, or TranscriptFile in modelsim.ini file is set, then the transcript output is logged to the specified file. By default the TranscriptFile variable in modelsim.ini is set to transcript. If either variable is set, the transcript contents are always saved and no explicit saving is necessary.
Main window The Main window tool bar k ea er br st e p ov ll st ep n ru nt in co ru n ue ng le n ru -a th n ru rt st a re py st e pa co si gn de d lo a co m pi le Buttons on the Main window tool bar give you quick access to these ModelSim commands and functions.
Main window Main window tool bar buttons Button Menu equivalent Command equivalents Restart restart the current simulation with the option of use current formatting, breakpoints, and log file File > Restart restart Run run the current simulation for the default time length Run > Run … run (no arguments) none run Continue Run continue the current simulation run Run > Continue run -continue Run -All run to current simulation forever, or unti
Main window Main window tool bar buttons Button Break stop the current simulation run Menu equivalent Command equivalents none execute a break when the Main window is active with The Main window status bar Fields at the bottom of the Main window provide the following information about the current simulation: 32 Field Description Now the current simulation time or a larger time unit if one can be used without a fractional remainder Delta the current simulation iteration number Env
Main window Editing the command line, the current source file, and notepads The following mouse actions and special keystrokes can be used to edit commands in the entry region of the Main window. They can also be used in editing the file displayed in the Source window (p61) and all notepad windows (enter the notepad command at the VSIM prompt to open the notepad editor).
Main window Keystrokes - UNIX Keystrokes - Windows Result < control - d > delete character to the right < control - k > delete to the end of line < control - a > < control - a >, move insertion cursor to beginning of line < control - e > < control - e >, move insertion cursor to end of line < * meta - "<" > none move insertion cursor to beginning of file < * meta - ">" > none move insertion cursor to end of file < control - w > < control - x > cut selection < *meta - w >
Dataflow window Dataflow window The Dataflow window allows you to trace VHDL signals or Verilog nets through your design. Double-click an item with the left mouse button to move it to the center of the Dataflow display.
Dataflow window The Dataflow window menu bar The following menu commands and button options are available from the Dataflow window menu bar.
Dataflow window Tracing HDL items with the Dataflow window The Dataflow window is linked with the Signals window (p55) and the Process window (p52). To examine a particular process in the Dataflow window, click on the process name in the Process window. To examine a particular HDL item in the Dataflow window, click on the item name in the Signals window.
List window List window The List window displays the results of your simulation run in tabular format. The window is divided into two adjustable panes, which allow you to scroll horizontally through the listing on the right, while keeping time and delta visible on the left.
List window Action Menu or mouse See also move or delete items already in the List window menu selection: Edit > (select Cut, Copy, Paste, Delete, Combine, Select All, or Unselect All) "Adding HDL items to the List window" (p44) drag and drop: within the List window set display properties such as name length, trigger on options, delta views, and strobe timing menu selection: Prop > Display Props "Setting List window display properties" (p42) format an item’s radix, label, width, and triggering pro
List window The List window menu bar The following menu commands and button options are available from the List window menu bar.
List window Markers menu Add Marker add a time marker at the top of the listing page Delete Marker delete the selected marker from the listing Goto choose the time marker to go to from a list of current markers Prop menu Display Props set display properties for all items in the window: delta settings, trigger on selection, strobe period, and label size Signal Props set label, radix, trigger on/off, and field width for the selected item Window menu Initial Layout restore all windows to the size a
List window Setting List window display properties Before you add items to the List window you can set the window’s display properties. To change when and how a signal is displayed in the List window, make this selection from the List window menu bar: Prop > Display Props. The resulting Modify Display Properties dialog box has the following options. Trigger settings page The Triggers page controls the triggering for the display of new lines in the List window.
List window setup of address bits and clock edges. Affects the display of data, not the acquisition of the data. • Use Expression Builder (button) Opens the Expression Builder to help you write a gating expression. • Expression Enter the expression for trigger gating into this field, or use the Expression Builder (select the Use Expression Builder button). The expression is evaluated when the List window would normally have displayed a row of data (given the trigger on signals and strobe settings above).
List window Adding HDL items to the List window Before adding items to the List window you may want to set the window display properties (see "Setting List window display properties" (p42)). You can add items to the List window in several ways. Adding items with drag and drop You can drag and drop items into the List window from the Process, Signals, or Structure window. Select the items in the first window, then drop them into the List window.
List window Use Edit > Select All and Edit > Delete to remove the items from the current List window or create a new, blank List window with the View > New > List selection from the "Main window" (p24). You may find it useful to have two differently formatted windows open at the same time, see "Examining simulation results with the List window" (p47). Note: List window format files are design-specific; use them only with the design you were simulating when they were created.
List window The Modify Signal Properties dialog box includes these options: • Signal Shows the item you selected with the mouse. • Label Allows you to specify the label that is to appear at the top of the List window column for the specified item. • Radix Allows you to specify the radix (base) in which the item value is expressed. The default radix is symbolic, which means that for an enumerated type, the List window lists the actual values of the enumerated type of that item.
List window Examining simulation results with the List window Because you can use the Main window View menu (p26) to create a second List window, you can reformat another List window after the simulation run if you decide a different format would reveal the information you’re after. Compare the two illustrations.
List window Finding items by name in the List window The Find dialog box allows you to search for text strings in the List window. From the List window select Edit > Find to bring up the Find dialog box. Enter an item label and Find it by searching Forward (right) or Reverse (left) through the List window display. The column number of the item found displays at the bottom of the dialog box. Note that you can change an item’s label, see "Setting List window display properties" (p42).
List window • Search Options: Search for Signal Value Reveals the Search Value field; search for the value specified in the Search Value field (the value must be formatted in the same radix as the display). If no value is specified look for transitions.
List window Setting time markers in the List window From the List window select Markers > Add Marker to tag the selected list line with a marker. The marker is indicated by a thin box surrounding the marked line. The selected line uses the same indicator, but its values are highlighted. Delete markers by first selecting the marked line, then making the Markers > Delete Marker menu selection. Finding a marker Choose a specific marked line to view with Markers > Goto menu selection.
List window Key Action searches forward (down) to the next transition on the selected signal searches backward (up) to the previous transition on the selected signal (does not function on HP workstations) opens the find dialog box; find the specified item label within the list display Saving List window data to a file From the List window select Edit > Write List (format) to save the List window data in one of these formats: • tabular writes a text file that looks like
Process window Process window The Process window displays a list of processes and indicates the pathname of the instance in which the process is located. Each HDL item in the scrollbox is preceded by one of the following indicators: • Indicates that the process is scheduled to be executed within the current delta time. • Indicates that the process is waiting for a VHDL signal or Verilog net or variable to change or for a specified time-out period.
Process window The Process window menu bar The following menu commands and button options are available from the Process window menu bar.
Process window Customize use the Button Adder to define and add a button to either the menu bar, tool bar, or status bar of the specified window lists the currently open windows; select a window name to switch to, or show that window if it is hidden; when the source window is available, the source file name is also indicated; open additional windows from the "View menu" (p26) Active/In Region toggle button 54 Active Displays all the processes that are scheduled to run during the curren
Signals window Signals window The Signals window shows the names and values of HDL items in the current region (which is selected in the Structure window). Items may be sorted in ascending, descending, or declaration order.
Signals window The Signals window menu bar The following menu commands are available from the Signals window menu bar.
Signals window Tile Horizontally tile all open windows horizontally Tile Vertically tile all open windows vertically Icon Children icon all but the Main window Icon All icon all windows Deicon All deicon all windows Customize use the Button Adder to define and add a button to either the menu bar, tool bar, or status bar of the specified window lists the currently open windows; select a window name to switch to, or show that window if it is hidden; when the source window is availa
Signals window The Force dialog box includes these options: • Signal Name Specify the signal or net for the applied stimulus. • Value Initially displays the current value, which can be changed by entering a new value into the field. A value can be specified in radixes other than decimal by using the form (for VHDL and Verilog, respectively): base#value -or- b|o|d|h’value 16#EE or h’EE, for example, specifies the hexadecimal value EE.
Signals window Adding HDL items to the Wave and List windows or a log file Before adding items to the List or Wave window you may want to set the window display properties (see "Setting List window display properties" (p42)). Once display properties have been set, you can add items to the windows or log file in several ways.
Signals window If the target window (Wave or List) is closed, ModelSim opens it when you when you invoke the command. Finding HDL items in the Signals window Find the specified text string within the Signals window; choose the Name or Value field to search and the search direction: Forward or Reverse.
Source window Source window The Source window allows you to view and edit your HDL source code. Select an item in the Structure window (p67) or use the File menu to add a source file to the window, then select a process in the Process window (p52) to view that process; an arrow next to the line numbers indicates the selected process. If any breakpoints have been set, each is signified by a colored dot next to a line number at the left side of the window pane.
Source window The Source window menu bar The following menu commands are available from the Source window menu bar. File menu New edit a new source file Open select a source file to open Use Source specifies an alternative file to use for the current source file; this alternative source mapping exists for the current simulation only Source Directory add to a list of directories (the SourceDir variable in modelsim.
Source window Options menu Options open the Source Options dialog box, see "Setting Source window options" (p66) Window menu Initial Layout restore all windows to the size and placement of the initial full-screen layout Cascade cascade all open windows Tile Horizontally tile all open windows horizontally Tile Vertically tile all open windows vertically Icon Children icon all but the Main window Icon All icon all windows Deicon All deicon all windows Customize use the Button Adder to define
Source window The Source window tool bar er ov st ep st ep d fin t py pa st e co cu fil e ce ur so ve sa lo ad so ur ce fil e Buttons on the Source window tool bar gives you quick access to these ModelSim commands and functions.
Source window Source window tool bar buttons Button Menu equivalent Other equivalents Paste paste the copied text to the cursor location Edit > Paste see: "Editing the command line, the current source file, and notepads" (p33) Find find the specified text string within the source file; match case option Edit > Find none Step steps the current simulation to the next HDL statement none step Step Over HDL statements are executed but treated as simple statements instead of entered and traced line b
Source window Setting Source window options Access the Source window options with this Source menu selection: Options > Options.
Structure window Structure window The Structure window provides a hierarchical view of the structure of your design. An entry is created by each HDL item within the design. HDL items you can view The following HDL items for VHDL and Verilog are represented by hierarchy within Structure window.
Structure window where: • instantiation label Indicates the label assigned to the component or module instance in the instantiation statement. • entity or module Indicates the name of the entity or module that has been instantiated. • architecture Indicates the name of the architecture associated with the entity (not present for Verilog).
Structure window Find...
Variables window Variables window The Variables window lists the names of HDL items within the current process, followed by the current value(s) associated with each name. The pathname of the current process is displayed at the bottom of the window. HDL items you can view The following HDL items for VHDL and Verilog are viewable within the Variables window.
Variables window The Variables window menu bar The following menu commands are available from the Variables window menu bar.
Variables window Window menu 72 Initial Layout restore all windows to the size and placement of the initial full-screen layout Cascade cascade all open windows Tile Horizontally tile all open windows horizontally Tile Vertically tile all open windows vertically Icon Children icon all but the Main window Icon All icon all windows Deicon All deicon all windows Customize use the Button Adder to define and add a button to either the menu bar, tool bar, or status bar of the specified window
Wave window Wave window The Wave window, like the List window, allows you to view the results of your simulation. In the Wave window, however, you can see the results as HDL item waveforms and their values. The Wave window is divided into two windowpanes: the left pane displays item names and their values at the active cursor (located in the right pane); the right pane displays waveforms corresponding to each item and any cursors you may have added.
Wave window You can resize the windowpanes by clicking and dragging the bar between the two windowpanes. Waveform and signal-name formatting are easily changed via the Prop menu (p77). You can reuse any formatting changes you make by saving a Wave window format file, see "Adding items with a Wave window format file" (p82). Wave window action list This action list provides a quick reference to menu selections and mouse actions in the Wave window.
Wave window Action Menu or mouse See also zoom in or out to change the amount of simulation time shown in the window menu selection: Zoom > (select zoom option) "Zooming - changing the waveform display range" (p88) center mouse button: click and drag to zoom rubberband section change signal properties: radix, color, height, format (analog/literal/logic/ event) menu selection: Prop > Signal Props "Setting Wave window display properties" (p81) save the Wave window configuration; load a new configura
Wave window Save Format saves the current Wave window display and signal preferences to a do (macro) file; running the DO file will reformat the Wave window to match the display as it appeared when the DO file was created Close close this copy of the Wave window; you can create a new window with View > New from the "The Main window menu bar" (p25) Edit menu Cut cut the selected item from the wave name pane; see "Editing and formatting HDL items in the Wave window" (p82) Copy copy the selected item a
Wave window Prop menu Display Props set display properties for all items in the window: delta settings, trigger on selection, strobe period, and label size Signal Props set label, radix, trigger on/off, and field width for the selected item (use the menu selections below to quickly change individual properties) Radix set the selected item’s radix Format set the waveform format for the selected item Color set the color for the selected item from a color palette Height set the waveform height in p
Wave window Wave window tool bar ea br -a k ll n n ru e in u nt co zo ru ru n fu ll ea om ar t2 m zo o ou in om zo om zo x 2x n n iti o iti o ns ns t ra ne d fin d fin pr ev de io u le s te t ra cu cu r d ad xt so r rs or st e pa t py co cu at fo rm e av w ve sa lo ad w av e fo rm at The Wave window tool bar gives you quick access to these ModelSim commands and functions.
Wave window Wave window tool bar buttons Button Menu equivalent Other options Copy copy the selected text within the Main window transcript Edit > Copy none Paste paste the copied text to the cursor location Edit > Paste see: "Editing the command line, the current source file, and notepads" (p33) Add Cursor add a cursor to the center of the waveform window Cursor > Add Cursor none Delete Cursor delete the selected cursor from the window Cursor > Delete Cursor none Find Previous Transition lo
Wave window Wave window tool bar buttons Button 80 Menu equivalent Other options Zoom area use the cursor to outline a zoom area Zoom > Zoom Range see: "Zooming - changing the waveform display range" (p88) Zoom Full zoom out to view the full range of the simulation from time 0 to the current time Zoom > Zoom Full see: "Zooming - changing the waveform display range" (p88) Run run the current simulation for the default time length none use the run command at the VSIM prompt Continue Run continue
Wave window Setting Wave window display properties You can define the item name width and the cursor snap distance of all items in the Wave window with the Prop > Display Props... menu selection. The Wave Window Properties dialog box includes these options: • Max Signal Name Width Sets the item name width. This is especially useful for items that have a long pathname. Choose a maximum name width setting, say 10 characters, and then item pathnames longer than 10 characters are truncated on the left.
Wave window You can add all the items in the current region with this command: add wave * Or add all the items in the design with: add wave -r /* Adding items with a Wave window format file To use a Wave window format file you must first save a format file for the design you are simulating.
Wave window You can also click+drag to move items within the name/value windowpane: • to select several contiguous items: click+drag to select additional items above or below the original selection • to select several items randomly: control+click to add or subtract from the selected group • to move the selected items: re-click and hold on one of the selected items, then drag to the new location To format an item: Select the item’s label in the left name/value pane or its waveform in the right windowpane,
Wave window This illustration shows the same item displayed in each wave format outlined below. Note that the signal labels were also changed. HDL items of VHDL type integer and floating point, and Verilog type real can be formatted as analog in the Wave window. • Format: Analog Step Displays a waveform of an integer, real or time type, with the height and offset determined by the Pixels = specification and the value of the item. • Format: Analog Interpolated Displays the waveform in interpolated style.
Wave window Sorting a group of HDL items Use the Edit > Sort menu selection to sort the items in the name/value pane. Finding items by name or value in the Wave window The Find dialog box allows you to search for text strings in the Wave window. From the Wave window select Edit > Find to bring up the Find dialog box. Choose either the Name or Value field to search from the drop-down menu, and enter the value to search for in the Find field.
• Search Options: Search for Expression Reveals the Search Expression field and the Use Expression Builder button; searches for the expression specified in the Search Expression field evaluating to a boolean true. Wave Signal Search dialog box with Search for Signal Value selected The expression may involve more than one signal but is limited to signals logged in the List window. Expressions may include constants, variables, and macros. If no expression is specified, the search will give an error.
Wave window Using time cursors in the Wave window When the Wave window is first drawn, there is one cursor in it at time zero. Clicking anywhere in the waveform display brings that cursor to the mouse location. You can add additional cursors to the waveform pane with the Cursor > Add Cursor menu selection, or with the Add Cursor button on the toolbar. The selected cursor is drawn as a solid line; all other cursors are drawn with dotted lines.
Wave window The cursors are designed to snap to the closest wave edge to the left on the waveform that the mouse pointer is positioned over. You can control the snap distance from "Wave category" in the dialog box available from the Properties > Display menu selection; see "Setting Wave window display properties" (p81). You can position a cursor without snapping by dragging in the area below the waveforms.
Wave window visible range horizontally, extending the view on the right. The starting time is held static. • Zoom Last Restores the display to where it was before the last zoom operation. • Zoom Range Brings up a dialog box that allows you to enter the beginning and ending times for a range of time units to be displayed. Zooming with the toolbar buttons Use these buttons on the Wave window toolbar to zoom.
Wave window Zooming keyboard shortcuts See the table below for list of Wave window keyboard shortcuts.
3 - ModelSim EE Lessons Chapter contents Choose the lessons appropriate for your simulator version: PLUS, and VHDL lessons Basic VHDL simulation . . Debugging a VHDL design . . Running a batch-mode simulation Executing commands at startup. Tcl/Tk and ModelSim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 103 112 114 115 . . . . . . . . . . . . . 129 Mixed VHDL/Verilog simulation . .
Command, button, and menu equivalents Many of the lesson steps are accomplished by a button or menu selection. When appropriate, VSIM command-line (PROMPT:) or menu (MENU:) equivalents for these selections are shown in parentheses within the step. This example shows three options to the run -all command, a button, prompt command, and a menu selection. (PROMPT: run -all) (MENU: Run > Run -All) Drag and drop too "Drag and Drop" (p20) allows you to copy and move signals among windows.
Reusing commands from the Main transcript ModelSim’s Main transcript may be saved, and the resulting file used as a DO (macro) file to replay the transcribed commands. You can save the transcript at any time before or during simulation. You have the option of clearing the transcript (File > Clear Transcript) if you don’t want to save the entire command history. To save the contents of the transcript select File > Save Main As from the Main menu.
Basic VHDL simulation Basic VHDL simulation The goals for the first lesson are: • create a library • compile a VHDL file • start the simulator • understand the basic VSIM windows, mouse, and menu conventions • run VSIM using the run command • list some signals • use the waveform display • force the value of a signal • single-step through a simulation run • set a breakpoint • use the Wave window 1 You’ll start out by creating a new directory for this exercise (in case other users will be working these less
Basic VHDL simulation 3 Before you compile any HDL code, you’ll need a design library to hold the compilation results. To create a new design library, make this menu selection in the Main window: Library > Create a New Library. (PROMPT: vlib work) In the Create a New Library dialog box select Create: a new library and a logical mapping to it. Make sure Library: indicates work, then select OK. This creates a subdirectory named work - your design library - within the current directory.
Basic VHDL simulation 4 Compile the file counter.vhd into the new library by selecting the Compile button on the toolbar: (PROMPT: vcom counter.vhd) This opens the Compile HDL Source Files dialog box. Complete the compilation by selecting counter.vhd from the file list and clicking Compile. Select Done when you are finished. You can compile multiple files in one session from the file list. Individually select and Compile the files in the order required by your design.
Basic VHDL simulation The Load Design dialog box comes up, as shown below (you won’t see this dialog box if you invoked vsim with counter from the command line). The Load Design dialog box allows you to select the library and the top-level design unit to simulate. You can also select the resolution limit for this simulation.
Basic VHDL simulation Î 6 Select the entity counter and choose Load to accept these settings. 7 Now you can open all of the VSIM windows with this Main window menu selection: View > All. (PROMPT: view *) 8 To display the top-level signals in the List window, select the Signals window and make this Signal menu selection: View > List > Signals in Region. (PROMPT: add list /counter/*) 9 Next add top-level signals to the Wave window with a similar Signals menu selection: View > Wave > Signals in Region.
Basic VHDL simulation The force command you just invoked is interpreted by VSIM to mean: • force clk to the value 1 at 50 ns after the current time • then to 0 at 100 ns after the current time • repeat this cycle every 100 ns Note how the Run Length selector on the toolbar now indicates 100 (ns is the current default resolution). You will see the effects of this force command as soon as you tell the simulator to run.
Basic VHDL simulation 12 Select the Break button on the Main toolbar to end the run. (KEYBOARD: control+c) The arrow points to the next HDL statement to be executed. Next, you will set a breakpoint in the function on line 18. 13 Move the pointer to the VSIM Source window. Using the vertical scroll bar, scroll until line 18 is visible. Click at or near line number 18 to set the breakpoint. You should see a dot next to the line number where the breakpoint is set.
Basic VHDL simulation 14 Select the Continue Run button to resume the run that you interrupted. VSIM will hit the breakpoint, as shown by an arrow in the VSIM Source window and by a message in the Main window. Also note that the parameters and variables within the function are displayed in the VSIM Variables window. (PROMPT: run -continue) (MENU: Run > Continue) 15 Click the Step button to single-step through the simulation. Notice that the values change in the VSIM Variables window.
Basic VHDL simulation n iti o fu ea om zo om zo ll x ou t2 2x zo om in om xt zo ne ar ns ns t ra io u s tra d) d fin fin d pr ev el ec te (s or e rs cu le t de d ad These Wave window buttons give you quick access to zooming and cursor placement. cu rs iti o n or 16 Experiment with using the cursors, buttons, scrolling, and zooming (see page 157 for Wave window shortcuts).
Debugging a VHDL design Debugging a VHDL design The goals for this lesson are: • show an example of a VHDL testbench - a VHDL architecture that instantiates the VHDL design units to be tested, provides simulation stimuli, and checks the results • map a logical library name to an actual library • change the default run length • recognize assertion messages in the command window • change the assertion break level • restart the simulation run using the restart command • examine composite types displayed in th
Debugging a VHDL design ModelSim modifies the modelsim.ini file for you. 5 Start the simulator by entering the following command at the UNIX/DOS prompt: vsim The Load Design dialog box is displayed, as shown below. 6 Perform the following steps in this dialog box: • Make sure that the simulator resolution is ns (default). • Look in the Design Unit scroll box and select the configuration named test_adder_structural. • Click Load to accept the settings. (PROMPT: vsim -t ns work.
Debugging a VHDL design 9 To add top-level signals to the Wave window, enter the command: add wave /* (Signals MENU: View > Wave > Signals in Region) (DRAG&DROP) 10 Now change the default simulation run length to 1000 (ns) with the run length selector on the Main toolbar. Click on the field to edit the number to 1000 (notice how the arrows allow you to change the run length in increments). (Main MENU: Options > Simulation > Defaults) 11 Next, you will run the simulator.
Debugging a VHDL design 12 First, change the simulation assertion options. Make this Main menu selection: Options > Simulation. 13 Select the Assertions page. Change the selection for Break on Assertion to Error and click OK. This will cause the simulator to stop at the HDL statement after the assertion is displayed. 14 To restart the simulation select the Restart button on the Main toolbar.
Debugging a VHDL design 15 From the Main toolbar select the Run button. (Main MENU: Run > Run 1000 ns) (PROMPT: run) Notice that the arrow in the Source window is pointing to the statement after the assertion. 16 If you turn to the Variables window now, you can see that i = 6. This indicates that the simulation stopped in the sixth iteration of the test pattern’s loop.
Debugging a VHDL design 17 Expand the variable named test_patterns by clicking the [+]. (You may need to resize the window for a better view.) 18 Also expand the sixth record in the array, that is, test_patterns(6), by clicking the [+]. The Variables window should be similar to the one below. The assertion shows that the signal sum does not equal the sum field in test_patterns(6). Note that the sum of the inputs a, b, and cin should be equal to the output sum. But there is an error in the test vectors.
Debugging a VHDL design 20 Once the simulation has restarted, add variables to the Variables window by selecting the test /testbench process in the Process window. 21 In the Variables window, expand test_patterns, and test_pattern(6) again. Then highlight the sum record by clicking on the variable name (not the box before the name) and then use the Edit > Change menu selection. 22 Select the last four bits in the value field 1000 by dragging the pointer across them.
Debugging a VHDL design By default, a new line is displayed in the List window for each transition of a listed signal. The following steps will change the triggering so the values are listed every 100 ns. 24 In the List window make this menu selection: Prop > Display Props. 25 Perform these steps on Triggers page in the Modify Display Properties (list) dialog box: • Deselect Trigger On: Signals to disable triggering on signals. • Select Trigger On: Strobe to enable the strobe.
Debugging a VHDL design 27 In the List window select the signal you want to change, then make the property changes in the dialog box. Make the following property changes: • Select signal a, then click Decimal, then click Apply. • Select signal b, then click Decimal, then Apply. • Select signal sum, then click Decimal, then OK. This brings you to the end of this lesson, but feel free to experiment further with the menu system.
Running a batch-mode simulation Running a batch-mode simulation The goals for this lesson are: • run a batch-mode VHDL simulation • execute a macro (DO) file • view a saved simulation You’ll work this lesson from a DOS or UNIX prompt. 1 To set up for this lesson you’ll need to create a new directory and make it the current directory. Copy this file into your new directory: ///examples/counter.
Running a batch-mode simulation • the -wav switch instructed the simulator to save the simulation results in a log file named saved.wav • used the contents of yourfile to specify that values are to be listed in decimal, to execute a stimulus file called stim.do, and to write the results to a file named counter.lst, the default for a design named counter 8 Since you saved the simulation results in saved.wav, you can view the simulation results by starting up VSIM with its -view switch: vsim -view saved.
Executing commands at startup Executing commands at startup The goals for this lesson are: • specify the design unit to be simulated on the command line • edit the modelsim.ini file • execute commands at startup with a DO file Start this lesson from either the UNIX or DOS prompt. 1 For this lesson, you will use a macro (DO) file that provides startup information. For convenience, a startup file has been provided with the ModelSim program.
Tcl/Tk and ModelSim Tcl/Tk and ModelSim This lesson is divided into several Tcl examples intended to give you a sense of Tcl/Tk’s function within ModelSim. The examples include a custom simulation interface created with Tcl/Tk. You must be using ModelSim EE/PLUS or ModelSim EE/VHDL to complete these exercises.
Tcl/Tk and ModelSim How Tcl/Tk works with ModelSim ModelSim incorporates Tcl as an embedded library package. The Tcl library consists of a parser for the Tcl language, routines to implement the Tcl built-in commands, and procedures that allow Tcl to be extended with additional commands specific to ModelSim. ModelSim generates Tcl commands and passes them to the Tcl parser for execution.
Tcl/Tk and ModelSim The custom-traffic-light interface The subject of our main Tcl/Tk lesson is a simple traffic-light controller. The system is comprised of three primary components: a state machine, a pair of traffic lights, and a pair of traffic sensors. The components are described in three VHDL files: traffic.vhd (the state machine), queue.vhd (the traffic arrival queue) and tb_traffic.vhd (the testbench).
Tcl/Tk and ModelSim The result is a traffic intersection interface similar to this illustration: wm widget Calls to the operating system window manager to create the "traffic" window. frame and scale widget A scale widget within a frame widget creates an analog entry device for a minimum to a maximum value and invokes the VSIM force command entry widget The entry widget (contained within a frame widget) can facilitate entry, or in this case, provides a display for a VSIM examine command.
Tcl/Tk and ModelSim Tk widgets The intersection illustration points out several Tcl/Tk "widgets". A widget is simply a user interface element, like a menu or scrolled list. Tk widgets are referenced within Tcl procedures to create graphic interface objects. The Tk tool box comes with several widgets, additional widgets can be created using these as a base.
Tcl/Tk and ModelSim Solutions to the examples Throughout the traffic intersection examples you will be modifying Tcl files to complete the final intersection. You will find a completed set of intersection examples ready-to-run in the tcl_tutorial/solutions directory. Invoke these commands from the ModelSim prompt to run the intersection: cd solutions do traffic.
Tcl/Tk and ModelSim Example shortcuts To save some typing, copy the commands from the PDF version of these instructions and paste them at the ModelSim prompt. Paste with the right (2 button mouse), or middle (3 button mouse). You can also select a ModelSim or VSIM prompt from the Main transcript to paste a previous command to the current command line. Make a transcript DO file You can rerun the commands executed during the current session with a Do file created from the Main transcript.
Tcl/Tk and ModelSim Example 1 - create a "hello world" button widget Before you begin the examples make sure you have completed "Preparing for the Tcl/Tk examples" (p121). In this example you will study a "hello world" button that prints a message when pressed. 1 Source the Tcl file from the ModelSim prompt: source hello.tcl then run the procedure defined within hello.tcl: hello_example The file hello.tcl was read into the VSIM Tcl interpreter.
Tcl/Tk and ModelSim Example 2 - add a procedure that gets called by a button push Before you begin this example make sure you have completed "Preparing for the Tcl/Tk examples" (p121). In this example you will study a larger Tcl example, and add a procedure that gets called by a button push. This example will display all of the gif images in the images directory. Each button has a binding attached to it for "enter" events, and a binding for a mouse button press.
Tcl/Tk and ModelSim Press all the buttons and notice the object names in the Main transcript. Close the image example window when you’re done. Example 3 - The traffic light simulation In this example you’ll simulate an intersection with traffic lights. The simulation interface you will create allows you to run "what if" scenarios efficiently. Introduction of the traffic intersection widget This portion of our example introduces the traffic intersection widget.
Tcl/Tk and ModelSim For our example, the desired condition is the state of the lights. Whenever the state of the light in the simulation changes, we want to change the color of the light on the screen. 4 Load the VHDL libraries you compiled in preparation for these examples using this command at the ModelSim prompt: vsim tb_traffic Be sure you invoke this command before the start of the connect_lights procedure, if you don't load the libraries, you won't have a design to simulate.
Tcl/Tk and ModelSim Add widgets to display simulation information Running the lights may be interesting, but not very useful - let’s add some displays that will tell us what’s happening to the cars at the intersection. Now you will add queue widgets to display the sum of the length of each pair of queues as we simulate. 8 The East/West widget for displaying the total East/West queue length is already provided. Let's edit the source to add a display for the North/South direction.
Tcl/Tk and ModelSim You can remove the comments in the code to make this change. Similarly, add the North/South widget for controlling the length of the lights. The East/West widget for light control is provided. (You can remove the comments in the code to make this change as well.) These control widgets are implemented using the Tk "scale" widgets, enclosed in a frame. When the value of the scale widget changes, it calls the command specified with the -command option on each scale.
Tcl/Tk and ModelSim Let’s make some changes to the light colors and transition arrows. 2 Open the source file with this command: notepad state-machine.tcl Note the "ModelSim EXAMPLE part 1" comments in the file. Change "both_red" state coordinates as indicated in the file. 3 Note the "ModelSim EXAMPLE part 2" comments in the file. Change the transition arrow coordinates as indicated in the file. 4 Note the "ModelSim EXAMPLE part 3" comments in the file.
Basic Verilog simulation Basic Verilog simulation You must be using ModelSim EE/PLUS or ModelSim EE/VLOG for this lesson. The goals for this lesson are: • compile a Verilog design • examine the hierarchy of the design • list signals in the design • change list attributes • set a breakpoint • add and remove cursors in the waveform display If you’ve completed any previous VHDL lesson you’ll notice that the Verilog and VHDL simulation processes are almost identical.
Basic Verilog simulation 4 Before you compile a source file, you’ll need a design library to hold the compilation results. To create a new design library, make this menu selection in the Main window: Library > Create a New Library. (PROMPT: vlib work) In the Create a New Library dialog box, select Create: a new library and a logical mapping to it. Make sure Library: indicates work, then select OK. This creates a subdirectory named work - your design library - within the current directory.
Basic Verilog simulation Note: Remember, a library directory should not be created using UNIX/DOS commands - always use the Main Library menu or the vlib command. Next, you’ll compile the Verilog design. The example design consists of two Verilog source files, each containing a unique module. The file counter.v contains a module called counter, which implements a simple 8-bit binary up-counter. The other file, tcounter.v, is a testbench module (test_counter) used to verify counter.
Basic Verilog simulation Note: The order in which you compile the two Verilog modules is not important. This may again seem strange to Verilog XL users who understand the possible problems of interface checking between design units, or compiler directive inheritance. ModelSim defers such checks until the design is loaded by VSIM (the HDL simulator). So it doesn't matter here if you choose to compile counter.v before or after tcounter.v.
Basic Verilog simulation The Load Design dialog box allows you to select a design unit to simulate from the specified library. You can also select the resolution limit for the simulation. The default library is work and the default resolution is 1 ns (default). 7 Select Design Unit: test_counter and click Load to accept these settings.
Basic Verilog simulation In the Signals window, control-click on each of the clk, rst, and count signals to make a group selection. Click and hold on the group one more time, then drag it to either pane of the Wave window. HDL items can also be copied from one window to another (or within the Wave and List windows) with the Edit > Copy and Edit > Paste menu selections. You can also delete selected items with the Edit > Delete selection. 11 Next open the Structure and Source windows.
Basic Verilog simulation 12 Rearrange the windows to give yourself a clear view of all open windows (try the Window > Initial Layout menu selection), then click inside the Structure window. Notice how this window describes the hierarchical structure of the design. In the illustration the Structure window shows three hierarchical levels: test_counter, counter and the function called increment. (If test_counter is not displayed you simulated counter instead of test_counter.
Basic Verilog simulation 16 Next change the run length to 500 on the Run Length selector and select the Run button again. Now the simulation has run for a total of 600ns (the default 100ns plus the 500 you just asked for). A status bar reflects this information at the bottom of the Main window. 17 The last command you executed (run 500) caused the simulation to advance for 500ns. You can also advance simulation to a specific time. Type: run @ 3000 This advances the simulation to time 3000ns.
Basic Verilog simulation Your window won’t look exactly like the illustration because your simulation very likely stopped at a different point. Next we'll take a brief look at some interactive debug features of the ModelSim environment. To start with, let's see what we can do about the way the List window presents its data. 20 In the List window select /test_counter/count. From the List window menu bar select Prop > Signal Props. The Modify Signal Properties (list) dialog box is opened.
Basic Verilog simulation Select a display radix of Decimal for the signal count. Click OK. This causes the List window output to change; the count signal is now listed in decimal rather than the default binary. 21 Let’s set a breakpoint at line 30 in the counter.v file (which contains a call to the Verilog function increment). To do this, select dut: counter in the Structure window. Move the cursor to the Source window and scroll the window to display line 30.
Basic Verilog simulation You will see a dot appear next to the line number. This indicates that a breakpoint has been set for that line. Clicking line 30 once more would remove the breakpoint but don’t do that now. 22 Select the Run button from the Main toolbar to resume execution of the simulation. (PROMPT: run) (Main MENU: Run > Run 500 ns) When the simulation hits the breakpoint, it stops running, highlights the Source window with an arrow, and issues a message in the Main window.
Basic Verilog simulation 24 Let’s move through the Verilog source functions with ModelSim’s Step and Step Over commands. Click Step Over on the toolbar. This causes the debugger to step over the function call on line 30. The Step button on the toolbar would have single-stepped the debugger, including each line of the increment function.
us t ra xt tra nsit io zo ns n om iti on in zo 2x om ou t2 zo x om ar e zo om a fu ll ne fin d fin d pr ev io rs or cu te cu le de d ad These Wave window buttons give you quick access to zooming and cursor placement. rs or Basic Verilog simulation Click and drag with the center button (3-button mouse) or right button (2-button mouse) to zoom the display. interval measurement selected cursor is bold When you add a cursor, it is drawn in the middle of the display.
Basic Verilog simulation Another way to position multiple cursors is to use the mouse in the time box tracks at the bottom of the display. Clicking anywhere in a track selects that cursor and brings it to the mouse position. The cursors are designed to snap to the closest wave edge to the left of the mouse pointer. You can position a cursor without snapping by dragging in the area below the waveforms. 29 Experiment with using the cursors, scrolling, and zooming (see page 157 for Wave window shortcuts).
Mixed VHDL/Verilog simulation Mixed VHDL/Verilog simulation You must be using ModelSim EE/PLUS for this lesson. The goals for this lesson are: • compile multiple VHDL and Verilog files • simulate a mixed VHDL and Verilog design • list VHDL signals and Verilog nets and registers • view the design in the Structure window • view the HDL source code in the Source window 1 First, return to the directory you created in "Basic VHDL simulation" (p94).
Mixed VHDL/Verilog simulation 3 Let’s create a new library to hold the mixed design. Make this menu selection in the Main window: Library > Create a New Library. (PROMPT: vlib mixed) In the Create a New Library dialog box select Create: a new library only. In the Library: field type mixed, then select OK. This creates a subdirectory named mixed (your design library) within the current directory. The library contains a special file named _info that is created with the library.
Mixed VHDL/Verilog simulation This opens the Edit Library dialog box; where you can set the library mapping between work and mixed. Type mixed into the Path: field, then click OK. Now you’re ready to compile the design. 5 Compile the HDL files by selecting the Compile button on the toolbar: (PROMPT: vlog cache.v memory.v proc.v) (PROMPT: vcom util.vhd set.vhd top.vhd) This opens the Compile HDL Source Files dialog box. A group of Verilog files can be compiled in any order.
Mixed VHDL/Verilog simulation 6 Depending on the design, the compile order of VHDL files can be very specific. In the case of this lesson, the file top.vhd must be compiled last. Stay in the Compile HDL Source Files dialog box and compile the VHDL files in this order (this invokes the VHDL compiler, vcom): • util.vhd • set.vhd • top.vhd Compiling is now complete, click Done to dismiss the dialog box. 7 Now it’s time to simulate.
Mixed VHDL/Verilog simulation 9 This time you will use the VSIM command line to add all of the HDL items in the region to the List and Wave windows: add list * add wave * (Signals MENU: View > List > Signals in Region) (Signals MENU: View > Wave > Signals in Region) 10 Take a look at the Structure window. Notice the hierarchical mixture of VHDL and Verilog in the design. VHDL levels are indicated by a square “prefix”, while Verilog levels are indicated by a circle “prefix.
Mixed VHDL/Verilog simulation 12 We’ll use ModelSim’s Find/Search function to find the declaration of cache_set within cache.v. From the Source window menu select: Edit > Find; the Search dialog box is displayed. In the Search For: field type cache_set and click Forward. The cache_set declaration is now displayed in the Source window. Note that the declaration of cache_set is a VHDL entity instantiated within the Verilog file cache.v.
Mixed VHDL/Verilog simulation Before you quit, try experimenting with some of the commands you’ve learned from Lesson 1. Note that in this design, “clk” is already driven, so you won’t need to use the force command.
Finding names, and searching for values Finding names, and searching for values You can easily locate HDL item names and values within ModelSim’s windows. Start any of the lesson simulations to try out the Find and Search functions illustrated below. Finding items by name in tree windows You can find HDL item names with the Edit > Find menu selection in these windows: List, Process, Signals, Source, Structure, Variables, and Wave windows.
Finding names, and searching for values The List Signal Search dialog box includes these options: You can locate values for the Signal Name: shown at the top of the dialog box. The search is based on these options (multiple Search Options may be selected): • Search Options: Ignore Glitches Ignore zero width glitches in VHDL signals and Verilog nets. • Search Options: Reverse Direction Search the list from bottom to top.
Finding names, and searching for values • Search Occurrences You can search for the n-th transition or the n-th match on value; Search Occurrences indicates the number of transitions or matches for which to search. • Search Value Valid only if Use signal value is selected; specifies the search value; must be formatted in the same radix as displayed. The result of your search is indicated at the bottom of the dialog box.
Using the Wave window Using the Wave window us t ra xt tra nsit io zo ns n om iti on in zo 2x om ou t2 zo x om ar e zo om a fu ll ne fin d fin d pr ev io rs or cu te cu le de d ad These Wave window buttons give you quick access to zooming and cursor placement. rs or This practice involves the use of Wave window time cursors, zooming the waveform display, and Wave window keyboard shortcuts. Any of the previous lesson simulations may be used with this practice.
Using the Wave window Add Cursor menu selection (or the Add Cursor button shown below). The selected cursor is drawn as a solid line; all other cursors are drawn with dotted lines. Remove cursors by selecting them and choosing using the Cursor > Delete Cursor menu selection (or the Delete Cursor button shown below).
Using the Wave window Zooming - changing the waveform display range Zooming lets you change the simulation range in the windowpane display. You can zoom with either the Zoom menu, toolbar buttons, mouse, keyboard, or VSIM commands. Using the Zoom menu You can use the Wave window menu bar, or call up a Zoom menu window with the right mouse button in the right windowpane. The menu options include: • Zoom Full Redraws the display to show the entire simulation from time 0 to the current simulation time.
Using the Wave window Zooming with the toolbar buttons These zoom buttons are available on the toolbar: Zoom in 2x zoom in by a factor of two from the current view Zoom area use the cursor to outline a zoom area Zoom out 2x zoom out by a factor of two from current view Zoom Full zoom out to view the full range of the simulation from time 0 to the current time Zooming with the mouse To zoom with the mouse, position the mouse cursor to the left side of the desired zoom interval, press the middle mouse bu
Using the Wave window Wave window keyboard shortcuts Using the following keys when the mouse cursor is within the Wave window will cause the indicated actions: Key Action i I or + zoom in o O or - zoom out f or F zoom full l or L zoom last r or R zoom range scroll waveform display up scroll waveform display down scroll waveform display left scroll waveform display right scroll waveform display up by page scroll
Continuing with ModelSim EE Continuing with ModelSim EE More information on ModelSim commands, functions and techniques for use can be found in the following locations: • ModelSim EE/PLUS Reference Manual an Adobe Acrobat (.
A - Technical Support, Updates, and Licensing Technical support - by telephone Mentor Graphics customers In North America For customers who purchased products from Mentor Graphics in North America, and are under a current support contract, technical telephone support is available from the central SupportCenter by calling toll-free 1-800-547-4303. The coverage window is from 6:00am to 5:30pm Pacific Time. All coverage is provided Monday through Friday, excluding Mentor Graphics holidays.
Technical support - electronic support services Technical support - electronic support services Mentor Graphics customers Mentor Graphics Customer Support offers a SupportNet-Email server for North American and European companies that lets customers find product information or submit service requests (call logs) to the SupportCenter 24 hours a day, 365 days a year. The server will return a call log number within minutes.
Technical support - other channels • ModelSim Version: (Use the Help About dialog box with Windows; type vcom for UNIX workstations.
Updates Updates Mentor customers: getting the latest version via FTP You can ftp the latest EE or PE version of the software from the SupportNet site at ftp://supportnet.mentorg.com/pub/mentortech/modeltech/. Instructions are there as well. A valid license file from Mentor Graphics is needed to uncompress the ModelSim EE files. A password from Model Technology is required to uncompress the ModelSim PE files. Contact license@model.com if you are a current PE customer and need a password.
Licenses - ModelSim EE All customers: ModelSim EE licensing ModelSim EE uses Globetrotter’s FLEXlm license manager and files. Globetrotter FLEXlm license files contain lines that can be referred to by the word that appears first on the line. Each kind of line has a specific purpose and there are many more kinds of lines that MTI does not use. A license.dat file example SERVER hostname 11111111 1650 DAEMON modeltech ./modeltech ./options FEATURE vcom modeltech 1998.
Licenses - ModelSim EE A DAEMON line specifies the name of the license daemon and the locations of the daemon and options files it will use. This is the full path to the modeltech daemon. In the example file, the UNIX "./" means "look in the current directory". This is the directory in which the server was started. If the server is to be started from another directory, the full path to the modeltech and options files would need to be added to this line. For example, DAEMON modeltech /usr/mti5.
Online References Lines that start with "#" are comments. If you want to learn more about the tools that license ModelSim, read the license manager appendix in the ModelSim reference manual, and visit GLOBEtrotter at http://www.globetrotter.com/home.htm. All customers: maintenance renewals and EE licenses When maintenance is renewed, a new license file that incorporates the new maintenance expiration date will be automatically sent to you.
- Technical Support, Updates, and Licensing ModelSim EE Tutorial
Index A Assertion errors 105 B Breakpoints continuing simulation after 101 deleting 61 setting 61 viewing 61 C Compile the order of Verilog modules 132 Verilog 129 VHDL 95 Conventions text and command syntax 14 Cursors adding and deleting in the Wave window 87 D Dataflow window (see also, Windows) 35 Debugging a VHDL design 103 Delay specifying stimulus delay 58 Delta collapse deltas in the List window 42 Descriptions of HDL items 65 Design hierarchy viewing in Structure window 67 Design library ModelS
of a Verilog design 135 Home page Model Technology’s home-page URL 16 I Wave window 75 N Nets Instantiation label 68 K Keyboard shortcuts, List window 50 Keyboard shortcuts, Wave window 90, 157 adding to the Wave and List windows 59 displaying in Dataflow window 35 displaying values in Signals window 55 forcing signal and net values 57 saving values as binary log file 59 viewing waveforms 73 Next and previous edges, searching for in Wave window 90 Notepad windows, text editing 33 L Library creation a
S Searching for HDL item names and transitions in the Wave window 88, 155 for values and finding names in windows 21, 150 in tree windows 150 List window signal values, transitions, and names 48 text strings in the List window 48 text strings in the Wave window 85 waveform signal values, edges and names 85 Shortcuts command history 92 List window 50 text editing 33 Wave window 90, 157 Signal transitions searching for 88, 155 Signals adding to a log file 59 adding to the Wave and List windows 59 applying sti
V Values of HDL items 65 Variables window (see also, Windows) 70 Variables, HDL changing value of with the GUI 70 Verilog interface checking between design units 132 source code viewing 61 viewing design in Structure and Source windows 147 Verilog simulation 129 VHDL source code viewing 61 VHDL simulation 94 Viewing design hierarchy 22 W Wave window cursors 140 placing top level Verilog signals in 133 Wave window (see also, Windows) 73 Windows finding HDL item names 21, 150 opening multiple copies 21 openi
Thank you for purchasing ModelSim! Model Technology A M E N T O R G R A P H I C S C O M P A N Y