

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Documentation ModelSim Start Here: http://www.model.com/pdf/se_start.pdf ModelSim Tutorial: http://www.model.com/pdf/se_tutor.pdf Globetrotter FlexLM Doc: http://www.globetrotter.com/manual.htm Web - Download the Latest Release http://www.model.com/support/download.html ftp://ftp.model.com/pub/ (206.103.63.81) [Fast] ftp://support.model.com/pub/model.com/ (206.103.57.2) [Slow] Environment Variables (see ModelSim cmd "printenv") LM_LICENSE_FILE Required Pathname of license.dat file DOPATH Optional Search path for ".do" files EDITOR Optional Specifies editor for "edit" cmd MODELSIM Optional Pathname of modelsim.ini file MODELSIM_TCL Optional List of modelsim.tcl files MODEL_TECH_TCL Optional Pathname to Tcl/Tk libraries MODEL_TECH Don’t Set Used internally by ModelSim MGC_LOCATION_MAP Optional Used as "soft" path to find files MTI_TF_LIMIT Optional Limits Transcript file size (k) PLIOBJS Optional Used to load PLI object files TMPDIR Optional Used by VSIM for temp space Mentor Graphics Licensing Environment Variable MGLS_LICENSE_FILE Pathname for Mentor license file
MGLS_HOME Pathname for Mentor Licensing
PATH Environment Variable Unix: Add /<install_dir>/modeltech/bin to $path PC: PATH will be updated automatically during install Starting the License Server Unix: Copy license.dat file to /<install_dir>/modeltech/
Command Where used: Description (Sh)ell, For details on these commands refer to the (M)odelSim> Model Sim Reference Manual (V)SIM>
vcom Sh, M, V VHDL Compiler (see below) vdel Sh, M, V Deletes a design unit from a specific library vdir Sh, M, V Lists the contents of a library vlib Sh, M, V Creates a design library vlog Sh, M, V Verilog Compiler (see below) vmap Sh, M, V Defines or displays library mappings vsim Sh, M, V VHDL and/or Verilog Simulator (see below)
add button M, V Adds a button (e.g., add button MyRun {run 5000} ) add list | wave V Add signals to the List or Wave windows add log V Log signals to vsim.wlf file for analysis later alias M, V Create a user defined alias (e.g., alias h "history" ) bp, bd V Set/Clear a breakpoint (see Managing Breakpoints below) cd Sh, M, V Change directory change V Modify a VHDL variable or Verilog register checkpoint V Save the state of you simulation (see restore ) configure M, V Configure List or Wave window attributes delete V Remove HDL item from List or Wave window do M, V Execute a file of commands (e.g., do macro.do ) drivers V Display current and future value of signal or net drivers echo M, V Display message (e.g., echo "Time is $now ns." ) edit M, V Invoke editor specified by the EDITOR env variable environment M, V Display or change current region/signal environment examine M, V Examine one or more HDL items (e.g., exa /top/clk ) find V Display pathnames of matching HDL items force V Force signals or nets (e.g., force clk 1 10, 0 20 – r 100 ) history M, V List previous commands log M, V Same as add log above .main clear M, V Clears the Main window transcript noforce V Release signals or nets from force commands notepad M, V Simple text editor printenv M, V Display names and values of environment variables property V Change List or Wave signal attributes (color, radix, etc.) pwd M, V Display current path in Main transcript window radix M, V Change the default radix in all windows report M, V report simulator control returns all control variable values report M, V report simulator state returns all state variable values restart V Restart the simulator restore M, V Restore the simulation state from a previous checkpoint resume M, V Resume macro execution after a pause command right | left V Search in wave window for next transition or –expr run V Advance simulation time (e.g., run 1000 ) search | next V Search specified window for next item matching pattern seetime V Scroll List or Wave window to time (e.g., seetime wave 500 ) view M, V Open a ModelSim window and pop it to the top vsource V Display HDL source file in Source window when M, V Perform action on condition (e.g., when clk=1 {echo clk} ) where M, V Display info about the environment write M, V Records names, window contents and preferences to a file
<ctrl-a> M, V Move to beginning of line <ctrl-e> M, V Move to end of line <ctrl-c> M, V Copy the selection in the Main transcript window <ctrl-v> M, V Paste to the Main transcript window (see <ctrl-c> ) !! | !n M, V Repeat last command, Repeat nth command !abc M, V Repeat cmd starting "abc" ^abc^xyz M, V Replace "abc" in previous command with "xyz" dumplog64 Sh Dump the contents of the vsim.wlf file in a readable form vgencomp Sh Create VHDL component from compiled Verilog module vmake Sh Print a makefile for a library
ModelSim Editions ModelSim-PE Personal Edition (FPGA, Basic Functionality) ModelSim-SE/EE Special Edition / Elite Edition (ASIC signoff, Code Coverage, Performance Analyzer) ModelSim Products ModelSim-VHDL VHDL Compiler, Simulator, Debugger ModelSim-VLOG Verilog Compiler, Simulator, Debugger ModelSim-PLUS VHDL & Verilog Compiler, Siumlator, Debugger ModelSim-LNL VHDL or Verilog Compiler, Simulator, Debugger ModelSim Definitions LNL Language Neutral Licensing (VHDL or Verilog) SKS Single Kernel Simulator Quick Guide Notes Find this document at http://www.model.com/pdf/se_guide.pdf Commands in bold are typed at the ModelSim> or VSIM> prompts Licensing Help http://www.model.com/resources/licensing/licensing_help.html
Copyright © 2000, Model Technology Incorporated Reproduction Permitted (and encouraged!)
A M E N T O R G R A P H I C S C O M P A N Y
Key Arguments (use – help for full list) [-help] Display vlog syntax help [-version] Returns vlog version [-compat] Disable event order optimizations [-f
Key Arguments (use – help for full list) [-help] Display vsim syntax help [-version] Returns vsim version [-c ] Run in cmd line mode [-do "cmd" |
Key Arguments (use – help for full list) [-help] Display vcom syntax help [-version] Returns vcom version [-93] [-87] Choose VHDL-1993 or 1987 [-check_synthesis] Turn on synthesis checker [-debugVA] Print VITAL opt status [-explicit] Resolve ambiguous overloads [-f
modelsim.ini System Initialization or Project file; stores library locations, simulator resolution, paths, etc. modelsim.tcl Window sizes, positions, colors, etc.; user Tcl/Tk code startup.do Default name of macro executed after design is loaded See "startup=" line in modelsim.ini transcript Default filename that ModelSim transcript window activity is saved to vsim.wlf Default name of simulation log file saved by VSIM my_project.mpf Model Sim project file
Copy modelsim.ini to current directory Execute vmap -c Loading order (stops after finding first file)
Loading order Always loads: /<install_dir>/modeltech/tcl/vsim/pref.tcl Loads the first found from:
Environment Variable Examples MODELSIM_TCL #Print the string length of "Hello, World!" Online Documentation set len [string length "Hello, World!" ] Help->Tcl Help echo "Hello, World! is $len characters long!" Help->Tcl Syntax #Create a button in the wave window that does something Help->Tcl Man Pages apply_button_adder wave controls right red white SayHi {echo hi} Help->Technotes->MTI_Widgets #Display the Tcl/Tk source code to apply_button_adder Language Syntax info body apply_button_adder command arg1 arg2 arg3 … #Set the right mouse button to execute "drivers" on selected signal Language Syntax: Commands bind .signals.tree <Button-3> { set
VITAL 2.2b & ‘ 95 Verilog IEEE Std 1364- PLI 1. Timing SDF 1.0, 2.0, & 2. Value Change Dump VCD for Verilog and VHDL
Paper and Online (see docs sub-directory) Start Here se_start.pdf User’s Manual se_man.pdf Command Reference se_cmds.pdf ModelSim Tutorial se_tutor.pdf Technical Notes www.model.com/support/technote/index.html See <install_dir>/modeltech/docs/technotes Company Periodical ModelUser (req via [email protected]) ModelSim Help Pulldown Help > Release Notes Help > Tcl Man Pages Training http://www.model.com/support/training.html This Quick Guide http://www.model.com/pdf/se_guide.pdf
bp Sets a breakpoint; without arg shows all bps bd Deletes a breakpoint disablebp Turn off all breakpoints onbreak Define what to do when a breakpoint is hit during a macro (e.g., onbreak {resume}) when Perform actions under certain conditions Examples bp alu.vhd 147 {do macro.do} Set breakpoint bd alu.vhd 147 Clear breakpoint when – label when1 {clk’event and b="01100111"} { echo "Signal c is [examine – bin c]" stop } Use "when" to show the current whens.
Copyright © 2000, Model Technology Incorporated Reproduction Permitted (and encouraged!) 1020-