Home

ModelSim Reference Manual

image

Contents

1. Example 12 hc91 This is the preferred notation because it removes the ambiguity about the number of bits Based notation Ox OX 0o 0O Ob OB ModelSim automatically zero fills unspecified upper bits Variables Table 1 12 Variables Supported for GUI Expresssions Name of a signal The name may be a simple name a VHDL or Verilog style extended identifier or a VHDL or Verilog style path The signal must be one of the following types VHDL signal of type INTEGER REAL or TIME VHDL signal of type std_logic or bit VHDL signal of type user defined enumeration Verilog net Verilog register Verilog integer or Verilog real ModelSim Reference Manual v10 1c 29 Syntax and Conventions GUIL_expression_format Table 1 12 Variables Supported for GUI Expresssions cont NOW Returns the value of time at the current location in the WLF file as the WLF file is being scanned not the most recent simulation time Array variables Table 1 13 Array Variables Supported for GUI Expresssions Variable Name of asignal VHDL signals of type bit_vector or std_logic_vector Verilog register Verilog net array A subrange or index may be specified in either VHDL or Verilog syntax Examples mysignal 1 to 5 mysignal 1 5 mysignal 4 mysignal 4 Signal attributes lt name gt event lt name gt rising lt name gt falling lt name gt delayed lt n
2. SIM 5 gt Find insource memory cache vhd 1 16 a i i a a a a a a a ai a a ta a a a Local MRU memory ree memory vhd 12 entity memory is memory vhd 21 end entity memory memory vhd 25 architecture RTL of memory is top vhd 44 component memory top vhd 83 m memory port mapfclk saddr sdata srw sstrb srdy SIM 6 gt Find insource memory port top vhd 83 m memory port maptclk saddr sdata srw sstrb srdy SIM 7 gt A Transcript al Related Topics DISABLE_ELAB_DEBUG environment variable 144 ModelSim Reference Manual v10 1c Commands force force This command allows you to apply stimulus interactively to VHDL signals Verilog nets and registers and SystemC boundary types It is possible to create a complex sequence of stimuli when the force command is included in a macro file There are a number of constraints on what you can and cannot force You can force e VHDL signals or parts of signals e Verilog nets and registers bit selects part selects and field selects Refer to Force and Release Statements in Verilog for more information e Virtual Signals if the number of bits corresponds to the signal value e An alias of a VHDL signal e An input port that is mapped at a higher level in VHDL and mixed models You cannot force e Virtual functions e VHDL variables Refer to the change command for information on working with VHDL variables
3. Specifies a SystemVerilog class Note that you must use quotation marks with this argument e over optional Directs ModelSim to run VHDL procedures and functions Verilog tasks and functions but to treat them as simple statements instead of entering and tracing them line by line Examples e Advance the simulator 1000 timesteps run 1000 e Advance the simulator the appropriate number of timesteps corresponding to 10 4 milliseconds run 10 4 ms e Advance the simulator to timestep 8000 run 8000 218 ModelSim Reference Manual v10 1c Commands run e Advance the simulator into the instance top p run step inst top p Related Topics Simulate Toolbar ModelSim Reference Manual v10 1c 219 Commands runStatus runStatus This command returns the current state of your simulation to stdout after issuing a run or step command Syntax runStatus full Arguments e full optional Appends additional information to the output of the runStatus command Returns Table 2 3 runStatus Command States and Table 2 4 runStatus full Command Information show outputs of the runStatus command Table 2 3 runStatus Command States Description The design is loaded and is ready to run break The simulation stopped before completing the requested run error The simulation stopped due to an error condition loading nodesign The simulation is currently elaborating The
4. busy gt busy Line 111 gt 111 waiting gt waiting Line 120 gt 120 114 gt 114 waiting gt busy Line 111 gt 111 a ea eee ee ee ee ee ee re a When you do not specify this switch you will receive a message similar to Note vlog 143 Detected 1 FSM s in design unit serial_mul rtl fsmxassign nofsmxassign optional Toggles recognition of finite state machines FSMs containing X assignment This option is used to detect FSMs if current state variable or next state variable has been assigned X value in a case statement FSMs containing X assign are otherwise not detectable This setting is on by default ModelSim Reference Manual v10 1c Commands vlog e gen_xml lt design_unit gt lt filename gt Produces an XML tagged file containing the interface definition of the specified module Optional This option requires a two step process where you must 1 compile lt filename gt into a library with vlog without gen_xml then 2 execute vlog with the gen_xml switch for example vlib work vlog counter v vlog gen_xml counter counter xml e hazards Detects event order hazards involving simultaneous reading and writing of the same register in concurrently executing processes Optional You must also specify this argument when you simulate the design with vsim Refer to Hazard Detection for more details Note A Enabling hazards implicitly enables t
5. c capacity classdebug colormap new debugdb lt db_pathname gt defaultstdlogicinittoz delayed_timing_checks display lt display_spec gt displaymsgmode both tran wlf do lt command_string gt lt macro_file_name gt donotcollapsepartiallydriven dpiforceheader dpiforceheader dpiheader dpilib lt libname gt dpioutoftheblue 0 1 2 dumpports collapse dumpports nocollapse dumpports direction dumpports no_strength_range dumpports unique error lt msg_number gt lt msg_number gt enumfirstinit errorfile lt filename gt ModelSim Reference Manual v10 1c 351 Commands vsim 352 f lt filename gt fatal lt msg_number gt lt msg_number gt g lt Name gt lt Value gt G lt Name gt lt Value gt gblso lt filename gt geometry lt geometry_spec gt gui hazards help i initregNBA installcolormap keeploaded keeploadedrestart keepstdout 1 lt filename gt L lt library_name gt lib lt libname gt lt library_name gt lt design_unit gt Lf lt library_name gt maxdelays mindelays modelsimini lt ini_filepath gt msglimit lt msg_number gt lt msg_number gt msgmode both tran wlf multisource_delay min max latest multisource_int_delays name lt name gt no_autodtc noautoldlibpath nodpiexports no_cancelled_e
6. required unless all is used Specifies the entity package configuration or module to be deleted lt arch_name gt Specifies the name of an architecture to be deleted If omitted all of the architectures for the specified entity are deleted Invalid for a configuration or a package verbose optional Displays progress messages Examples Delete the work library vdel all Delete the synopsys library vdel lib synopsys all Delete the entity named xor and all its architectures from the work library vdel xor Delete the architecture named behavior of the entity xor from the work library vdel xor behavior Delete the package named base from the work library vdel base ModelSim Reference Manual v10 1c 289 Commands vdir vdir This command lists the contents of a design library and checks the compatibility of a vendor library If vdir cannot read a vendor supplied library the library may not be compatible with ModelSim This command provides additional information with the help switch Syntax vdir 1 prop lt prop gt r all lib lt library_name gt lt design_unit gt modelsimini lt ini_filepath gt Arguments 290 all optional Lists the contents of all libraries listed in the Library section of the active modelsim ini file Refer to modelsim ini Variables for more information lt design_unit gt optional Indicates the design unit to search for within the sp
7. Examples 322 Reconstruct a bus sim chip alu a 4 downto 0 using VHDL notation assuming that a_ii are all scalars of the same type virtual signal env sim chip alu concat_range 4 downto 0 a_04 amp a_03 amp a_02 amp a_01 amp a_00 a Reconstruct a bus sim chip alu a 4 0 using Verilog notation Note that the concatenation notation starts with amp rather than virtual signal env sim chip alu concat_range 4 0 amp a_04 a_03 a_02 a_01 a_00 a Create a signal sim testbench stuff which is a record type with three fields corresponding to the three specified signals The example assumes chipa mode is of type integer chipa alu a is of type std_logic_vector and chipa decode inst is a user defined enumeration virtual signal install sim testbench chipa alu a 19 downto 13 amp chipa decode inst amp chipa mode stuff Create a virtual signal that is the same as top signalA except it is delayed by 10 ps virtual signal delay 10 ps top signalA myDelayedSignalA Create a three bit signal chip address_mode as an alias to the specified bits virtual signal chip instruction 23 21 address_mode Concatenate signals a b and c with the literal constant 000 virtual signal a amp b amp c amp 3 b000 myextendedbus Add three missing bits to the bus num creates a virtual signal fullbus and then adds that signal to the Wave window M
8. ModelSim Reference Manual v10 1c 85 Commands call call This command calls SystemVerilog static functions and class functions directly from the vsim command line in live simulation mode Tasks are not supported Function return values are returned to the vsim shell as a Tcl string If the function returns a class reference the class instance ID is returned Syntax Calling a function call lt pathToFunction gt classInstancePath functionArg0 functionArg1 Arguments 86 pathToFunction required The name of a function The function name may be qualified in one of three ways 1 By specifying the path to the function declaration through the structural hierarchy or declaration hierarchy Hierarchical paths must be specified as a full path to a function or a function that exists relative to the current context as shown in the Structure window or returned by the environment command 2 By specifying a class instance hierarchical path 3 By specifying a class instance id string classInstancePath optional Must be specified if the function path is a declaration path and the function is a non static class function Conversely the class instance path name must not be specified if the given function path is a class instance variable reference or a class instance name in the format lt class_type gt nnn This is because the class instance information can be extracted from the pathname itself functionAr
9. No arguments Runs the simulation for the default time 100 ns You can change the default lt timesteps gt and lt time_units gt in the GUI with the Run Length toolbar box in the Simulate toolbar or from the modelsim ini file RunLength and UserTimeUnit variables lt timesteps gt lt time_units gt optional Specifies the number of timesteps for the simulation to run The number may be fractional or may be specified as absolute by preceding the value with the character lt time_units gt Any valid time unit fs ps ns us ms or sec where the default is to use the current time unit all optional Causes the simulator to run the current simulation forever or until it hits a breakpoint or specified break event continue optional Continues the last simulation run after a run step run step over command or a breakpoint A run continue command may be input manually or used as the last command in a bp command string final optional Instructs the simulator to run all final blocks then exit the simulation init optional Initializes non trivial static SystemVerilog variables before beginning the simulation for example expressions involving other variables and function calls This could be useful for when you want to initialize values before executing any force examine or bp commands You cannot use run init after any other run commands or if you have specified vsim runinit on the command line
10. onbreak exa data cont e Resume execution of the macro file on encountering a breakpoint onbreak resume 186 ModelSim Reference Manual v10 1c Commands onbreak e This set of commands test for assertions Assertions are treated as breakpoints if the severity level is greater than or equal to the current BreakOnAssertion variable setting refer to modelsim ini Variables By default a severity level of failure or above causes a breakpoint a severity level of error or below does not set broken 0 onbreak lassign runStatus full status fullstat if Sstatus eq error Unexpected error report info and force an error exit echo Error fullstat set broken 1 resume elseif S status eq break If this is a user break then issue a prompt to give interactive control to the user if string match user_ Sfullstat pause else Assertion or other break condition set broken 2 resume else resume run all if Sbroken 1 Unexpected condition Exit with bad status echo failure quit force code 3 elseif Sbroken 2 Assertion or other break condition echo error quit force code 1 else echo Success quit force Related Topics e abort e Useful Commands for Handling e bp Breakpoints and Errors e do e Macros DO Files onerror resume status ModelSim Reference Manual v10 1c 187 Commands onElabError onElabError This command s
11. optional Specifies the name of the VCD file If omitted the command is executed on the file designated by the vcd file command or dump vcd if ved file was not invoked Related Topics ved add ved checkpoint vcd dumpports ved dumpportsall vcd dumpportsflush vcd dumpportslimit vcd dumpportsoff vcd dumpportson vcd file 256 vcd files ved flush vcd limit ved off ved on ved2wlf DumpportsCollapse Value Change Dump VCD Files Verilog tasks are documented in the Language Reference Manual IEEE 1364 standard ModelSim Reference Manual v10 1c Commands ved dumpports vcd dumpports This command creates a VCD file that includes port driver data By default all port driver changes are captured in the file You can filter the output using arguments detailed below Related Verilog task dumpports Arguments to this command are order dependent Please read the argument descriptions for more information Syntax vcd dumpports compress direction file lt filename gt force_direction in out inout no_strength_range unique vcdstim lt object_name gt Arguments compress optional Produces a compressed VCD file ModelSim uses the gzip compression algorithm It is not necessary to specify compress if you specify a gz extension with the file lt filename gt argument direction optional Includes driver direction data in the VCD file file lt filename gt optional C
12. Clock patterns wave create pattern clock dutycycle lt value gt period lt time gt lt unit gt lt object_name gt Constant patterns wave create pattern constant initialvalue lt value gt value lt value gt lt object_name gt 388 ModelSim Reference Manual v10 1c Commands wave create Random patterns wave create pattern random initialvalue lt value gt period lt time gt lt unit gt random_type normal uniform poisson exponential seed lt value gt lt object_name gt Repeater patterns wave create pattern repeater initialvalue lt value gt period lt time gt lt unit gt repeat forever never lt n gt sequence lt val1 gt lt val2 gt Counter patterns wave create pattern counter direction up down upthendown downthenup initialvalue lt value gt period lt time gt lt unit gt repeat forever never lt n gt startvalue lt value gt endvalue lt value gt step lt value gt type binary gray johnson onehot range zerohot lt object_name gt No pattern wave create pattern none lt object_name gt Arguments e pattern clock constant random repeater counter none required Specifies the waveform pattern Refer to Creating Waveforms from Patterns for a description of the pattern types clock Specifies a clock pattern constant Specifies a constant pattern random Speci
13. ModelSim Reference Manual Software Version 10 1c 1991 2012 Mentor Graphics Corporation All rights reserved This document contains information that is proprietary to Mentor Graphics Corporation The original recipient of this document may duplicate this document in whole or in part for internal business purposes only provided that this entire notice appears in all copies In duplicating any part of this document the recipient agrees to make every reasonable effort to prevent the unauthorized use and distribution of the proprietary information This document is for information and instruction purposes Mentor Graphics reserves the right to make changes in specifications and other information contained in this publication without prior notice and the reader should in all cases consult Mentor Graphics to determine whether any changes have been made The terms and conditions governing the sale and licensing of Mentor Graphics products are set forth in written agreements between Mentor Graphics and its customers No representation or other affirmation of fact contained in this publication shall be deemed to be a warranty or give rise to any liability of Mentor Graphics whatsoever MENTOR GRAPHICS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL INDIRECT SPEC
14. Signal foo top ul all signals under ul top ul same as line above r top u2 recursively all signals under u2 Note that you can produce these files from scratch but be careful with syntax wlfman items always creates a legal object_list_file wlfman filter reads in a WLF file and optionally an object_list_file and writes a new WLF file containing filtered information from those sources You determine the filtered information with the arguments you specify wlfman monitor returns the current state of a WLF file to the transcript Each time the state is monitored a line of information is output The state of the WLF file can be monitored at regular intervals indicating the changes over time Here is an example wlfman monitor visim wlf File Sim State Time closed 14000 wlfman profile generates a report of the estimated percentage of file space that each signal is taking in the specified WLF file This command can identify signals that account for a large percentage of the WLF file size such as a logged memory that uses a zero delay integer loop to initialize the memory You may be able to drastically reduce WLF file size by not logging those signals wlfman merge combines two WLF files with different signals into one WLF file It does not combine wlf files containing the same signals at different runtime ranges 1 e mixedhdl_Ons_100ns wlf amp mixedhdl_100ns_200ns wlf wlfman optimize copies the data fro
15. This command adds the specified objects to a VCD file The allowed objects are Verilog nets and variables and VHDL signals of type bit bit_vector std_logic and std_logic_vector other types are silently ignored The command works with mixed HDL designs All ved add commands must be executed at the same simulation time The specified objects are added to the VCD header and their subsequent value changes are recorded in the specified VCD file By default all port driver changes and internal variable changes are captured in the file You can filter the output using arguments detailed below Related Verilog tasks dumpvars fdumpvars Arguments to this command are order dependent Please read the argument descriptions for more information Syntax vcd add dumpports file lt filename gt in out inout ports internal r r optcells lt object_name gt Arguments dumpports optional Specifies port driver changes to be added to an extended VCD file When the ved dumpports command cannot specify all port driver changes that will appear within the VCD file multiple ved add dumpports commands can be used to specify additional port driver changes file lt filename gt optional Specifies the name of the VCD file This option should be used only when you have created multiple VCD files using the vcd files command lt filename gt A vcd file in optional Includes only port driver chang
16. You can invoke vcom either from within ModelSim or from the command prompt of your operating system You can invoke this command during simulation Compiled libraries are dependent on the major version of ModelSim When moving between major versions you must refresh compiled libraries using the refresh argument to vecom This is not required for minor versions letter releases All arguments to the vecom command are case sensitive For example WORK and work are not equivalent This command provides additional information with the help switch Syntax vcom options lt filename gt lt filename gt options 87 93 2002 2008 addpragmaprefix lt prefix gt allowProtectedBeforeBody amsstd noamsstd bindAtCompile bindAtLoad check_synthesis debugVA deferSubpgmCheck noDeferSubpgmCheck error lt msg_number gt lt msg_number gt explicit f lt filename gt fatal lt msg_number gt lt msg_number gt force_refresh lt design_unit gt fsmimplicittrans nofsmimplicittrans fsmresettrans nofsmresettrans fsmsingle nofsmsingle fsmverbose b t w gen_xml lt design_unit gt lt filename gt ignoredefaultbinding ignorepragmaprefix lt prefix gt ignoreStandardRealVector ignorevitalerrors initoutcompositeparam noinitoutcompositeparam just abcep 1 lt filename gt line lt number gt lint lower IrmWV
17. boolean 32 ModelSim Reference Manual v10 1c Syntax and Conventions GUI_expression_format Table 1 15 Precedence of GUI Expression Operators cont M 2 Note Arithmetic operators use the std_logic_arith package Casting Table 1 16 Casting Conversions Supported for GUI Expresssions Casting Description bool convert to boolean boolean convert to boolean int convert to integer integer convert to integer real convert to real time convert to 64 bit integer std_logic convert to 9 state signal value signed convert to signed vector unsigned convert to unsigned vector std_logic_vector convert to unsigned vector Examples of Expression Syntax top bus amp S bit_mask This expression takes the bitwise AND function of signal top bus and the array constant contained in the global Tcl variable bit_mask clk event amp amp top xyz 16 hffae This expression evaluates to a boolean true when signal clk changes and signal top xyz is equal to hex ffae otherwise is false clk rising amp amp mystate reading amp amp top u3 addr 32 habcd1234 Evaluates to a boolean true when signal c k just changed from low to high and signal mystate is the enumeration reading and signal top u3 addr is equal to the specified 32 bit hex constant otherwise is false ModelSim Reference Manual v10 1c 33 Syntax and Conventions GUIL_expressio
18. delta all collapse events none gateduration lt duration_open gt gateexpr lt expression gt usegating off on strobeperiod lt period gt lt unit gt strobestart lt start_time gt lt unit gt usesignaltriggers 0 1 usestrobe 0 1 Wave Window Arguments childrowmargin lt pixels gt cursorlockcolor lt color gt gridauto off on gridcolor lt color gt griddelta lt pixels gt gridoffset lt time gt lt unit gt gridperiod lt time gt lt unit gt namecolwidth lt width gt rowmargin lt pixels gt signalnamewidth lt value gt timecolor lt color gt timeline 0 1 timelineunits fs ps ns us ms sec min hr valuecolwidth lt width gt vectorcolor lt color gt waveselectcolor lt color gt waveselectenable 0 1 Description The command works in three modes e without options or values it returns a list of all attributes and their current values e with just an option argument without a value it returns the current value of that attribute e with one or more option value pairs it changes the values of the specified attributes to the new values The returned information has five fields for each attribute the command line switch the Tk widget resource name the Tk class name the default value and the current value Arguments list wave required Controls the widget to confi
19. e lt filename gt optional Redirects log output to the file designated by lt filename gt lt filename gt Specifies a file for saving output e o lt filename gt optional Combines all encrypted output into a single file lt filename gt Specifies a file for saving output e p lt prefix gt optional Prepends file names with a prefix lt prefix gt Any alpha numeric string e quiet optional Disables encryption messages Example e Insert header information into all design files listed vencrypt h encrypt_head top v cache v gates v memory v The encrypt_head file may look like the following pragma protect data_method aes128 cbc pragma protect author IP Provider pragma protect key_keyowner MTI key_method rsa pragma protect key_keyname MGC DVT MTL pragma protect begin There is no pragma protect end expression in the header file just the header block that starts the encryption The pragma protect end expression is implied by the end of the file For more detailed examples see Protecting Your Source Code in the User s Manual Related Topics e vhencrypt e Protecting Your Source Code in the User s Manual 294 ModelSim Reference Manual v10 1c Commands verror verror This command prints a detailed description about a message number It may also point to additional documentation related to the error Syntax verror fmt
20. virtual save kind implicits explicits append lt filename gt Arguments kind implicits explicits optional Saves only a subset of virtuals implicits virtual signals created internally by the tool explicits virtual signals explicitly created by a user such as with the virtual signal command Unique abbreviations are accepted append optional Specifies to save only virtuals that are not already saved or weren t read in from a macro file These unsaved virtuals are then appended to the specified or default file Optional lt filename gt optional The name of the file containing the definitions If you don t specify lt filename gt the default virtual filename virtuals do will be used You can specify a different default in the pref tcl file Related Topics virtual count e Virtual Objects ModelSim Reference Manual v10 1c 319 Commands virtual show virtual show This command lists the full path names of all explicitly defined virtuals Syntax e virtual show kind implicits explicits Arguments e kind implicits explicits optional Lists only a subset of virtuals implicits virtual signals created internally by the tool explicits virtual signals explicitly created by a user such as with the virtual signal command Unique abbreviations are accepted Related Topics virtual define virtual describe e Virtual Objects 320 ModelSim Reference
21. watch wave restart required Specifies that the contents of the designated window are recorded in the file specified by lt filename gt assertions Records objects of the Assertions window breakpoints Records file line and signal breakpoints coverdirective Records objects of the Coverdirectives window export_hier_config Records hierarchical sort order for objects in the Verification Results Analysis window list Records objects of the List window 424 ModelSim Reference Manual v10 1c Commands write format memory Records objects of the Memory window msgviewer Records objects of the Message Viewer window testbrowser Records objects of the Verification Management Browser window watch Records objects of the Watch window wave Records objects of the Wave window restart Records objects of all windows and breakpoints in the do file e lt filename gt required Specifies the name of the output file where the data is to be written You must specify the do extension Examples Save the current data in the List window in a file named alu_list do write format list alu_list do Save the current data in the Wave window in a file named alu_wave do write format wave alu_wave do Output e Below is an example of a saved Wave window format file onerror resume quietly WaveActivateNextPane 0 add wave noupdate format Logic cntr_struct ld add wave
22. wave modify pattern counter period lt value gt repeat forever lt n gt never startvalue lt value gt step lt value gt direction up down upthendown downthenup 400 ModelSim Reference Manual v10 1c Commands wave modify endvalue lt value gt type binary gray johnson onehot range zerohot lt wave_name gt Random patterns only wave modify pattern random period lt value gt random_type exponential normal poisson uniform seed lt value gt lt wave_name gt Repeater patterns only wave modify pattern repeater period lt value gt repeat forever lt n gt never sequence vall val2 val3 lt wave_name gt No pattern wave create pattern none lt wave_name gt Arguments e direction up down upthendown downthenup optional recommended when specifying pattern counter The direction in which the counter will increment or decrement up default Increment only down Decrement only upthendown Increment then decrement downthenup Decrement then increment e driver freeze deposit driver expectedoutput optional Specifies that the signal is a driver of the specified type Applies to signals of type inout or internal e dutycycle lt value gt required The duty cycle of the clock expressed as a percentage of the period that the clock is high lt value gt Any integer from 0 to 100 where the default is 50 e endtime
23. 69 analog signal formatting 61 annotating interconnect delays v2k_int_delays 378 archives library 327 argument 337 arrays indexes 13 slices 13 arrays VHDL searching for 26 assertions testing for with onbreak command 187 attributes of signals using in expressions 30 B batch_mode command 72 batch mode simulations ModelSim Reference Manual v10 1c JKLMNOPQRSTUVWXYZ Index halting 411 bd breakpoint delete command 73 binary radix mapping to std_logic values 37 bookmark add wave command 75 bookmark delete wave command 77 bookmark goto wave command 78 bookmark list wave command 79 bp breakpoint command 80 break on signal value 406 breakpoints conditional 406 continuing simulation after 217 deleting 73 listing 80 setting 80 signal breakpoints when statements 406 time based in when statements 412 busses user defined 64 O call command 86 case choice must be locally static 282 case sensitivity VHDL vs Verilog 17 cd change directory command 88 change command 89 check_synthesis argument 277 class objects viewing 91 classinfo command 91 Color radix 204 example 205 combining signals busses 64 commands abort 48 add dataflow 49 add list 51 439 ABCDEFGH add memory 55 add message 57 add watch 59 add wave 60 alias 69 batch_mode 72 bd breakpoint delete 73 bookmark add wave 75 bookmark delete wave 77 bookma
24. Commands mem load In the MTI memory data file format internal file address and data radix settings are stored within the file itself Thus there is no need to specify these settings on the mem load command line If a format specified on the command line and the format signature stored internally within the file do not agree the file cannot be loaded e lt path gt optional The hierarchical path to the memory instance If the memory instance name is unique shorthand instance names can be used The default is the current context as shown in the Structure window Memory address indexes can be specified in the instance name also If addresses are specified both in the instance name and the file only the intersection of the two address ranges is populated with memory data e skip lt Nwords gt optional Specifies the number of words to be skipped between each fill pattern value Used with filltype and filldata lt Nwords gt Specified as an unsigned integer e startaddress lt st gt optional Specifies the start address for a range of addresses to be loaded lt st gt Any valid address in the memory e truncate optional Ignores any most significant bits msb in a memory word which exceed the memory word size By default when memory word size is exceeded an error results Examples Load the memory pattern from the file vals mem to the memory instance top m mem filling the rest of the memory with the
25. Disables the splash screen Related Topics e do e Using a Startup File vsim ModelSim Reference Manual v10 1c 179 Commands noforce noforce This command removes the effect of any active force commands on the selected HDL objects and also causes the object s value to be re evaluated Syntax noforce lt object_name gt Arguments e lt object_name gt required Specifies the name of an object Must match an object name used in a previous force command Multiple object names may be specified as a space separated list Wildcard characters are allowed Related Topics e force e Wildcard Characters 180 ModelSim Reference Manual v10 1c Commands nolog nolog This command suspends writing of data to the wave log format WLF file for the specified signals A flag is written into the WLF file for each signal turned off and the GUI displays No Data for the signal s until logging for the signal s is turned back on Logging can be turned back on by issuing another log command or by doing a nolog reset Because use of the nolog command adds new information to the WLF file WLF files created when using the nolog command cannot be read by older versions of the simulator Transactions written in SCV or Verilog are logged automatically and can be removed with the nolog command A transaction is logged into the w f file if logging is enabled in other words if no nolog command has disabled it for that s
26. Syntax printenv lt var gt Arguments e lt var gt optional Specifies the name s of the environment variable s to print Examples e Print all environment variable names and their current values printenv Returns CC gcc DISPLAY sr1 0 0 e Print the specified environment variables printenv USER HOME Returns USER vince HOME scratch srl vince 194 ModelSim Reference Manual v10 1c Commands process report process report This command creates a textual report of all processes displayed in the Process Window Syntax process report file lt filename gt append Arguments e file lt filename gt optional Creates an external file where raw process data will be saved If file is not specified then the output is redirected to stdout lt filename gt A user specified name for the file e append optional Specifies that process data is to be appended to the current process report file If this option is not used the process data will overwrite the existing process report file ModelSim Reference Manual v10 1c 195 Commands project project This command is used to perform common operations on projects Prerequisites Some arguments to this command require a project to be opened with either the project new or project open command Some argument must be used outside of a simulation session Please read the argument descriptions for more information Syntax
27. The reason value will be one of WLF_STARTLOG WLF_ENDLOG WLF_EVENT or WLF_WAKEUP The function is expected to return continue stop or empty If continue or empty is returned the search continues making additional callbacks as necessary If stop is returned the search stops and control is returned to the caller of the searchlog command wee wee Only searching for a single signal is supported e count lt n gt optional Specifies to search for the nth occurrence of the match condition lt n gt Any positive integer 222 ModelSim Reference Manual v10 1c Commands searchlog e deltas optional Indicates to test for a match on simulation delta cycles Otherwise matches are only tested for at the end of each simulation time step e endtime lt time gt lt unit gt optional Specifies the simulation time at which to end the search By default no end time is specified lt time gt Specified as an integer or decimal number Current simulation units are the default unless specifying lt unit gt lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid VHDL time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces e eny lt path gt optional Indicates to test for a match on simulatio
28. WLF reader caching caches blocks of the WLF file to reduce redundant file I O This should have significant benefit in slow network environments This option may also be specified with the WLFCacheSize variable in the modelsim ini file wlfcollapsedelta default Instructs ModelSim to record values in the WLF file only at the end of each simulator delta step Any sub delta values are ignored May dramatically reduce WLF file size This option may also be specified with the WLFCollapseMode variable in the modelsim ini file wlfcollapsetime optional Instructs ModelSim to record values in the WLF file only at the end of each simulator time step Any delta or sub delta values are ignored May dramatically reduce WLF file size This option may also be specified with the WLFCollapseMode variable in the modelsim ini file nowlfcollapse optional Instructs ModelSim to preserve all events for each logged signal and their event order to the WLF file May result in relatively larger WLF files This option may also be specified with the WLFCollapseMode variable in the modelsim ini file wlfcompress default Creates compressed WLF files Use wlfnocompress to turn off compression This option may also be specified with the WLFCompress variable in the modelsim ini file nowlfcompress optional Causes vsim to create uncompressed WLF files WLF files are compressed by default in order to reduce file size This may slow simulation speed by on
29. WT_BLK_4 11 b00100000000 WT_BLK_5 11 b01000000000 RD_WD_1 color green 11 b10000000000 RD_WD_2 color green default hex defaultcolor white If a pattern label pair does not specify a color the normal wave window colors will be used If the value of the waveform does not match any pattern then the default radix and defaultcolor will be used ModelSim Reference Manual v10 1c 205 Commands radix define To specify a range of values wildcards may be specified for bits or characters of the value The wildcard character is similar to the iteration character in a Verilog UDP for example radix define 6 b01 700 Write color orange 6 b10 00 Read color green In this example the first pattern will match 010000 010100 011000 and 011100 In case of overlaps the first matching pattern is used going from top to bottom Related Topics User Defined Radices radix radix delete radix names radix list radix signal 206 ModelSim Reference Manual v10 1c Commands radix delete radix delete This command will remove the radix definition from the named radix Syntax radix delete lt name gt Arguments e lt name gt required Removes the radix definition from the named radix Related Topics User Defined Radices radix radix define radix list radix names radix signal ModelSim Reference Manual v10 1c 207 Commands radix list radix list This command will retu
30. decimal octal hex symbolic time and default If you do not specify a radix for an enumerated type the command uses the symbolic representation You can change the default radix for the current simulation using the radix command You can change the default radix permanently by editing the DefaultRadix variable in the modelsim ini file Changing the default radix does not change the radix of the currently displayed memory Use the add memory command to re add the memory with the desired radix or change the display radix from the Memory window Properties dialog radixenumnumeric optional Causes Verilog and SystemC enums to be displayed as numbers formatted by the current radix This overrides the default behavior of always showing enums symbolically e radixenumsymbolic optional Restores the default behavior of displaying Verilog and SystemC enums as symbols by reversing the action of the radixenumnumeric option e wordsperline lt num gt optional Specifies how many words are displayed on each line in the memory window By default the information displayed will wrap depending on the width of the window num Any positive integer ModelSim Reference Manual v10 1c 55 Commands add memory e lt object_name gt required Specifies the hierarchical path of the memory to be displayed Multiple memories are specified as a space separated list Must be specified as the final argument to the add memory comma
31. e An input port that has a conversion function on the input or on the path up the network mapped from the input This command provides additional information with the help switch Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax Forcing values driver type repetition time or stop time on an object force lt object_name gt lt value gt lt time_info gt lt value gt lt time_info gt deposit drive drive cancel lt time_info gt repeat lt time_info gt Reporting all force commands If you specify this command without arguments it returns a list of the most recently applied force commands and a list of forces coming from the Signal Spy signal_force and signal_force calls from within VHDL Verilog and SystemC source code For example after executing force freeze top p addr 0 100 1 150 r 200 cancel 2000 the times specified are relative to the current simulation time in this case 2820 ns entering ModelSim Reference Manual v10 1c 145 Commands force force returns force freeze top p addr 0 2920 ns 1 2970 ns repeat 3020 ns cancel 4820 ns __ Note ______EO The simulator translates the relative time you specify into absolute time when the force command is executed Arguments e lt object_name gt required when forcing a value change Specifies the name of the HDL object to
32. lt n gt optional Specifies the window upper left hand y coordinate in pixels Can only be used with the undock switch lt n gt Any non negative integer Examples 302 Undock the Wave window from the Main window and makes it a standalone window view undock wave e Display an undocked Processes window in the upper left hand corner of the monitor with a window size of 300 pixels square view process undock x 0 y 0 width 300 height 300 e Display the Watch and Wave windows ModelSim Reference Manual v10 1c Commands view view w e Display the Objects and Processes windows view ob pr e Open anew Wave window with My Wave Window as its title view title My Wave Window wave Related Topics noview ModelSim Reference Manual v10 1c 303 Commands virtual count virtual count This command reports the number of currently defined virtuals that were not read in using a macro file Syntax virtual count kind implicits explicits unsaved Arguments e kind implicits explicits optional Reports only a subset of virtuals implicits virtual signals created internally by the product explicits virtual signals explicitly created by a user such as with the virtual signal command Unique abbreviations are accepted e unsaved optional Reports the count of only those virtuals that have not been saved to a macro file Related Topics virtual define virtual s
33. ol olol e e oO n oO olol oj o gt O N ON Ol gt ojl ojl N ojl m Sloe ol Oo co S NIO 1 1 0 0 0 0 0 0 1 NI NI NI NI NINJ e e oje olol oj N O ol olej ol ojl olN O e e e e ModelSim Reference Manual v10 1c 37 Syntax and Conventions GUIL_expression_format For comparing Verilog net values ModelSim uses the table shown below An entry of 2 is a match only if you set the Tcl variable VLOG_X_MatchesAnything to 1 Table 1 18 Verilog Logic Values Used in GUI Search Search Entry Matches as follows 0 1 Z 38 ModelSim Reference Manual v10 1c Chapter 2 Commands This chapter describes ModelSim commands that you can enter either on the command line of the Main window or in a macro file Some commands are automatically entered on the command line when you use the graphical user interface Note that in addition to the simulation commands listed in this chapter you can also use the Tcl commands described in the Tcl man pages use the Main window menu selection Help gt Tcl Man Pages Table 2 1 provides a brief description of each ModelSim command For more information on command details arguments and examples click the link in the Command name column Table 2 1 Supported Commands Command name abort Action halts the execution of a macro file interrupted by a bre
34. portmode in out inout internal optional The port type for the waveform Useful for creating signals prior to loading a design in Ports of type IN You can also specify input as an alias for in ModelSim Reference Manual v10 1c Commands wave create out Ports of type OUT You can also specify output as an alias for out inout Ports of type INOUT internal default Ports of type INTERNAL e random type normal uniform poisson exponential optional recommended when specifying pattern random Specifies the type of algorithm used to generate a random waveform pattern normal Normal or Gaussian distribution of waveform events uniform default Uniform distribution of waveform events poisson Poisson distribution of waveform events exponential Exponential distribution of waveform events e range lt msb Isb gt optional Identifies bit significance in a counter pattern msb lsb Most significant bit and least significant bit Both must be specified e repeat forever never lt n gt optional recommended when specifying pattern repeater or pattern counter Controls duration of pattern repetition forever Repeat the pattern for as long as the simulation runs never Never repeat the pattern during simulation lt n gt Repeat the pattern lt n gt number of times where lt n gt is any positive integer e seed lt value gt optional
35. v10 1c Commands vsim hierarchical path to select generics in an instance specific manner For example specifying G top ul tpd 20ns on the command line would affect only the tpd generic on the op u instance assigning it a value of 20ns Specifying Gu 1 tpd 20ns affects the tpd generic on all instances named u Specifying Gtpd 20ns affects all generics named fpd lt Value gt Specifies an appropriate value for the declared data type of a VHDL generic or any legal value for a Verilog parameter Make sure the value you specify fora VHDL generic is appropriate for VHDL declared data types Integers are treated as signed values For example Gp 10 overwrites the parameter p with the signed value of 10 e gblso lt filename gt optional On UNIX platforms loads PLI FLI shared objects with global symbol visibility Essentially all data and functions are exported from the specified shared object and are available to be referenced and used by other shared objects You can also specify this argument with the GlobalSharedObjectsList variable in the modelsim ini file e geometry lt geometry_spec gt optional Specifies the size and location of the main window Where lt geometry_spec gt is of the form WxH X Y e gui optional Starts the ModelSim GUI without loading a design and redirects the standard output stdout to the GUI Transcript window e help optional Sends the arguments and syntax for vsim to the tra
36. vgencomp is invoked on the compiled module vgencomp top and writes the following to stdout component top generic width integer 8 delay real 4 500000 filename string file in port il in std_logic ol out std_logic_vector 7 downto 0 o2 out std_logic_vector 4 to 7 iol inout std_logic_vector Ja end component 298 ModelSim Reference Manual v10 1c Commands vhencrypt vhencrypt This command encrypts VHDL code contained within encryption envelopes The code is not compiled before encryption so dependent packages and design units do not have to exist before encryption Upon execution of this command the vhd filename extension is changed to vhdp and the vhdl filename extension is changed to vhdlp If the vhencrypt utility does not find any encryption directives no output file is produced The vhencrypt command must be followed by a compile command such as vcom for the design to be compiled This command provides additional information with the help switch Syntax vhencrypt lt filename gt d lt dirname gt e lt extension gt f lt filename gt h lt filename gt 1 lt filename gt o lt filename gt p lt prefix gt quiet e lt filename gt required Specifies the name of the VHDL source code file to encrypt One filename is required Multiple filenames can be entered separated by spaces Wildcards can be used e d lt dirna
37. warning There may be a problem that will affect the accuracy of the results Examples e Create a message numbered 80304 add message id 304 lt message gt Related Topics e displaymsgmode modelsim ini variable msgmode modelsim ini variable e Message Viewer Window 58 ModelSim Reference Manual v10 1c Commands add watch add watch This command adds signals and variables to the Watch window in the Main window Refer to Wildcard Characters for wildcard usage as it pertains to the add commands Arguments to this command are order dependent Please read the argument descriptions for more information Syntax add watch lt object_name gt radix lt type gt radixenumnumeric radixenumsymbolic Arguments e lt object_name gt required Specifies the name of the object to be added Multiple objects are entered as a space separated list Must be specified as the first argument to the add watch command Wildcard characters are allowed Note that the WildcardFilter Tcl preference variable identifies types to ignore when matching objects with wildcard patterns Variables must be preceded by the process name For example add watch myproc int1 e radix lt type gt optional Specifies a user defined radix If you do not specify this switch the command uses the global default radix lt type gt binary ascii unsigned decimal octal hex symbolic time and default You can change the
38. 245 transcript path 247 transcript sizelimit 248 TreeUpdate 425 tssi2mti 249 unsetenv 252 variables referenced in 22 ved add 253 vcd checkpoint 255 vcd comment 256 vcd dumpports 257 vcd dumpportsall 260 vcd dumpportsflush 261 vcd dumpportslimit 262 vcd dumpportsoff 263 vcd dumpportson 264 vcd file 265 vcd files 267 vcd flush 269 vcd limit 270 ved off 271 vcd on 272 vcom 275 vdel 288 vdir 290 vencrypt 293 verror 295 vgencomp 297 vhencrypt 299 view 301 virtual count 304 virtual define 305 virtual delete 306 virtual describe 307 virtual expand 308 virtual function 309 virtual hide 312 virtual log 313 virtual nohide 315 virtual nolog 316 ModelSim Reference Manual v10 1c JKLMNOPQRSTUVWX YZ virtual region 318 virtual save 319 virtual show 320 virtual signal 321 vlib 327 vlog 329 vmake 347 vmap 349 vsim 351 vsimDate 381 vsimld 381 vsimVersion 381 vsource 383 wave 384 wave create 388 wave edit 394 wave export 397 wave import 399 wave modify 400 wave sort 405 WaveActivateNextPane 425 WaveRestoreCursors 425 WaveRestoreZoom 425 when 406 where 414 wlf2log 415 wlf2vcd 417 wlfman 418 wlfrecover 423 write format 424 write list 427 write preferences 428 write report 429 write timing 432 write transcript 434 write tssi 435 write wave 437 comment characters in VSIM commands 11 compatibility of vendo
39. 4 end endmodule top When you issue the command examine n the transcript returns 0 However when you issue the command stack up examine n the transcript returns 1 Table 1 2 contains examples of various ways of specifying object names Table 1 2 Examples of Object Names Object Name Description clk specifies the object clk in the current context top clk specifies the object clk in the top level design unit top block1 u2 clk specifies the object clk two levels down from the top level design unit blockI u2 clk specifies the object clk two levels down from the current context array_sig 4 specifies an index of an array object farray_sig I to 10 specifies a slice of an array object in VHDL see Tcl Syntax and Specification of Array Bits and Slices for more information 16 ModelSim Reference Manual v10 1c Syntax and Conventions Wildcard Characters Table 1 2 Examples of Object Names cont Object Name Description mysignal 31 0 specifies a slice of an array object in Verilog see Tcl Syntax and Specification of Array Bits and Slices for more information record_sig field specifies a field of a record Environment Variables and Pathnames You can substitute environment variables for pathnames in any argument that requires a pathname For example vlog v lib_path und1 Assuming you have defined lib_path on your system vlog will locate the source library
40. BE LIABLE FOR INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING LOST PROFITS OR SAVINGS WHETHER BASED ON CONTRACT TORT OR ANY OTHER LEGAL THEORY EVEN IF MENTOR GRAPHICS OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES IN NO EVENT SHALL MENTOR GRAPHICS OR ITS LICENSORS LIABILITY UNDER THIS AGREEMENT EXCEED THE AMOUNT RECEIVED FROM CUSTOMER FOR THE HARDWARE SOFTWARE LICENSE OR SERVICE GIVING RISE TO THE CLAIM IN THE CASE WHERE NO AMOUNT WAS PAID MENTOR GRAPHICS AND ITS LICENSORS SHALL HAVE NO LIABILITY FOR ANY DAMAGES WHATSOEVER THE PROVISIONS OF THIS SECTION 9 SHALL SURVIVE THE TERMINATION OF THIS AGREEMENT HAZARDOUS APPLICATIONS CUSTOMER ACKNOWLEDGES IT IS SOLELY RESPONSIBLE FOR TESTING ITS PRODUCTS USED IN APPLICATIONS WHERE THE FAILURE OR INACCURACY OF ITS PRODUCTS MIGHT RESULT IN DEATH OR PERSONAL INJURY HAZARDOUS APPLICATIONS NEITHER MENTOR GRAPHICS NOR ITS LICENSORS SHALL BE LIABLE FOR ANY DAMAGES RESULTING FROM OR IN CONNECTION WITH THE USE OF MENTOR GRAPHICS PRODUCTS IN OR FOR HAZARDOUS APPLICATIONS THE PROVISIONS OF THIS SECTION 10 SHALL SURVIVE THE TERMINATION OF THIS AGREEMENT INDEMNIFICATION CUSTOMER AGREES TO INDEMNIFY AND HOLD HARMLESS MENTOR GRAPHICS AND ITS LICENSORS FROM ANY CLAIMS LOSS COST DAMAGE EXPENSE OR LIABILITY INCLUDING ATTORNEYS FEES ARISING OUT OF OR IN CONNECTION WITH THE USE OF PRODUCTS AS DESCRIBED IN SECTION 10 THE PROVISIONS OF THIS SECTION 11 SHAL
41. Descriptions Table 1 4 provides a list of the WildcardFilter arguments 20 Argument Alias Table 1 4 WildcardFilter Arguments Description VHDL Alias Assertion CellInternal Concurrent SystemVerilog or PSL assertion Signals in cells where a cell is defined as 1 a module within a celldefine 2 a Verilog module found with a library search using either vlog v or vlog y and compiled with vlog libcell or 3 a module containing a specify block Class Verilog class declaration ClassReference SystemVerilog class reference Compare Waveform comparison signal Constant VHDL constant Cover SystemVerilog or PSL cover statements Covergroup SystemVerilog or PSL covergroup Coverpoint Verilog coverpoint Cross Verilog cross Endpoint System Verilog assertion objects created for sequences on which the method ended triggered is used PSL assertion objects created for sequences for which the built in function ended is used Generic VHDL generic ImmediateAssert Integer VHDL immediate assertions VHDL integer Memory Verilog memories NamedEvent Verilog named event Verilog net ModelSim Reference Manual v10 1c Syntax and Conventions Wildcard Characters Table 1 4 WildcardFilter Arguments cont Argument Parameter Description Verilog parameter Real Reg Verilog real registers Veri
42. Enables the use of a previous style of naming in VHDL for generate statement iteration names in the design hierarchy The previous style is controlled by the value of the GenerateFormat value The default behavior is to use the current style names which is described in Naming Behavior of VHDL For Generate Blocks This argument duplicates the function of the OldVhdlForGenNames variable in modelsim ini and will override the setting of that variable if it specifies the current style onfinish ask stop exit final optional Customizes the simulator shutdown behavior when it encounters finish in the design e ask o In batch mode the simulation exits o In GUI mode a dialog box pops up and asks for user confirmation on whether to quit the simulation e stop stops simulation and leaves the simulation kernal running e exit exits out of the simulation without a prompt e final executes all final blocks then exits the simulation By default the simulator exits in batch mode prompts you in GUI mode Edit the OnFinish variable in the modelsim ini file to set the default operation of finish pli lt object list gt optional Loads a space separated list of PLI shared objects The list must be quoted if it contains more than one object This is an alternative to specifying PLI objects in the Veriuser entry in the modelsim ini file refer to modelsim ini Variables You can use environment variables as part of th
43. Figure 2 1 drivers Command Results in Transcript ansen e eee eee eee eee 121 Figure 2 2 find infiles Example 0 cece ccc cee eee eee ene e eee ee eens 142 Figure 2 3 find insource EXAM ples 140435340944 0044d 04S Seaweed aaa ae eeu weds 144 Figure 2 4 readers Command Results in Transcript 0 00 eee eee eee 211 ModelSim Reference Manual v10 1c 9 Table 1 1 Table 1 2 Table 1 3 Table 1 4 Table 1 5 Table 1 6 Table 1 7 Table 1 8 Table 1 9 Table 1 10 Table 1 11 Table 1 12 Table 1 13 Table 1 14 Table 1 15 Table 1 16 Table 1 17 Table 1 18 Table 2 1 Table 2 2 Table 2 3 Table 2 4 Table 2 5 Table 2 6 Table 2 7 Table 2 8 Table 2 9 Table 2 10 Table 2 11 10 List of Tables Conventions for Command Syntax 0 0 cece eee eee eee 11 Examples of Object Names 0 cece cece eee e eee eeeeeees 16 Wildcard Characters in HDL Object Names 0 0000 c eee eee 18 WildcardFilter Arguments 20 0 cece eee tenes 20 WildcardFilter Argument Groups 0 cece eee ee eee nee 21 Keyboard Shortcuts for Command History s s sssaaa asanare 24 VHDL Number Conventions Style 1 0 0 0 0 eee eee 25 VHDL Number Conventions Style 2 22 02 26 20e0ee0e ee bees dee uee eens 25 Verilog Number Conventions ssssueeuen aaura eaea 26 Constants Supported for GUI Expresssions 0000 e ee eee eee 29 Array Constants Supp
44. Manual v10 1c Commands virtual signal virtual signal This command creates a new signal known only by the GUI not the kernel that consists of concatenations of signals and subelements as specified in lt expressionString gt It cannot handle bit selects and slices of Verilog registers Please see Concatenation of Signals or Subelements for more details on syntax fea Note The virtual function and virtual signal commands are interchangeable The product will keep track of whether you ve created a signal or a function with the commands and maintain them appropriately We document both commands because the virtual save virtual describe and virtual define commands will reference your virtual objects using the correct command Syntax virtual signal env lt path gt install lt path gt delay lt time gt lt expressionString gt lt name gt Arguments e eny lt path gt optional Specifies a hierarchical context for the signal names in lt expressionString gt so they don t all have to be full paths lt path gt Specifies a relative path to the signal s On Windows systems the path separator should be a forward slash e install lt path gt optional Causes the newly created signal to become a child of the specified region If install is not specified the newly created signal becomes a child of the nearest common ancestor of all objects appearing in lt expressionString gt If the expr
45. Optional Refer to Verilog XL Compatible Compiler Arguments for more information After all explicit filenames on the vlog command line have been processed the compiler uses the y option to find and compile any modules that were referenced but not yet defined Files within this directory are compiled only if the file names match the names of previously unresolved references Multiple y options are allowed You will need to specify a file suffix ModelSim Reference Manual v10 1c Commands vlog by using y in conjunction with the libext lt suffix gt option See additional discussion in the examples Note aI Any y arguments that follow a refresh argument on a vlog command line are ignored Any y arguments that come before the refresh argument on a vlog command line are processed e lt filename gt Specifies the name of the Verilog source code file to compile One filename is required Multiple filenames can be entered separated by spaces Wildcards can be used Examples e Compile the Verilog source code contained in the file example vlg vlog example vlg e After compiling top v vlog will scan the file und1 for modules or primitives referenced but undefined in top v Only referenced definitions will be compiled vlog top v v undl e After compiling top v vlog will scan the vlog_lib library for files with modules with the same name as primitives referenced but undefined in top v The use of libext v u imp
46. Parameter Register or memory Integer real realtime time and local variables in tasks and functions Subelements of register integer real realtime and time multi dimensional arrays all dimensions must be specified Bit selects and part selects of the above except for objects whose basic type is real The name can be a full hierarchical name or a relative name A relative name is relative to the current environment Wildcards cannot be used ModelSim Reference Manual v10 1c 89 Commands change e lt value gt required Defines a value for lt variable gt The specified value must be appropriate for the type of the variable You must place lt value gt within quotation marks or curly braces if it contains spaces Note The initial type of lt variable gt determines the type of value that it can be given For example if lt variable gt is initially equal to 3 14 then only real values can be set on it Also note that changing the value of a parameter or generic will not modify any design elements that depended on the parameter or generic during elaboration for example sizes of arrays Examples e Change the value of the variable count to the hexadecimal value FFFF change count 16 FFFF e Change the value of the element of rega that is specified by the index i e 16 change rega 16 0 e Change the value of the set of elements of foo that is specified by the slice 1 e 20 22 change
47. Returns the location for saving the transcript file wlf optional Returns the current location for saving the wif file project optional Returns the current location of the project file simulator control Displays the current values for all simulator control variables e simulator state Displays the simulator state variables relevant to the current simulation Examples e Display configuration file information report where Returns INI modelsim ini PWD Testcases l Transcript transcript WLF vsim wlf Project e HHHH e Display all simulator control variables 212 ModelSim Reference Manual v10 1c report simulator control Returns UserTimeUnit RunLength IgnoreNote 0 IgnoreWarning IgnoreError IgnoreFailure IgnoreSVAFatal PathSeparator DelayFileOpen WLFSizeLimit IterationLimit BreakOnAssertion DefaultForceKind default 0 ns 3 0 0 IgnoreSVAInfo 0 IgnoreSVAWarning IgnoreSVAError 0 0 0 CheckpointCompressMode NumericStdNoWarnings StdArithNoWarnings DefaultRadix symbol 1 5000 WLFFilename vsim wl WLFTimeLimit 0 0 1 0 0 Tg f Commands report e Display all simulator state variables Only the variables that relate to the design being simulated are displayed report simulator state Returns now 0 delt
48. Rw aa 240 Time spb hac abe SR ER CASS ER DA Da ed Ee OH RAGE ETA RO ENOTES 241 AUSCHPL eseni sade Seeds oes a aes Owe E Sh ade SSRe esses E a SS 244 transcript Til s c1ccc adedadockerewesadaleeadece eons dcaledadake ieeavadeed ad 245 transcript DAU osne acu detd a eeu we aware Mee eae R eR eo weed eae ene coun ee 247 MANS CUPL SIZE ed oc or soir ieee seed eas caw sa NE AE A Eo xe E a 248 ISI ATIN eene ath eee aces eae oe aera Oe eee POR RS hee ee e E eee eee 249 UV VIOUS co oi cote he Sass eee eee h eee etae 4s Shee aoe eee kee et 250 nsele a Sec ghteseeaund co E ORs ome ca oan be cee eee a deee hee bates 252 TG ce ch hig ae neee gr a ea oath ace e aA E E AE E 253 Ved checkp int sna seer eagle a ba daa a Sadia doa e Shad aE OR Ode E eee eS 255 ved COMIMCHL 321444 55 aree aoe ded saws ee se weed BAUR Pe Pee Res 256 Ved d mpportS esros neat hoa riitaa ERA E Raaed Serhan epecheaesdeadawaas 257 v dd mpportsall sss sessu ees tees heen ded ste eee Reed eee enue E 260 Ved dumpportsflush ccs eves disse ee ecea tages Gaede dcue ep atesd ase eeedea Sa aK 261 Ved dumpportsimit serpere So seo Sh eee ESA SADR SHG EEO S SH a Res 262 yed d mpportsoff 2 pcksevat o Sued hee sedaRogheteuheenee tae Geese EEEE 263 ved UMP POISON Ses 5 04 reenn en EE E atennsd caberenet doeenst sided ess 264 vod Tes sarine e aaa ae ye E AA 4 4 aay ee Ny eRe Ae ea eae ee ae Pee 265 VOCMNGS te Ge ce hee eee eee r cae eo eee OR ee a ee ae eee ee eee eee 267 Ved HUS ou rg eee e
49. SunOS and Linux the memory size is reported in Kbytes e For Windows the memory size is reported in bytes Some of the values may not be available on all platforms and other values may be approximates Different operating systems report these numbers differently Syntax simstats memory working time cpu context faults Arguments memory optional Returns the amount of virtual memory that the OS has allocated for vsimk e working optional Returns the portion of allocated virtual memory that is currently being used by vsimk If this number exceeds the actual memory size you will encounter performance degradation time optional Returns the cumulative wall clock time of all run commands cpu optional Returns the cumulative processor time of all run commands Processor time differs from wall clock time in that processor time is only counted when the cpu is actually running vsimk If vsimk is swapped out for another process cpu time does not increase ModelSim Reference Manual v10 1c 229 Commands simstats context optional Returns the number of context swaps vsimk being swapped out for another process that occurred during all run commands e faults optional Returns the number of page faults that occurred during all run commands 230 ModelSim Reference Manual v10 1c Commands stack down stack down This command moves down the call stack If invoked without arguments the command
50. Topics ved add e vcd files vcd checkpoint e vcd flush vcd comment e vcd limit vcd dumpports vcd on vcd dumpportsall vcd2wif e vcd dumpportsflush e DumpportsCollapse e vcd dumpportslimit e Value Change Dump VCD Files vcd dumpportsoff e Verilog tasks are documented in the vcd dumpportson Language Reference Manual IEEE 1364 e vcd file standard ModelSim Reference Manual v10 1c 271 Commands ved on vcd on This command turns on VCD dumping to the specified file and records the current values of all VCD variables By default ved on is automatically performed at the end of the simulation time that the vcd add command performed Related Verilog tasks dumpon fdumpon Syntax ved on lt filename gt Arguments e lt filename gt optional Specifies the name of the VCD file If omitted the command is executed on the file designated by the vcd file command or dump vcd if ved file was not invoked Related Topics ved add ved checkpoint ved comment vcd dumpports ved dumpportsall vcd dumpportsflush vcd dumpportslimit vcd dumpportsoff vcd dumpportson vcd file 272 ved files ved flush ved limit ved off ved2wlf DumpportsCollapse Value Change Dump VCD Files Verilog tasks are documented in the Language Reference Manual IEEE 1364 standard ModelSim Reference Manual v10 1c Commands ved2wilf vcd2wif This command is a utility that translates a VCD Value C
51. UVM transaction logging Where arguments are in conflict the last argument will override earlier arguments and a warning is issued You can also control UVM Aware debugging with the UVMControl modelsim ini variable vcdstim lt instance gt lt filename gt optional Specifies a VCD file from which to re simulate the design The VCD file must have been created in a previous ModelSim simulation using the vcd dumpports command Refer to Using Extended VCD as Stimulus for more information ModelSim Reference Manual v10 1c Commands vsim e version optional Returns the version of the simulator as used by the licensing tools e view lt alias_name gt lt WLF_filename gt optional Specifies a wave log format WLF file for vsim to read Allows you to use vsim to view the results from an open simulation vsim wlf or an earlier saved simulation The Structure Objects Wave and List windows can be opened to look at the results stored in the WLF file other ModelSim windows will not show any information when you are viewing a dataset lt alias_name gt Specifies an alias for lt WLF_file_name gt where the default is to use the prefix of the WLF_filename Wildcard characters are allowed lt WLF file_name gt Specifies the pathname of a saved WLF file See additional discussion in the Examples e viewcov lt dataset_name gt lt UCDB_filename gt required for coverage view mode Invokes vsim in the coverage view
52. a fully rooted name e g sim top uI clk The current dataset is used when accessing objects where a dataset name is not specified as part of the name The current dataset is determined by the dataset currently selected in the Structure window or by the last dataset specified in an environment The current context in the current or specified dataset is used when accessing objects with relative or simple names The current context is either the current process if any or the current instance if there is no current process or the current process is not in the current instance The situation of the current process not being in the current instance can occur for example by selecting a different instance in the Structure tab or by using the environment to set the current context to a different instance The current context is also the activation level of an automatic task function or block Different levels of activation may be selected by using the Call Stack window or by using the stack up or stack down commands For example when you set a breakpoint on line 5 of the following code package p ModelSim Reference Manual v10 1c 15 Syntax and Conventions Design Object Names int I function automatic int factorial int n if n 0 return 1 else return n factorial n 1 endfunction factorial endpackage p module top initial begin p l p factorial 3 Sdisplay p I1 Sdisplay p factorial
53. add Commands not currently compatible with virtual signals when ModelSim Reference Manual v10 1c 323 Commands virtual signal Related Topics 324 virtual count virtual describe virtual log virtual region virtual function virtual define virtual expand virtual nohide virtual save virtual type virtual delete virtual hide virtual nolog virtual show Virtual Objects ModelSim Reference Manual v10 1c Commands virtual type virtual type This command creates a new enumerated type known only by the GUI not the kernel Virtual types are used to convert signal values to character strings The command works with signed integer values up to 64 bits Virtual types cannot be used in the when command Note If you are using SystemVerilog you can also convert signal values to character strings using associative arrays in your code See the SystemVerilog LRM for more information Syntax virtual type delete lt name gt lt list_of_strings gt lt name gt Arguments delete lt name gt Required if not defining a type Deletes a previously defined virtual type lt name gt The name you gave the virtual type when you originally defined it lt list_of_strings gt Required if delete is not used A list of values and their associated character strings Values can be expressed in decimal or based notation and can include don t cares see examples below Three kinds of based notation a
54. agrees that it will not export Products in any manner without first obtaining all necessary approval from appropriate local and United States government agencies U S GOVERNMENT LICENSE RIGHTS Software was developed entirely at private expense All Software is commercial computer software within the meaning of the applicable acquisition regulations Accordingly pursuant to US FAR 48 CFR 12 212 and DFAR 48 CFR 227 7202 use duplication and disclosure of the Software by or for the U S Government or a U S Government subcontractor is subject solely to the terms and conditions set forth in this Agreement except for provisions which are contrary to applicable mandatory federal laws THIRD PARTY BENEFICIARY Mentor Graphics Corporation Mentor Graphics Ireland Limited Microsoft Corporation and other licensors may be third party beneficiaries of this Agreement with the right to enforce the obligations set forth herein REVIEW OF LICENSE USAGE Customer will monitor the access to and use of Software With prior written notice and during Customer s normal business hours Mentor Graphics may engage an internationally recognized accounting firm to review Customer s software monitoring system and records deemed relevant by the internationally recognized accounting firm to confirm Customer s compliance with the terms of this Agreement or U S or other local export laws Such review may include FLEXIm or FLEXnet or successor product report log files tha
55. alias to this switch Examples e Add all objects in the design to the dataflow window add dataflow r e Add all objects in the region to the dataflow window add dataflow Related Topics e Automatically Tracing All Paths Between Two Nets e Dataflow Window e Using the WildcardFilter Preference Variable 50 ModelSim Reference Manual v10 1c Commands add list add list This command adds the following objects and their values to the List window e VHDL signals and variables e Verilog nets and registers e User defined buses If you do not specify a port mode such as in or out this command displays all objects in the selected region with names matching the object name specification Refer to Wildcard Characters for wildcard usage as it pertains to the add commands Arguments to this command are order dependent Please read the argument descriptions for more information Syntax add list lt object gt lt object_name gt sig allowconstants depth lt level gt in inout out ports internal label lt name gt nodelta lt radix_type gt radix lt type gt radixenumnumeric radixenumsymbolic recursive trigger notrigger width lt integer gt Arguments e lt object gt required when lt object_name gt sig is not specified Specifies the name of the object to be listed Multiple objects are entered as a space separated list Wildcards are allowed Ref
56. are added Multiple commands may be entered on one line if they are separated by semi colons For example ModelSim gt vlog nodebug ports level3 v level2 v vlog nodebug top v The return value of the last function executed is the only one printed to the transcript This may cause some unexpected behavior in certain circumstances Consider this example vsim c do run 20 simstats quit f top You probably expect the simstats results to display in the Transcript window but they will not because the last command is quit f To see the return values of intermediate commands you must explicitly print the results For example vsim do run 20 echo simstats quit f c top Command History Shortcuts You can review simulator command history or rerun previous commands by using keyboard shortcuts at the ModelSim VSIM prompt Table 1 6 contains a list of these shortcuts 24 Table 1 6 Keyboard Shortcuts for Command History repeats the last command repeats command number n n is the VSIM prompt number e g for this prompt VSIM 12 gt n 12 lt string gt shows a list of executed commands that start with lt string gt Use the up and down arrows to choose from the list abc repeats the most recent command starting with abc xyz ab replaces xyz in the last command with ab up and down arrows scrolls through the command history with the keyboard arrows click on prompt left click
57. as a separate compilation units This is the default behavior and is the inverse of the behavior of mfcu This switch will override the MultiFileCompilationUnit variable if it is set to 1 in the modelsim ini file e source Displays the associated line of source code before each error message that is generated during compilation Optional by default only the error message is displayed ModelSim Reference Manual v10 1c 341 Commands vlog e s Instructs the compiler not to load the standard package Optional This argument should only be used when you are compiling the sv_std package e sy Enables SystemVerilog features and keywords Optional By default ModelSim follows the IEEE Std 1364 2001 and ignores SystemVerilog keywords If a source file has a sv extension ModelSim will automatically parse SystemVerilog keywords e svext l lt extension gt l lt extension gt optional Enables SystemVerilog language extensions Where lt extension gt is one of the following feci Treat constant expressions in a foreach loop variable index as constant pae Automatically export all symbols imported and referenced in a package uslt default Promote unused design units found in source library files specified with the y option to top level design units spsl default Search for packages in source libraries specified with y and libext Multiple extensions are specified as a comma separated list For
58. be declared as import tasks or functions 0 Support for DPI out of the blue calls is disabled 1 Support for DPI out of the blue calls is enabled but debugging support is not available 2 Support for DPI out of the blue calls is enabled with debugging support for a SystemC thread Debugging support for DPI out of the blue calls from a SystemC method requires two vsim arguments entered together at the command line dpioutoftheblue 2 and scdpidebug Refer to scdpidebug for more information e hazards optional Enables event order hazard checking in Verilog modules Verilog only You must also specify this argument when you compile your design with vlog Refer to Hazard Detection for more details Noe Using hazards implicitly enables the compat argument As a result using this argument may affect your simulation results e maxdelays optional Selects the maximum value in min typ max expressions The default is the typical value Has no effect if you specified the min typ max selection at compile time If you specify the mindelays typdelays or maxdelays flag with vopt and specify a different flag with vsim the simulation will be able to use the delay value based upon the flag specified with vopt You must specify vsim novopt to force the simulator to use the delay flag specified with vsim e mindelays optional Selects the minimum value in min typ max expressions The default is
59. be forced A wildcard is permitted only if it matches one object Refer to Design Object Names and Tcl Syntax and Specification of Array Bits and Slices for the full syntax of an object name The object name must specify a scalar type or a one dimensional array of character enumeration You may also specify a record sub element an indexed array or a sliced array as long as the type is one of the above Must be specified as the first argument to the force command e lt value gt required when forcing a value change Specifies the value to which the object is to be forced The specified value must be appropriate for the type Must be specified as the second argument to the force command A one dimensional array of character enumeration can be forced as a sequence of character literals or as a based number with a radix of 2 8 10 or 16 For example the following values are equivalent for a signal of type bit_vector 0 to 3 Description VHDL Value Verilog Value character literal sequence 1111 1111 binary radix 2 1111 b1111 octal radix 8 17 ol7 decimal radix 10 15 d15 hexadecimal radix 16 F hF Note For based numbers in VHDL ModelSim translates each 1 or 0 to the appropriate value for the number s enumerated type The translation is controlled by the translation table in the pref tcl file If ModelSim cannot find a translation for 0 or 1 it uses the left bound of the signal type type left for that value You can
60. be maintained e nolog optional Specifies that the current logging environment will not be maintained after the simulation is restarted where the default is for all currently logged objects to continue to be logged e nowave optional Specifies that the current Wave window environment will not be maintained after the simulation is restarted where the default is for all objects displayed in the Wave window to remain in the window with the same format Related Topics vsim ModelSim Reference Manual v10 1c 215 Commands resume resume This command is used to resume execution of a macro DO file after a pause command or a breakpoint This command may be input manually or placed in an onbreak command string Placing a resume command in a bp command string does not have this effect The resume command can also be used in an onerror command string to allow an error message to be printed without halting the execution of the macro file Syntax resume Arguments None Related Topics 216 abort do onbreak onerror pause Useful Commands for Handling Breakpoints and Errors ModelSim Reference Manual v10 1c run Commands run This command advances the simulation by the specified number of timesteps Syntax run lt timesteps gt lt time_units gt all continue init next over step inst lt full_path gt out over this this lt class_handle gt Arguments
61. because all variables would have been initialized by that point next optional Causes the simulator to run to the next event time ModelSim Reference Manual v10 1c 217 Commands run e step optional Steps the simulator to the next HDL Current values of local HDL variables may be observed at this time using the Locals window You can specify the following arguments when you use step inst lt full_path gt optional Instructs the simulation to step into a specific instance process or thread lt full_path gt Specifies the full path to an instance process or thread out optional Instructs the simulation to step out of the current function or procedure and return to the caller over optional Directs ModelSim to run VHDL procedures and functions Verilog tasks and functions but to treat them as simple statements instead of entering and tracing them line by line You can use the over argument to skip over a VHDL procedures or functions Verilog task or functions When a wait statement or end of process is encountered time advances to the next scheduled activity ModelSim then updates the Process and Source windows to reflect the next activity this this lt class_handle gt optional Instructs the simulation to step into a method of a SystemVerilog class when this refers to the specified class handle To obtain the handle of the class use the examine handle command lt class_handle gt
62. braces see examples below for more details To examine a VHDL variable you can add a process label to the name For example make certain to use two underscore characters exa line__ 36 i delta lt delta gt optional Specifies a simulation cycle at the specified time step from which to fetch the value where the default is to use the last delta of the time step You must log the objects to be examined using the add list add wave or log command for the examine command to be able return a value for a requested delta lt delta gt Any non negative integer env lt path gt optional Specifies a path in which to look for an object name lt path gt The specified path to a object event lt time gt optional Specifies a simulation cycle at the specified event time from which to fetch the value The event lt time gt refers to the event time relative to events for all signals in the objects dataset at the specified time You must log the objects to be examined using the add list add wave or log command for the examine command to be able return a value for a requested event expr lt expres sion gt optional Specifies an expression to be examined You must log the expression using the add list add wave or log command for the examine command to return a value for a specified expression The expression is evaluated at the current time simulation If you also specify the time argument the expression will be evaluat
63. called Useful for placing messages at specific times in the simulation lt time gt Specified as an integer or decimal number file lt filename gt optional Displays a user specified string in the File Info column of the Message Viewer window id lt id_number gt optional Assigns an identification number to the message lt id_number gt Any non negative integer from 0 9999 where the default is 0 The number specified is added to the base identification number of 80000 inline optional Causes the message to also be returned to the caller as the return value of the add message command ModelSim Reference Manual v10 1c 57 Commands add message line lt linenumber gt optional Displays the user specified number in File Info column of the Message Viewer window e noident optional Prevents return of the ID number of the message e nolevel optional Prevents return of the severity level of the message e objects lt list gt optional List of related design items shown in the Objects column of the Message Viewer window lt list gt A space separated list enclosed in curly braces or quotation marks My e region region optional Message is displayed in the Region column of the Message Viewer window e severity error note warning optional Sets the message severity level error ModelSim cannot complete the operation note default The message is informational
64. ce dies edsbisee es dhaesededdereeee dhe ie edd eeee iaedd Seek 400 WAVE SOLE se seee sods aT aa tyne Gein se Sb eta so dese trae asec Andre has Gate Giaa Godlee Aedes oie 405 WHEN ees aaa tts Scene ew ots ee otal i ae a a ee Sten Me a ee ee ae ee 406 WAGTE a Be a Be oO ar BE OE Pe 414 WOM so ohn oh eee ee oe eee GO EES AR Oe Non SHON Ae COMER Oa eae 415 WIZ VCE PER AE hi hare ane oagieRd bo Deen tes otek He bi date nnd oageand bb Raw oes 417 5531111 4 16 ee a eS Nn A TE 418 WIHTECOVEE 6 40 5 oe COR HDR ERA EEE He GES ER ew GE eNO HPSS a ew de we bd 423 Write forma 2 4 xo 24052 don 24k eee eRe oad be dee eee a aa eee Pas 424 WISE ccs ccsccsceatde Skah ace ghd teea n Dh area ghee Seated ep aba ok aba eed Gen She aah graces 427 Wilte preferenc s 6 9 0 401406 4o0 dees eile dey deeded ea ade eee ek ede a ae 428 WINE TSPON e satin cd an oE ee BANGS a ed ae a a eae Sed oe ESTEE ks RES 429 Wate UM av Beye areia eli aod ae er a Ea R seas O a ote dee yee eas 432 WHS transcript i 1i2chsebasciGesedsidseetadadereuddaceeetadeieeskdsadeeiak 434 WHILE SSI ste ec cde sds a netted artes Sh ene ase BE ep ye GEM eee tee oia a a n oe 435 WHILE WAV Cece 2c ts dete os Met es a aks Be ede al a ee oe gee Ne Sede eh ta a ee oe et ee 437 Index End User License Agreement ModelSim Reference Manual v10 1c 7 List of Examples Example 1 1 SystemVerilog Scope Resolution Operator Example 14 ModelSim Reference Manual v10 1c List of Figures
65. create a sequence of forced values on an object by specifying lt value gt lt time_info gt in a comma space separated list 146 ModelSim Reference Manual v10 1c Commands force For example force top p addr 1 100ns 0 200ns 1 250ns e cancel lt time_info gt optional Cancels the force command at the time specified by lt time_info gt where lt time_info gt is lt time_value gt lt time_unit gt Refer to lt time_info gt for more information about specifying time values e drive optional Attaches a driver to the object and drives the specified lt value gt until the object is forced again or until it is unforced with the noforce command This option is illegal for unresolved signals e deposit optional Sets the object to the specified lt value gt The lt value gt remains until the object is forced again there is a subsequent driver transaction or it is unforced with a noforce command Note If the freeze drive or deposit options are not used then freeze is the default for unresolved objects and drive is the default for resolved objects If you prefer freeze as the default for resolved and unresolved VHDL signals change the DefaultForceKind variable in the modelsim ini file e freeze optional Freezes the object at the specified lt value gt until it is forced again or until it is unforced with the noforce command Note If you prefer freeze as the def
66. driver type Undo an edit Redo a previously undone edit wave edit cut copy paste invert mirror end lt time gt lt unit gt start lt time gt lt unit gt lt object_name gt wave edit insert_pulse duration lt time gt lt unit gt start lt time gt lt unit gt lt object_name gt wave edit delete time lt time gt lt unit gt lt object_name gt wave edit stretch move backward lt time gt lt unit gt forward lt time gt lt unit gt time lt time gt lt unit gt lt object_name gt wave edit change_value end lt time gt lt unit gt start lt time gt lt unit gt lt value gt lt object_name gt wave edit extend extend to by time lt time gt lt unit gt wave edit driveType driver freeze deposit driver expectedoutput end lt time gt lt unit gt start lt time gt lt unit gt wave edit undo lt number gt 394 ModelSim Reference Manual v10 1c Commands wave edit wave edit redo lt number gt Arguments backward lt time gt lt unit gt required if forward lt time gt isn t specified The amount to stretch or move the edge backwards in simulation time lt time gt Specified as an integer or decimal number lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt
67. driving or not Related Topics tssi2mti 436 ModelSim Reference Manual v10 1c Commands write wave write wave This command records the contents of the Wave window in PostScript format The output file can then be printed on a PostScript printer Syntax write wave lt filename gt end lt time gt landscape height lt real_num gt margin lt real_num gt perpage lt time gt portrait start lt time gt width lt real_num gt Arguments e 6 lt filename gt required Specifies the name of the PostScript ps output file e end lt time gt optional The simulation time at which the record will end lt time gt Specified as a positive integer or decimal number where the units are the current simulation time resolution e height lt real_num gt optional Specifies the paper height in inches lt real_num gt Specified as a positive integer or decimal number where the default is 11 0 e landscape optional Use landscape horizontal orientation default e margin lt real_num gt optional Specifies the margin in inches lt real_num gt Specified as a positive integer or decimal number where the default is 0 5 e perpage lt time gt optional Specifies the time width per page of output lt time gt Specified as a positive integer or decimal number where the units are the current simulation time resolution e portrait optional Use portrait vertical
68. ee ee Sneha eyes aha outa eee eke abe eee Reet 269 yed limit 2Sq cdt eee and ea bvee nied Oke ewe CdSe Oe oka ee ea duee heer eans 4 270 Ved Ofi oy bth boi oenb a dcnesetiate dhe delta ea ade eee eee aes 271 Ved Ol 34 gaa ended E ee EE ed ae Sab a Eee edd oR ee ESTEE dee eee s 272 WII WI cco gea pea yo a e oe de dt E a O wed E a OS A 273 VOOM EN A E E E E E E E 275 WOE O E E E E 288 Volt e E E E E E E E E E E E 290 VEUCIVPE eses rae cone sheer eenee eee eee ee ER T E RER EPE NE RERE 293 VeNOL 5 gosh Gd ot acd bh EN E EATE EEEN 295 VECUCOMIP eeann erare E ER es erent EE E cabornseticeesst es EA 297 VOCUCIY Dl gd ose ai in aaaea a Ea iene E aoaaa B aaa a aa EE a a a Ei A 299 VIEW eao pCR Raha ER Ree e a a a a a a e a ee e E E E 301 viral c n reri 0443 7 oe 0 eG as EEA eE ENER PENSEE ATENT EEEREN TEF 304 Virt al USING ere a hk Dab eae nea ASR a EEEE EEA TEDE RRT ERRE ERREA 305 Virtual delete aese saed na a aE a Oe a a a Se E E oe Ad 306 virtual d scibe lt 5 ceee spi 24 hig Sa E E E E EE E ae EES RSE RS 307 virtual expand a ede te SATT REE E O A E E E O dees EE eee ae a 308 Virtual function seso bee ahneeeg pae Ea pR E E E R ee RERE ae 309 viral Mide sa asee iaaea aa RSA SG OHTA OE OE aaa a i poas 312 Vila JOP s iea aiai E a E AE E O E bee E E ee E ee 313 WIN Wal NOMICG eseese ranerne ered HOw Pare ee Hale E EET EER EEEE 315 ModelSim Reference Manual v10 1c Table of Contents Virtual nolot seeen he neue eben aena eee Foe ee ee Ree eo e
69. elaborated Each instance line is prefixed by VHDL or Verilog depending on the type of model Returns the signal variable name address range depth and width of the memory Syntax mem list r lt path gt Arguments e r optional Recursively descends into sub modules when listing memories e lt path gt optional The hierarchical path to the location the search should start where the default is the current context as shown in the Structure window Examples e Recursively list all memories at the top level of the design mem list r Returns Verilog top m mem 0 255 256d x 16w e Recursively list all memories in op2 uut mem list top2 uut r Returns Verilog top2 uut mem 0 255 x 16w ModelSim Reference Manual v10 1c 165 Commands mem load mem load This command updates the simulation memory contents of a specified instance You can upload contents either from a memory data file a memory pattern or both If both are specified the pattern is applied only to memory locations not contained in the file A relocatable memory file is one that has been saved without address information You can load a relocatable memory file into the instance of a memory core by specifying an address range on the mem load command line If no address range starting and ending address is specified the memory is loaded starting at the first location The order in which the data is placed into the memory depend
70. example vlog svext feci uslt spsl e svinputport net var relaxed Used in conjunction with sv to determine the default data type assigned to an input port declaration Optional net declares the port to be a net This value enforces strict compliance to the Verilog LRM IEEE Std 1364 2005 where the port declaration defaults to wire var declares the port to be a variable This value enforces behavior from previous releases where the port declaration defaults to variable relaxed default declares the port to be a net only if the type is a 4 state scalar or 4 state single dimensional vector Otherwise the port is declared a variable e svO0Scompat Used in conjunction with the sv switch to ensure compatibility with the reserved keyword set of IEEE Std 1800 2005 e sv09compat Used in conjunction with the sv switch to ensure compatibility with the reserved keyword set of IEEE Std 1800 2009 e sv12compat Used in conjunction with the sv switch to ensure compatibility with the reserved keyword set of IEEE Std 1800 2012 342 ModelSim Reference Manual v10 1c Commands vlog e skipprotected Ignores any protected endprotected region contained in a module Optional e skipprotectedmodule Prevents adding any module containing a protected endprotected region to the library Optional e suppress lt msg_number gt lt msg_number gt Prevents the specified message s from
71. fast id lt id gt label lt label gt lt when_condition_expression gt lt command gt Embedded Commands Allowed with the fast Argument You can use any Tcl command as a lt command gt along with any of the following vsim commands bp bd e change e disablebp enablebp e echo e examine e force noforce e log nolog stop 406 ModelSim Reference Manual v10 1c Commands when when nowhen Embedded Commands Not Allowed with the fast Argument e Any do commands e Any Tk commands or widgets e References to U I state variables or tcl variables e Virtual signals functions or types Using Global Tcl Variables with the fast Argument Embedded commands that use global Tcl variables for passing a state between the when command and the user interface need to declare the state using the Tcl uivar command For example the variable i below is visible in the GUI From the command prompt you can display it by entering echo i or modify it for example by entering set i 25 set i 10 when fast clk 0 uivar i set i expr i 1 if Si lt 0 force reset 1 0 0 250 when fast reset 0 uivar i set i 10 Additional Restrictions on the fast Argument Accessing channels such as files pipes sockets that were opened outside of the embedded command will not work For example set fp open mylog txt w when fast bus puts fp bus change examine bus The chann
72. file ModelSim Reference Manual v10 1c Commands vcom preserve optional Forces vcom to preserve the case of letters in object identifiers Can also be enabled by setting the PreserveCase variable to 1 in the modelsim ini file e quiet optional Disables Loading messages e rangecheck default Enables run time range checking Range checking can be disabled using the norangecheck argument Refer to Range and Index Checking for additional information e refresh optional Regenerates a library image By default the work library is updated To update a different library use work lt library_name gt with refresh for example vecom work lt your_lib_name gt refresh If a dependency checking error occurs which prevents the refresh use the vcom force_refresh argument Refer to the veom Examples for more information You may use a specific design name with refresh to regenerate a library image for that design but you may not use a file name e s5 optional Instructs the compiler not to load the standard package This argument should only be used if you are compiling the standard package itself e separateConfigLibrary Allows the declaration of a VHDL configuration to occur in a different library than the entity being configured Strict conformance to the VHDL standard LRM requires that they be in the same library This argument must be used if optimization is disabled novopt e skip abce
73. file The information returned varies depending on the condition of the breakpoint s in the specified file Returns a complete list of all breakpoints and whether they are enabled or not when specified without lt line_number gt Returns nothing if lt line_number gt is not executable lt filename gt The name of the file containing the breakpoint lt line_number gt The line number where a breakpoint has been set The output contains six fields of information For example bp query top vhd 70 returns 1 1 top vhd 70 2 1 o 110 Indicates whether a breakpoint exists at the location 0 Breakpoint does not exit 1 Breakpoint exists o l always reports a 1 o lt file_name gt o lt line_number gt o lt id_number gt o 110 Indicates whether the breakpoint is enabled 0 Breakpoint is not enabled ModelSim Reference Manual v10 1c 83 Commands bp 1 Breakpoint is enabled Examples 84 List all existing breakpoints in the design including the source file names line numbers breakpoint id s labels and any commands that have been assigned to the breakpoints bp Set a breakpoint in the source file alu vhd at line 147 bp alu vhd 147 Execute the macro do macro file when the breakpoint is hit bp alu vhd 147 do macro do Set a breakpoint on line 22 of test vhd When the breakpoint is hit the values of variables var and var2 are examined This breakpoint is initially disable
74. file und and search it for undefined modules Refer to Environment Variables for more information Name Case Sensitivity Name case sensitivity is different for VHDL and Verilog VHDL names are not case sensitive except for extended identifiers in VHDL 1076 1993 or later In contrast all Verilog names are case sensitive Names in ModelSim commands are case sensitive when matched against case sensitive identifiers otherwise they are not case sensitive Extended Identifiers The following are supported formats for extended identifiers for any command that takes an identifier ext ident Note that trailing space before closing brace is required ext ident All non alpha characters escaped Wildcard Characters You can use wildcard characters in HDL object names for the following simulator commands add dataflow e add list ModelSim Reference Manual v10 1c 17 Syntax and Conventions Wildcard Characters e add memory e add watch e add wave e find e log When you execute any of these commands with a wildcard the default behavior is to exclude the following object types e VHDL shared variables in packages and design units constants generics and immediate assertions e Verilog parameters specparams memories e PSL and SystemVerilog assertions covers and endpoints e Signals in cells You can alter these exclusions with the WildcardFilter preference variable Refer to the section Using the W
75. fixed value 1 b0 mem load infile vals mem format bin filltype value filldata 1 b0 top m mem When you enter the mem display command on memory addresses 0 through 12 you see the following mem display startaddress 0 endaddress 12 top m mem 0 0000000000000000 0000000000000001 0000000000000010 00000000000000 4 0000000000000100 0000000000000101 0000000000000110 00000000000001 8 0000000000001000 0000000000001001 0000000000000000 0000000000000000 12 0000000000000000 Load the memory pattern from the file vals mem to the memory instance top m mru_mem filling the rest of the memory with the fixed value 16 Hbeef mem load infile vals mem format hex st 0 end 12 filltype value filldata 16 Hbeef top m mru_mem 168 ModelSim Reference Manual v10 1c Commands mem load Load memory instance top mem2 with two words of memory data using the Verilog Hex format skipping 3 words after each fill pattern sequence mem load filltype value filldata 16 hab 16 hcd top mem2 skip 3 e Load memory instance top mem with zeros 0 mem load filldata 0 top mem Truncate the msb bits that exceed the maximum word size specified in HDL code mem load format h truncate infile data_files data out top m_reg_inc mem Related Topics mem save ModelSim Reference Manual v10 1c 169 Commands mem save mem save This command saves the contents of a memory instance to a file in any of the s
76. gt map lt mapping pairs gt no_strength_range nomap unique Arguments compress optional Produces a compressed VCD file ModelSim uses the gzip compression algorithm If you specify a gz extension on the file lt filename gt argument ModelSim compresses the file even if you don t use the compress argument direction optional Includes driver direction data in the VCD file lt filename gt required Specifies the name of a VCD file to create Multiple files can be opened during a single simulation however you can create only one file at a time If you want to create multiple files invoke ved files multiple times map lt mapping pairs gt optional Overrides the default mappings Affects only VHDL signals of type std_logic lt mapping pairs gt Specified as a list of character pairs The first character in a pair must be one of the std_logic characters UX01ZWLH and the second character is the character you wish to be recorded in the VCD file The Tcl convention for command strings that include spaces is to enclose them in quotation marks For example to map L and H to z vcd file map L z H z no_strength_range optional Ignores strength ranges when resolving driver values This argument is an extension to the IEEE 1364 specification Refer to Resolving Values for additional information nomap optional Affects only VHDL signals of type std_logic It specifies that the v
77. have been entered to arrive at the current state for the active process Syntax tb Arguments e None 240 ModelSim Reference Manual v10 1c Commands Time Time These commands allow you to perform comparisons between operations on and conversions of time values When unit is left unspecified the commands assume the current simulation time unit as defined by the Resolution variable in the modelsim ini file or the vsim t command Units of time ns us and so forth can be specified independently for each lt time 1 2 gt specified for most of the commands See the description of each command and examples for more information Arguments to this command are order dependent Follow the order specified in the Syntax for each command Syntax eqTime lt time1 gt unit lt time2 gt unit Returns a 1 true or O false if lt time1 gt and lt time2 gt are equal neqTime lt time1 gt unit lt time2 gt unit Returns a 1 true or O false if lt time1 gt and lt time2 gt are not equal ItTime lt time1 gt unit lt time2 gt unit Returns a 1 true or 0 false if lt time1 gt is less than lt time2 gt gtTime lt time1 gt unit lt time2 gt unit Returns a 1 true or O false if lt time1 gt is greater than lt time2 gt IteTime lt time1 gt unit lt time2 gt unit Returns a 1 true or 0 false if lt time1 gt is less than or equal to lt time2 gt gteTime lt time1 gt unit lt time2 gt unit Re
78. hierarchy lt level gt Any integer greater than or equal to zero For example if you specify depth 1 the command descends only one level in the hierarchy divider lt divider_name gt optional Adds a divider to the Wave window If you do not specify this argument the command inserts an unnamed divider lt divider_name gt Specifies the name of the divider which appears in the pathnames column Multiple objects entered as a space separated list When you specify more than one lt divider_name gt the command creates a divider for each name You can begin a name with a space but you must enclose the name within quotes or braces You cannot begin a name with a hyphen expand lt signal_name gt optional Instructs the command to expand a compound signal immediately but only one level down lt signal_name gt Specifies the name of the signal This string can include wildcards format lt type gt lt format gt optional Specifies the display format of the objects Valid entries are format lt type gt lt format gt Display Format format literal literal Literal waveforms are displayed as a box containing the object value format logic logic Logic signals may be U X 0 1 Z W L H or format analog step analog step Analog step changes to the new time before plotting the new Y format analog interpolated analog interpolated Analog interpolated dra
79. instance writes the contents of the Main window transcript to the specified file write tssi records the contents of the List window in a TSSI format file write wave ModelSim Reference Manual v10 1c records the contents of the Wave window in PostScript format 47 Commands abort abort This command halts the execution of a macro file interrupted by a breakpoint or error When macros are nested you may choose to abort the last macro only abort a specified number of nesting levels or abort all macros You can specify this command within a macro to return early Syntax abort lt n gt all Arguments e lt n gt optional The number of nested macro levels to abort Specified as an integer greater than 0 where the default value is 1 e all optional Instructs the tool to abort all levels of nested macros Related Topics onbreak onElabError onerror 48 ModelSim Reference Manual v10 1c Commands add dataflow add dataflow This command adds the specified process signal net or register to the Dataflow window Wildcards are allowed Arguments to this command are order dependent Please read the argument descriptions for more information Syntax add dataflow lt object gt connect lt source_net gt lt destination_net gt in out inout ports internal nofilter recursive Arguments lt object gt required unless specifyi
80. is in progress lt home_dir gt The path to the new project directory within the current working directory lt proj_name gt Specifies a name for the new project The file will be saved as an mpf file lt defaultlibrary gt Specifies a name for the default library lt intialini gt An optional modelsim ini file can be specified as a seed for the project file by using the initialini option If initialini is an empty string then ModelSim uses the current modelsim ini file when creating the project You must specify a default library if you want to specify initialini 0 default Copies all library mappings from the specified lt initialini gt file into the new project 1 Copies library mappings referenced in an others clause in the initial ini file ModelSim Reference Manual v10 1c 197 Commands project e open lt project gt optional Closes any currently opened project and opens a specified project file must be a valid mpf file making it the current project Changes the current working directory to the project s directory Must be used outside of a simulation session e removefile lt filename gt optional Removes the specified file from the current project Examples e Make user george design test3 test3 mpf the current project and changes the current working directory to user george design test3 project open user george design test3 test3 mpf e Execute current project library bui
81. is inefficient to do so Using this option does not help you find event order dependencies but it allows you to ignore them Keep in mind that this option does not account for all event order discrepancies and that using this option may degrade performance Refer to Event Ordering in Verilog Designs for additional information e compile_uselibs lt directory_name gt Locates source files specified in a uselib directive Refer to Verilog XL uselib Compiler Directive compiles those files into automatically created libraries and updates the modelsim ini file with the logical mappings to the new libraries Optional If a directory_name is not specified ModelSim uses the name specified in the MTI_USELIB_DIR environment variable If that variable is not set ModelSim creates the directory mti_uselibs in the current working directory e convertallparams Enables converting parameters not defined in ANSI style to VHDL generics of type std_logic_vector bit_vector std_logic vl_logic vl_logic_vector and bit Optional e cuname Used only in conjunction with mfcu Optional The cuname names the compilation unit being created by vlog The named compilation unit can then be specified on the vsim command line along with the lt top gt design unit The purpose of doing so is to force elaboration of specified compilation unit package thereby forcing elaboration of a necessary bind statement within that compilation unit that
82. is specified you must enclose lt time gt and lt unit gt within curly braces cut copy paste invert mirror required Specifies the type of edit to perform cut Deletes the specified portion of the waveform copy Saves a copy of the specified portion of the waveform paste Inserts the contents of the clipboard into the specified portion of the waveform invert Flips the specified portion of the waveform vertically mirror Flips the specified portion of the waveform horizontally driver freeze deposit driver expectedoutput required Specifies the type of driver to which you want the specified section of the waveform changed Applies to signals of type inout or internal duration lt time gt lt unit gt optional The length of the pulse lt time gt Specified as an integer or decimal number where the default is 10 time units lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces end lt time gt lt unit gt required unless specifying paste The end of the section of waveform to perform the editing operation upon denoted by a simulation time lt time gt Specified as an integer or decimal number lt unit gt
83. less than lt greater than or equal gt less than or equal lt AND amp amp AND OR ll OR The operands may be object names signame event or constants Subexpressions in parentheses are permitted The command will be executed when the expression is evaluated as TRUE or 1 The formal BNF syntax is condition Name expression expression expression AND relation expression OR relation relation relation Name Literal Name Literal Name EVENT expression Literal lt char gt lt bitstring gt lt bitstring gt The operator can occur only between a Name and a Literal This means that you cannot compare the value of two signals i e Name Name is not possible Tcl variables can be used in the condition expression but you must replace the curly braces with double quotes This works like a macro substitution where the Tcl variables are evaluated once and the result is then evaluated as the when condition Condition expressions are evaluated in the vsim kernel which knows nothing about Tcl variables That s why the condition expression must be evaluated in the GUI before it is sent to the vsim kernel See below for an example of using a Tcl variable The gt lt gt and lt operators are the standard ones for vector types not the overloaded operators in the std_logic_1164 package This may cause unexpected results when comparing objects that con
84. list command 165 mem load command 166 mem save command 170 mem search command 173 memory window add memory command 55 adding items to 55 memory comparing contents 161 memory displaying contents 162 memory listing 165 memory loading contents 166 memory saving contents 170 memory searching for patterns 173 Message Viewer window messages write command 178 messages echoing 124 getting more information 295 loading disabling with quiet 341 loading disbling with quiet 285 messages clearfilter command 176 177 messages write command 178 mfcu 337 mindelays 337 mulTime command 241 multi source interconnect delays 359 N name case sensitivity VHDL vs Verilog 17 negative pulses driving an error state 377 neqTime command 241 nets drivers of displaying 121 readers of displaying 211 stimulus 145 values of examining 130 444 no_risefall_delaynets 374 noforce command 180 nolibcell 336 nolog command 181 notepad command 183 noview command 184 nowarn lt CODE gt 339 nowhen command 185 O object_list_file WLF files 418 onbreak command 186 onElabError command 188 onerror command 189 optimizations disabling for Verilog designs 340 optimizing wlf files 418 order of events changing in Verilog 331 _ p parameters using with macros 119 pathnames in VSIM commands 12 spaces in 12 pause command 192 PLI loading shared objects with global sym
85. min and hr If lt unit gt is specified you must enclose lt delay gt and lt unit gt within curly braces strobestart lt start_time gt lt unit gt optional Specifies the start time of the list strobe lt start_time gt Any non negative integer lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt delay gt and lt unit gt within curly braces usesignaltriggers 01 1 optional Specifies whether or not signals are to be used as triggers 0 Signals are not used as triggers 1 Signals are used as triggers usestrobe 0 1 optional Specifies whether or not a strobe is used as a trigger 0 Strobe is not used to trigger 1 Strobe is used to trigger Arguments Wave window only childrowmargin lt pixels gt optional Specifies the distance in pixels between child signals Related Tcl variable is PrefWave childRowMargin lt pixels gt Any non negative integer where the default is 2 cursorlockcolor lt color gt optional Specifies the color of a locked cursor Related Tcl variable is PrefW ave cursorLockColor lt color gt Any Tcl color where the default is red gridauto off on optional Controls the grid period when in simulation time mode o
86. mode to display UCDB data e visual lt visual gt optional Specifies the visual to use for the window Does not apply to Windows platforms Where lt visual gt may be lt class gt lt depth gt One of the following directcolor grayscale greyscale pseudocolor staticcolor staticgray staticgrey truecolor followed by lt depth gt Specifies how many bits per pixel are needed for the visual default Instructs the tool to use the default visual for the screen lt number gt Specifies a visual X identifier best lt depth gt Instructs the tool to choose the best possible visual for the specified lt depth gt where lt depth gt Specifies how many bits per pixel are needed for the visual e warning lt msg_number gt lt msg_number gt optional Changes the severity level of the specified message s to warning Edit the warning variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information e wlf lt file_name gt optional Specifies the name of the wave log format WLF file to create The default file name is vsim wilf This option may also be specified with the WLFFilename variable in the modelsim ini file ModelSim Reference Manual v10 1c 367 Commands vsim 368 wlfcachesize lt n gt optional Specifies the size in megabytes of the WLF reader cache By default the cache size is set to zero
87. ns with a value of 1111 and a drive type of freeze wave create driver freeze pattern constant value 1111 range 7 0 starttime Ons endtime 1000ns sim andm v_cont2 392 ModelSim Reference Manual v10 1c Commands wave create Related Topics wave edit wave modify Generating Stimulus with Waveform Editor Creating Waveforms from Patterns ModelSim Reference Manual v10 1c 393 Commands wave edit wave edit This command modifies waveforms created with the wave create command Some arguments to this command are order dependent Please read through the argument descriptions for more information d The following table summarizes the available editing options Command wave edit cut wave edit copy wave edit paste wave edit invert wave edit mirror wave edit insert_pulse wave edit delete wave edit stretch wave edit move wave edit change_value wave edit extend wave edit driveType wave edit undo wave edit redo Syntax Description Cut part of a waveform to the clipboard Copy part of a waveform to the clipboard Paste the waveform from the clipboard Vertically flip part of a waveform Mirror part of a waveform Insert a new edge on a waveform doesn t affect waveform duration Delete an edge from a waveform doesn t affect waveform duration Move an edge by stretching the waveform Move an edge without moving other edges Change the value of part of a waveform Extend all waves Change the
88. objects displayed in the List window VHDL signals and variables and Verilog nets and registers Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax write list events lt filename gt Arguments e events optional Specifies to write print on change format where the default is tabular format e lt filename gt required Specifies the name of the output file where the data is to be written Examples e Save the current data in the List window in a file named alu lst write list alu lst Related Topics write tssi ModelSim Reference Manual v10 1c 427 Commands write preferences write preferences This command saves the current GUI preference settings to a Tcl preference file Settings saved include Wave Objects and Locals window column widths Wave Objects and Locals window value justification and Wave window signal name width Syntax write preferences lt preference file name gt Arguments e lt preference file name gt required Specifies the name for the preference file If the file is named modelsim tcl ModelSim will read the file each time vsim is invoked To use a preference file other than modelsim tcl you must specify the alternative file name with the MODELSIM_TCL environment variable You can modify variables by editing the preference file with the ModelSim notepad notepad lt preference file name gt 428 ModelSim Refe
89. of a command that can be used to re create the object removes the matching virtuals virtual describe ModelSim Reference Manual v10 1c prints a complete description of the data type of one or more virtual signals 45 Commands Command name virtual expand Table 2 1 Supported Commands cont produces a list of all the non virtual objects contained in the virtual signal s virtual function creates a new signal that consists of logical operations on existing signals and simulation time virtual hide causes the specified real or virtual signals to not be displayed in the Objects window virtual log causes the sim mode dependent signals of the specified virtual signals to be logged by the simulator virtual nohide redisplays a virtual previously hidden with virtual hide virtual nolog virtual region stops the logging of the specified virtual signals creates a new user defined design hierarchy region virtual save saves the definitions of virtuals to a file virtual show virtual signal lists the full path names of all the virtuals explicitly defined creates a new signal that consists of concatenations of signals and subelements virtual type creates a new enumerated type vlib creates a design library vlog compiles Verilog design units and SystemVerilog extensions vmake vmap creates a makefile that can be used to reconstruct the spe
90. of the specified message s to error Optional Edit the error variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information e f lt filename gt Specifies a file with more command line arguments Optional Allows complex arguments to be reused without retyping Allows gzipped input files Nesting of f options is allowed Refer to the section Argument Files for more information e force_refresh lt design_unit gt Forces the refresh of all specified design units Optional By default the work library is updated use work lt library_name gt in conjunction with force_refresh to update a different library for example vlog work lt your_lib_name gt force_refresh When the compiler refreshes a design unit it checks each dependency to ensure its source has not been changed and recompiled Sometimes the dependency checking algorithm changes from release to release This can lead to false errors during the integrity checks performed by the refresh argument An example of such a message follows Error vsim 13 Recompile u test dware dware_61le_beta dwpackages because home users questasim linux synopsys attributes has changed ModelSim Reference Manual v10 1c 333 Commands vlog 334 The force_refresh argument forces the refresh of the design unit overriding any dependency checking errors encountered by the refresh argument A more
91. only operate on one field at a time That is the expression a b where a and b are records with multiple fields is not supported This would have to be expressed as a f1 b f1 amp amp a f2 b 2 Examples 36 ModelSim Reference Manual v10 1c Syntax and Conventions GUI_expression_format vhdlsig field vhdlsig fieldl subfieldl vhdlsig 5 field3 vhdlsig field4 3 downto 0 Searching for Binary Signal Values in the GUI When you use the GUI to search for signal values displayed in 4 state binary radix you should be aware of how ModelSim maps between binary radix and std_logic The issue arises because there is no un initialized value in binary while there is in std_logic So ModelSim relies on mapping tables to determine whether a match occurs between the displayed binary signal value and the underlying std_logic value This matching algorithm applies only to searching using the GUI It does not apply to VHDL or Verilog test benches For comparing VHDL std_logic std_ulogic objects ModelSim uses the table shown below An entry of 0 in the table is no match an entry of 1 is a match an entry of 2 is a match only if you set the Tcl variable STDLOGIC_X_MatchesAnything to 1 Note that X will match a U and will match anything Table 1 17 VHDL Logic Values Used in GUI Search Search Matches as follows Entry x 0 e
92. optional Disables initialization of subprogram parameters for array and record types when the subprogram is executed in designs compiled with LRM 1076 2002 and earlier By default designes compiled with LRM 1076 2008 and later do not initialize subprogram parameters for array and record types when the subprogram is executed You can also disable initialization of subprogram parameters for array and record types by setting the InitiOutCompositeParam variable to 2 in the modelsim ini file just abcep optional Directs the compiler to include only the following a architectures b bodies c configurations e entities p packages Any combination in any order can be used but you must specify at least one choice if you use this switch l lt filename gt optional Generates a log file of the compile line lt number gt optional Starts the compiler on the specified line in the VHDL source file By default the compiler starts at the beginning of the file lt number gt lint optional Performs additional static checks on case statement rules and enables warning messages for the following situations ModelSim Reference Manual v10 1c Commands vcom o The result of the built in concatenation operator amp is the actual for a subprogram formal parameter of an unconstrained array type o If you specify the BindAtCompile switch with vcom the entity to which a component instantiation is bound has a p
93. orientation where the default is landscape horizontal e start lt time gt optional Specifies the start time to be written lt time gt Specified as a positive integer or decimal number where the units are the current simulation time resolution ModelSim Reference Manual v10 1c 437 Commands write wave e width lt real_num gt optional Specifies the paper width in inches lt real_num gt Specified as a positive integer or decimal number where the default is 8 5 Examples e Save the current data in the Wave window in a file named alu ps write wave alu ps e Write two separate pages to top ps The first page contains data from 600ns to 700ns and the second page contains data from 701ns to 800ns write wave start 600ns end 800ns perpage 100ns top ps To make the job of creating a PostScript waveform output file easier use the File gt Print Postscript menu selection in the Wave window 438 ModelSim Reference Manual v10 1c ABCDEFGH I Symbols hasX hasX 30 typdelays 343 finish behavior customizing 376 Numerics 2001 keywords disabling 344 A abort command 48 absolute time using 22 add dataflow command 49 add list command 51 add log command 156 add memory 55 add memory command 55 add message command 57 add watch command 59 add wave command 60 add_cmdhelp command 67 AddPragmaPrefix ini file variable 330 addTime command 241 alias command
94. pair such as linux_gcec 3 2 3 all Specifies that all objects should be removed as reported by the output of the vdir obj command e lib lt library_path gt optional Specifies location of the library that holds the design unit to be deleted By default the design unit is deleted from the work library lt library_path gt A logical name or pathname of the library e modelsimini lt ini_filepath gt optional Loads an alternate initialization file that replaces the current initialization file Overrides the file path specified in the MODELSIM environment variable lt ini_filepath gt Specifies either an absolute or relative path to the initialization file On Windows systems the path separator should be a forward slash e obj lt object_info gt optional removes directories containing DPI object files lt object_info gt Specifies the type of directory to remove as reported by the output of the vdir obj command This will take the form of either 288 ModelSim Reference Manual v10 1c Commands vdel lt compiler gt a string identifying the compiler such as gec 3 3 1 lt platform gt a string identifying the platform such as linux lt platform compiler gt a string identifying a compiler platform pair such as linux_gcc 3 2 3 all Specifies that all directories should be removed as reported by the output of the vdir obj command e lt primary gt lt arch_name gt
95. parentheses should be used rather than braces Procedure calls are not supported A GUI expression can include the following elements Tcl macros constants array constants variables array variables signal attributes operators and casting Tcl Macros Macros are useful for pre defined constants or for entire expressions that have been previously saved The substitution is done only once when the expression is first parsed Macro syntax is S lt name gt Substitutes the string value of the Tcl global variable lt name gt 28 ModelSim Reference Manual v10 1c Syntax and Conventions GUI_expression_format Constants Table 1 10 Constants Supported for GUI Expresssions boolean value true false TRUE FALSE integer 0 9 real number lt int gt lt int gt lt int gt exp where the optional exp is elE 0 O time integer or real optionally followed by time unit enumeration VHDL user defined enumeration literal single bit constants expressed as any of the following O1xXzZUHLW U X 0 P Z W DL EP PbO bl Array Constants Expressed in Any of the Following Formats Table 1 11 Array Constants Supported for GUI Expresssions VHDL notation lt int gt lt alphanum gt Example 16 abc123 VHDL bitstring ULXIOILIZIWILIHI Example 11010X11 Verilog notation lt int gt bIBlolOldIDIhIH lt alphanum gt where lt alphanum gt includes 0 9 a f A F and
96. project addfile lt filename gt lt file_type gt lt folder_name gt addfolder lt foldername gt lt folder_parent gt calculateorder close compileall n compileorder compileoutofdate n delete lt filename gt filenames env history new lt home_dir gt lt proj_name gt lt defaultlibrary gt lt intialini gt 0 1 open lt project gt removefile lt filename gt Arguments 196 addfile lt filename gt lt file_type gt lt folder_name gt optional Adds the specified file to the current project Requires a project to be open lt filename gt required The name of an existing file lt file_type gt optional The HDL file type of the file being added For example do for a do file lt folder_name gt optional Places the file in an existing folder created with project addfolder command If no folder name is specified the file will be placed in the top level folder addfolder lt foldername gt lt folder_parent gt optional Creates a project folder within the project Requires a project to be open lt foldername gt required Any string lt folder_parent gt optional Places lt foldername gt in an existing parent folder If lt folder_parent gt is unspecified lt foldername gt is placed at the top level calculateorder optional Determines the compile order for the project by compiling each file then moving any compile
97. required The file s to search You can use Tcl regular expression wildcards to further restrict the search capability Example Figure 2 2 shows a screen capture containing a few examples of the find infiles command and the results Figure 2 2 find infiles Example SIM 10 gt Find infiles memory vhd C QuestaTestcases dataflow cache vhd 116 9 Ree local MRU memory PEE Ekaa C QuestaTestcases dataflow memory vhd 12 entity memory is l C QuestaTestcases dataflow memory vhd 21 end entity memory C QuestaTestcases dataflow memory vhd 25 architecture RTL of memory is C QuestaTestcases dataflow top vhd 44 component memory C QuestaTestcases dataflow top vhd 83 m memory port maptclk saddr sdata srw sstrb srdy SIM 11 gt Find infiles Memory port vhd C QuestaTestcases dataflow top vhd 83 m memory port maptclk saddr sdata srw sstrb srdy SIM 12 gt Find infiles vsim do C QuestaTestcases dataflow run do 28 vsim voptargs acc top fnemprof FA Transcript al gt 142 ModelSim Reference Manual v10 1c Commands find insource find insource This command searches for a string in the source files for the current design and prints the results to the Transcript window The results are hotlinked individually and will open the file and display the location of the string When you execute this command in command line mode from outside of the GUI the results are sent t
98. resolve will not execute methods of an uninitialized class type e nowam lt CODE gt Disables warning messages in the category specified by lt CODE gt Optional Warnings that can be disabled include the lt CODE gt name in square brackets in the warning message For example Warning test v 15 RDGN Redundant digits in numeric literal This warning message can be disabled by specifying nowarnRDGN e nowarn lt category_number gt Prevents the specified message s from displaying The lt msg_number gt is the number preceding the message you wish to suppress Optional Multiple nowarn switches are allowed Warnings may be disabled for all compiles via the Main window Compile gt Compile Options menu command or the modelsim ini file refer to modelsim ini Variables The warning message categories are described in Table 2 7 Table 2 7 Warning Message Categories for vlog nowarn Category Description number non LRM compliance in order to match Cadence behavior constructs that code coverage can t handle oldsv optional Allows unpacked array concatenation on input ports to be treated as an assignment pattern Accepts constant expressions in variable loop list with the standard foreach syntax foreach array i j k and alternate foreach syntax foreach array i j k e override_timescale lt time_unit gt lt time_precision gt Specifies a timescale for all compiled design u
99. resolved by arbitration in Singapore before a single arbitrator to be appointed by the chairman of the Singapore International Arbitration Centre SIAC to be conducted in the English language in accordance with the Arbitration Rules of the SIAC in effect at the time of the dispute which rules are deemed to be incorporated by reference in this section This section shall not 19 20 restrict Mentor Graphics right to bring an action against Customer in the jurisdiction where Customer s place of business is located The United Nations Convention on Contracts for the International Sale of Goods does not apply to this Agreement SEVERABILITY If any provision of this Agreement is held by a court of competent jurisdiction to be void invalid unenforceable or illegal such provision shall be severed from this Agreement and the remaining provisions will remain in full force and effect MISCELLANEOUS This Agreement contains the parties entire understanding relating to its subject matter and supersedes all prior or contemporaneous agreements including but not limited to any purchase order terms and conditions Some Software may contain code distributed under a third party license agreement that may provide additional rights to Customer Please see the applicable Software documentation for details This Agreement may only be modified in writing by authorized representatives of the parties Waiver of terms or excuse of breach must be in writin
100. restart dataset restart This command unloads the specified dataset or currently active dataset and reloads the dataset using the same dataset name The contents of Wave and other coverage windows are restored for UCDB datasets after a reload Syntax dataset restart lt file_name gt Arguments e lt file_name gt optional Specifies the WLF or UCDB file to open as a view mode or coverage mode dataset If lt filename gt is not specified the currently active dataset is restarted Related Topics dataset alias dataset clear dataset list e e dataset close e e dataset open dataset rename dataset save dataset snapshot dataset config dataset info ModelSim Reference Manual v10 1c 111 Commands dataset save dataset save This command writes data from the current simulation to the specified file This lets you save simulation data while the simulation is still in progress Arguments to this command are order dependent Follow the order specified in the Syntax section Syntax dataset save lt dataset_name gt lt file_name gt Arguments e lt dataset_name gt required Specifies the name of the dataset you want to save e lt file_name gt required Specifies the name of the file to save Examples Save all current log data in the sim dataset to the file gold wlf dataset save sim gold wlf Related Topics dataset list dataset open dataset rename dataset restart dataset snapshot
101. s You can use this to create a list of arguments for a command that does not accept or understand virtual signals Syntax virtual expand base lt pathname gt Arguments e base optional Outputs the root signal parent in place of a subelement For example vcd add virtual expand base myVirtualSignal the resulting command after substitution would be vcd add signala signalb signalc e lt pathname gt required Specifies the path to the signals and virtual signals to expand where wildcards are allowed and you can specify any number of paths Examples e Add the elements of a virtual signal to the VCD file In the Tcl language the square brackets specify that the enclosed command should be executed first virtual expand then the result substituted into the surrounding command vcd add virtual expand myVirtualSignal Therefore if myVirtualSignal is a concatenation of signala signalb recl and signalc 5 downto 3 the resulting command after substitution would be vcd add signala signalb recl signalc 5 downto 3 The slice of signalc is enclosed in curly braces because it contains spaces Related Topics virtual signal e Virtual Objects 308 ModelSim Reference Manual v10 1c Commands virtual function virtual function This command creates a new signal known only by the GUI not the kernel that consists of logical operations on existing signals and simulation time as descri
102. sort ascending ModelSim Reference Manual v10 1c 405 Commands when when This command instructs ModelSim to perform actions when the specified conditions are met For example you can use the command to break on a signal value or at a specific simulator time Use the nowhen command to deactivate when commands Syntax when fast id lt id gt label lt label gt lt when_condition_expression gt lt command gt Description The when command uses a when_condition_expression to determine whether or not to perform the action Conditions can include VHDL signals and Verilog nets and registers The when_condition_expression uses a simple restricted language that is not related to Tcl which permits only four operators and operands that may be either HDL object names signame event or constants ModelSim evaluates the condition every time any object in the condition changes hence the restrictions Here are some additional points to keep in mind about the when command The when command creates the equivalent of a VHDL process or a Verilog always block It does not work like a looping construct you might find in other languages such as C e Virtual signals functions regions types and so forth cannot be used in the when command Neither can simulator state variables other than now e With no arguments when will list the currently active when statements and their labels explicit or implicit Syntax when
103. specific class is class_name e isa lt class_name gt optional Restricts the search to those objects that have class_name anywhere in their heritage e lt object_name gt optional Specifies the incrTcl object for which you want to search Wildcard characters are allowed If you do not specify an object name the command returns all objects in the current namespace context See incrT cl commands in the Tcl Man Pages Help gt Tcl Man Pages for more information Description The following rules are used by the find command to locate an object Ifthe name does not include a dataset name then the current dataset is used e Ifthe name does not start with a path separator then the current context is used e If the name is a path separator followed by a name that is not the name of a top level design unit then the first top level design unit in the design is used e Fora relative name containing a hierarchical path if the first object name cannot be found in the current context then an upward search is done up to the top of the design hierarchy to look for a matching object name 138 ModelSim Reference Manual v10 1c Commands find e Ifno objects of the specified name can be found in the specified context then an upward search is done to look for a matching object in any visible enclosing scope up to an instance boundary If at least one match is found within a given context no more upward searching is done therefore so
104. specified in the Syntax section Syntax Isublist lt list gt lt pattern gt Arguments e lt list gt required Specifies the Tcl list to target with Isublist e lt pattern gt required Specifies the pattern to match within the lt list gt using Tcl glob style matching Examples e In the example below variable t returns structure signals source set window_names Structure signals variables process source wave list set t lsublist S window_names s Related Topics The set command is a Tcl command Refer to the Tcl man pages Help gt Tcl Man Pages for details 160 ModelSim Reference Manual v10 1c Commands mem compare mem compare This command compares a selected memory to a reference memory or file Must have the diff utility installed and visible in your search path in order to run this command Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax mem compare mem lt ref_mem gt file lt ref_file gt actual_mem Arguments e mem lt ref_mem gt optional Specifies a reference memory to be compared with actual_mem lt ref_mem gt A memory record e file lt ref_file gt optional Specifies a reference file to be compared with actual_mem lt ref_file gt A saved memory file e actual mem required Specifies the name of the memory to be compared against the reference data Must be specifie
105. tag fmt tag full lt msgNum gt verror fmt tag fmt tag full tool lt tool gt all verror tool lt tool gt ranges verror kind lt tool gt pedanticerrors permissive Arguments fmt tag fmt tag full optional Specifies the type and amount of information to return fmt returns the format string used in the error message tag returns the tag associated with the error message full returns the format string tag and complete text associated with the error message tool lt tool gt all required when not specifying lt msgNum gt or ranges Returns information about all messages associated with a specified tool where lt tool gt can be one of the following common vcom vcom vlog vlog vsim vsim vish wif vsim sccom sccom vsim systemc ucdb vsim vlog pseudo_synth kind lt tool gt optional Specifies filtering for messages according to either or both of the following pedanticerrors display messages that are reported as errors due to adhering to a more strict interpretation of the LRM permissive display messages reported as warnings that would be displayed as errors if you use vsim pedanticerrors where lt tool gt can be any of the values allowed for the tool argument above lt msgNum gt required when not specifying all or ranges Specifies the message number s you would like more information about You can find the message numbe
106. teau Shee ee PRR SE Re Che HHS SM Ge mee EOE 59 add WAVE lt cu0 snoeren rneer ida Meee sehen Ne eadder so eaSe date redee chee setae es 60 add CONN ess o deico be x ayia soem 24 aor ee ede Oe Fee eee Ba eee 67 BUMS 6 44a ede RRR ER SAREE REI RRER ER SAREE Raa REE OG R eee EAS 69 ModelSim Reference Manual v10 1c 3 Table of Contents archive load ce eee cee eee eee ee eee ee eee eee ee en E 70 archive White 240 2 4snca bet avs eae hs aeadag deaths ede Oe eee eee ewe oe PE aeETaS 71 batch iMod s serea smta nnana hee sb a a he a a a E E A 72 IDG ns rated r een gt E are 4 te ttn a ett ot eon oid 73 bookmark add wave 0 0 ccc eee eee a eee 75 bookmark delete Wave 0 0 eee a eee 71 bookmark goto wave fa beso a4s hGh hee neren 78 bookmark list Wave 0 eee eee eens 79 PPer pi rasu iae eaa a heed chee esc DAKE be ted be EAN ee R ee OEE 80 Ca e A e A aye ete fore a an a E a a a a aye kee a es 86 a EE E E E E EAEE E AE E oe are 88 CHANBES eked enara nn ea a E a E E cides E E E 89 CLASSI neye asia e EE E a otis G E EAE E aE eai 4 Eaa OERE E e O arai aea ra 91 COMMBULE 64s heen SEER eee Ee ae Shee Shee GEES e EEN She see Seen A 95 dataset alias sc endan kanena a ae a aaa a Pe eth ae ae Ra a ee eo 101 dataset cleat oc lt 3i 0 04 id Gidea hg Wea he acheauhe dade ae eid Ga Gerard glans eed 102 dataset Close mess eect eee tide eon aea n teeta ae eee aE a bates oda ae tots epic dae 103 dataset config sosesc cee esse e
107. the WLF file to create if you plan to create many files for later viewing vsim view test sim2 wlf For example ModelSim Reference Manual v10 1c 379 Commands vsim 380 vsim wlf my_design i01 my_asic structure vsim wlf my_design i02 my_asic structure Annotate instance top u using the minimum timing from the SDF file myasic sdf vsim sdfmin top ul myasic sdf Use multiple switches to annotate multiple instances vsim sdfmin top ul sdf1 sdfmin top u2 sdf2 top This example searches the libraries mylib for top only and gatelib for cache_set If the design units are not found the search continues to the work library Specification of the architecture only is optional vsim mylib top only gatelib cache_set Invoke vsim on test_counter and run the simulation until a break event then quit when it encounters a finish task vsim do set PrefMain forceQuit 1 run all work test_counter ModelSim Reference Manual v10 1c Commands vsim lt info gt vsim lt info gt The vsim lt info gt commands return information about the current vsim executable vsimAuth Returns the authorization level PE SE VHDL Verilog PLUS vsimDate Returns the date the executable was built such as Apr 10 2000 e vsimld Returns the identifying string such as ModelSim 6 1 e vsimVersion Returns the version as used by the licensing tools such as 1999 04 e vsimVersionString Returns the full vsim versio
108. the explicit declaration to hide the implicit declaration is what most VHDL users expect ARITHMETIC left right e The work option specifies mylib as the library to regenerate refresh rebuilds the library image without using source code allowing models delivered as compiled libraries without source code to be rebuilt for a specific release of ModelSim 4 6 and later only vcom work mylib refresh ModelSim Reference Manual v10 1c 287 Commands vdel vdel This command deletes a design unit from a specified library This command provides additional information with the help switch Syntax vdel lib lt library_path gt modelsimini lt ini_filepath gt verbose all lt primary gt lt arch_name gt obj object_info dpiobj object_info Arguments e all optional Deletes an entire library __Caution___ SSSSSSSSSSSSSeFSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS You cannot recover libraries cannot once deleted You are not prompted for confirmation e dpiobj lt object_info optional Delete auto compiled DPI object files lt object_info gt Specifies the type of object to remove as reported by the output of the vdir obj command This will take the form of either lt compiler gt a string identifying the compiler such as gee 3 3 1 lt platform gt a string identifying the platform such as linux lt platform compiler gt a string identifying a compiler platform
109. the following conventions to define ModelSim command syntax Table 1 1 Conventions for Command Syntax Syntax notation Description angled brackets surrounding a syntax item indicate a user defined argument do not enter the brackets in commands square brackets generally indicate an optional item if the brackets surround several words all must be entered as a group the brackets are not entered braces indicate that the enclosed expression contains one or more spaces yet should be treated as a single argument or that the expression contains square brackets for an index for either situation the braces are entered an ellipsis indicates items that may appear more than once the ellipsis itself does not appear in commands the vertical bar indicates a choice between items on either side of it do not include the bar in the command monospaced type monospaced type is used in command examples comments included with commands are preceded by the number sign useful for adding comments to DO files macros 1 One exception to this rule is when you are using Verilog syntax to designate an array slice For example add wave vector1 4 0 The square brackets in this case denote an index The braces prevent the Tcl interpreter from treating the text within the square brackets as a Tcl command Note Neither the prompt at the beginning of a line nor the lt Enter gt key that ends a line is sho
110. the horizontal axis displays simulation time or grid period count Related Tcl variable is PrefWave timeline 0 default Simulation time is displayed 1 Grid period count is displayed e timelineunits fs ps ns us ms sec min hr optional Specifies units for timeline display Does not affect the currently defined simulation time fs femtosecond aots seconds ps picosecond aot seconds ns nanosecond 10 seconds default us microsecond 106 seconds ms millisecond a0 seconds sec second min minute 60 seconds hr hour 3600 seconds e _ vyaluecolwidth lt width gt optional Specifies the width of the value column in pixels Related Tcl variable is PrefWave valueColWidth lt width gt Any non negative integer where the default is 100 e vectorcolor lt color gt optional Specifies the vector waveform color Default is b3ffb3 Related Tcl variable is PrefWave vectorColor lt color gt Any color where the default is b3ffb3 e waveselectcolor lt color gt optional Specifies the background highlight color of a selected waveform Related Tcl variable is PrefWave waveSelectColor lt color gt Any color where the default is grey30 ModelSim Reference Manual v10 1c 99 Commands configure e waveselectenable 01 1 optional Specifies whether the waveform background highlights when an object is selected Related Tcl variable is PrefWa
111. the left brace when writing structure literals is not legal When you specify this argument an error will occur for literals written without that mark tt Inserting the grave accent mark to precede quotation marks C that enclose string literals is not legal only string literals within quotation marks are allowed When you specify this argument an error will occur for string literals using that mark Using class extern method prototypes with lifetime automatic static designations produces a compliance error instead of a warning Using cover bool clk as a PSL statement Using realtime data types in SystemVerilog assertions Using an unsized constant in a concatenation if it is the leftmost value in the list This argument also produces a report of mismatched else directives permissive Allows messages in the LRM group of error messages to be downgraded to a warning Optional ModelSim Reference Manual v10 1c Commands vlog e permit_defunct_sv Allows using a selected set of constructs no longer supported by the SystemVerilog standard Currently the set supports only the use of the keyword char This argument allows use of the keyword char to be interpreted as the SystemVerilog byte type Optional e printinfilenames Prints the path names of all source files opened including include files during the compile Specifies whether each file is a Verilog or SystemVerilog
112. time at the current resolution you can optionally specify the resolution if you place curly braces around the specification For example 5000 ns sets the duration at 5000 nanoseconds regardless of the current simulator resolution ModelSim Reference Manual v10 1c 369 Commands vsim The time range begins at the current simulation time and moves back in simulation time for the specified duration For example vsim wlftlim 5000 writes at most the last 5000ns of the current simulation to the WLF file the current simulation resolution in this case is ns If used in conjunction with wlfslim the more restrictive of the limits will take effect This option may also be specified with the WLFTimeLimit variable in the modelsim ini file The wlfslim and wlftlim switches were designed to help users limit WLF file sizes for long or heavily logged simulations When small values are used for these switches the values may be overridden by the internal granularity limits of the WLF file format See Limiting the WLF File Size Arguments VHDL 370 absentisempty optional Causes VHDL files opened for read that target non existent files to be treated as empty rather than ModelSim issuing fatal error messages nocollapse optional Disables the optimization of internal port map connections nofileshare optional Turns off file descriptor sharing By default ModelSim shares a file descriptor for all VHDL files opened for wr
113. to 01XZ at 100 nanoseconds after the current simulator time force bus1 01XZ 100 ns Force bus to 16 F at the absolute time 200 measured in the resolution units selected at simulation start up force bus1 16 f 200 Force input to 1 at 10 time units after the current simulation time and to 0 at 20 time units after the current simulation time Repeat this cycle every 100 time units after the current simulation time If the current simulation time is 100 ns the next transition is to 1 at 110 ns and 0 at 120 ns this pattern to start repeating at 200 ns force input1 1 10 0 20 r 100 Similar to the previous example but also specifies the time units force input1 1 10 ns 0 20 ns r 100 ns Force signal s to alternate between values 1 and 0 every 100 time units until 1000 time units have occurred starting from time Now Cancellation occurs at the last simulation delta cycle of a time unit force s 1 0 0 100 repeat 200 cancel 1000 So force s 1 0 cancel 0 will force signal s to 1 for the duration of the current time period Force siga to decimal value 85 whenever the value on the signal is 1 when mydut siga 10 1 force deposit mydut siga 10 85 Force one bit of a record containing an array ModelSim Reference Manual v10 1c 149 Commands force force struct1 bus1 4 1 e Force a slice of an array force bus1 2 5 hF Related Topics e change e Force Command Defaults DefaultForceKind e noforce Design O
114. top_vh cache sdata top_vh memory data e wlfman monitor f p 100000000 vsim wlf Returns Setting end time to 100000000 measuring progress Percent Complete 7 2 File State open open open open Related Topics 422 File Time 7239185 7691785 8144385 8596625 7 7 8 1 8 6 oP A oe Recording Simulation Results With Datasets WLF File Parameter Overview ModelSim Reference Manual v10 1c Commands wlfrecover wlifrecover This command attempts to repair WLF files that are incomplete due to a crash or if the file was copied prior to completion of the simulation Use this command if you receive a bad magic number error message when opening a WLF file You can run the command from the VSIM gt or ModelSim gt prompt or from a shell Syntax wlfrecover lt filename gt force q Arguments e lt filename gt required Specifies the WLF file to repair e force optional Disregards file locking and attempts to repair the file q optional Hides all messages unless there is an error while repairing the file Related Topics e Saving a Simulation to a WLF File ModelSim Reference Manual v10 1c 423 Commands write format write format This command records the names and display options of the HDL objects currently being displayed in the Analysis List Memory Message Viewer Test Browser and Wave windows The write format restart command creates a single do file tha
115. vcd add command 253 vcd checkpoint command 255 vcd comment command 256 vcd dumpports command 257 vcd dumpportsall command 260 vcd dumpportsflush command 261 vcd dumpportslimit command 262 ModelSim Reference Manual v10 1c ABCDEFGH I vcd dumpportsoff command 263 vcd dumpportson command 264 ved file command 265 VCD files adding items to the file 253 capturing port driver data 257 converting to WLF files 273 creating 253 dumping variable values 255 flushing the buffer contents 269 generating from WLF files 417 inserting comments 256 internal signals adding 253 specifying maximum file size 270 specifying name of 267 specifying the file name 265 state mapping 265 267 turn off VCD dumping 271 turn on VCD dumping 272 viewing files from another tool 273 vcd files command 267 ved flush command 269 vcd limit command 270 vcd off command 271 vcd on command 272 vcd2wlf command 273 vcom command 275 vcom Examples 286 vdel command 288 vdir command 290 vector elements initializing 89 vencrypt command 293 vendor libraries compatibility of 290 Verilog finish behavior customizing 376 capturing port driver data with dumpports 265 Verilog 2001 disabling support 344 verror command 295 version obtaining with vsim command 367 obtaining with vsim lt info gt commands 381 vgencomp command 297 VHDL ModelSim Reference Manual v10 1c JKLMNOPQRSTUVWX YZ arrays se
116. when label checkStrobe top sstrb 1 Our state Zero condition has been met move to state One set strobe One This signal breakpoint fires each time clk goes to 0 when top clk 0 if strobe eq One Our state One condition has been met Sample the busses echo Sample paddr examin hex top paddr sdata examine hex top sdata reset our state variable until next rising edge of sstrb back to state Zero set strobe Zero Ending the simulation with the stop command Batch mode simulations are often structured as run until condition X is true rather than run for X time simulations The multi line when command shown below sets a done condition and ModelSim runs an echo command and a stop command when the condition is reached The simulation will not stop even if a quit f command is used unless you enter a stop command To exit the simulation and quit ModelSim use an approach like the following ModelSim Reference Manual v10 1c 411 Commands when onbreak resume when done_condition 1 echo End condition reached if batch_mode set DoneConditionReached 1 stop run 1000 us if SDoneConditionReached 1 quit f This example stops 100ns after a signal transition when a 1 If the 100ns delay is already set then let it go if when label a_100 when label a_100 Snow 100 delete this breakpoint then s
117. where the data is to be written If lt filename gt is omitted the report is written to the Transcript window l optional Generates more detailed information about the design including a list of sparse memories or the memory capacity for all object types You must precede this argument with capacity when specifying a capacity report qdas optional Reports memory usage data for queues dynamic arrays and associative arrays You must precede this argument with capacity when specifying a capacity report S optional Generates a short list of design information You must precede this argument with capacity when specifying a capacity report tcl optional Generates a Tcl list of design unit information This argument cannot be used with a filename Examples 430 e Save information about the current design in a file named alu_rpt txt write report alu_rpt txt Create a Simulation Report for the current simulation write report l returns icp IMULATION REPORT Generated on Mon Aug 10 12 56 15 2009 Design simulated lt directory gt work top fast Number of signals nets in design 89 Number of processes in design 74 Simulator Parameters Current directory lt directory gt Project file lt directory gt win32 modelsim ini Simulation time resolution ins List of Design units used Module top Architecture fast Library lt d
118. will be able to use the delay value based upon the flag specified with vopt You must specify vsim novopt to force the simulator to use the delay flag specified with vsim v2k_int_delays optional Causes interconnect delays to be visible at the load module port per the IEEE 1364 2001 spec By default ModelSim annotates INTERCONNECT delays in a manner compatible with Verilog XL If you have sdf_annotate calls in your design that are not getting executed add the Verilog task sdf_done after your last sdf_annotate to remove any zero delay MIPDs that may have been created May be used in tandem with the multisource_int_delays argument see above Arguments object 378 The object arguments may be a lt library_name gt lt design_unit gt an mpf file a wif file or a text file Multiple design units may be specified for Verilog modules and mixed VHDL Verilog configurations lt library_name gt lt design_unit gt optional Specifies a library and associated design unit multiple library design unit specifications can be made If no library is specified the work library is used You cannot ModelSim Reference Manual v10 1c Commands vsim use the wildcard for this argument Environment variables can be used lt design_unit gt may be one of the following lt configuration gt Specifies the VHDL configuration to simulate lt module gt optional Specifies the name of one or more top level Verilog modules
119. will state separately in the applicable invoice s Unless timely provided with a valid certificate of exemption or other evidence that items are not taxable Mentor Graphics will invoice Customer for all applicable taxes including but not limited to VAT GST sales tax and service tax Customer will make all payments free and clear of and without reduction for any withholding or other taxes any such taxes imposed on payments by Customer hereunder will be Customer s sole responsibility If Customer appoints a third party to place purchase orders and or make payments on Customer s behalf Customer shall be liable for payment under Orders placed by such third party in the event of default 1 3 All Products are delivered FCA factory Incoterms 2000 freight prepaid and invoiced to Customer except Software delivered electronically which shall be deemed delivered when made available to Customer for download Mentor Graphics retains a security interest in all Products delivered under this Agreement to secure payment of the purchase price of such Products and Customer agrees to sign any documents that Mentor Graphics determines to be necessary or convenient for use in filing or perfecting such security interest Mentor Graphics delivery of Software by electronic means is subject to Customer s provision of both a primary and an alternate e mail address GRANT OF LICENSE The software installed downloaded or otherwise acquired by Customer under
120. would otherwise not be elaborated An example of the necessary commands is vlog cuname pkg_name mfcu filel sv file2 sv vsim top pkg_name You need to do this only in cases where you have a bind statement in a module that might otherwise not be elaborated because no module in the design depends on that compilation unit In other words if a module that depends on that compilation unit exists you don t need to force the elaboration for it occurs automatically Also if you are using qverilog to compile and simulate the design this binding issue is handled properly automatically e define lt macro_name gt lt macro_text gt Allows you to define a macro from the command line that is equivalent to the following compiler directive define lt macro_name gt lt macro_text gt Optional You can specify more than one macro with a single define For example ModelSim Reference Manual v10 1c 331 Commands vlog 332 vlog define one rl1l two r2 three r3 test v A command line macro overrides a macro of the same name defined with the define compiler directive deglitchalways nodeglitchalways Reduces the incidents of zero delay oscillations among always_comb and always combinatorial logic blocks that produce glitches on the variables they write This is the default behavior Old behavior may be selected with the vlog nodeglitchalways option A side effect of this behavior is that time zero races involving th
121. 000 ps a file containing the data from 3000000 to 3500000 ps is saved as vsim wlf default e Enable snapshotting with time 10000 and default mode cumulative and default filemode overwrite ModelSim Reference Manual v10 1c Commands dataset snapshot dataset snapshot reset time 10000 Related Topics dataset list dataset open dataset rename dataset restart dataset save dataset alias dataset clear dataset close dataset config dataset info ModelSim Reference Manual v10 1c 115 Commands delete delete This command removes objects from either the List or Wave window Arguments to this command are order dependent Syntax delete list window lt wname gt lt object_name gt delete wave window lt wname gt lt object_name gt Arguments e list Specifies the target is a list window wave Specifies the target is a wave window e window lt wname gt optional Specifies the name of the List or Wave window to target for the delete command The view command allows you to create more than one List or Wave window If no window is specified the default window is used the default window is determined by the most recent invocation of the view command and has Default appended to the name e lt object_name gt required Specifies the name of an object Must match an object name used in an add list or add wave command Multiple object names are specified as a space separated list Wildcard c
122. 10 1c Commands vsim vsim The vsim command invokes the VSIM simulator which you can use to view the results of a previous simulation run when invoked with the view switch or to view coverage data stored in the UCDB from a previous simulation run when invoked with the viewcov switch You can simulate a VHDL configuration or an entity architecture pair a Verilog module or configuration If you specify a VHDL configuration it is invalid to specify an architecture During elaboration vsim determines if the source has been modified since the last compile You can use this command in batch mode from the Windows command prompt Refer to Batch Mode for more information on the VSIM batch mode To manually interrupt design loading use the Break key or lt Ctrl C gt from a shell You can invoke vsim from a command prompt or in the Transcript window of the Main window You can also invoke it from the GUI by selecting Simulate gt Start Simulation All arguments to the vsim command are case sensitive for example g and G are not equivalent Syntax Note A This Syntax section presents all of the vsim switches in alphabetical order while the Arguments section groups the arguments into the following sections Arguments all languages Arguments VHDL Arguments Verilog Arguments object vsim options options absentisempty alt_path_delays assertfile lt filename gt bitblast iopath tcheck
123. 10 1c vcd files vcd flush vcd limit ved off vcd on ved2wlf DumpportsCollapse Value Change Dump VCD Files Verilog tasks are documented in the Language Reference Manual IEEE 1364 standard 261 Commands ved dumpportslimit vcd dumpportslimit This command specifies the maximum size of the VCD file by default limited to available disk space When the size of the file exceeds the limit a comment is appended to the file and VCD dumping is disabled Related Verilog task dumpportslimit Arguments to this command are order dependent Please read the argument descriptions for more information Syntax vcd dumpportslimit lt dumplimit gt lt filename gt Arguments e lt dumplimit gt required Specifies the maximum VCD file size in bytes Must be specified as the first argument to the ved dumpportslimit command e lt filename gt optional Specifies the name of the VCD file If omitted the command is executed on all open VCD files Related Topics vcd add vcd files vcd checkpoint vcd flush vcd comment vcd limit vcd dumpports vcd off vcd dumpportsall vcd on Sr P o m vcd dumpportso DumpportsCollapse vcd dumpportson e Value Change Dump VCD Files vcd file e Verilog tasks are documented in the Language Reference Manual IEEE 1364 standard 262 ModelSim Reference Manual v10 1c vcd dumpportsoff Commands ved dumpportsoff This command tur
124. 335 hazards argument to vsim 373 history of commands shortcuts for reuse 24 implicit operator hiding with vcom explicit 287 incdir 335 ModelSim Reference Manual v10 1c JKLMNOPQRSTUVWX YZ interconnect delays 359 annotating per Verilog 2001 378 internal signals adding to a VCD file 253 interrupting design loading 351 intToTime command 241 K keywords disabling 2001 keywords 344 enabling SystemVerilog keywords 342 L layout command 154 LD_LIBRARY_PATH disabling default internal setting of 359 libcell 336 libraries archives 327 dependencies checking 290 design libraries creating 327 listing contents 290 refreshing library images 285 341 vendor supplied compatibility of 290 Verilog 358 lint style checks 336 List window adding items to 51 loading designs interrupting 351 log command 156 log file log command 156 nolog command 181 QuickSim IT format 415 redirecting with 1 358 virtual log command 313 virtual nolog command 316 Ishift command 159 lsublist command 160 IteTime command 241 1tTime command 241 _M macros DO files breakpoints executing at 81 executing 119 forcing signals nets or registers 145 443 ABCDEFGHIJKLMNOPQRSTUVWXY2Z parameters passing 119 relative directories 119 shifting parameter values 227 maxdelays 337 mc_scan_plusargs PLI routine 376 mem compare command 161 mem display command 162 mem
125. HDLConfig Vis mixedsvvh b 11 r i modelsimini lt ini_filepath gt no1164 noaccel lt package_name gt nocasestaticerror nocheck nodbgsym nofprangecheck noFunctionInline noindexcheck nologo nonstddriverinit noothersstaticerror note lt msg_number gt lt msg_number gt novital novitalcheck nowarn lt category_number gt oldconfigvis ModelSim Reference Manual v10 1c 275 Commands vcom pedanticerrors performdefaultbinding preserve quiet rangecheck norangecheck refresh s separateConfigLibrary skip abcep source suppress lt msg_number gt lt msg_number gt time version vmake warning lt msg_number gt lt msg_number gt work lt library_name gt Arguments 276 87 93 2002 2008 optional Specifies which LRM specific compiler to use You can also control this behavior with the VHDL93 variable in the modelsim ini file Refer to Differences Between Versions of VHDL for more information 87 Enables support for VHDL 1076 1987 93 Enables support for VHDL 1076 1993 2002 Enables support for VHDL 1076 2002 default 2008 Enables support for VHDL 1076 2008 addpragmaprefix lt prefix gt optional Enables recognition of synthesis and coverage pragmas with a user specified prefix If this argument is not specified pragmas are treated as comments All regul
126. IAL OR CONSEQUENTIAL DAMAGES WHATSOEVER INCLUDING BUT NOT LIMITED TO LOST PROFITS ARISING OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT EVEN IF MENTOR GRAPHICS CORPORATION HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES RESTRICTED RIGHTS LEGEND 03 97 U S Government Restricted Rights The SOFTWARE and documentation have been developed entirely at private expense and are commercial computer software provided with restricted rights Use duplication or disclosure by the U S Government or a U S Government subcontractor is subject to the restrictions set forth in the license agreement provided with the software pursuant to DFARS 227 7202 3 a or as set forth in subparagraph c 1 and 2 of the Commercial Computer Software Restricted Rights clause at FAR 52 227 19 as applicable Contractor manufacturer is Mentor Graphics Corporation 8005 S W Boeckman Road Wilsonville Oregon 97070 7777 Telephone 503 685 7000 Toll Free Telephone 800 592 2210 Website www mentor com SupportNet supportnet mentor com Send Feedback on Documentation supportnet mentor com doc_feedback_form TRADEMARKS The trademarks logos and service marks Marks used herein are the property of Mentor Graphics Corporation or other third parties No one is permitted to use these Marks without the prior written consent of Mentor Graphics or the respective third party owner The use herein of a third party Mark is not an attempt to indi
127. L SURVIVE THE TERMINATION OF THIS AGREEMENT INFRINGEMENT 12 1 Mentor Graphics will defend or settle at its option and expense any action brought against Customer in the United States Canada Japan or member state of the European Union which alleges that any standard generally supported Product acquired by Customer hereunder infringes a patent or copyright or misappropriates a trade secret in such jurisdiction Mentor Graphics will pay costs and damages finally awarded against Customer that are attributable to the action Customer understands and agrees that as conditions to Mentor Graphics obligations under this section Customer must a notify Mentor Graphics promptly in writing of the action b provide Mentor Graphics all reasonable information and assistance to settle or defend the action and c grant Mentor Graphics sole authority and control of the defense or settlement of the action 13 14 15 16 17 18 12 2 Ifa claim is made under Subsection 12 1 Mentor Graphics may at its option and expense a replace or modify the Product so that it becomes noninfringing b procure for Customer the right to continue using the Product or c require the return of the Product and refund to Customer any purchase price or license fee paid less a reasonable allowance for use 12 3 Mentor Graphics has no liability to Customer if the action is based upon a the combination of Software or hardware with any product not fu
128. Manual IEEE 1364 standard ModelSim Reference Manual v10 1c Commands vcd file vcd file This command specifies the filename and state mapping for the VCD file created by a vcd add command The ved file command is optional If used it must be issued before any ved add commands Related Verilog task dumpfile Syntax vcd file dumpports direction lt filename gt map lt mapping pairs gt no_strength_range nomap unique Arguments dumpports optional Capture detailed port driver data for Verilog ports and VHDL std_logic ports This option works only on ports and any subsequent ved add command will accept only qualifying ports silently ignoring all other specified objects direction optional Includes driver direction data in the VCD file lt filename gt optional Specifies the name of the VCD file that is created where the default is dump vcd map lt mapping pairs gt optional Overrides the default mappings Affects only VHDL signals of type std_logic lt mapping pairs gt Specified as a list of character pairs The first character in a pair must be one of the std_logic characters UX01ZWLH and the second character is the character you wish to be recorded in the VCD file The Tcl convention for command strings that include spaces is to enclose them in quotation marks For example to map L and H to z vcd file map L z H z no_strength_range optional Ignores strength ra
129. S ee et he Bae Geib he 5 Hao Ge een hee 165 mem load Se cep cee ye eee ne ep ce ere ee aes ys yo ee ge cee oe 166 MEM SAVE 2 o2 4c ibheetinetd Senn sed seed ene epee ane eee ett a eee 170 MEM Seares aena here cessed grees toh ae Hee Gere a qu a OEM ee Eee aoa toh are ee 173 messages clearfilter s e vr d ces nriran Sauer ea Gees be sce esa See dines ee Eaa pads 176 Messag s SUING plo eiodsoGs esd aed S hoe ee ES ade SRO ee OES ee eae Rees 177 Messages WING fn ni dh ada d dad nso RROeE ARGS GRA Ae eae Ped eee RT RAE a E 178 mod lSiM 8c heh Sk cere x an dean Gp actncded St de dhecries webied amp a apd ER cared dean Gp anche atc dara Canes 179 TOLOLCE ops os ae tener E E oie 4 a E 2 A a wine E AE a E oii 2 andes 2 arta 180 MOINS 46 eGhe seer See eee eS es SSS ee Shee Shee GEES ee eee ete She see Eee 181 j tepad 2 c5025 34 e5eh ee eee Sea ees A weetee Se Geese eae e Neg eae eR See heey eceae 183 NOVICW amp i deiie the Sh abe ad xd Ga hepa ng a TEE E Sede aed nid Get hapbardnd ged EE 184 HOWDEN cot tits ete ethene ee eae edge ett tetas oe ot A EE ee bate oda E e i 185 Onbre ak Main tos 2 geil els es oe el eine dain ae ae oh le a cg ee et ee ee ete 186 ONEIABEITOR o 50 00 lt ee eaten one oan dee PS oS cede eg aoe d ee Rate ne os de ee eee 188 ONGIMOLs 30 occ E AEE Sen EN EE Sone ooh sk Sete Solel Sandy 189 OMPIMIS occ coh ou ese edt E qu te GEN ed Eee aoa tbat goes 191 PAUSE 255 Gish dee a beed kee ec PARE hs ded be PoE eee eee e
130. Sim Reference Manual v10 1c 237 Commands stop stop This command is used with the when command to stop simulation in batch files The stop command has the same effect as hitting a breakpoint The stop command may be placed anywhere within the body of the when command Syntax stop sync Arguments e sync optional Stops the currently running simulation at the next time step Description Use run continue to continue the simulation run or the resume command to continue macro execution If you want macro execution to resume automatically put the resume command at the top of your macro file onbreak resume Note aaas If you want to stop the simulation using a when command you must use a stop command within your when statement DO NOT use an exit command or a quit command The stop command acts like a breakpoint at the time it is evaluated Related Topics bp resume run when 238 ModelSim Reference Manual v10 1c Commands suppress suppress This command prevents one or more specified messages from displaying You cannot suppress Fatal or Internal messages The suppress command used without arguments returns the message numbers of all suppressed messages Edit the suppress variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information Syntax suppress clear lt msg_number gt lt msg_number gt lt msg_number gt lt msg_n
131. Specifies the name of the macro file to be executed The name can be a pathname or a relative file name Pathnames are relative to the current working directory Must be specified as the first argument to the do command If the do command is executed from another macro file pathnames are relative to the directory of the calling macro file This allows groups of macro files to be stored in a separate sub directory lt parameter_value gt optional Specifies values that are to be passed to the corresponding parameters 1 through 9 in the macro file Multiple parameter values must be separated by spaces If you want to make the parameters optional for example specify fewer parameter values than the number of parameters actually used in the macro you must use the argc simulator state variable in the macro Refer to Making Macro Parameters Optional Note While there is no limit on the number of parameters that can be passed to macros only nine values are visible at one time Use the shift command to see the other parameters Examples Execute the file macros stimulus and pass the parameter value 100 to 1 in the macro file do macros stimulus 100 Where the macro file testfile contains the line bp 1 2 place a breakpoint in the source file named design vhd at line 127 ModelSim Reference Manual v10 1c 119 Commands do do testfile design vhd 127 Related Topics e Tcl and Macros DO Files e Modes
132. TI format default e noaddress optional Specifies that addresses not be printed e startaddress lt st gt optional Specifies the start address for a range of addresses to be displayed lt st gt Any valid address in the memory If unspecified the default is the start of the memory e wordsperline lt n gt optional Specifies how many words are to be printed on each line lt n gt Any positive integer where the default is an 80 column display width e lt path gt required Specifies the full path to the memory instance The default is the current context as shown in the Structure window Indexes can be specified Must be specified as the final argument to the mem display command Examples e This command displays the memory contents of instance top c mru_mem addresses 5 to 10 mem display startaddress 5 endaddress 10 top c mru_mem returns 5 110 110 110 110 110 000 e Display the memory contents of the same instance to the screen in hex format as follows mem display format hex startaddress 5 endaddress 10 top c mru_mem returns ModelSim Reference Manual v10 1c 163 Commands mem display 5 6 66660 Related Topics e For details on MTI format refer to the mem load description 164 ModelSim Reference Manual v10 1c Commands mem list mem list This command displays a flattened list of all memory instances in the current or specified context after a design has been
133. The arguments to this command are order dependent Please read through the argument descriptions for more information Syntax add_cmdhelp lt command_name gt lt command_description gt lt command_arguments gt Arguments e lt command_name gt required Specifies the command name that will be entered as an argument to the help command Must be enclosed in braces The command_name must not interfere with an already existing command_name Must be specified as the first argument to the add_cmdhelp command e lt command_description gt required Specifies a description of the command Must be enclosed in braces Must be specified as the second argument to the add_cmdhelp command e lt command_arguments gt required A space separated list of arguments for the command Must be enclosed in braces If the command doesn t have any arguments enter Must be specified as the third argument to the add_cmdhelp command Examples e Add a command named date with no arguments add_cmdhelp date Displays date and time Entering VSIM gt help date returns Displays date and time Usage date e Add the change date command add_cmdhelp change date Modify date or time time date lt arg gt Entering VSIM gt help change date ModelSim Reference Manual v10 1c 67 Commands add_cmdhelp returns Modify data or time Usage change date time date lt arg gt e Deletes the cha
134. UPF Debug Symbol file exists ModelSim Reference Manual v10 1c Commands vencrypt vencrypt This command encrypts Verilog and SystemVerilog code contained within encryption envelopes The code is not pre processed before encryption so macros and other directives are unchanged This allows IP vendors to deliver encrypted IP with undefined macros and directives Upon execution of this command the filename extension will be changed to vp for Verilog files v files and svp for SystemVerilog files sv files If the vencrypt utility processes the file or files and does not find any encryption directives it reprocesses the file using the following default encryption pragma protect data_method aes128 cbc pragma protect key_keyowner MTI pragma protect key_keyname MGC DVT MTI pragma protect key_method rsa pragma protect key_block encoding enctype base64 pragma protect begin The vencrypt command must be followed by a compile command such as vlog for the design to be compiled This command provides additional information with the help switch Syntax vencrypt lt filename gt d lt dirname gt e lt extension gt f lt filename gt h lt filename gt 1 lt filename gt o lt filename gt p lt prefix gt quiet e lt filename gt required Specifies the name of the Verilog source code file to encrypt One filename is required Mu
135. _msg no_glitch_msg no_neg_tchk no_notifier no_path_edge no_pulse_msg no_risefall_delaynets no_show_cancelled_e no_tchk_msg nocollapse nocapacity nocompress noexcludehiz noexcludeternary nofileshare noimmedca noglitch noschematic nosdferror nosdfwarn nospecify nostdout note lt msg_number gt lt msg_number gt notimingchecks ntcnotchks novhdlvariablelogging nowarnBSOB nowarn lt CODE number gt nowiremodelforce ntc_warn ntcnotchks oldvhdlforgennames onfinish ask stop exit final pduignore lt instpath gt permissive pli lt object list gt plicompatdefault latest 2005 2001 lt plusarg gt printsimstats pulse_e lt percent gt pulse_e_style_ondetect pulse_e_style_onevent pulse_r lt percent gt quiet runinit sdf_iopath_to_prim_ok sdf_nocheck_celltype sdfmin sdftyp sdfmax lt delayScale gt lt instance gt lt sdf_filename gt sdfminr sdftypr sdfmaxr lt delayScale gt lt instance gt lt sdf_filename gt sdfmaxerrors lt n gt sdfnoerror sdfnowarn sdf_report_unannotated_insts sdf_verbose std_input lt filename gt std_output lt filename gt show_cancelled_e strictvital suppress lt msg_number gt lt msg_number gt sv_lib lt shared_obj gt sv_liblist lt filename gt sv_root lt dirname gt sync t
136. a library loo architecture E OSE HEHE HE Viewing preference variables work entity type_clocks full resolution ins Preference variables have more to do with the way things look but not entirely rather than controlling the simulator You can view preference variables from the Preferences dialog box Select Tools gt Edit Preferences Main window Related Topics modelsim ini Variables Simulator GUI Preferences ModelSim Reference Manual v10 1c 213 Commands restart restart This command reloads the design elements and resets the simulation time to zero Only design elements that have changed are reloaded Note that SDF files are always reread during a restart e If no design is loaded the restart command produces a message to that effect and takes no further action e Ifa simulation is loaded the restart command restarts the simulation e If multiple datasets are open including a simulation the environment is changed to the simulation context and the simulation is restarted Shared libraries are handled as follows during a restart Shared libraries that implement VHDL foreign architectures only are reloaded at each restart when the architecture is elaborated unless vsim keeploaded is used e Shared libraries loaded from the command line foreign and pli options and from the Veriuser entry in the modelsim ini file are reloaded unless vsim keeploaded is used Share
137. a filename and you are using the GUI a dialog box pops up allowing you to select the options and enter a filename Examples 286 e Compile the VHDL source code contained in the file example vhd ModelSim Reference Manual v10 1c Commands vcom vcom example vhd e ModelSim supports designs that use elements conforming to the 1987 1993 and 2002 standards Compile the design units separately using the appropriate switches veom 87 o_unitsl vhd o_units2 vhd veom 93 n_unit91 vhd n_unit92 vhd e When compiling source that uses the numeric_std package this command turns off acceleration of the numeric_std package located in the ieee library vcom noaccel numeric_std example vhd e Although it is not obvious the operator is overloaded in the std_logic_1164 package All enumeration data types in VHDL get an implicit definition for the operator So while there is no explicit operator there is an implicit one This implicit declaration can be hidden by an explicit declaration of in the same package LRM Section 10 3 However if another version of the operator is declared in a different package than that containing the enumeration declaration and both operators become visible through use clauses neither can be used without explicit naming vcom explicit example vhd To eliminate that inconvenience the VCOM command has the explicit option that allows the explicit operator to hide the implicit one Allowing
138. ackets to specify a subelement index find signals s 1 Find a 4 bit array named data Note that you must use curly braces due to the spaces in the array slice specification find signals top data 3 downto 0 ModelSim Reference Manual v10 1c 139 Commands find e Note that when specifying an object that contains an extended identifier as the last part of the name there must be a space after the closing and before the closing find signals top My extended id If dut core pclk exists prints the message pclk does exist in the transcript This would typically be run in a Tcl script if find signals dut core pclk echo pclk does exist e Find instances based on their names using wildcards Send search results to a text file that lists instance names including the hierarchy path on separate lines Search for all instances with ul in path set pattern_match ul Get the list of instance paths set inst_list find instances r Initialize an empty list to strip off the architecture names set ilist list foreach inst Sinst_list set ipath lindex Sinst 0 if string match S pattern_match Sipath lappend ilist Sipath At this point ilist contains the list of instances only no architecture names Begin sorting list set ilist lsort dictionary Silist Open a file to write out the list set fhandle open ins
139. akpoint or error add dataflow adds the specified object s to the Dataflow window add list lists VHDL signals and variables and Verilog nets and registers and their values in the List window add log also known as the log command see log add memory add message opens the specified memory in the MDI frame of the Main window used within a macro or script and specifies a user defined runtime message that is sent to the transcript and wlf files add watch adds signals or variables to the Watch window add wave adds VHDL signals and variables and Verilog nets and registers to the Wave window add_cmdhelp adds an entry to the command line help use the help command to display the help text alias creates a new Tcl procedure that evaluates the specified commands archive load ModelSim Reference Manual v10 1c allows you to load an archived debug database dbg file that was previously created with the archive write command 39 Commands Command name archive write Table 2 1 Supported Commands cont allows you to create a debug archive file with the file extension dgb that contains one or more WLF files debug information captured from the design library an optional connectivity debug database file and optional HDL source files batch_mode returns a 1 if ModelSim is operating in batch mode otherwise returns a 0 bd bookmark add wave d
140. al Displays values in a form closest to their natural form unsigned optional Displays values in unsigned decimal format Related Topics User Defined Radices radix define radix delete radix names radix list radix signal ModelSim Reference Manual v10 1c 203 Commands radix define radix define This command is used to create or modify a user defined radix A user definable radix is used to map bit patterns to a set of enumeration labels User defined radices are available for use in the Wave and List windows or with the examine command Syntax radix define lt name gt lt definition_body gt color lt value gt Arguments lt name gt required User specified name for the radix lt definition_body gt required A list of number pattern label pairs The definition body has the form lt numeric value gt lt enum label gt lt numeric value gt lt enum label gt default lt radix_type gt J A lt numeric value gt is any legitimate HDL integer numeric literal To be more specific lt base gt lt base integer gt lt base gt is 2 8 10 or 16 lt base gt bit value lt base gt is B O or X lt integer gt lt size gt lt base gt lt number gt lt size gt is an integer lt base gt is b d o or h Refer to the Verilog and VHDL Language Reference Manuals for exact definitions of these numeric literals The comma in the definition body is optio
141. alExpr ClassReference ModelSim Reference Manual v10 1c 21 Syntax and Conventions Simulator Variables Table 1 5 WildcardFilter Argument Groups cont Group Argument Specific arguments included AllSignals Signal Net Parameter Reg Integer Time Real SpecParam Memory NamedEvent VirtualSignal VirtualExpr Endpoint ClassReference AllSignals Vars Signal Variable Constant Generic Alias Net Parameter Reg Integer Time Real SpecParam Memory NamedEvent VirtualSignal VirtualExpr Endpoint ScVariable ClassReference AllConstants Constant Generic Parameter SpecParam Default Variable Constant Generic Parameter SpecParam Memory Assertion Cover Endpoint Sc Variable CellInternal ImmediateAssert Simulator Variables You can reference ModelSim variables in a simulator command by preceding the name of the variable with the dollar sign character ModelSim uses global variables for simulator state variables simulator control variables simulator preference variables and user defined variables Refer to modelsim ini Variables in the User s Manual for more information on variables The report command returns a list of current settings for either the simulator state or simulator control variables Simulation Time Units You can specify the time unit for delays in all simulator commands that have time arguments For example force clk 1 50 ns 1 100 ns repeat 1 us run 2 ms Note that a
142. alues recorded in the VCD file shall use the std_logic enumeration characters of UXO1ZWLH This option ModelSim Reference Manual v10 1c 267 Commands vcd files results in a non standard VCD file because VCD values are limited to the four state character set of x01z By default the std_logic characters are mapped as follows VHDL VCD VHDL VCD U x W X L 0 0 H 1 1 x Z Z e unique optional Generates unique VCD variable names for ports even if those ports are connected to the same collapsed net Examples The following example shows how to mask outputs from a VCD file until a certain time after the start of the simulation The example uses two ved files commands and the ved on and vcd off commands to accomplish this task vcd files in_inout vcd vcd files output vcd ved add in inout file in_inout vcd ved add out file output vcd vcd off output vcd run 1us ved on output vcd run all Related Topics ved add e vcd flush vcd checkpoint vcd limit vcd comment vcd off vcd dumpports vcd on vcd dumpportsall vcd2wif vcd dumpportsflush DumpportsCollapse e vcd dumpportslimit e Value Change Dump VCD Files vcd dumpportsoff e Verilog tasks are documented in the vcd dumpportson Language Reference Manual IEEE 1364 vcd file standard 268 ModelSim Reference Manual v10 1c Commands ved flush vcd flush This command flushes the contents of the VCD file bu
143. ame gt hasX The delayed attribute lets you assign a delay to a VHDL signal To assign a delay to a signal in Verilog use notation in a sub expression e g 10 top signalA The hasX attribute lets you search for signals nets or registers that contains an X unknown value See Examples of Expression Syntax below for further details on delayed and hasX 30 ModelSim Reference Manual v10 1c Operators Syntax and Conventions GUI_expression_format Table 1 14 Operators Supported for GUI Expresssions Operator Description arithmetic add arithmetic arithmetic divide arithmetic mod MOD arithmetic modulus arithmetic arithmetic multiply arithmetic rem REM arithmetic remainder arithmetic arithmetic subtract arithmetic amp concat arithmetic lt name gt delayed lt time gt delayed signal lt time gt attributes lt name gt falling Falling edge attributes lt name gt rising Rising edge attributes lt name gt event Value change attributes lt name gt hasX Value has an X attributes and AND bitwise and bitwise logical nand NAND bitwise nand bitwise logical nor NOR bitwise nor bitwise logical or OR bitwise or bitwise logical xnor XNOR bitwise xnor bitwise logical xor XOR bitwise xor bitwise logical
144. ame gt is omitted the transcript is written to a file named transcript Related Topics e do e Saving a Transcript File as a Macro DO file 434 ModelSim Reference Manual v10 1c Commands write tssi write tssi This command records the contents of the List window in a TSSI format file The file contains simulation data for all HDL objects displayed in the List window that can be converted to TSSI format VHDL signals and Verilog nets A signal definition file is also generated The List window needs to be using symbolic radix in order for write tssi to produce useful output Syntax write tssi lt filename gt Arguments lt filename gt required Specifies the name of the output file where the data is to be written Description If the lt filename gt has a file extension e g listfile lst then the definition file is given the same file name with the extension def e g listfile def The values in the listfile are produced in the same order that they appear in the List window The directionality is determined from the port type if the object is a port otherwise it is assumed to be bidirectional mode INOUT Objects that can be converted to SEF are VHDL enumerations with 255 or fewer elements and Verilog nets The enumeration values U X 0 1 Z W L H and the enumeration values defined in the IEEE Standard 1164 std_ulogic enumeration are converted to SEF values according to the table below Other va
145. amel gt lt signalOrSliceName2 gt Note that the concatenation syntax begins with amp rather than just Repetition multipliers are supported as illustrated in the second line The repetition element itself may be an arbitrary concatenation subexpression Concatenation Directives A concatenation directive as illustrated below can be used to constrain the resulting array range of a concatenation or influence how compound objects are treated By default the concatenation will be created with a descending index range from n 1 down to 0 where n is the number of elements in the array concat_range 31 0 lt concatenationExpr gt Verilog syntax concat_range 31 0 lt concatenationExpr gt Also Verilog syntax concat_range 31 downto 0 lt concatenationExpr gt VHDL syntax The concat_range directive completely specifies the index range concat_ascending lt concatenationExpr gt The concat_ascending directive specifies that the index start at zero and increment upwards concat_flatten lt concatenationExpr gt The concat_flatten directive flattens the signal structure hierarchy concat_noflatten lt concatenationExpr gt ModelSim Reference Manual v10 1c 35 Syntax and Conventions GUIL_expression_format The concat_noflatten directive groups signals together without merging them into one big array The signals become elements of a record and retain their original names When expanded th
146. amnBSOB optional Disables run time warning messages for bit selects in initial blocks that are out of bounds e nowarm lt CODE number gt optional Disables warning messages in the category specified by a warning code or number Warnings that can be disabled include the code name in square brackets in the warning message For example Warning vsim 3017 test v 2 TFMPC Too few port connections Expected lt m gt found lt n gt The warning code for this example is TFMPC and the warning number is 3017 Therefore this warning message can be disabled with nowarnTFMPC or nowarn3017 e 6 ntc_wam optional Enables warning messages from the negative timing constraint algorithm By default these warnings are disabled ModelSim Reference Manual v10 1c 375 Commands vsim 376 This algorithm attempts to find a set of delays for the timing check delayed net arguments such that all negative limits can be converted to non negative limits with respect to the delayed nets If there is no solution for this set of limits then the algorithm sets one of the negative limits to zero and recalculates the delays This process is repeated until a solution is found A warning message is issued for each negative limit set to zero ntcnotchks optional Instructs vsim to not simulate timing checks but still consider negative timing check limits for the calculation of delayed input delays oldvhdlforgennames optional
147. and pulse_r lt percent gt classdebug optional Enables visibility into class instances for class and UVM debugging You can also enable visibility into class instances by setting the ClassDebug modelsim ini variable to 1 Refer to the classinfo command for more information delayed_timing_checks optional Causes timing checks to be performed on the delayed versions of input ports used when there are negative timing check limits By default ModelSim automatically detects and applies delayed_timing_checks to cells with negative timing checks To turn off this feature specify no_autodtc with vsim dpiforceheader optional Forces the generation of a DPI header file even if it will be empty of function prototypes dpiheader optional Generates a header file that may then be included in C source code for DPI import functions Simulation quits after header file is generated Refer to DPI Use Flow for additional information dpilib lt libname gt optional Specifies the design library name that contains DPI exports and automatically compiled object files If the dpilib switch is not set vsim loads export symbols from all ModelSim Reference Manual v10 1c Commands vsim libraries accessible via vsim options L Lf and lib Multiple occurences of dpilib are supported e dpioutoftheblue 01 112 optional Instructs vsim to allow DPI out of the blue calls from C functions The C functions must not
148. and UDP definitions Optional Refer to Verilog XL Compatible Compiler Arguments for more information After all explicit filenames on the vlog command line have been processed the compiler uses the v option to find and compile any modules that were referenced but not yet defined Modules and UDPs within the file are compiled only if they match previously unresolved references Multiple v options are allowed See additional discussion in the examples version Returns the version of the compiler as used by the licensing tools Optional ModelSim Reference Manual v10 1c 343 Commands vlog 344 vlog01compat Ensures compatibility with rules of IEEE Std 1364 2001 Default vlog95compat Disables Verilog 2001 keywords which ensures that code that was valid according to the 1364 1995 spec can still be compiled By default ModelSim follows the rules of IEEE Std 1364 2001 Some requirements in 1364 2001 conflict with requirements in 1364 1995 Optional Edit the vlog95compat variable in the modelsim ini file to set a permanent default vmake Generates a complete record of all command line data and files accessed during the compile of a design This data is then used by the vmake command to generate a comprehensive makefile for recompiling the design library By default vcom stores compile data needed for the refresh switch and ignores compile data not needed for refresh The vmake switch forces inclusion of all file depe
149. and supersede all prior or contemporaneous agreements If Customer does not agree to these terms and conditions promptly return or in the case of Software received electronically certify destruction of Software and all accompanying items within five days after receipt of Software and receive a full refund of any license fee paid ORDERS FEES AND PAYMENT 1 1 To the extent Customer or if agreed by Mentor Graphics Customer s appointed third party buying agent places and Mentor Graphics accepts purchase orders pursuant to this Agreement Order s each Order will constitute a contract between Customer and Mentor Graphics which shall be governed solely and exclusively by the terms and conditions of this Agreement any applicable addenda and the applicable quotation whether or not these documents are referenced on the Order Any additional or conflicting terms and conditions appearing on an Order will not be effective unless agreed in writing by an authorized representative of Customer and Mentor Graphics 1 2 Amounts invoiced will be paid in the currency specified on the applicable invoice within 30 days from the date of such invoice Any past due invoices will be subject to the imposition of interest charges in the amount of one and one half percent per month or the applicable legal rate currently in effect whichever is lower Prices do not include freight insurance customs duties taxes or other similar charges which Mentor Graphics
150. anual v10 1c Command name onfinish Commands Table 2 1 Supported Commands cont controls simulator behavior when encountering finish or sc_stop in the design code pause interrupts the execution of a macro precision determines how real numbers display in the GUI printenv process report echoes to the Main window the current names and values of all environment variables creates textual report of all processes displayed in the Process window project performs common operations on new projects pwd displays the current directory path in the Main window quietly turns off transcript echoing for the specified command quit exits the simulator radix specifies the default radix to be used radix define creates or modifies a user defined radix radix delete removes the radix definition from the named radix radix list returns the complete definition of a radix radix names returns a list of currently defined radix names radix signal report sets or inspects radix values for the specified signal in the Objects Locals and Wave windows displays the value of all simulator control variables or the value of any simulator state variables relevant to the current simulation restart reloads the current dataset if the current dataset is not the active simulation sim and resets the simulation time to zero in effect acting just like a r
151. ar synthesis and coverage pragmas are honored lt prefix gt Specifies a user defined string where the default is no sting indicated by quotation marks You may also set this with the AddPragmaPrefix variable in the vcom section of the modelsim ini file allowProtectedBeforeBody optional Allows a variable of a protected type to be created prior to declaring the body amsstd noamsstd optional Specifies whether vcom adds the declaration of REAL_VECTOR to the STANDARD package This is useful for designers using VHDL AMS to test digital parts of their model amsstd REAL_ VECTOR is included in STANDARD noamsstd REAL_ VECTOR is not included in STANDARD default You can also control this with the AmsStandard variable or the MGC_AMS HOME environment variable ModelSim Reference Manual v10 1c Commands vcom e bindAtCompile optional Forces ModelSim to perform default binding at compile time rather than at load time Refer to Default Binding for more information You can change the permanent default by editing the BindAtCompile variable in the modelsim ini e bindAtLoad optional Forces ModelSim to perform default binding at load time rather than at compile time Default e check_synthesis optional Turns on limited synthesis rule compliance checking Specifically it checks to see that signals read by a process are in the sensitivity list The checks understand only combinational logic n
152. arching for 26 compile 1076 1987 276 1076 1993 276 1076 2002 276 1076 2008 276 field naming syntax 13 VHDL 1987 enabling support for 276 VHDL 1993 enabling support for 276 VHDL 2002 enabling support for 276 VHDL 2008 package STANDARD REAL_VECTOR 279 VHDL 2008 enabling support for 276 vhencrypt command 299 view command 301 viewing waveforms 367 virtual count commands 304 virtual define command 305 virtual delete command 306 virtual describe command 307 virtual expand commands 308 virtual function command 309 virtual hide command 312 virtual log command 313 virtual nohide command 315 virtual nolog command 316 virtual region command 318 virtual save command 319 virtual show command 320 virtual signal command 321 vlib command 327 vlog multiple file compilation 337 vlog command 329 vmake command 347 vmap command 349 vsim disabling internal setting of LD_LIBRARY_PATH 359 vsim build date and version 381 vsim command 351 vsim Examples 379 447 ABCDEFGH I W WARNING 8 lint argument to vlog 337 warnings SDF disabling 364 suppressing VCOM warning messages 284 339 suppressing VLOG warning messages 339 suppressing VSIM warning messages 375 watch window add watch command 59 adding items to 59 watching signal values 59 wave commands 384 wave create command 388 wave cursor commands 384 wave edit command 394 wave export command 397 wave import command 399 wav
153. are creating Multiple values are entered as a space separated list and enclosed in curly braces e starttime lt time gt lt unit gt optional The simulation time that the waveform should start If omitted the waveform starts at 0 simulation time units lt time gt Specified as an integer or decimal number lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces startvalue lt value gt required when specifying pattern counter The initial value of the counter This option applies to patterns specifying type Range only All other counter patterns start from 0 and go to the maximum value for that particular signal e g for a 3 bit signal the start value will be 000 and the end value will be 111 lt value gt Value must be appropriate for the type of waveform you are creating e step lt value gt required The step by which the counter is incremented decremented lt value gt Value must be appropriate for the type of waveform you are creating e type binary gray johnson onehot range zerohot optional Specifies a counter format binary Specifies a binary counter gray Specifies a binary counter where two successive value
154. as vopt is specified with acc v and the variables are not filtered out by the WildcardFilter via the Variable entry You can disable this argument with novhdlvariablelogging Refer to vhdlvariable logging and VhdlVariableLogging modelsim ini variable for more information ModelSim Reference Manual v10 1c 371 Commands vsim Note n 4 Logging process variables is inherently expensive on simulation performance because of their nature It is recommended that they not be logged or added to the Wave and List windows However if debugging requires them to be logged then use of this switch will lessen the performance hit in doing so vital2 2b optional Selects SDF mapping for VITAL 2 2b default is VITAL 2000 Arguments Verilog 372 alt_path_delays optional Configures path delays to operate in inertial mode by default In inertial mode a pending output transition is cancelled when a new output transition is scheduled The result is that an output may have no more than one pending transition at a time and that pulses narrower than the delay are filtered The delay is selected based on the transition from the cancelled pending value of the net to the new pending value The alt_path_delays option modifies the inertial mode such that a delay is based on a transition from the current output value rather than the cancelled pending value of the net This option has no effect in transport mode see pulse_e lt percent gt
155. ate to startup do vsim do 354 status command 236 Std_logic mapping to binary radix 37 stop command 238 subTime command 241 suppress command 239 synthesis pragmas 276 330 rule compliance checking 277 SystemVerilog enabling with sv argument 342 multiple files in a compilation unit 337 scope resolution 14 SystemVerilog classes call command 86 T tb command 240 Tcl history shortcuts 24 variable in when commands 409 TFMPC disabling warning 375 time absolute using 22 simulation time units 22 time collapsing 368 Time commands 241 time resolution setting with vsim command 364 446 time time units simulation time 22 timescale directive warning disabling 375 timing disabling checks 339 disabling checks for entire design 360 title Main window changing 365 transcript redirecting with 1 358 transcript command 244 transcript file command 245 transcript path command 247 transcript sizelimit command 248 TreeUpdate command 425 TSCALE disabling warning 375 TSSI 435 tssi2mti command 249 _ u 343 undeclared nets reporting an error 336 unsetenv command 252 user defined bus 64 User defined radix 204 V v 343 v2k_int_delays 378 validTime command 242 values describe HDL items 117 examine HDL item values 130 variable settings report 22 variables describing 117 referencing in commands 22 value of changing from command line 89 examining 130
156. ates objects by type and name Arguments to the command are grouped by object type e Arguments for nets and signals e Arguments for instances and blocks e Arguments for virtuals e Arguments for classes e Arguments for objects Syntax find nets signals lt object_name gt internal nofilter in inout out ports recursive find instances blocks lt object_name gt bydu lt design_unit gt file lt file_name gt recursive nodu find virtuals lt object_name gt kind lt kind gt unsaved recursive find classes lt class_name gt find objects class lt class_name gt isa lt class_name gt lt object_name gt Arguments for nets and signals When searching for nets and signals the find command returns the full pathname of all nets signals registers variables and named events that match the name specification 136 lt object_name gt required Specifies the net or signal for which you want to search Multiple nets and signals and wildcard characters are allowed Wildcards cannot be used inside of a slice specification Spaces square brackets and extended identifiers require special syntax see the examples below for more details in optional Specifies that the scope of the search is to include ports of mode IN inout optional Specifies that the scope of the search is to include ports of mode INOUT internal optional Specifies tha
157. ation continuous assignments and primitives are not run before other normal priority processes scheduled in the same iteration Use this argument to prevent the default event ordering where continuous assignments and primitives are run with immediate priority You may also set even ordering with the ImmediateContinuousAssign variable in the modelsim ini file no_ notifier optional Disables the toggling of the notifier register argument of all timing check system tasks By default the notifier is toggled when there is a timing check violation and the notifier usually causes a UDP to propagate an X This argument suppresses X propagation in both Verilog and VITAL for the entire design noschematic optional Used with vsim debugdb to generate a debug database for the Dataflow window only Will not remove schematic information that has already been generated by with vopt debugdb nospecify optional Disables specify path delays and timing checks in Verilog nostdout optional Directs all output to the transcript only when in command line and batch mode Prevents duplication of I O between the shell and the transcript file Has no affect on interactive GUI mode no_tchk_msg optional Disables error messages generated when timing checks are violated For Verilog it disables messages issued by timing check system tasks For VITAL it overrides the MsgOn arguments and generics Notifier registers are still toggled an
158. ault for resolved and unresolved VHDL signals change the DefaultForceKind variable in the modelsim ini file e repeat lt time_info gt optional Repeats a series of forced values and times at the time specified where lt time_info gt is lt time_value gt lt time_unit gt Refer to lt time_info gt for more information about specifying time values You must specify at least two lt value gt lt time_info gt pairs on the forced object before specifying repeat for example force top dut p 1 0 0 100 repeat 200 cancel 1000 ModelSim Reference Manual v10 1c 147 Commands force A repeating force command will force a value before other non repeating force commands that occur in the same time step e lt time_info gt optional Specifies the relative or absolute simulation time at which the lt value gt is to be applied where lt time_info gt is lt time_value gt lt time_unit gt A prefix applied to lt time_value gt to specify an absolute time By default the specified time units are assumed to be relative to the current time unless the value is preceded by the character at Omit the at character to specify relative time For example cancel 520 ns Relative Time cancel 520 ns Absolute Time lt time_value gt The time either relative or absolute to apply to lt value gt Any non negative integer A value of zero cancels the force at the end of t
159. ave virtual show Virtual Objects 304 ModelSim Reference Manual v10 1c Commands virtual define virtual define This command prints to the transcript the definition of the virtual signals functions or regions in the form of a command that can be used to re create the object Syntax virtual define kind implicits explicits gt lt pathname gt Arguments e kind implicits explicits optional Transcripts only a subset of virtuals implicits virtual signals created internally by the tool explicits virtual signals explicitly created by a user such as with the virtual signal command Unique abbreviations are accepted e lt pathname gt required Specifies the path to the virtual s for which you want definitions where wildcards are allowed Example e Show the definitions of all the virtuals you have explicitly created virtual define kind explicits Related Topics virtual describe virtual show e Virtual Objects ModelSim Reference Manual v10 1c 305 Commands virtual delete virtual delete This command removes the matching virtuals Syntax virtual delete kind implicits explicits lt pathname gt Arguments e kind implicits explicits optional Removes only a subset of virtuals implicits virtual signals created internally by the product explicits virtual signals explicitly created by a user such as with the virtual signal command Unique abbrev
160. bed in lt expressionString gt It cannot handle bit selects and slices of Verilog registers Please see Syntax and Conventions for more details on syntax If the virtual function references more than a single scalar signal it will display as an expandable object in the Wave and Objects windows The children correspond to the inputs of the virtual function This allows the function to be expanded in the Wave window to see the values of each of the input waveforms which could be useful when using virtual functions to compare two signal values Virtual functions can also be used to gate the List window display fe Note The virtual function and virtual signal commands are interchangeable The product will keep track of whether you ve created a signal or a function with the commands and maintain them appropriately We document both commands because the virtual save virtual describe and virtual define commands will reference your virtual objects using the correct command Syntax virtual function env lt path gt install lt path gt delay lt time gt lt expressionString gt lt name gt Arguments Arguments for virtual function are the same as those for virtual signal except for the contents of the expression string e eny lt path gt optional Specifies a hierarchical context for the signal names in lt expressionString gt so they don t all have to be full paths lt path gt Specifies a relativ
161. bject Names e Virtual Signals e Force and Release Statements in Verilog 150 ModelSim Reference Manual v10 1c Commands formatTime formatTime This command provides global format control for all time values displayed in the GUI When specified without arguments this command returns the current state of the three arguments Syntax formatTime l commas l nodefunits l bestunits Arguments e l commas optional Insert commas into the time value prefix On prefix Off default e 4l nodefunits optional Do not include default unit in the time prefix On prefix Off default e bestunits optional Use the largest unit value possible prefix On prefix Off default Examples e Display commas in time values formatTime commas Instead of displaying 6458131 ps the GUI will display 6 458 131 ps e Use largest unit value possible formatTime bestunits Displays 8 us instead of 8 000 ns ModelSim Reference Manual v10 1c 151 Commands help help This command displays in the Transcript window a brief description and syntax for the specified command Syntax help lt command gt lt topic gt Arguments e lt command gt optional Specifies the command for which you want help The entry is case and space sensitive e lt topic gt optional Specifies a topic for which you want help The entry is case and space sensitive Specify one of the foll
162. bling for entire design 360 y 344 F Zoom ModelSim Reference Manual v10 1c ABCDEFGHIJKLMNOPQRSTUVWXY2Z wave window returning current range 385 ModelSim Reference Manual v10 1c 449 ABCDEFGHIJKLMNOPQRSTUVWXY2Z 450 ModelSim Reference Manual v10 1c End User License Agreement The latest version of the End User License Agreement is available on line at www mentor com eula IMPORTANT INFORMATION USE OF ALL SOFTWARE IS SUBJECT TO LICENSE RESTRICTIONS CAREFULLY READ THIS LICENSE AGREEMENT BEFORE USING THE PRODUCTS USE OF SOFTWARE INDICATES CUSTOMER S COMPLETE AND UNCONDITIONAL ACCEPTANCE OF THE TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT ANY ADDITIONAL OR DIFFERENT PURCHASE ORDER TERMS AND CONDITIONS SHALL NOT APPLY END USER LICENSE AGREEMENT Agreement This is a legal agreement concerning the use of Software as defined in Section 2 and hardware collectively Products between the company acquiring the Products Customer and the Mentor Graphics entity that issued the corresponding quotation or if no quotation was issued the applicable local Mentor Graphics entity Mentor Graphics Except for license agreements related to the subject matter of this license agreement which are physically signed by Customer and an authorized representative of Mentor Graphics this Agreement and the applicable quotation contain the parties entire understanding relating to the subject matter
163. bol visibility 357 pragmas synthesis pragmas 276 330 preference variables WildcardFilter 18 Preoptimized Design Unit and SDF file 363 printenv command 193 194 process report command 195 projects override mapping for work directory with vceom 286 override mapping for work directory with vlog 344 propagation preventing X propagation 360 pulse error state 377 pwd command 199 ModelSim Reference Manual v10 1c ABCDEFGH I as lt lt QuickSim II logfile format 415 quietly command 200 quit command 201 R Radix color 204 example 205 user defined 204 radix display values in debug windows 202 of signals being examined 53 63 132 radix command 202 Radix define command 204 setting radix color 204 205 radix list command 208 radix name command 209 range checking disabling 283 enabling 285 readers command 211 RealToTime command 242 record field selection syntax 13 refresh dependency check errors 278 333 refreshing library images 285 341 report command 212 reporting processes in the Process Window 195 variable settings 22 resolution specifying with t argument 364 restart command 214 resume command 216 run command 217 runStatus command 220 scaleTime command 242 scope resolution operator 14 scope setting region environment 128 SDF annotation verbose mode 364 controlling missing instance messages 363 errors on loading disabling 363 warning messages disabl
164. c 337 Commands vlog 338 modelsimini lt ini_filepath gt Loads an alternate initialization file that replaces the current initialization file Overrides the file path specified in the MODELSIM environment variable Specifies either an absolute or relative path to the initialization file On Windows systems the path separator should be a forward slash nodbgsym Disables the generation of the symbols debugging database in the compiled library The symbols debugging database is the dbs file in the compiled library that provides information to the GUI allowing you to view detailed information about design objects at the source level Two major GUI features that use this database include source window annotation and textual dataflow You should only specify this switch if you know that anyone using the library will not require this information for design analysis purposes noexcludeternary lt design_unit gt optional Disables the automatic exclusion of UDB coverage data rows resulting from ternary expressions for the specified design unit Normal operation for code coverage is to include rows corresponding to the case where two data inputs are the same and the select input is a don t care To disable this automatic exclusion for the entire design use vsim noexcludeternary instead noForceUnsignedToVhdlInteger Prevents untyped Verilog parameters in mixed language designs that are initialized with unsigned
165. cate Mentor Graphics as a source of a product but is intended to indicate a product from or associated with a particular third party A current list of Mentor Graphics trademarks may be viewed at www mentor com trademarks Table of Contents Chapter 1 Syntax and Conventions 06 42i2006 6sddecsecdnseessacsseviesedawee seen dwesa 11 Documentation Conventions lt lt cscessccsSerdieesveeenci iSeatndscsndeedersbes dnd 11 File and Directory Pathnames 2 05 i4 5 es 2 4a ye5 5 24S ioe ce Gale edb dee ee eee 12 Desin Object Namis see 24025 tiecdes chen ko bee ee eeSee eee EPNER EEE ENEE 12 Object Name Synta K pesseet uke dh keene uke oh en KERENT EERE E EEES RERET ES 12 Tcl Syntax and Specification of Array Bits and Slices 0 0 0 0 0 0 0 e eee eee 13 System Verilog Scope Resolution Operator 0 0 cece eee eee 14 Specifying Names 4 6 er ss aea te ede Gan ce bena cadre boda Cae 24S ae aaa eae 13 Environment Variables and Pathnames 0 0 c cece eee 17 Name Case Sensitivity ccc hc0 cedeweda sind ane 1eenrada deed donee enwahnaeas 17 Extended Identifiers j2 02 04s 400 lt 400as44c sued oud t Ea E a a a a 17 Wildcard Characters nannu nanne 17 Using the WildcardFilter Preference Variable 20 0 cece eee eee eee 18 Simulator Variables coven estou seg sionn na sina nena Woke eee EER Ea EERE ese 22 Simulation Time UMS 2c c ecdex whol aveen to cadeer set adedetoeaSed shee renan 22 Arsument Miles 2 535 64 a
166. cified library defines a mapping between a logical library name and a directory vsim loads a new design into the simulator vsim lt info gt vsim_break returns information about the current vsim executable stop the current simulation before completion vsource specifies an alternative file to use for the current source file wave commands for manipulating cursors for zooming and for adjusting the wave display view in the Wave window when instructs ModelSim to perform actions when the specified conditions are met where wlf2log displays information about the system environment translates a ModelSim WLF file to a QuickSim II logfile wlf2vced 46 translates a ModelSim WLF file to a VCD file ModelSim Reference Manual v10 1c Command name wlfman Commands Table 2 1 Supported Commands cont outputs information about or a new WLF file from an existing WLF file wlfrecover attempts to repair an incomplete WLF file write format records the names and display options in a file of the objects currently being displayed in the List or Wave window write list write preferences records the contents of the List window in a list output file saves the current GUI preference settings to a Tcl preference file write report prints a summary of the design being simulated write timing write transcript prints timing information about the specified
167. cified pattern searches all source files related to the current design and prints to the Transcript window those lines from the files that match the specified pattern formatTime applies stimulus to VHDL signals and Verilog nets global format control for all time values displayed in the GUI help displays in the Main window a brief description and syntax for the specified command history lists the commands executed during the current session layout allows you to perform operations on GUI layouts log Ishift ModelSim Reference Manual v10 1c creates a wave log format WLF file containing simulation data for all objects whose names match the provided specifications takes a Tcl list as an argument and shifts it in place one place to the left eliminating the left most element 41 Commands Command name Isublist Table 2 1 Supported Commands cont returns a sublist of the specified Tcl list that matches the specified Tcl glob pattern mem compare compares the selected memory to a reference memory or file mem display displays the memory contents of a selected instance to the screen mem list mem load displays a flattened list of all memory instances in the current or specified context after a design has been elaborated updates the simulation memory contents of a specified instance mem Save mem search saves the contents of a memory instance to a file i
168. cified with the WLFOptimize variable in the modelsim ini file e wlfsimcachesize lt n gt optional Specifies the size in megabytes of the WLF reader cache for the current simulation dataset only By default the cache size is set to zero This makes it easier to set different sizes for the WLF reader cache used during simulation and those used during postsimulation debug WLF reader caching caches blocks of the WLF file to reduce redundant file I O If neither the wlfsimcachesize switch nor the WLFSimCacheSize modelsim ini variable are specified the wlfcachesize switch or the WLFCacheSize modelsim ini variable settings will be used e wlfslim lt size gt optional Specifies a size restriction for the event portion of the WLF file size an integer in megabytes where the default is 0 which implies an unlimited size Noe Note that a WLF file contains event header and symbol portions The size restriction is placed on the event portion only Consequently the resulting file will be larger than the specified size If used in conjunction with wlftlim the more restrictive of the limits takes precedence This option may also be specified with the WLFSizeLimit variable in the modelsim ini file See Limiting the WLF File Size e wlftlim lt duration gt optional Specifies the duration of simulation time for WLF file recording The default is infinite time 0 The lt duration gt is an integer of simulation
169. cl variable The expression will be evaluated at 3450us ModelSim Reference Manual v10 1c 133 Commands examine examine time 3450 us expr top bus and bit_mask e Using the fifo syntax limits the variable to the simple name fifo instead of interpreting the parenthesis as part of the variable Quotes are needed when spaces are involved and by using quotes instead of braces the Tcl interpreter will expand variables before calling the command examine time t name fifo fifo 1 to 3 fifo 1 e Because time is not specified this expression will be evaluated at the current simulation time Note the signal attribute and array constant specified in the expression examine expr clk event amp amp top xyz 16 hffae Commands like find and examine return their results as a Tcl list Gust a blank separated list of strings You can do things like foreach sig find sig ABC echo Signal sig is exa sig if examine bin signal_ 12 11101111XXXZ examine hex find Related Topics Design Object Names e Wildcard Characters DefaultRadix modelsim ini variable 134 ModelSim Reference Manual v10 1c Commands exit exit This command exits the simulator and the ModelSim application If you want to stop the simulation using a when command use a stop command within your when statement do not use an exit command or a quit command The stop command acts like a b
170. compile time However some expressions which are globally static are allowed This switch prevents the compiler from warning on such expressions If the pedanticerrors switch is specified this switch is ignored nocheck optional Disables index and range checks You can disable these individually using the noindexcheck and norangecheck arguments respectively nodbgsym optional Disables the generation of the symbols debugging database in the compiled library The symbols debugging database is the dbs file in the compiled library that provides information to the GUI allowing you to view detailed information about design objects at the source level Two major GUI features that use this database include source window annotation and textual dataflow You should only specify this switch if you know that anyone using the library will not require this information for design analysis purposes noDeferSubpgmCheck optional Causes range and length violations detected within subprograms to be reported as errors instead of as warnings As an alternative to using this argument you can set the NoDeferSubpgmCheck variable in the modelsim ini file to a value of 1 nofprangecheck optional Disables range checks on floating type values only noFunctionInline optional Turns off VHDL subprogram inlining for design units using a local copy of a VHDL package This may be needed in case the local package has the same name as an MTI supp
171. condition expression within braces or quotation marks when the expression makes use of spaces Refer to the note below when setting breakpoints in the GUI If the condition is true the simulation stops at the breakpoint If false the simulation bypasses the breakpoint A condition cannot refer to a VHDL variable only a signal The cond switch re parses expressions each time the breakpoint is hit This allows expressions with local references to work Condition expressions referencing items outside the context of the breakpoint must use absolute names This is different from the behavior in previous ModelSim versions where a relative signal name was resolved at the time the bp command was issued allowing the breakpoint to work even though the relative signal name was inappropriate when the breakpoint was hit Note ___J_O You can also specify this expression by choosing Tools gt Breakpoints from the main menu and entering the expression in the Breakpoint Condition field of the Modify Breakpoints dialog box Do not enclose the condition expression in quotation marks or braces The condition expression can use the following operators Operation Operator Syntax equals ModelSim Reference Manual v10 1c 81 Commands bp Operation Operator Syntax not equal l AND amp amp AND OR ll OR The operands may be object names signame event or constants Subexpressions i
172. conservative approach to working around refresh dependency checks is to recompile the source code if it is available fsmimplicittrans nofsmimplicittrans optional Toggles recognition of implied same state transitions This setting is off by default fsmresettrans nofsmresettrans optional Toggles recognition of synchronouos or asynchronous reset transitions This includes excludes reset transitions in coverage results This setting is on by default fsmsingle nofsmsingle optional Toggles the recognition of VHDL FSMs where the current state variable of type std_logic bit boolean or single bit std_logic_vector bit_vector and Verilog single bit FSMs This setting is off by default fsmverbose b t w Provides information about FSMs detected including state reachability analysis Optional b displays only basic information t displays a transition table in addition to the basic information w displays any warning messages in addition to the basic information When you do not specify an argument this switch reports all information similar to Note vlog 1947 FSM RECOGNITION INFO Fsm detected in fpu rtl vhdl serial_mul vhd Current State Variable s_state fpu rtl vhdl serial_mul vhd 76 Clock clk_i Reset States are waiting busy State Set is busy waiting Transition table is a a a Ge a a a ec a se eee busy gt waiting Line 114 gt 114
173. cygdrive Generates a makefile that uses a path specified with UNIX pathname conventions Use this argument if you are using cygwin v3 81 or later which no longer supports Windows conventions for drive and pathname Optional e du lt design_unit_name gt Specifies that a vmake file will be generated only for the specified design unit You can specify this argument any number of times for a single vmake command Optional e f lt filename gt Specifies a file to read command line arguments from Optional Refer to the section Argument Files for more information ModelSim Reference Manual v10 1c 347 Commands vmake fullsrcpath Produces complete source file paths within generated makefiles By default source file paths are relative to the directory in which compilations originally occurred Use this argument to copy and evaluate generated makefiles within directories that are different from where compilations originally occurred Optional ignore Omits a make rule for the named primary design unit and its secondary design units Optional lt library_name gt Specifies the library name if none is specified then work is assumed Optional modelsimini lt ini_filepath gt Loads an alternate initialization file that replaces the current initialization file Overrides the file path specified by the MODELSIM environment variable Specifies either an absolute or relative path to the initialization file On Windows systems t
174. d it can be enabled with the enablebp command bp disable test vhd 22 echo exa var1 echo exa var2 Set a breakpoint so that the simulation pauses whenever clk 1 and prdy 0 bp test vhd 14 cond clk 1 AND prdy 0 Set a breakpoint with the label top_bp bp top vhd 14 label top_bp Set a breakpoint for line 15 of a vhd but only for the instance a2 bp a vhd 15 inst top a2 Set multiple breakpoints in the source file test vhd at line 14 The second instance will overwrite the conditions of the first bp test vhd 14 inst test inst1 inst test inst2 Set multiple breakpoints at line 14 The second instance will append its conditions to the first bp test vhd 14 inst test inst1 inst test inst2 appendinst Set a breakpoint for a specific variable of a particular class type set x examine handle my_class_var bp top sv 15 cond this x List the line number and enabled disabled status 1 enabled 0 disabled of all breakpoints in testadd vhd bp query testadd vhd List details about the breakpoint on line 48 bp query testadd vhd 48 ModelSim Reference Manual v10 1c Commands bp e List all executable lines in testadd vhd between lines 2 and 59 bp query testadd vhd 2 59 Note naam Any breakpoints set in VHDL code and called by either resolution functions or functions that appear in a port map are ignored Related Topics bd disablebp enablebp Editing File Line Breakpoints onbreak when
175. d as the final argument to the mem compare command ModelSim Reference Manual v10 1c 161 Commands mem display mem display This command prints to the Transcript window the memory contents of the specified instance If the given instance path contains only a single array signal or variable the signal or variable name need not be specified You can redirect the output of the mem display command into a file for later use with the mem load command The output file can also be read by the Verilog readmem system tasks if the memory module is a Verilog module and Verilog memory format hex or binary is specified Address radix data radix and address range for the output can also be specified as well as special output formats By default identical data lines are printed To replace identical lines with a single line containing the asterisk character you can enable compression with the compress argument Note The format settings are stored at the top of this file as a pseudo comment so that subsequent mem load commands can correctly interpret the data Do not edit this data when manipulating a saved file Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax mem display addressradix d h compress dataradix lt radix_type gt endaddress lt end gt format bin hex mti noaddress startaddress lt st gt wordsperline lt n gt lt pa
176. d libraries that implement VHDL foreign subprograms remain loaded they are not reloaded even if they also contain code for a foreign architecture You can configure defaults for the restart command by setting the DefaultRestartOptions variable in the modelsim ini file Refer to Restart Command Defaults To handle restarts with Verilog PLI applications you need to define a Verilog user defined task or function and register a misctf class of callback To handle restarts with Verilog VPI applications you need to register reset callbacks To handle restarts with VHDL FLI applications you need to register restart callbacks Refer to Verilog Interfaces to C for more information on the Verilog PLI VPI DPI and the ModelSim FLI Reference for more information on the FLI Syntax restart force nobreakpoint nolist nolog nowave Arguments e force optional Specifies that the simulation will be restarted without requiring confirmation in a popup window e nobreakpoint optional Specifies that all breakpoints will be removed when the simulation is restarted where the default is for all breakpoints to be reinstalled after the simulation is restarted 214 ModelSim Reference Manual v10 1c Commands restart nolist optional Specifies that the current List window environment will not be maintained after the simulation is restarted where the default is for all currently listed HDL objects and their formats to
177. d may result in the propagation of Xs for timing check violations note lt msg_number gt lt msg_number gt optional Changes the severity level of the specified message s to note Edit the note variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information notimingchecks ntcnotchks optional Disables Verilog timing checks This option sets the generic TimingChecksOn to FALSE for all VHDL Vital models with the Vital_level0 or Vital_level1 attribute Generics with the name TimingChecksOn on non VITAL models are unaffected By default Verilog timing check system tasks setup hold in specify blocks are enabled For VITAL the timing check default is controlled by the ASIC or FPGA vendor but most default to enabled ModelSim Reference Manual v10 1c Commands vsim Additionally ntcnotchks maintains the delay net delays necessitated by negative timing check limits For this reason when using ntcnotchks it is necessary to SDF annotate all timing check values nowiremodelforce optional Restores the force command to previous usage prior to version 10 0b where an input port cannot be forced directly if it is mapped at a higher level in VHDL and mixed models Signals must be forced at the top of the hierarchy connected to the input port e pduignore lt instpath gt Ignore Preoptimized Design Unit black box If lt instpath gt i
178. d performs the same action as the Message Viewer Filter Dialog Box which controls which messages are shown in the Message Viewer The ideal workflow for using this command is through the GUI 1 View gt Message Viewer 2 Right click in the Message Viewer and select Filter The Message Viewer Filter dialog box is displayed 3 Create your filter 4 OK or Apply The Message Viewer updates based on your filter and a messages setfilter command which is equivalent to your settings is output to the transcript 5 Retain the messages setfilter command from the transcript for future use Syntax messages setfilter lt tcl_list gt Arguments e lt tcl_list gt The tcl_list argument is a complex string of tcl code that controls the filter settings Examples e Severity is error and time is greater than or equal to 100 ns messages setfilter Severity Contains Case Insensitive error AND Time gt 100 ns e The objects field contains neither clock or reset messages setfilter Object Contains Case Sensitive clock NOR Object Contains Case Sensitive data The message string either contains reg_str2 or reg_strl messages setfilter Message Contains Case Insensitive reg_str2 OR Message Contains Case Insensitive reg_str1 ModelSim Reference Manual v10 1c 177 Commands messages write messages write This command prints the contents of the Message Viewer windo
179. d wave This command creates a named reference to a specific zoom range and scroll position in the specified Wave window Bookmarks are saved in the wave format file and are restored when the format file is read You can also interactively add a bookmark through the GUI by selecting the Wave gt Bookmarks gt Bookmarks menu item Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax bookmark add wave lt label gt lt range_start gt lt unit gt lt range_end gt lt unit gt lt topindex gt Arguments lt label gt required A string that specifies the name for the bookmark Must be specified as the first argument to the bookmark add wave command lt range_start gt lt unit gt optional Specifies the beginning point of the zoom range where the default starting point is zero 0 lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt limit gt and lt unit gt within curly braces The complete grouping of lt range_start gt and lt range_end gt must also be enclosed in braces or quotes for example 100 ns 10000 ns 10000 lt range_end gt lt unit gt optional Specifies the end point of the zoom
180. d_number gt or lt label gt A string that specifies the name of the source file in which the breakpoint is to be deleted The filename must match the one used previously to set the breakpoint including whether you used a full pathname or a relative name Must be specified as the first argument to the bd command e lt line_number gt required A string that specifies the line number of the breakpoint to be deleted e lt id_number gt lt label gt required when not specifying lt filename gt Specifies the identification of breakpoints using markers assigned by the bp command Must be specified as the first argument to the bd command lt id_number A string that specifies the identification number of the breakpoint to be deleted The identification number is set with the id argument to the bp command lt label gt A string that specifies the label of the breakpoint to be deleted The label is set with the label switch to the bp command Examples Delete the breakpoint at line 127 in the source file named alu vhd bd alu vhd 127 e Delete the breakpoint with id 5 bd 5 e Delete the breakpoint with the label top_bp bd top_bp e Delete the breakpoint with id 6 and the breakpoint at line 234 in the source file named alu vhd ModelSim Reference Manual v10 1c 73 Commands bd bd 6 alu vhd 234 Related Topics e bp onbreak 74 ModelSim Reference Manual v10 1c Commands bookmark add wave bookmark ad
181. dard 259 Commands ved dumpporisall vcd dumpportsall This command creates a checkpoint in the VCD file which shows the value of all selected ports at that time in the simulation regardless of whether the port values have changed since the last timestep Related Verilog task dumpportsall Syntax vcd dumpportsall lt filename gt Arguments e lt filename gt optional Specifies the name of the VCD file If omitted the command is executed on all open VCD files Related Topics ved add vcd files vcd checkpoint vcd flush vcd comment vcd limit vcd dumpports vcd off vcd dumpportsflush vcd on e ee ree nea e Aanika PN vcd dumpportso DumpportsCollapse vcd dumpportson e Value Change Dump VCD Files vcd file e Verilog tasks are documented in the Language Reference Manual IEEE 1364 standard 260 ModelSim Reference Manual v10 1c vcd dumpportsflush Commands vcd dumpportsflush This command flushes the contents of the VCD file buffer to the specified VCD file Related Verilog task dumpportsflush Syntax vcd dumpportsflush lt filename gt Arguments lt filename gt optional Specifies the name of the VCD file If omitted the command is executed on all open VCD files Related Topics ved add ved checkpoint vcd comment vcd dumpports vcd dumpportsall vcd dumpportslimit vcd dumpportsoff vcd dumpportson vcd file ModelSim Reference Manual v
182. ded Commands Not Allowed with the fast Argument Disallowed commands still work but they slow down the simulation label lt label gt optional Used to identify individual when commands lt label gt Associates a name or label with the specified when command Adds a level of identification to the when command The label may contain special characters Quotation marks or braces are required only if lt label gt contains spaces or special characters id lt id gt optional Attempts to assign this id number to the when command lt id gt Any positive integer that is not already assigned If the id number you specify is already used ModelSim will return an error Note 408 Id numbers for when commands are assigned from the same pool as those used for the bp command So even if you have not specified a given id number for a when command that number may still be used for a breakpoint lt when_condition_expression gt required if a command is specified Specifies the conditions to be met for the specified lt command gt to be executed The condition is evaluated in the simulator kernel and can be an object name in which case the curly braces can be omitted The command will be ModelSim Reference Manual v10 1c Commands when executed when the object changes value The condition can be an expression with these operators Name Operator equals not equal I greater than gt
183. default radix for the current simulation using the radix command You can change the default radix permanently by editing the DefaultRadix variable in the modelsim ini file e radixenumnumeric optional Causes Verilog and SystemC enums to be displayed as numbers formatted by the current radix This overrides the default behavior of always showing enums symbolically e radixenumsymbolic optional Restores the default behavior of displaying Verilog and SystemC enums as symbols by reversing the action of the radixenumnumeric option Related Topics e Watch window e Wildcard Characters e Using the WildcardFilter Preference e DefaultRadix variable Variable ModelSim Reference Manual v10 1c 59 Commands add wave add wave This command adds the following objects to the Wave window e VHDL signals and variables e Verilog nets and registers e SystemVerilog class objects Dividers and user defined buses If no port mode is specified this command will display all objects in the selected region with names matching the object name specification Refer to Wildcard Characters for wildcard usage as it pertains to the add commands Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax add wave allowconstants clampanalog 01 1 color lt standard_color_name gt depth lt level gt divider lt divider_name gt expand lt signal_
184. displaying The lt msg_number gt is the number preceding the message you wish to suppress Optional You cannot suppress Fatal or Internal messages Edit the suppress variable in the modelsim ini file to set a permanent default Refer to Changing message Severity Level for more information time Reports the wall clock time vlog takes to compile the design Optional Note that if many processes are running on the same system wall clock time may differ greatly from the actual cpu time spent on vlog e timescale lt time_units gt lt time_precision gt Specifies the default timescale for modules not having an explicit timescale directive in effect during compilation Optional The format of the timescale argument is the same as that of the timescale directive The format for lt time_units gt and lt time_precision gt is lt n gt lt units gt The value of lt n gt must be 1 10 or 100 The value of lt units gt must be fs ps ns us ms or s In addition the lt time_units gt must be greater than or equal to the lt time_precision gt e typdelays Selects typical delays from the min typ max expressions Default If preferred you can defer delay selection until simulation time by specifying the same option to the simulator gt u Converts regular Verilog identifiers to uppercase Allows case insensitivity for module names Optional e y lt library_file gt Specifies a source library file containing module
185. displaying signal names help optional Displays a list of command options with a brief description for each Inout optional Lists only the inout ports This may be combined with the input output or internal switches input optional Lists only the input ports This may be combined with the output inout or internal switches internal optional Lists only the internal signals This may be combined with the input output or inout switches l lt instance_path gt optional Lists the signals at or below an HDL instance path within the design hierarchy lt instance_path gt Specifies an HDL instance path lower optional Shows all logged signals in the hierarchy When invoked without the lower switch only the top level signals are displayed ModelSim Reference Manual v10 1c 415 Commands wlf2log o lt outfile gt optional Directs the output to be written to a file where the default destination for the logfile is standard out lt outfile gt A user specified filename e output optional Lists only the output ports This may be combined with the input inout or internal switches e quiet optional Disables error message reporting 416 ModelSim Reference Manual v10 1c Commands wlf2ved wlf2vcd This command translates a ModelSim WLF file to a standard VCD file Complex data types that are unsupported in the VCD standard records memories etc are not con
186. do command 119 DO files macros 119 dpiheader vlog 332 372 drivers command 121 dump files viewing in the simulator 273 dumplog64 command 123 E echo command 124 edit command 125 enablebp command 126 entities specifying for simulation 379 environment command 128 environment variables reading into Verilog code 331 specifying UNIX editor 125 state of 194 using in pathnames 17 environment displaying or changing pathname 128 eqTime command 241 errors getting details about messages 295 onerror command 189 SDF disabling 363 event order changing in Verilog 331 examine command 130 exit command 135 exiting the simulator customizing behavior 376 extended identifier 29 extended identifiers 17 ModelSim Reference Manual v10 1c ABCDEFGH I F f 333 file compression VCD files 257 267 find command 136 find connections command 141 force remove wire model 361 force command 145 format file List window 424 Wave window 424 formatTime command 242 G generics assigning or overriding values with g and G 355 examining generic values 130 limitation on assigning composite types 356 glitches disabling generation from command line 370 global visibility PLI FLI shared objects 357 gotolingk MGCGOTOVAR_user DPI File Loading 378 gteTime command 241 gtTime command 241 GUI_expression_format 27 syntax 27 H hasX 30 hazards hazards argument to vlog
187. e Reader top dut ALWAYS 1Aa _ SIM 28 gt Now 170 170ns Delta 3 sim fidd to Add to Schematic Add to Dataflow Copy Syntax readers lt object_name gt source Arguments e lt object_name gt required Specifies the name of the signal or net whose readers are to be shown All signal or net types are valid Multiple names and wildcards are accepted e source optional Returns the source file name and line number for each driver of the specified signal or net If the source location cannot be determined the value n a is returned for that driver Related Topics e drivers ModelSim Reference Manual v10 1c 211 Commands report report This command displays information relevant to the current simulation Syntax report files report where ini pwd transcript wlf project report simulator control report simulator state Arguments e files Returns a list of all source files used in the loaded design This information is also available in the Specified Path column of the Files window where ini pwd transcript wlf project Returns a list of configuration files where the arguments limit the list to those files specified If specified without arguments returns a list of all configuration files in the current simulation ini optional Returns the location of the modesim ini file pwd optional Returns the current working directory transcript optional
188. e specified dataset file when specified without lt dataset_alias gt e lt alias_name gt optional Specifies string to assign to the dataset as an alias Wildcard characters are permitted Examples Assign the alias name bar to the dataset named gold dataset alias gold bar Related Topics dataset clear dataset close e dataset open e e dataset config e e dataset rename dataset restart dataset save dataset snapshot dataset info dataset list ModelSim Reference Manual v10 1c 101 Commands dataset clear dataset clear This command applies only to WLF based simulation datasets It has no effect on coverage UCDB datasets All event data is removed from the current simulation WLF file while retaining all currently logged signals Subsequent run commands will continue to accumulate data in the WLF file If the command is executed when no design is loaded then the error Dataset not found sim is returned If the command is executed when a design is loaded then the sim dataset is cleared irrespective of which dataset is currently set Clearing the dataset will clear any open wave window based on the sim Syntax dataset clear Examples Clear data in the WLF file from time Ons to 100000ns then log data into the WLF file from time 100000ns to 200000ns add wave run 100000ns dataset clear run 100000ns Related Topics e dataset alias e dataset rename e datase
189. e with the 2001 model which is inherent in the specifications Refer to the appendix Verilog Interfaces to C in the User s Manual for more information e printsimstats optional Prints the output of the simstats command to the transcript at the end of simulation before exiting Edit the PrintSimStats variable in the modelsim ini file to set the simulation to print the simstats data by default ModelSim Reference Manual v10 1c 361 Commands vsim 362 pulse_int_e lt percent gt optional Controls how pulses are propagated through interconnect delays where lt percent gt is a number between 0 and 100 that specifies the error limit as a percentage of the interconnect delay Used in conjunction with multisource_int_delays see above This option works for both Verilog and VITAL cells though the destination of the interconnect must be a Verilog cell The source may be VITAL or Verilog A pulse greater than or equal to the error limit propagates to the output in transport mode transport mode allows multiple pending transitions on an output A pulse less than the error limit and greater than or equal to the rejection limit see pulse_int_r lt percent gt below propagates to the output as an X If the rejection limit is not specified then it defaults to the error limit For example consider an interconnect delay of 10 along with a pulse_int_e 80 option The error limit is 80 of 10 and the rejection limit defaults to 80 o
190. e Manual v10 1c 157 Commands log Related Topics 158 add list add wave dataset alias dataset clear dataset close dataset config dataset config dataset info dataset list dataset open dataset restart dataset rename dataset save dataset snapshot nolog Recording Simulation Results With Datasets vlog libcell nolibcell Wildcard Characters ModelSim Reference Manual v10 1c Commands Ishift Ishift This command takes a Tcl list as an argument and shifts it in place one place to the left eliminating the left most element The number of shift places may also be specified Returns nothing Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax Ishift lt list gt lt amount gt Arguments e lt list gt required Specifies the Tcl list to target with Ishift Must be specified as the first argument to the Ishift command e lt amount gt optional Specifies the number of places to shift where the default is 1 Examples proc myfunc args throws away the first two arguments lshift args 2 Related Topics e Refer to the Tcl man pages Help gt Tcl Man Pages for details ModelSim Reference Manual v10 1c 159 Commands Isublist Isublist This command returns a sublist of the specified Tcl list that matches the specified Tcl glob pattern Arguments to this command are order dependent Follow the order
191. e a list of files enclosed in curly braces if you want to capture more than one WLF file in the archive include_src optional Indicate if source files should be captured in the archive This is off by default which means no source will be in the archive dbg lt dbg_file_name gt optional Specifies the name of an existing debug database dbg file to be included in the archive ModelSim Reference Manual v10 1c 71 Commands batch_mode batch_mode This command returns 1 if ModelSim is operating in batch mode otherwise it returns 0 It is typically used as a condition in an if statement Syntax batch_mode Arguments None Examples Some GUI commands do not exist in batch mode If you want to write a script that will work in or out of batch mode you can use the batch_mode command to determine which command to use For example if batch_mode log else add wave Related Topics e Modes of Operation 72 ModelSim Reference Manual v10 1c Commands bd bd This command deletes a breakpoint You can delete multiple breakpoints by specifying separate information groupings on the same command line Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax bd lt filename gt lt line_number gt bd lt id_number gt lt label gt Arguments e 6 lt filename gt required when not specifying lt i
192. e acted x ote 216 MUN 6 0 0 G4 bee aa a aa a HELE a e a a a aa ee r a a aa aS 217 MSS eere n e a cnet sae a a a e a TE 220 SGatChlOS 3 224 64 pada Pasa EEEE AER TEER ed E EERTE ERT RS OEE Ee EEEREN 222 SES ican ca sac aa td eye v6 sb hy greta veo shh Gyn ef dh Ay a Maca reas Se aa OE Gera ath eG Ady and air 225 Sele AV re 2 ecg Sarees can asst edie a casa a iat face aed eu io Se eae ee ete 226 SIGS ce cecrgce netic ace Moet crates Bierce eres a eee teeioe eon S Masato tedace buen cit a bars 227 SHOW enea ee eh eee an eed nde Ghee ad oh a ob Se ed ete oe 228 SUMNStAS ne aceon ode eed ee nea Dba EES Glas ae a HEE aa Sa Ene aw eG Eee ats 229 Stack COW eis ee ate ee eel oe beth ie ee he ee acale E E E a A 231 Stack MAME 2S s r re isles Peg ob Sl weer ond Wide Bene lo dh e eRe ob Vd a Pave ob Gale eer end E e 232 ModelSim Reference Manual v10 1c 5 Table of Contents Stack level o et duce G6 ee Shee Reco Ree EE eee eee R ee Ee eee Oe oer See 233 Stack US eeen oh eR Aue ote a eee See Ae OSes uae oh NEE GENER os ees 234 Stack UP s dueude Laster veca doen ne es Steusesadeeu he caxteameredeeehtca eee ss 235 SaS eee e ogee eae eu uee ds cous i 6es ee eae 24a oh ee eure 236 SICD ue eave eee ee ee epee EE tease oe eee eee hoes cee ene eee eee eS 237 SOD eaea ere ee ee rT ee A E E a E A er ere ree ter T re 238 SUPPICSS ici 244 cssdeeetwrcdSeanddbbare beset beaudeinses tenet seas doaeSeeee 239 Ua aye cared ei bP Pe Ate iS aA WRAPS He Od aS aa aI Oca a
193. e call stack by n levels The default value is 1 level Related Topics stack down stack level stack frame stack tb ModelSim Reference Manual v10 1c 235 Commands status status This command lists summary information about currently interrupted macros If invoked without arguments the command lists the filename of each interrupted macro the line number at which it was interrupted and prints the command itself It also displays any onbreak or onerror commands that have been defined for each interrupted macro Syntax status file line Arguments e file optional Reports the file pathname of the current macro e line optional Reports the line number of the current macro Exampl es The transcript below contains examples of resume and status commands VSI M paused gt status Macro resume_test do at line 3 Current macro V command executing pause is Interrupted ONBREAK commands resume Macro startup do at line 34 command executing run 1000 processing BREAKPOINT is Interrupted ONBREAK commands resume SIM paused gt resume Resuming execution of macro resume_test do at line 4 Related Topics do 236 abort pause resume ModelSim Reference Manual v10 1c Commands step step The step command is an alias for the run command with the step switch Refer to the run command for a complete syntax description Model
194. e dataset alias e dataset clear e dataset close e dataset config e dataset info 112 ModelSim Reference Manual v10 1c Commands dataset snapshot dataset snapshot This command saves data from the current WLF file vsim wlf by default at a specified interval It provides you with sequential or cumulative snapshots of your simulation data This command does not apply to coverage datasets UCDB Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax dataset snapshot dir lt directory gt disable enable file lt file_name gt filemode overwrite increment mode cumulative sequential report reset size lt file_size gt time lt n gt lt unit gt Arguments dir lt directory gt optional Specifies a directory into which the files should be saved Either absolute or relative paths may be used Default is to save to the current working directory disable optional Turns snapshotting off All dataset snapshot settings from the current simulation are stored in memory All other options are ignored after you specify disable enable optional Turns snapshotting on Restores dataset snapshot settings from memory or from a saved dataset default file lt file_name gt optional Specifies the name of the file to save snapshot data lt file_name gt A specified file name where the default is vsim_snapsho
195. e eee ee beck EA 316 virtual TSCON 5 a keet ee he Season Seen ee eke Sane aes See Oks ae eae EENES 318 Virtual SAVE second Fie vd Gaderer hgh RE a Mhe aceranhe AE Ga erearhd gd hah 319 VITA SHOW ssc echt tnte 2 ot btn oe et ete oe oe oto ie faut tebe be ee ae entering 320 virwal CIGNA cote tide eek eee eee eee e Po eee eee Pe ee eee Pe eee ie eee eee 321 virtual YPE Janice ete terai e N EA ees E ede E E deals 325 VD eae E E EER EE cee E EE E EER E T EE E EN 327 VIOS en ee ee OE EE E ee ee ee 329 VINK Ee 0 05 2s ts aden Pos ot 2 eee ote Vi ae a Se ee ls Slee ee an 2 ae ole hee 347 Wild ee Shou ee send eee seb cus bese ieee a a a ei a E a a a ae e ayes a 349 VS rees See hese deh a aa h aed a semen deh a Fhcben dae Sueno beh g Bada hata a seman R 351 VSI INL OD eee ind Sk tire x and dean Gp anced E decries weed amp E apd dora aca amp aan Gra auth ara ane ead 381 WVSIM OPC AK 2 2 5 wise a cesta E oie 4 oid sa cena O E ae E E win lt E E a a one aa 382 VSOULCE 26 54 Bb Gee hn OES She OEE ee eG ESE RO ear Go eee OES Ee ee Se 383 WOVE 4 lt 2 0 sane oreo ee he ee eo eet eee oe Be ene ee ar oe te oe eee oe ee cae 384 WAVE cree sc oe Rb dS GAEDE EDGE RREEE RG DERE EE DEERE SRC ERE REDE BRE HEDGES 388 WAVE CUI e Pitas sok een ee edn oe Cech a pe etiam oki ees ee edn ae bate eos 394 WaVe EXPO ss isc e cee banan ete dow se essere s Dhsee EE EE a E sax 397 Wave POF 25 deere ree aces tye aeebase adda e aie deur ene teades ie dee E 399 WAVE Modify 2 ct
196. e glitch producing always blocks may resolve in a different order delay_mode_distributed Disables path delays in favor of distributed delays Optional Refer to Delay Modes for details delay_mode_path Sets distributed delays to zero in favor of using path delays Optional delay_mode_unit Sets path delays to zero and non zero distributed delays to one time unit Optional delay_mode_zero Sets path delays and distributed delays to zero Optional dpiforceheader optional Forces the generation of a DPI header file even if it will be empty of function prototypes dpiheader lt filename gt optional Generates a header file that may then be included in C source code for DPI import functions Refer to DPI Use Flow for additional information E lt filename gt optional Captures text processed by the Verilog parser after preprocessing has occurred and copies that text to an output file This includes text read from source files specified by using the v or y argument lt filename gt Specifies a name for the debugging output file Wildcards are not allowed Generally preprocessing consists of the following compiler directives ifdef else elsif endif ifndef define undef include The line directive attempts to preserve line numbers file names and level in the output file per the 1800 2009 LRM White space is usually preserved but sometimes it may be deleted or add
197. e log format WLF file 367 of binary signal values 156 wave modify command 400 wave sort command 405 Wave window adding items to 60 WaveActivateNextPane command 425 waveform editor creating waves 388 editing commands 394 importing vcd stimulus file 399 modifying existing waves 400 saving waves 397 waveform logfile log command 156 waveforms optimizing viewing of 369 saving and viewing 156 WaveRestoreCursors command 425 WaveRestoreZoom command 425 when command 406 when statement time based breakpoints 412 where command 414 wildcard characters for pattern matching in simulator commands 17 448 JKLMNOPQRSTUVWX YZ WildcardFilter Preference Variable 18 windows List window output file 427 saving the format of 424 opening from command line 301 Wave window path elements changing 98 WLF files collapsing deltas 368 collapsing time steps 368 converting to VCD 417 creating from VCD 273 indexing 418 limiting size 369 log command 156 merging 418 optimizing 418 optimizing waveform viewing 369 repairing 423 saving 112 113 specifying name 367 wlfman command 418 wlf2log command 415 wlf2vcd command 417 wlfman command 418 wlfrecover command 423 write format command 424 write list command 427 write preferences command 428 write report command 429 write timing command 432 write transcript command 434 write tssi command 435 write wave command 437 X X propagation disa
198. e new signal looks just like a group of signals The directive can be used hierarchically with no limits on depth concat_sort_wild_ascending lt concatenationExpr gt The concat_sort_wild_ascending directive gathers signals by name in ascending order the default is descending concat_reverse lt concatenationExpr gt The concat_reverse directive reverses the bits of the concatenated signals Examples of Concatenation amp mybusbasename Gathers all signals in the current context whose names begin with mybusbasename sorts those names in descending order and creates a bus with index range n 1 downto 0 where n is the number of matching signals found Note that it currently does not derive the index name from the tail of the one bit signal name concat_range 13 4 amp mybusbasename Specifies the index range to be 13 downto 4 with the signals gathered by name in descending order concat_ascending amp mybusbasename Specifies an ascending range of 0 to n 1 with the signals gathered by name in descending order concat_ascending concat_sort_wild_ascending amp mybusbasename Specifies an ascending range of 0 to n 1 with the signals gathered by name in ascending order concat_reverse busl amp bus2 Specifies that the bits of bus1 and bus2 be reversed in the output virtual signal Record Field Members Arbitrarily nested arrays and records are supported but operators will
199. e path lt plusarg gt optional Arguments preceded with are accessible by the Verilog PLI routine mc_scan_plusargs ModelSim Reference Manual v10 1c Commands vsim e pulse_e lt percent gt optional Controls how pulses are propagated through specify path delays where lt percent gt is a number between 0 and 100 that specifies the error limit as a percentage of the path delay A pulse greater than or equal to the error limit propagates to the output in transport mode transport mode allows multiple pending transitions on an output A pulse less than the error limit and greater than or equal to the rejection limit see pulse_r lt percent gt propagates to the output as an X If the rejection limit is not specified then it defaults to the error limit For example consider a path delay of 10 along with a pulse_e 80 option The error limit is 80 of 10 and the rejection limit defaults to 80 of 10 This results in the propagation of pulses greater than or equal to 8 while all other pulses are filtered Note that you can force specify path delays to operate in transport mode by using the pulse_e 0 option e pulse_e_style_ondetect optional Selects the on detect style of propagating pulse errors see pulse_e A pulse error propagates to the output as an X and the on detect style is to schedule the X immediately as soon as it has been detected that a pulse error has occurred on event style is the default fo
200. e path to the signal s On Windows systems the path separator should be a forward slash e install lt path gt optional Causes the newly created signal to become a child of the specified region If install is not specified the newly created signal becomes a child of the nearest common ancestor of all objects appearing in lt expressionString gt If the expression references more than one WLF file dataset the virtual signal will automatically be placed in region virtuals Functions lt path gt Specifies a relative path to the signal s On Windows systems the path separator should be a forward slash ModelSim Reference Manual v10 1c 309 Commands virtual function delay lt time gt lt unit gt optional Specifies a value by which the virtual function will be delayed You can use negative values to look forward in time Refer to the examples below for more details lt time gt Specified as an integer or decimal number Current simulation units are the default unless specifying lt unit gt lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid VHDL time units are fs ps ns us ms sec min and hr You must enclose lt time gt and lt unit gt within curly braces AD lt expressionString gt required A text string expression enclosed in curly braces using the GUI_expression_forma
201. e port type for the waveform in Ports of type IN You can also specify input as an alias for in out Ports of type OUT You can also specify output as an alias for out inout Ports of type INOUT internal default Ports of type INTERNAL random_type exponential normal poisson uniform required Specifies a random pattern to generate exponential Exponential distribution of waveform events normal Normal or Gaussian distribution of waveform events poisson Poisson distribution of waveform events uniform default Uniform distribution of waveform events range lt msb Isb gt optional Identifies bit significance in a counter pattern msb lsb Most significant bit and least significant bit Both must be specified repeat forever lt n gt never required Controls duration of pattern repetition forever Repeat the pattern for as long as the simulation runs lt n gt Repeat the pattern lt n gt number of times where lt n gt is any positive integer ModelSim Reference Manual v10 1c Commands wave modify never Never repeat the pattern during simulation e seed lt value gt optional Specifies a seed value for a randomly generated waveform lt value gt Any non negative integer where the default is 5 e sequence vall val2 val3 required The set of values that you want repeated lt vall gt Value must be appropriate for the type of waveform you
202. e specified pattern If both are specified the pattern is applied only to memory locations not contained in the file dec Decrement each succeeding memory word by one digit inc Increment each succeeding memory word by one digit rand Randomly generate each succeeding memory word starting with the word specified by filldata as the seed value Value default Substitute each memory word in the range with the value specified in filldata filldata lt data_word gt required unless infile is used Specifies a data word used to fill memory addresses in the pattern specified by filltype lt data_word gt Specifies a data word Must be in the same format as specified by the fillradix switch fillradix lt radix_type gt optional use with filldata Specifies radix of the data specified by the filldata switch lt radix_type gt Valid entries or any unique abbreviations are binary decimal unsigned octal hex symbolic and default format bin hex mti optional use with infile Specifies the format of the file to be loaded bin Specifies binary data format hex Specifies hex format mti MTI format default Specifies the format of the file to be loaded The bin and hex values are the standard Verilog hex and binary memory pattern file formats These can be used with Verilog memories and with VHDL memories composed of std_logic types ModelSim Reference Manual v10 1c 167
203. e to two percent You may want to disable compression to speed up simulation or if you are experiencing problems with faulty data in the resulting WLF file This option may also be specified with the WLFCompress variable in the modelsim ini file wlfdeleteonquit optional Deletes the current simulation WLF file vsim w f automatically when the simulator exits This option may also be specified with the WLFDeleteOnQuit variable in the modelsim ini file nowlfdeleteonquit default Preserves the current simulation WLF file vsim wlf when the simulator exits This option may also be specified with the WLFDeleteOnQuit variable in the modelsim ini file wlflock optional Locks a WLF file An invocation of ModelSim will not overwrite a WLF file that is being written by a different invocation ModelSim Reference Manual v10 1c Commands vsim e nowlflock optional Disables WLF file locking This will prevent vsim from checking whether a WLF file is locked prior to opening it as well as preventing vsim from attempting to lock a WLF once it has been opened e wlfopt default optional Optimizes the WLF file Enables faster display of waveforms in the Wave window when the display is zoomed out to display a larger time range This option may also be specified with the WLFOptimize variable in the modelsim ini file e nowlfopt optional Disables optimization of waveform display in the Wave window This option may also be spe
204. ecified library If the design unit is a VHDL entity its architectures are listed By default all entities configurations modules packages and optimized design units in the specified library are listed l optional Prints the version of veom vlog with which each design unit was compiled plus any compilation options used Also prints the object code version number that indicates which versions of vecom vlog and ModelSim are compatible lib lt library_name gt optional Specifies the logical name or the pathname of a library to be listed By default the contents of the work library are listed lt library_name gt A logical name or pathname of a library modelsimini lt ini_filepath gt optional Loads an alternate initialization file that replaces the current initialization file Overrides the file path specified in the MODELSIM environment variable lt ini_filepath gt Specifies either an absolute or relative path to the initialization file On Windows systems the path separator should be a forward slash prop lt prop gt optional Reports on a specified design unit property ModelSim Reference Manual v10 1c Commands vdir lt prop gt Specifies a Design Unit Property as listed in Table 2 6 If you do not specify a value for lt prop gt an error message is displayed Table 2 6 Design Unit Properties Value of lt prop gt archcfg Description configuration for arch body need
205. ecifies the ID number of a breakpoint or when statement to disable e lt label gt optional Specifies the label name of a breakpoint or when statement to disable If you do not specify either of these arguments all breakpoints and when statements are disabled Use the bp command with no arguments to find labels and ID numbers for all breakpoints in the current simulation Use the when command with no arguments to find labels and ID numbers of all when statements in the current simulation _ Id numbers for breakpoints and when statements are assigned from the same pool Even if you have not specified a given id number for a breakpoint that number may still be used for a when command Related Topics bd onbreak e bp resume enablebp when 118 ModelSim Reference Manual v10 1c do Commands do This command executes the commands contained in a macro file A macro file can have any name and extension An error encountered during the execution of a macro file causes its execution to be interrupted unless an onerror command or the OnErrorDefaultAction Tcl variable is specified with the resume command The onbreak command is used to take action with source code breakpoint cases Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax do lt filename gt lt parameter_value gt Arguments lt filename gt required
206. ecifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt delay gt and lt unit gt within curly braces namecolwidth lt width gt optional Specifies the width of the name column in pixels Related Tcl variable is PrefW ave nameCol Width lt width gt Any non negative integer where the default is 150 rowmargin lt pixels gt optional Specifies the distance between top level signals in pixels Related Tcl variable is PrefWave rowMargin lt pixels gt Any non negative integer where the default is 4 signalnamewidth lt value gt optional Controls the number of hierarchical regions displayed as part of a signal name shown in the pathname pane Related Tcl variable is PrefWave SignalName Width Can also be set with the WaveSignalName Width variable in the modelsim ini file ModelSim Reference Manual v10 1c Commands configure lt value gt Any non negative integer where the default is 0 display the full path For example 1 displays only the leaf path element 2 displays the last two path elements and so on e timecolor lt color gt optional Specifies the time axis color Related Tcl variable is PrefWave timeColor lt color gt Any color where the default is green e timeline 01 1 optional Specifies whether
207. ecimal unsigned or hex By default the radix displayed is the system default ModelSim Reference Manual v10 1c 173 Commands mem search You can change the default radix for the current simulation using the radix command You can change the default radix permanently by editing the DefaultRadix variable in the modelsim ini file endaddress lt address gt optional Specifies the end address for a range of addresses to search lt address gt Any valid address in the memory lt path gt optional Specifies the hierarchical path to the location of the memory instance The default is the current context as shown in the Structure window replace lt word gt lt word gt optional Replaces the found patterns with a designated pattern lt word gt A word pattern Multiple word patterns are accepted separated by a single space No wildcards are allowed in the replaced pattern startaddress lt address gt optional Specifies the start address for a range of addresses to search lt address gt Any valid address in the memory Examples 174 e Search for and print to the screen all occurrences of the pattern 16 Hbeef in uut u0 mem3 mem search glob 16 Hbeef dataradix hex uut Uu0 mem3 Returns 7845 beef 7846 beef 100223 beef e Search for and print only the first occurrence of 16 Hbeef in the address range 7845 150000 replacing it with 16 Heafe in uut ul mem3 mem search g
208. ection of waveform to perform the editing operation upon denoted by a simulation time lt time gt Specified as an integer or decimal number lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces e time lt time gt lt unit gt required The amount of time to extend or stretch waves lt time gt Specified as an integer or decimal number lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces e lt value gt required The new value Must match the type of the lt object_name gt Related Topics e wave create e Generating Stimulus with Waveform Editor 396 ModelSim Reference Manual v10 1c Commands wave export wave export This command creates a stimulus file from waveforms created with the wave create command Syntax wave export designunit lt name gt endtime lt time gt lt unit gt lt time gt file lt name gt format force vcd vhdl verilog starttime lt time gt Arg
209. ects and subregions visible in the environment named uut show uut e List the names of all the objects and subregions visible in the environment named sub_region which is directly visible in the current environment show sub_region e List the names of all the objects and subregions visible in all top level environments show all Related Topics environment e find 228 ModelSim Reference Manual v10 1c Commands simstats simstats This command returns performance related statistics about elaboration and simulation The statistics measure the simulation kernal process vsimk for a single invocation of vsim If you invoke vsim a second time or restart the simulation the current statistics are discarded and new values are collected If executed without arguments the command returns a list of pairs similar to the following elab memory 0 elab working set 7245824 elab time 0 942645 elab cpu time 0 190274 elab context 0 elab page faults 1549 memory 0 working set 0 time 0 cpu time 0 context 0 page faults 0 The elaboration statistics are measured one time at the end of elaboration The simulation memory statistics are measured at the time you invoke simstats The simulation time statistics are updated at the end of each run command See the arguments below for descriptions of each statistic Units for time values are in seconds Units for memory values vary by platform e For
210. ects to add to the VCD file You can specify multiple objects by separating names with spaces Wildcards are accepted Must be specified as the final argument to the ved dumpports command Examples e Create a VCD file named counter vcd of all IN ports in the region test_design dut vcd dumpports in file counter vcd test_design dut e These two commands resimulate a design from a VCD file Refer to Simulating with Input Values from a VCD File for further details ved dumpports file addern vcd testbench uut vsim vcdstim addern vcd addern gn 8 do add wave run 1000 e This series of commands creates VCD files for the instances proc and cache and then re simulates the design using the VCD files in place of the instance source files Refer to Replacing Instances with Output Values from a VCD File for more information ved dumpports vcdstim file proc vcd top p ved dumpports vcdstim file cache vcd top c run 1000 vsim top vcdstim top p proc vcd vcdstim top c cache vcd 258 ModelSim Reference Manual v10 1c Related Topics ved add vcd checkpoint vcd comment vcd dumpportsall vcd dumpportsflush vcd dumpportslimit vcd dumpportsoff vcd dumpportson vcd file ModelSim Reference Manual v10 1c Commands vcd dumpports vcd files vcd flush ved limit vcd off vcd on ved2wlf DumpportsCollapse Value Change Dump VCD Files Verilog tasks are documented in the Language Reference Manual IEEE 1364 stan
211. ed at the specified time It is not necessary to specify lt name gt when using this argument See GUI_expression_format for the format of the expression lt expression gt Specifies an expression enclosed in braces handle optional Returns the memory address of the specified lt name gt You can use this value as a tag when analyzing the simulation This value also appears as the title of a box in the Watch window This option will not return any value if you are in view mode ModelSim Reference Manual v10 1c 131 Commands examine 132 in optional Specifies that lt name gt include ports of mode IN out optional Specifies that lt name gt include ports of mode OUT inout optional Specifies that lt name gt include ports of mode INOUT internal optional Specifies that lt name gt include internal non port signals maxlen lt integer gt optional Specifies the maximum number of characters in the output of the command lt integer gt Any non negative integer where 0 is unlimited ports optional Specifies that lt name gt include all ports Has the same effect as specifying in inout and out together name optional Displays object name s and value s Related switch is value lt radix_type gt optional Specifies the radix type for the objects that follow in the command Valid entries or any unique abbreviations are binary ascii unsigned decimal octal hex
212. ed to the output file ModelSim Reference Manual v10 1c Commands vlog e Edebug lt filename gt optional Captures text processed by the Verilog parser after preprocessing has occurred and copies that text to a debugging output file lt filename gt Specifies a name for the debugging output file Wildcards are not allowed Generally preprocessing consists of the following compiler directives ifdef else elsif endif ifndef define undef include The file is a concatenation of source files with include expanded The file can be compiled and then used to find errors in the original source files The line directive attempts to preserve line numbers and file names in the output file White space is usually preserved but sometimes it may be deleted or added to the output file e enumfirstinit optional Initializes enum variables in SystemVerilog using the leftmost value as the default You must also use the argument with the vsim command in order to implement this initialization behavior Specify the EnumBaselInit variable as 0 in the modelsim ini file to set this as a permanent default e Epretty lt filename gt Captures text processed by the Verilog parser after preprocessing has occurred performs some formatting for better readability and copies that text to an output file lt filename gt Optional e error lt msg_number gt lt msg_number gt Changes the severity level
213. ee ee 192 DICCIHION Apa nse eeseree eeu n ts A E cde ey beste e eee neteus os ete see oe 193 PONEI spect ea ooiod A oy ok ene ease oak cones eee eens 194 PROCESS r pot 5 6 cades nnd soeewneesdees tet anegasecsher anes seceustesderuss 195 PEOJECU n tot ai a a EAEE E ose ols lt one ody eye eed a aeeing oud one eee sk 196 WU ereer Se Shee ee eee ea ee ee ee OER ae ee eee One eee ees 199 QUIGUS 2 2 outa s eth ee eee Sea eee eWecwes ese Geese Geet ee dae See Se eke etiesaee 200 UN once aq EE EE ea hued Reed Oke e We CdSe Oe cA Rea ee eases eee heaue es 201 MAAN eaa avin Bey caer shes gh cay Eaa A a tee ate re eke athe Hires ts ear nA Heenan uh ese ate 202 radik defie aot ek Ee eed og ha ie he ns aks ea Bae ha ee ea ee 204 AGI delete so ses ca ers an rar ch tee ch ep ee tod wn re aa a a aa Apc aa Gil ete UN Eee 207 radix list 22 5 2n lt 826 Gs Yeah eine epi a eee tees Po bhak teed a eee ide b ends 208 radik NAINIES oes casa dg ces ce eed ce deena Sodas Hele esas aa sO eye Heng ees Seg kates Sedna ag de 209 radix signal 274 ues twa Bred ASR EM eG PARE be ded be eee ee kee ee DAER ae 210 readerSe eae ee Eee SEEN BOR OOO Pt Vee RCE NEN UCR E a SONU CPs tenet sc MENUS POTTS DR OENO TOP Ter Wh Soe te a ER E 211 PEDOL a ee eee ane eee eee eee a eee ee ee ee ee a ee eee eee eee ee See eee ee eee 212 MO SEAL EEPE Sacco ecard amp avenge EEE S EEE E tevahed Se de Shap weaned amp EE E E EEES T EEEE EE 214 MESUING sc aa A a E A E fai AEA E cosine e E E E sat
214. ee ete dou KEN E EAEEREN E A EEDE E ead 104 dataset CUITENE 0 2 es ee dae ee aa oo a a a ne oe de eee eee 106 CLAS CETL orc se cc ac Pe tee edt ace etre cer eae a a aa ce ene ote 107 dataset Stre cach aa des twas srg gee than deen tie ah qu a CEN ed Ee aoa thee coe 108 dataset p por edud eaten dese ede Seer ee Reed be ANUE aE eee s keer eee ee 109 d taset reame s 24c52 ae ct Sek ent Ak teeta ace eA toate ik cule oes AA 110 dataset Testa lt lt soo ect obi ad ote oaadak oes ek heen k at bred EN TE 111 dataset SaYye terreri Sees etn amp O sth Spd Recpapsa E ayaa Gi Se de bheerie and amp EEE Bey dees 112 d tas t Snapshot secre errare enee eae eo AG eee A Ne Ona RNS eee we wee oe 113 deleterree terr Abe Gee OES ae O EE oe OSES SO ene Se ee Eke 116 CESCIIDE Sx Sues St nae es ee Se eds ene Sa ere ys es Se ewe 117 CISADIEDD 3 4ehb esac and ea bien Reed Oke e We Cae Oe cheat ea dees heer send 4 118 OS sepa sgt ests sees ss re st etre dS tb Spates ne esas E eyaa ease eenare nee 119 AIVOS ecco ite Sas Sere oe ce aes St aes See ct ah cys Dae ee us date oa ce OM ate a ha 121 MUMDIOE OF s Ass 5 ba eS Rated oa de desea a eee wees S A Pee eee a awe 123 OCHO este ce oh hak Dae ei E Poe EEN Se LE ee ted Stel Shae Ty 124 OI ones co a sas eee he aise gens Sab eRe eed GG alos uniha oats due od aie anne Gene Gees 125 enablebp eairt dows eee og Chae RW DAG Sates one eh EGER BETA Eek a ees 126 CNCOUING 25484 a acs a nok ee ee Ue Pe RO ee eee co
215. el that fp refers to is not available in the simulator only in the user interface Even using the uivar command does not work here because the value of fp has no meaning in the context of the fast argument The following method of rewriting this example opens the channel writes to it then closes it within the when command when fast bus set fp open mylog txt a puts fp bus change examine bus close Sfp The following example is a little more sophisticated method of doing the same thing ModelSim Reference Manual v10 1c 407 Commands when when fast Snow Ons set fp open mylog txt w when fast bus puts fp bus change examine bus when fast Snow 1000ns close Sfp The general principle is that any embedded command done using the fast argument is global to all other commands used with the fast argument Here now Ons is a way to define Tcl processes that the fast commands can use These processes have the same restrictions that when bodies have but the advantage is again speed as a proc will tend to execute faster than code in the when body itself It is recommended not to use virtual signals and expressions Arguments fast optional Causes the embedded lt command gt to execute within the simulation kernel which provides faster execution and reduces impact on simulation runtime performance Limitations on using the fast argument are described above in Embed
216. elay with pulse handling and transport delay behavior Works for both Verilog and VITAL cells Use this argument when you have interconnect data in your SDF file and you want the delay on each interconnect path modeled independently Pulse handling is configured using the pulse_int_e and pulse_int_r switches described below The multisource_int_delays argument cannot be used if you compiled using the novital argument to vcom The novital argument instructs vcom to implement VITAL functionality using VHDL code instead of accelerated code and multisource interconnect delays cannot be implemented purely within VHDL e name lt name gt optional Specifies the application name used by the interpreter for send commands This does not affect the title of the window e noautoldlibpath optional Disables the default internal setting of LD_LIBRARY_PATH enabling you to set it yourself Use this argument to make sure that LD_LIBRARY_PATH is not set automatically while you are using the GUI e nocapacity optional Disables the display of both coarse grain and fine grain analysis of memory capacity e nocompress optional Causes VSIM to create uncompressed checkpoint files This option may also be specified with the CheckpointCompressMode variable in the modelsim ini file ModelSim Reference Manual v10 1c 359 Commands vsim 360 noimmedca optional Causes Verilog event ordering to occur without enforced prioritiz
217. eletes a breakpoint adds a bookmark to the specified Wave window bookmark delete wave deletes bookmarks from the specified Wave window bookmark goto wave bookmark list wave zooms and scrolls a Wave window using the specified bookmark displays a list of available bookmarks bp sets a breakpoint call change calls SystemVerilog static package and class functions modifies the value of a VHDL variable or Verilog register variable classinfo displays information about class types and instances configure invokes the List or Wave widget configure command for the current default List or Wave window dataset alias assigns an additional name to a dataset dataset clear dataset close clears the current simulation WLF file closes a dataset dataset config configures WLF file settings after dataset is open dataset current opens the specified dataset and sets the GUI context to the last selected context of the specified dataset dataset info reports information about the specified dataset dataset list lists the open dataset s dataset open opens a dataset and references it by a logical name dataset rename changes the logical name of an opened dataset dataset restart unloads specified or current dataset dataset save saves data from the current WLF file to a specified file dataset snapshot saves data from the current WLF
218. en notice of any unauthorized disclosure or use of the Products as soon as Customer learns or becomes aware of such unauthorized disclosure or use Except as otherwise permitted for purposes of interoperability as specified by applicable and mandatory local law Customer shall not reverse assemble reverse compile reverse engineer or in any way derive any source code from Software Log files data files rule files and script files generated by or for the Software collectively Files including without limitation files containing Standard Verification Rule Format SVRF and Tcl Verification Format TVF which are Mentor Graphics proprietary syntaxes for expressing process rules constitute or include confidential information of Mentor Graphics Customer may share Files with third parties excluding Mentor Graphics competitors provided that the confidentiality of such Files is protected by written agreement at least as well as Customer protects other information of a similar nature or importance but in any case with at least reasonable care Customer may use Files containing SVRF or TVF only with Mentor Graphics products Under no circumstances shall Customer use Software or Files or allow their use for the purpose of developing enhancing or marketing any product that is in any way competitive with Software or disclose to any third party the results of or information pertaining to any benchmark 5 2 If any Software or portions there
219. endent Please read through the argument descriptions for more information d The following table summarizes the available waveform pattern options Command wave create pattern clock wave create pattern constant wave create pattern random wave create pattern repeater wave create pattern counter wave create pattern none Syntax All waveforms Description Generates a clock waveform Recommended that you specify an initial value duty cycle and clock period for the waveform Generates a waveform with a constant value It is suggested that you specify a value Generates a random waveform based upon a seed value Specify the type normal or uniform an initial value and a seed value If you don t specify a seed value Questa uses a default value of 5 Generates a waveform that repeats Specify an initial value and pattern that repeats You can also specify how many times the pattern repeats Generates a waveform from a counting pattern Specify start and end values repeat step count time period and type Binary Gray Johnson OneHot Range and ZeroHot Creates a placeholder for a waveform Specify an object name wave create driver freeze deposit driver expectedoutput initialvalue lt value gt language vhdl verilog portmode in out inout internal range lt msb Isb gt starttime lt time gt lt unit gt endtime lt time gt lt unit gt lt object_name gt
220. ent time is 1000 ns this command echo Thetimeis nowns returns the message The time is 1000 ns e If the quotes are omitted echo The time is now ns all blank spaces of two or more are compressed into one space The time is now ns e echo can also use command substitution such as echo The hex value of counter is examine hex counter If the current value of counter is 21 15 hex this command returns The hex value of counter is 15 124 ModelSim Reference Manual v10 1c Commands edit edit This command invokes the editor specified by the EDITOR environment variable By default the specified filename will open in the Source window Syntax edit lt filename gt Arguments e lt filename gt optional Specifies the name of the file to edit If the lt filename gt argument is omitted the editor opens the current source file If you specify a non existent filename it will open a new file Either absolute or relative paths may be used Related Topics notepad EDITOR environment variable ModelSim Reference Manual v10 1c 125 Commands enablebp enablebp This command turns on breakpoints and when commands that were previously disabled Syntax enablebp lt id gt lt label gt Arguments e lt id gt optional Specifies a breakpoint ID number or when statement to enable e lt label gt optional Specifies the label name of a breakpoint or when statement to enable If you do not s
221. eparated list msgmode both tran wlf optional Specifies the location s for the simulator to output elaboration and runtime messages both outputs messages to both the transcript and the WLF file tran outputs messages only to the transcript therefore they are not available in the Message Viewer Default behavior ModelSim Reference Manual v10 1c Commands vsim wlf outputs messages only to the WLF file Message Viewer therefore they are not available in the transcript Refer to the section Message Viewer Window in the User s Manual for more information e modelsimini lt ini_filepath gt optional Loads an alternate initialization file that replaces the current initialization file Overrides the file path specified in the MODELSIM environment variable Specifies either an absolute or relative path to the initialization file On Windows systems the path separator should be a forward slash e multisource_delay min max latest optional Controls the handling of multiple PORT or INTERCONNECT constructs that terminate at the same port By default the Module Input Port Delay MIPD is set to the max value encountered in the SDF file Alternatively you may choose the min or latest of the values If you have a Verilog design and want to model multiple interconnect paths independently use the multisource_int_delays argument e multisource_int_delays optional Enables multisource interconnect d
222. eparated list Wildcards permitted At least one type or wildcard is required Refer to the view command for a complete list of possible arguments You can also close Source windows using the tab or file name Examples e Close the Wave window named wavel noview wave1 e Close all List windows noview List Related Topics view 184 ModelSim Reference Manual v10 1c Commands nowhen nowhen This command deactivates selected when commands Syntax nowhen lt label gt Arguments e lt label gt optional Specifies an individual when command Wildcards may be used to select more than one when command Examples e Deactivate the when command labeled 99 nowhen 99 e Deactivate all when commands nowhen Related Topics when ModelSim Reference Manual v10 1c 185 Commands onbreak onbreak This command is used within a macro and specifies one or more scripts to be executed when running a macro that encounters a breakpoint in the source code The onbreak setting will effect any run commands that follow the onbreak statement until another onbreak command is issued If a do file is executed from within the macro the do file script will inherit the onbreak setting specified prior to execution unless and until another onbreak command is given in which case that onbreak setting will be in effect until the do file script completes at which point execution will return to the calling macro and the calling macro s
223. er to the section Wildcard Characters for wildcard usage as it pertains to the add commands Must be specified as the first argument to the add list command Note that the WildcardFilter Tcl preference variable identifies types to ignore when matching objects with wildcard patterns You can add variables as long as they are preceded by the process name For example add list myproc int1 You must specify the lt object gt argument as the first argument to the add list command e lt object_name gt sig required when lt object gt is not specified Creates a user defined bus with the specified object name containing the specified signals sig concatenated within the user defined bus Arguments must be enclosed in braces Must be specified as the second argument to the add list command sig A space separated list of signals enclosed in braces that are included in the user defined bus The signals may be either scalars or various sized arrays as long as they have the same element enumeration type For example add list mybus a b y ModelSim Reference Manual v10 1c 51 Commands add list 52 allowconstants optional For use with wildcard searches Specifies that constants matching the wildcard search should be added to the List window This command does not add constants by default because they do not change depth lt level gt optional Restricts a recursive search as specified with rec
224. er Settings from the Command Line Refer to the list of WildcardFilter arguments in Table 1 4 and Figure 1 5 to determine what you want to include in the wildcard matches e To define a new list of values enter the following command set WildcardFilter lt arg1 arg2 gt Note that you must enclose the space separated list of arguments in quotation marks e To add one or more values to the current list enter the following command lappend WildcardFilter lt arg1 arg2 gt Note that you must not enclose the space separated list of arguments in quotation marks To remove a value from the filter use the set command with the Tcl lsearch command to create the new list from the existing list For example set WildcardFilter Isearch not all inline WildcardFilter Endpoint Changing the WildcardFilter Settings back to the Default Enter the following command set WildcardFilter default Changing the WildcardFilter settings from the GUI 1 Choose Tools gt Wildcard Filter from the main menu ModelSim Reference Manual v10 1c 19 Syntax and Conventions Wildcard Characters 2 Select the individual Filters you want to exclude from wildcard searches Table 1 4 describes each option or select Composite Filters to activate related filters Table 1 5 describes each composite option 3 Click OK Refer to the Tcl man pages Help gt Tcl Man Pages for more information about the lsearch and set commands WildcardFilter Argument
225. ers questasim linux synopsys attributes has changed The force_refresh argument forces the refresh of the design unit overriding any dependency checking errors encountered by the refresh argument A more conservative approach to working around refresh dependency checks is to recompile the source code if it is available fsmimplicittrans nofsmimplicittrans optional Toggles recognition of implied same state transitions which is off by default nofsmimplicittrans fsmresettrans nofsmresettrans optional Toggles recognition of sychronous or asynchronous reset transitions and is on by default fsmresettrans This includes excludes reset transitions in coverage results fsmsingle nofsmsingle optional Toggles the recognition of VHDL FSMs where the current state variable of type std_logic bit boolean or single bit std_logic_vector bit_vector and Verilog single bit FSMs fsmverbose b t w optional Provides information about FSMs detected including state reachability analysis b displays only basic information t displays a transition table in addition to the basic information w displays any warning messages in addition to the basic information When you do not specify an argument this switch reports all information similar to ModelSim Reference Manual v10 1c Commands vcom Note vcom 1947 FSM RECOGNITION INFO Fsm detected in fpu rtl vhdl serial_mul vhd C
226. es false expressed in x number of timescale units The default value for normal synchronous gating is zero If gateduration is set to a non zero value a simulation value will be displayed after the gate expression becomes false if you don t want the values displayed set gateduration to zero lt duration_open gt Any non negative integer where the default is 0 values are not displayed gateexpr lt expression gt optional Specifies the expression for trigger gating Use the usegating argument to enable trigger gating The expression is evaluated when the List window would normally have displayed a row of data lt expression gt An expression usegating off on optional Enables triggers to be gated on or off by an overriding expression Use the gatexpr argument to specify the expression Refer to Using Gating Expressions to Control Triggering for additional information on using gating with triggers off default Triggers are gated off a value of 0 ModelSim Reference Manual v10 1c Commands configure on Triggers are gated on a value of 1 strobeperiod lt period gt lt unit gt optional Specifies the period of the list strobe lt period gt Any non negative integer lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec
227. es from ports of mode IN out optional Includes only port driver changes from ports of mode OUT inout optional Includes only port driver changes from ports of mode INOUT ports optional Includes only port driver changes Excludes internal variable or signal changes internal optional Includes only internal variable or signal changes Excludes port driver changes ModelSim Reference Manual v10 1c 253 Commands ved add r r optcells optional Specifies that signal and port selection occurs recursively into subregions If omitted included signals and ports are limited to the current region When r is used with optcells it allows Verilog optimized cell ports to be visible when using wildcards By default Verilog optimized cell ports are not selected even if they match the specified wildcard pattern lt object_name gt required Specifies the Verilog or VHDL object or objects to add to the VCD file Multiple objects may be specified by separating names with spaces Wildcards are accepted Must be specified as the final argument to the ved add command Related Topics 254 ved checkpoint vcd comment vcd dumpports ved dumpportsall vcd dumpportsflush vcd dumpportslimit vcd dumpportsoff vcd dumpportson vcd file ved files ved flush ved limit ved off ved on ved2wlf DumpportsCollapse Value Change Dump VCD Files Verilog tasks are documented in the Language Reference Manual IEEE 1364 sta
228. ession references more than one WLF file dataset the virtual signal will automatically be placed in region virtuals Signals lt path gt Specifies a relative path to the signal s On Windows systems the path separator should be a forward slash e delay lt time gt lt unit gt optional Specifies a value by which the virtual function will be delayed You can use negative values to look forward in time Refer to the examples below for more details lt time gt Specified as an integer or decimal number Current simulation units are the default unless specifying lt unit gt lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid VHDL time units are fs ps ns us ms sec min and hr You must enclose lt time gt and lt unit gt within curly braces ModelSim Reference Manual v10 1c 321 Commands virtual signal lt expressionString gt required A text string expression enclosed in curly braces using the GUI_expression_format lt name gt required The name you define for the virtual signal Case is ignored unless installed in a Verilog region Use alpha numeric and underscore characters only unless you are using VHDL extended identifier notation If using VHDL extended identifier notation lt name gt needs to be quoted with double quotes or with curly braces
229. estart of a simulation resume continues execution of a macro file after a pause command or a breakpoint runStatus advances the simulation by the specified number of timesteps returns the current state of your simulation after issuing a run or step command searchlog ModelSim Reference Manual v10 1c searches one or more of the currently open logfiles for a specified condition displays the specified number of source file lines around the current execution line 43 Commands Command name setenv Table 2 1 Supported Commands cont sets an environment variable shift show shifts macro parameter values down one place lists objects and subregions visible from the current environment simstats reports performance related statistics about active simulations stack down stack frame moves down the call stack selects the specified call frame stack level reports the current call frame number stack tb stack up is an alias for the tb command moves up the call stack status lists all currently interrupted macros step stop steps to the next HDL statement stops simulation in batch files used with the when command suppress prevents the specified message s from displaying tb displays a stack trace for the current process in the Transcript window Time performs various numerical comparisons operations and conversions on si
230. etails project ranked runmegr schematic source stackview structural structure tracker transaction transcript watch wave Not all windows are available with all variants ModelSim SE ModelSim PE Questa SV AFYV and so on e aliases optional Returns a list of lt window_type gt aliases e height lt n gt optional Specifies the window height in pixels Can only be used with the undock switch lt n gt Any non negative integer ModelSim Reference Manual v10 1c 301 Commands view icon optional Toggles the view between window and icon Can only be used with the undock switch names optional Returns a list of valid lt window_type gt arguments title New Window Title optional Specifies the window title of the designated window New Window Title Any string Curly braces are needed for a string containing spaces Double quotes can be used in place of braces for example New Window Title dock optional Docks the specified standalone window into the Main window undock optional Opens the specified window as a standalone window undocked from the Main window width lt n gt optional Specifies the window width in pixels Can only be used with the undock switch lt n gt Any non negative integer x lt n gt optional Specifies the window upper left hand x coordinate in pixels Can only be used with the undock switch lt n gt Any non negative integer y
231. exclude data for ports of mode OUT whose names match the specification inout optional Specifies that the kernel exclude data for ports of mode INOUT whose names match the specification ModelSim Reference Manual v10 1c Commands virtual nolog e internal optional Specifies that the kernel exclude data for internal non port objects whose names match the specification e ports optional Specifies that the kernel exclude data for all ports e lt pattern gt required Indicates which signal names or wildcard patterns should be used in finding the signals to unlog where wildcards are allowed and you can specify any number of names or patterns Related Topics virtual log e Virtual Objects ModelSim Reference Manual v10 1c 317 Commands virtual region virtual region This command creates a new user defined design hierarchy region Note Virtual regions cannot be used in the when command Syntax virtual region lt parentPath gt lt regionName gt Arguments e lt parentPath gt required The full path to the region that will become the parent of the new region e lt regionName gt required The name you want for the new region Related Topics virtual function virtual signal e Virtual Objects 318 ModelSim Reference Manual v10 1c Commands virtual save virtual save This command saves the definitions of virtuals to a file named virtual do in the current directory Syntax
232. executed transcript on e Ifissued immediately after the previous example the message transcript Returns Macro transcripting is turned ON Related Topics e Transcript Window e echo 244 ModelSim Reference Manual v10 1c Commands transcript file transcript file This command sets or queries the current PrefMain file Tcl preference variable You can use this command to clear a transcript in batch mode or to limit the size of a transcript file It offers an alternative to setting the PrefMain file Tcl preference variable through the GUI Syntax transcript file lt filename gt Arguments lt filename gt optional Specifies a name for the transcript file Wildcard characters are allowed and stdout or stderr are valid file names If you specify a new file the existing transcript file is closed and a new transcript file opened If you specify an empty string the existing file is closed and no new file is opened If you don t specify this argument the current filename is returned Note You can prevent overwriting older transcript files by including a pound sign in lt filename gt when lt filename gt is a repeated string The simulator replaces the pound character with the next available sequence number when saving a new transcript file Examples e Close the current transcript file and stops writing data to the file This is a method for reducing the size of your t
233. f 10 This results in the propagation of pulses greater than or equal to 8 while all other pulses are filtered pulse_int_r lt percent gt optional Controls how pulses are propagated through interconnect delays where lt percent gt is a number between 0 and 100 that specifies the rejection limit as a percentage of the interconnect delay This option works for both Verilog and VITAL cells though the destination of the interconnect must be a Verilog cell The source may be VITAL or Verilog A pulse less than the rejection limit is filtered If the error limit is not specified by pulse_int_e then it defaults to the rejection limit quiet optional Disable Loading messages during batch mode simulation runinit optional Initializes non trivial static SystemVerilog variables for example expressions involving other variables and function calls before displaying the simulation prompt sdf_iopath_to_prim_ok optional Prevents vsim from issuing an error when it cannot locate specify path delays to annotate If you specify this argument IOPATH statements are annotated to the primitive driving the destination port if a corresponding specify path is not found Refer to SDF to Verilog Construct Matching for additional information sdfmin sdftyp sdfmax lt delayScale gt lt instance gt lt sdf_filename gt optional Annotates VITAL or Verilog cells in the specified SDF file a Standard Delay Format file w
234. ff default user specified grid period is used ModelSim Reference Manual v10 1c 97 Commands configure 98 on grid period is determined by the major tick marks in the time line gridcolor lt color gt optional Specifies the background grid color Related Tcl variable is PrefWave gridColor lt color gt Any color where the default is grey50 griddelta lt pixels gt optional Specifies the closest in pixels two grid lines can be drawn before intermediate lines will be removed Related Tcl variable is PrefWave gridDelta lt pixels gt Any non negative integer where the default is 40 gridoffset lt time gt lt unit gt optional Specifies the time in user time units of the first grid line Related Tcl variable is PrefWave gridOffset lt time gt Any non negative integer where the default is 0 lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt delay gt and lt unit gt within curly braces gridperiod lt time gt lt unit gt optional Specifies the time in user time units between subsequent grid lines Related Tcl variable is PrefWave gridPeriod lt time gt Any non negative integer where the default is 1 lt unit gt optional A suffix sp
235. ffer to the specified VCD file This command is useful if you want to create a complete VCD file without ending your current simulation Related Verilog tasks dumpflush fdumpflush Syntax vcd flush lt filename gt Arguments e lt filename gt optional Specifies the name of the VCD file If omitted the command is executed on the file designated by the vcd file command or dump vcd if ved file was not invoked Related Topics ved add vcd files vcd checkpoint vcd limit vcd comment vcd off vcd dumpports vcd on vcd dumpportsall vcd2wif vcd dumpportsflush DumpportsCollapse vcd dumpportslimit e Value Change Dump VCD Files vcd dumpportsoff e Verilog tasks are documented in the vcd dumpportson Language Reference Manual IEEE 1364 vcd file standard ModelSim Reference Manual v10 1c 269 Commands vcd limit vcd limit This command specifies the maximum size of a VCD file by default limited to available disk space When the size of the file exceeds the limit a comment is appended to the file and VCD dumping is disabled Related Verilog tasks dumplimit fdumplimit Arguments to this command are order dependent Please read the argument descriptions for more information Syntax vcd limit lt filesize gt lt filename gt Arguments e 6 lt filesize gt Required Specifies the maximum VCD file size in bytes The numerical value of lt filesize gt can o
236. fied as the final argument to the add wave command Wildcard characters are allowed Multiple objects are entered as a space separated list Note that the WildcardFilter Tcl preference variable identifies types to ignore when matching objects with wildcard patterns Variables may be added if preceded by the process name For example add wave myproci int1 e lt object_name gt sig1 sig2 required unless specifying lt object_name gt Creates a user defined bus with the specified object name containing the specified signals sigl and so forth concatenated within the user defined bus Must be specified as the final argument to the add wave command sig A space separated list of signals enclosed in braces that are included in the user defined bus The signals may be either scalars or various sized arrays as long as they have the same element enumeration type oa Note cM You can also select Wave gt Combine Signals when the Wave window is selected to create a user defined bus 64 ModelSim Reference Manual v10 1c Commands add wave Examples e Display an object named out2 The object is specified as being a logic object presented in gold add wave logic color gold out2 e Display a user defined hex formatted bus named address add wave hex address a 7a 6a 5a 4a 3a _2a_1a_0 e Add all wave objects in the region add wave e Add all wave input ports in the region add wave in e Create a user defined b
237. fies a random pattern repeater Specifies a repeating pattern counter Specifies a counting pattern none Specifies a blank pattern e direction up down upthendown downthenup optional recommended when specifying pattern counter The direction in which the counter will increment or decrement up default Increment only down Decrement only upthendown Increment then decrement downthenup Decrement then increment e driver freeze deposit driver expectedoutput optional Specifies that the signal is a driver of the specified type Applies to waveforms created with portmode inout or portmode internal ModelSim Reference Manual v10 1c 389 Commands wave create 390 dutycycle lt value gt optional recommended for pattern clock Specifies the duty cycle of the clock Expressed as a percentage of the period that the clock is high lt value gt Any integer from 0 to 100 where the default is 50 endtime lt time gt lt unit gt optional The simulation time where the waveform will stop If omitted the waveform stops at 1000 simulation time units lt time gt Specified as an integer or decimal number lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt ti
238. file e quiet Disables Loading messages Optional e R lt simargs gt Instructs the compiler to invoke vsim after compiling the design The compiler automatically determines which top level modules are to be simulated The command line arguments following R are passed to the simulator not the compiler Place the R option at the end of the command line or terminate the simulator command line arguments with a single character to differentiate them from compiler command line arguments The R option is not a Verilog XL option but it is used by ModelSim to combine the compile and simulate phases together as you may be used to doing with Verilog XL It is not recommended that you regularly use this option because you will incur the unnecessary overhead of compiling your design for each simulation run Mainly it is provided to ease the transition to ModelSim e refresh Regenerates a library image Optional By default the work library is updated To update a different library use work lt library_name gt with refresh for example vlog work lt your_lib_name gt refresh If a dependency checking error occurs which prevents the refresh use the vlog force_refresh argument See vlog examples for more information You may use a specific design name with refresh to regenerate a library image for that design but you may not use a file name e sfcu Instructs the compiler to treat all files within a compilation command line
239. file at a specified interval delete 40 removes objects from either the List or Wave window ModelSim Reference Manual v10 1c Command name describe Commands Table 2 1 Supported Commands cont Action displays information about the specified HDL object disablebp do turns off breakpoints and when commands executes commands contained in a macro file drivers dumplog64 displays in the Main window the current value and scheduled future values for all the drivers of a specified VHDL signal or Verilog net dumps the contents of the vsim wif file in a readable format echo displays a specified message in the Main window edit enablebp invokes the editor specified by the EDITOR environment variable turns on breakpoints and when commands turned off by the disablebp command encoding translates between Unicode Tcl strings and a named encoding environment displays or changes the current dataset and region environment examine examines one or more objects and displays current values or the values at a specified previous time in the Main window exit find exits the simulator and the ModelSim application displays the full pathnames of all objects in the design whose names match the name specification you provide find infiles find insource searches the specified files and prints to the Transcript window those lines from the files that match the spe
240. filename gt optional Specifies the name of a bootstrap file containing names of DPI shared objects libraries to be loaded Refer to DPI File Loading for format information Sv_root lt dirname gt optional Specifies the directory name to be used as the prefix for DPI shared object lookups transport_int_delays optional Selects transport mode with pulse control for single source nets one interconnect path By default interconnect delays operate in inertial mode pulses smaller than the delay are filtered In transport mode narrow pulses are propagated through interconnect delays This option works for both Verilog and VITAL cells though the destination of the interconnect must be a Verilog cell The source may be VITAL or Verilog This option works independently from multisource_int_delays transport_path_delays optional Selects transport mode for path delays By default path delays operate in inertial mode pulses smaller than the delay are filtered In transport mode narrow pulses are propagated through path delays Note that this option affects path delays only and not primitives Primitives always operate in inertial delay mode typdelays default Selects the typical value in min typ max expressions Has no effect if you specified the min typ max selection at compile time If you specify the mindelays typdelays or maxdelays flag with vopt and specify a different flag with vsim the simulation
241. filtered In transport mode narrow pulses are propagated through interconnect delays This option works for both Verilog and VITAL cells though the destination of the interconnect must be a Verilog cell The source may be VITAL or Verilog This option works independently from multisource_int_delays e transport_path_delays optional Selects transport mode for path delays By default path delays operate in inertial mode pulses smaller than the delay are filtered In transport mode narrow pulses are propagated through path delays Note that this option affects path delays only and not primitives Primitives always operate in inertial delay mode e typdelays default Selects the typical value in min typ max expressions Has no effect if you specified the min typ max selection at compile time If you specify the mindelays typdelays or maxdelays flag with vopt and specify a different flag with vsim the simulation will be able to use the delay value based upon the flag specified with vopt You must specify vsim novopt to force the simulator to use the delay flag specified with vsim e vhdlvariablelogging optional This switch makes it possible for process variables to be logged recursively or added to the Wave and List windows process variables can still be logged or added to the Wave and List windows explicitly with or without this switch For example with this vsim switch log r will log process variables as long
242. foo 20 22 011 Set the Verilog register file_name to test2 txt Note that the quote marks are escaped with change file_name test2 txt e Set the time value of the mytimegeneric variable to 500 ps The time value is enclosed by curly braces or quotation marks because of the space between the value and the units change mytimegeneric 500 ps Related Topics force 90 ModelSim Reference Manual v10 1c Commands classinfo classinfo This command allows the user to access information about class types and instances available in the simulation You can view find and report statistics about class instances The following table summarizes the class viewing options Command Description classinfo find Reports on the current state of a particular class instance whether it exists has been destroyed or has not yet been created classinfo instances Displays the list of class items in the specified class classinfo report Prints a detailed report of a set of classes and their usage classinfo stats Displays statistics about the number of class types and instances classinfo types Displays the list of classes that match or do not match the specified pattern Syntax classinfo find tcl o lt outfile gt class instance name classinfo instances tcl o lt outfile gt classname classinfo report c fntpc m lt maxout gt o lt outfile gt sort a d f n tlp Ic tcl z classinfo s
243. g and shall not constitute subsequent consent waiver or excuse Rev 100615 Part No 246066
244. g0 functionArg optional All arguments required by the function are specified in a space separated list in declaration order If a function has default arguments the arguments may be omitted from the command line provided that the arguments occur at the end of the declaration list Function input arguments can be constant values including integers enumerated values and strings A string containing spaces or special characters must be enclosed in double quotes or braces or Tcl will try to interpret the string For example my string or my string Arguments can also be design objects Class references can be arguments specified by either their design instance path or class instance id string If a function has type inout out or ref arguments suitable user design objects must be passed in as arguments Any passed in argument will first be tested to determine if it is an appropriate constant value If it is not then the argument will be tested to determine if it is a design object Consequently where there is ambiguity between a constant string and the name of a design object the ModelSim Reference Manual v10 1c Commands call constant will be given precedence If in this case the design object is desired the full hierarchical path to the object can be supplied to differentiate it from the constant string Examples e Call using a static declaration path where the function sf_voidstring is a static class functio
245. glob lt word gt lt word gt regexp lt word gt lt word gt addressradix dec hex dataradix lt radix_type gt all replace lt word gt lt word gt startaddress lt address gt endaddress lt address gt lt path gt Arguments e glob lt word gt lt word gt required unless using regexp Specifies the value of the pattern accepting glob pattern syntax for the search lt word gt Any word pattern Multiple word patterns are specified as a space separated list Wildcards are accepted in the pattern This argument and regexp are mutually exclusive arguments e regexp lt word gt lt word gt required unless using glob Specifies the value of the pattern accepting regular expression syntax for the search lt word gt Any word pattern Wildcards are accepted in the pattern Multiple word patterns are specified as a space separated list This argument and glob are mutually exclusive arguments e addressradix dec hex optional Specifies the radix for the address being displayed dec Decimal default hex Hexadecimal e all optional Searches the specified memory range and returns all matching occurrences to the transcript By default only the first matching occurrence is printed e dataradix lt radix_type gt optional Specifies the radix for the memory data being displayed lt radix_type gt Can be specified as symbolic binary octal d
246. gt Value must be appropriate for the type of waveform you are creating e step lt value gt optional recommended when specifying pattern counter The step by which the counter is incremented decremented lt value gt Value must be appropriate for the type of waveform you are creating e type binary gray johnson onehot range zerohot optional Specifies a counter format binary Specifies a binary counter gray Specifies a binary counter where two successive values differ in only one bit Also known as a reflected binary counter johnson Specifies a twisted ring or Johnson counter onehot Specifies a shift counter where only one bit at a time is set to on 1 range default Specifies a binary counter where the values range between startvalue and endvalue zerohot Specifies a shift counter where only one bit at a time is set to off 0 e value lt value gt optional recommended when specifying pattern constant Specifies a value for the constant pattern lt value gt Value must be appropriate for the type of waveform you are creating e lt object_name gt required User specified name for the waveform Must be the final argument Examples e Create a clock signal with the following default values wave create pattern clock period 100 dutycycle 50 starttime 0 endtime 1000 initialvalue 0 counter clk e Create a constant 8 bit signal vector from 0 to 1000
247. gure Must be specified as the first argument to the configure command list Specifies the List widget wave Specifies the Wave widget ModelSim Reference Manual v10 1c 95 Commands configure lt option gt lt value gt bg lt color gt optional Specifies the window background color fg lt color gt optional Specifies the window foreground color selectbackground lt color gt optional Specifies the window background color when selected selectforeground lt color gt optional Specifies the window foreground color when selected font lt font gt optional Specifies the font used in the widget height lt pixels gt optional Specifies the height in pixels of each row Arguments List window only 96 delta all collapse events none optional Specifies how information is displayed in the delta column To use delta usesignaltriggers must be set to 1 on all Displays a new line for each time step on which objects change collapse Displays the final value for each time step events Displays an event column rather than a delta column and sorts List window data by event none Turns off the display of the delta column gateduration lt duration_open gt optional Extends gating beyond the back edge the last list row in which the expression evaluates to true The duration for gating to remain open beyond when gateexpr below becom
248. hange Dump file into a WLF file that you can display in ModelSim using the vsim view argument This command only works on VCD files containing positive time values Description The ved2wlf command functions as simple one pass converter If you are defining a bus in a VCD file you must specify all bus bits before the next scope or upscope statement appears in the file The best way to ensure that bits get converted together as a bus is to declare them on consecutive lines For example Line 21 Svar wire 1 in 2 Send Line 22 Svar wire Su in 1 Send Line 23 Svar wire 1 in 0 Send Arguments to this command are order dependent Please read the argument descriptions for more information Syntax vcd2wlf splitio splitio_in_ext lt extension gt splitio_out_ext lt extension gt nocase lt vcd filename gt lt wlf filename gt Arguments e splitio optional Specifies that extended VCD port values are to be split into their corresponding input and output components by creating two signals instead of just one in the resulting wlf file By default the new input component signal keeps the same name as the original port name while the output component name is the original name with __o appended to it e splitio_in_ext lt extension gt optional Adds an extension to input component signal names created by using splitio lt extension gt Specifies a string e splitio_out_ext lt extens
249. haracters are allowed Must be specified as the final argument to the delete list and delete wave commands Examples e Remove the object vec2 from the list2 window delete list window list2 vec2 e Remove all objects beginning with the string test from the Wave window delete wave test Related Topics add list e Wildcard Characters add wave 116 ModelSim Reference Manual v10 1c Commands describe describe This command displays information about the following types of simulation objects and design regions in the Transcript window e VHDL signals variables and constants e Verilog nets and registers e Design region VHDL signals Verilog nets and registers can be specified as hierarchical names Syntax describe lt name gt Arguments e lt name gt required The name of an HDL object for which you want a description Multiple object names are specified as a space separated list Wildcard characters are allowed HDL object names can be relative or full hierarchical names Examples Print the types of the three specified signals describe clk prw prdy Related Topics add list e Wildcard Characters e add wave ModelSim Reference Manual v10 1c 117 Commands disablebp disablebp This command turns off breakpoints and when commands To turn on breakpoints or when commands again use the enablebp command Syntax disablebp lt id gt lt label gt Arguments e lt id gt optional Sp
250. he compat argument As a result using this argument may affect your simulation results e ignorepragmaprefix lt prefix gt optional Directs vlog to ignore synthesis and coverage pragmas with the specified prefixname All affected pragmas will be treated as regular comments Edit the IgnorePragmaPrefix modelsim ini variable to set a permanent default lt prefix gt Specifies a user defined string e incdir lt directory gt Specifies directories to search for files included with include compiler directives Optional By default the current directory is searched first and then the directories specified by the incdir options in the order they appear on the command line You may specify multiple incdir options as well as multiple directories separated by in a single incdir option incr Performs an incremental compilation Optional Compiles only code that has changed For example if you change only one module in a file containing several modules only the changed module will be recompiled Note however that if the compile options change all modules are recompiled regardless of whether you use vlog incr or not e isymfile Generates a complete list of all imported tasks and functions TFs Used with DPI to determine all imported TFs that are expected by ModelSim e lt filename gt optional Generates a log file of the compile ModelSim Reference Manual v10 1c 335 Commands vlog libcell no
251. he current time period lt time_unit gt An optional suffix specifying a time unit where the default is to use the current simulator time by omitting lt time_unit gt Valid time units are fs ps ns us ms sec min and hr lt time_value gt and lt time_unit gt can be formatted in any of the following ways 10ns 10 ns 10 ns 10 ns Noe If you specify a sequence of forces and use curly braces surrounding a lt time_value gt and lt time_unit gt pair you must place a space in front of the comma separating the two value time pairs For example force foo 1 10 ns O0 20 ns Examples e Reporting all recently applied force commands If you specify this command with no arguments it returns a list of all forced objects and the changes applied For example after executing force freeze top p addr 0 100 1 150 r 200 cancel 2000 where the times specified are relative to the current simulation time in this case 2820 ns Entering force 148 ModelSim Reference Manual v10 1c Commands force returns force freeze top p addr 0 2920 ns 1 02970 ns repeat 803020 ns cancel 4820 ns Note Executing the force command translates the relative time you specified into absolute time Force input1 to 0 at the current simulator time force input1 0 Force the fourth element of the array bus to at the current simulator time force bus1 4 1 Force bus
252. he data type in the sequence will match the type stored in the memory For std_logic and associated types unsigned integer sequences are generated A seed value may be specified on the command line For any given seed the generated sequence is identical The interpretation of the pattern data is performed according to the default system radix setting However this can be overridden with a standard Verilog style lt radix_char gt lt data gt specification Syntax mem load infile lt infile gt filldata lt data_word gt infile lt infile gt endaddress lt end gt fillradix lt radix_type gt filltype dec inc rand value format bin hex mti lt path gt skip lt Nwords gt startaddress lt st gt truncate 166 ModelSim Reference Manual v10 1c Commands mem load Arguments infile lt infile gt required unless the filldata argument is used Updates memory data from the specified file lt infile gt The name of a memory file endaddress lt end gt optional Specifies the end address for a range of addresses to be loaded lt end gt Specified as any valid address in the memory filltype dec inc rand value optional use with the filldata argument Fills in memory addresses in an algorithmic pattern starting with the data word specified in filldata If a fill pattern is used without a file option the entire memory or specified address range is filled with th
253. he path separator should be a forward slash Optional Examples 348 e To produce a makefile for the work library vmake gt mylib mak Torun vmake on libraries other than work vmake mylib gt mylib mak To rebuild mylib specify its makefile when you run MAKE make f mylib mak To use vmake and MAKE on your work library C MIXEDHDL gt vmake gt makefile e To edit an HDL source file within the work library C MIXEDHDL gt make Your design gets recompiled for you You can change the design again and re run MAKE to recompile additional changes Torun vmake on libraries other than work C MIXEDHDL gt vmake mylib gt mylib mak e To rebuild mylib specify its makefile when you run MAKE C MIXEDHDL gt make f mylib mak ModelSim Reference Manual v10 1c Commands vmap vmap The vmap command defines a mapping between a logical library name and a directory by modifying the modelsim ini file With no arguments vmap reads the appropriate modelsim ini file s and prints to the transcript the current logical library to physical directory mappings This command provides additional information with the help switch Syntax vmap c del lt logical_name gt lt logical_name gt lt path gt modelsimini lt path modelsim ini gt Arguments C optional Copies the default modelsim ini file from the ModelSim installation directory
254. he vmake utility ModelSim Reference Manual v10 1c 327 Commands vlib e short optional Interchangeable with the dos argument e unix optional Specifies that subdirectories in a library may have long file names that are NOT compatible with DOS e long optional Interchangeable with the unix argument e lock unlock lt design_unit gt optional Locks an existing design unit so it cannot be recompiled or refreshed The unlock switch reverses this action File permissions are not affected by these switches e locklib unlocklib optional Locks a complete library so that compilation cannot target the library and the library cannot be refreshed The unlocklib switch reverses this action File permissions are not affected by these switches e lt name gt required Specifies the pathname or archive name of the library to be created Examples e Create the design library design You can define a logical name for the library using the vmap command or by adding a line to the library section of the modelsim ini file that is located in the same directory vlib design e Create the design library uut and specifies that any design units compiled into the library are created as archives Also specifies that each archive be compacted when 30 of its space is wasted vlib archive compact 3 uut 328 ModelSim Reference Manual v10 1c Commands vlog vlog The vlog command compiles Verilog source code and S
255. iations are accepted e lt pathname gt required Specifies the path to the virtual s you want to delete where wildcards are allowed Example e Delete all of the virtuals you have explicitly created virtual delete kind explicits Related Topics virtual signal virtual function e Virtual Objects 306 ModelSim Reference Manual v10 1c Commands virtual describe virtual describe This command prints to the transcript a complete description of the data type of one or more virtual signals Similar to the existing describe command Syntax virtual describe kind implicits explicits lt pathname gt Arguments e kind implicits explicits optional Transcripts only a subset of virtuals implicits virtual signals created internally by the product explicits virtual signals explicitly created by a user such as with the virtual signal command Unique abbreviations are accepted e lt pathname gt required Specifies the path to the virtual s for which you want descriptions where wildcards are allowed Example e Describe the data type of all virtuals you have explicitly created virtual describe kind explicits Related Topics virtual define virtual show e Virtual Objects ModelSim Reference Manual v10 1c 307 Commands virtual expand virtual expand This command prints to the transcript a list of all the non virtual objects contained in the specified virtual signal
256. ied factor The default factor is 2 0 wave zoom out Zoom out the wave display by the specified factor The default factor is 2 0 wave zoom full Zoom the wave display to show the full simulation time wave zoom last wave Zoom range Syntax Return to last zoom range Sets left and right edge of wave display to the specified start time and end time If times are not specified reports left and right edge times wave cursor active window lt win gt lt cursor num gt wave cursor add window lt win gt time lt time gt name lt name gt lock lt 0 1 gt wave cursor configure lt cursor num gt window lt win gt lt option gt lt value gt ModelSim Reference Manual v10 1c 385 Commands wave wave cursor delete window lt win gt lt cursor num gt wave cursor see window lt win gt at lt percent gt lt cursor num gt wave cursor time window lt win gt time lt time gt lt cursor num gt wave collapse all window lt win gt wave collapse cursor window lt win gt lt cursor num gt wave collapse range window lt win gt lt start time gt lt end time gt wave expand all window lt win gt wave expand cursor window lt win gt lt cursor num gt wave expand mode window lt win gt off deltas events wave expand range window lt win gt lt start time gt lt end time gt wave interrupt window lt win gt wave refresh
257. ies one or more numbers corresponding to the categories in Table 2 5 Multiple message categories are specified as a comma separated list Table 2 5 Warning Message Categories for vcom nowarn Category Description number unbound component process without a wait statement null range no space in time literal multiple drivers on unresolved signal VITAL compliance checks VitalChecks also works VITAL optimization messages lint checks 1 2 3 4 5 6 7 8 9 signal value dependency at elaboration VHDL 1993 constructs in VHDL 1987 code constructs that coverage can t handle locally static error deferred until simulation run oldconfigvis optional Forces veom to process visibility of VHDL component configurations consistent with prior releases Default behavior is to comply with Language Reference Manual visibility rules Refer to veom lrmVHDLConfigVis or the modelsim ini variable OldVHDLConfiguration Visibility for more information pedanticerrors optional Forces display of an error message rather than a warning on a variety of conditions Refer to Enforcing Strict 1076 Compliance for a complete list of these conditions This argument overrides nocasestaticerror and noothersstaticerror see above performdefaultbinding optional Enables default binding when it has been disabled via the RequireConfigForAl DefaultBinding option in the modelsim ini
258. ies that the delta column not be displayed when adding signals to the List window Identical to configure list delta none ModelSim Reference Manual v10 1c Commands add list e lt radix_type gt optional Specifies the radix type for the objects that follow in the command Valid entries or any unique abbreviations are binary ascii unsigned decimal octal hex symbolic time and default If no radix is specified for an enumerated type the default radix is used You can change the default radix for the current simulation using the radix command You can change the default radix permanently by editing the DefaultRadix variable in the modelsim ini file If you specify a radix for an array of a VHDL enumerated type ModelSim converts each signal value to 1 0 Z or X e radix lt type gt optional Specifies a user defined radix The radix lt type gt switch can be used in place of the lt radix_type gt switch For example radix hexadecimal is the same as hex lt type gt binary ascii unsigned decimal octal hex symbolic time and default This option overrides the global setting of the default radix the DefaultRadix variable in the modelsim ini file for the current simulation only e radixenumnumeric This option overrides the global setting of the default radix the DefaultRadix variable in the modelsim ini file e radixenumsymbolic optional Reverses the action of radixenumnumeric and se
259. if any Multiple commands should be separated by semi colons donotcollapsepartiallydriven optional Prevents the collapse of partially driven and undriven output ports during optimization Prevents incorrect values that can occur when collapsed dumpports collapse dumpports nocollapse optional Determines whether vectors VCD id entries in dumpports output are collapsed or not The default behavior is collapsed and can be changed by setting the DumpportsCollapse variable in the modelsim ini file dumpports direction optional Modifies the format of extended VCD files to contain direction information ModelSim Reference Manual v10 1c Commands vsim e dumpports no_strength_range optional Ignores strength ranges when resolving driver values for an extended VCD file This argument is an extension to the IEEE 1364 specification Refer to Resolving Values for additional information e dumpports unique optional Generates unique VCD variable names for ports in a VCD file even if those ports are connected to the same collapsed net e enumfirstinit optional Initializes enum variables in SystemVerilog using the leftmost value as the default You must also use the argument with the vlog command in order to implement this initialization behavior Specify the EnumBaselInit variable as 0 in the modelsim ini file to set this as a permanent default e error lt msg_number gt lt msg_number gt op
260. ifies that the scope of the listing is to include ports of modes IN OUT or INOUT internal optional For use with wildcard searches Specifies that the scope of the search is to include internal objects non port objects if they match the object_name specification label lt name gt optional Specifies an alternative name for the signal being added For example add wave label c clock adds the clock signal labeled as c This alternative name is not valid in a force or examine command max lt real_num gt optional Specifies the maximum Y axis data value to be displayed for an analog waveform Used in conjunction with the min switch the value you specify for max must be greater than the value you specify for min lt real_num gt Any integer that is greater than the value specified for min ModelSim Reference Manual v10 1c Commands add wave min lt real_num gt optional Specifies the minimum Y axis data value to be displayed for an analog waveform Used in conjunction with the max switch the value you specify for min must be less than the value you specify for max lt real_num gt Any integer that is less than the value specified for max For example if you know the Y axis data for a waveform varies between 0 0 and 5 0 you could add the waveform with the following command add wave analog min 0 max 5 height 100 my_signal Note Although offset and scale are still supp
261. ign as a parameter to begin_transaction is irrelevant For example a stream could have logging disabled between T1 and T2 and still record a transaction in that period through retroactive logging after time T2 A transaction is always either entirely logged or entirely ignored Arguments to this command are order dependent Please read through the argument descriptions for more information Note The log command is also known as the add log command Syntax log howmany in inout out ports internal out ports recursive depth lt level gt lt object_name gt log flush lt object gt Arguments e depth lt level gt optional Restricts a recursive search specified with the recursive argument to a certain level of hierarchy lt level gt Any non negative integer For example if you specify depth 1 the command descends only one level in the hierarchy e flush lt object gt optional Forced the WLF file to write all buffered region and event data to the WLF file By default the region and event data is buffered and periodically written to the file as appropriate If lt object gt is specified that object is first logged and then the file is flushed 156 ModelSim Reference Manual v10 1c Commands log e howmany optional Returns an integer indicating the number of signals found e in optional Specifies that the WLF file is to include data for ports of m
262. ignify command substitution Consider the following example set aluinputs find in alu ModelSim Reference Manual v10 1c 13 Syntax and Conventions Design Object Names ModelSim evaluates the find command first and then sets variable aluinputs to the result of the find command Obviously you don t want this type of behavior when specifying an array slice so you would use curly brace escape characters add wave s abc data_in 10 1 You must also use the escape characters if using VHDL syntax with spaces add wave s abc data_in 10 downto 1 For complete details on Tcl syntax refer to Tcl Command Syntax SystemVerilog Scope Resolution Operator SystemVerilog offers the scope resolution operator double colon for accessing classes within a package and static data within a class The example below shows various methods of using this operator as well as alternatives using standard hierarchical references Example 1 1 SystemVerilog Scope Resolution Operator Example package myPackage class packet static int a 0 1 1 2 int b 0 1 int c function new b 0 b 1 c a lO endfunction endclass endpackage myPackage 33 4 We module top myPackage packet my new int myint my a 1 endmodule The following examine examples access data from the class packet examine myPackage packet a examine top my a Both of the above commands return the contents of the static array a within class
263. ildcardFilter Preference Variable for more information Table 1 3 identifies these supported wildcard characters Table 1 3 Wildcard Characters in HDL Object Names Character Syntax Description matches any sequence of characters matches any single character matches any one of the enclosed characters a hyphen can be used to specify a range for example a z A Z 0 9 can be used only with the find command Note A wildcard character does not match a path separator For example dut will match dut siga and dut clk However dut will not match either of those Using the WildcardFilter Preference Variable The WildcardFilter preference variable controls which object types are excluded when performing wildcard matches with simulator commands The WildcardFilter preference variable is a Tcl List and can be modified using Tcl commands You can add both individual 18 ModelSim Reference Manual v10 1c Syntax and Conventions Wildcard Characters Figure 1 4 and group variables Figure 1 5 to the current variable list and you can remove individual variables from the current list Note Your WildcardFilter settings are persistent from one invocation to the next Procedure Determining the Current WildcardFilter Variable Settings Enter one of the following commands set WildcardFilter or echo WildcardFilter which returns the list of currently set variables Changing the WildcardFilt
264. in the User s Manual for more information e datasetSeparator is the character used to terminate the dataset name The default is colon though a different character other than backslash may be specified as the dataset separator via the DatasetSeparator variable in the modelsim ini file This character must be different than the pathSeparator character e pathSeparator is the character used to separate hierarchical object names Normally a backslash is used for VHDL and a period is used for Verilog although other characters except a backslash may be specified via the PathSeparator variable in the modelsim ini file This character must be different than the datasetSeparator Neither 12 ModelSim Reference Manual v10 1c Syntax and Conventions Design Object Names nor can be used when referring to the contents of a SystemVerilog package or class e hierarchicalPath is a set of hierarchical instance names separated by a path separator and ending in a path separator prior to the objectName For example top proc clk e objectName is the name of an object in a design e elementSelection indicates some combination of the following o Array indexing Single array elements are specified using either parentheses or square brackets around a single number You must also surround the object and specified array element with curly braces Refer to Tcl Syntax and S
265. indow layout maximized return a 1 if the current layout is maximized or a 0 if minimized layout restoretype removes the list of window type s that will not be restored when a new layout is loaded layout save saves the current layout to the specified name layout showsuppresstypes lists the window types that will not be restored when a new layout is loaded layout suppresstype adds the specified window type s to the list of types that will not be restored when a layout is reloaded layout togglezoom toggles the current zoom state of the active window from minimized to maximized or maximized to minimized layout zoomactive maximizes the current active window layout zoomwindow maximizes the specified window layout active layout current layout delete lt name gt layout load lt name gt layout names layout normal layout maximized layout restoretype lt window gt 154 ModelSim Reference Manual v10 1c Commands layout layout save lt name gt layout showsuppresstypes layout suppresstype lt window gt layout togglezoom layout zoomactive layout zoomwindow lt window gt Arguments e lt name gt required Specifies the name of the layout e lt window gt required The window specification can be any format accepted by the view command The window can be specified by its type 1 e wave list objects etc by the windowobj name i e main_pane wave main_pain
266. ing 364 ModelSim Reference Manual v10 1c JKLMNOPQRSTUVWX YZ search libraries 358 searching binary signal values in the GUI 37 List window signal values transitions and names 27 VHDL arrays 26 searchlog command 222 see command 225 setenv command 226 shared objects loading with global symbol visibility 357 shift command 227 shortcuts command history 24 command line caveat 24 show command 228 signals alternative names in the Wave window label 62 attributes of using in expressions 30 breakpoints 406 combining into a user defined bus 64 drivers of displaying 121 environment of displaying 128 force time specifying 148 log file creating 156 pathnames in VSIM commands 12 radix specifying for examine 53 63 132 readers of displaying 211 stimulus 145 values of examining 130 simstats command 229 simulating delays specifying time units for 22 design unit specifying 351 saving simulations 156 367 stopping simulation in batch mode 411 simulations saving results 112 113 Simulator commands 48 simulator resolution vsim t argument 364 445 ABCDEFGHIJKLMNOPQRSTUVWXY2Z simulator version 367 381 simultaneous events in Verilog changing order 331 spaces in pathnames 12 sparse memories listing with write report 430 specify path delays 377 stack down command 231 stack frame command 232 stack level command 233 stack tb command 234 stack up command 235 startup altern
267. ing to be matched e lt startTime gt lt unit gt required Specifies the simulation time at which to start the search The time is specified as an integer or decimal number Must be placed immediately before the lt pattern gt argument lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid VHDL time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces e lt pattern gt Required unless the expr argument is used Specifies one or more signal names or wildcard patterns of signal names to search on Must be specified as the final argument to the searchlog command Related Topics virtual signal virtual log virtual nolog e e e e GUI_expression_format 224 ModelSim Reference Manual v10 1c Commands see see This command displays the specified number of source file lines around the current execution line and places a marker to indicate the current execution line If specified without arguments five lines will be displayed before and four lines after Syntax see lt n gt lt pre gt lt post gt Arguments e lt n gt optional Designates the number of lines to display before and after the current execution line e lt pre gt optional Designates the number of lines to display before the current execut
268. integer gt optional Quits the simulation and issues an exit code lt integer gt This is the value of the exit code You should not specify an exit code that already exists in ModelSim Refer to the section Exit Codes in the User s Manual for a list of existing exit codes You can also specify a variable in place of lt integer gt You should always print a message before running the quit code command to explicitly state the reason for exiting Examples Refer to the Examples section of the exit command for an example of using the code argument The quit and exit commands behave similarly in this regard ModelSim Reference Manual v10 1c 201 Commands radix radix This command specifies the default radix to be used for the current simulation Specifying the command with no argument returns the current radix setting The command can be used at any time The specified radix is used for all commands force examine change etc as well as for displayed values in the Objects Locals Dataflow List and Wave windows as well as the Source window in the source annotation view Alternate methods for changing the default radix Inthe modelsim ini file edit the DefaultRadix variable e Choose Simulate gt Runtime Options from the main menu click the Defaults tab make your selection in the Default Radix box Syntax radix binary fpoint octal decimal hexadecimal unsigned ascii time e
269. ion keepstdout optional For use with foreign programs Instructs the simulator to not redirect the stdout stream to the Main window l lt filename gt optional Saves the contents of the Transcript window to lt filename gt Default is taken from the TranscriptFile variable initially set to transcript in the modelsim ini You can also specify stdout or stderr as lt filename gt L lt library_name gt optional Specifies the library to search for design units instantiated from Verilog and for VHDL default component binding Refer to Library Usage for more information If multiple libraries are specified each must be preceded by the L option Libraries are searched in the order in which they appear on the command line Lf lt library_name gt optional Same as L but libraries are searched before uselib directives Refer to Library Usage for more information lib lt libname gt optional Specifies the default working library where vsim will look for the design unit s Default is work msglimit lt msg_number gt lt msg_number gt optional Limits the number of iterations of the specified message s to five then suppresses all new instances Refer to Suppressing VSIM Warning Messages for more information lt msg_number gt lt msg_number gt Specifies the message number s to limit to five iterations Multiple messages are specified as a comma s
270. ion gt optional Adds an extension to output component signal names created by using splitio lt extension gt Specifies a string e nocase optional Converts all alphabetic identifiers to lowercase ModelSim Reference Manual v10 1c 273 Commands ved2wif lt vcd filename gt required Specifies the name of the VCD file or standard input you want to translate into a WLF file Must be specified immediately preceding the lt wlf filename gt argument to the ved2wlf command lt wlf filename gt required Specifies the name of the output WLF file Must be specified as the final argument to the ved2wlf command Example e Concatenate my vcd file and pipe standard input to ved2wlf and save output to my wlf file cat my vcd vcd2wif my wlf e Redirect input from the file my vcd file to ved2wlf and save the output to my w f file vcd2wif my wlf lt my vcd Related Topics 274 ved add ved checkpoint ved comment vcd dumpports ved dumpportsall vcd dumpportsflush vcd dumpportslimit vcd dumpportsoff vcd dumpportson vcd file ved files ved flush ved limit ved off ved on DumpportsCollapse Value Change Dump VCD Files Verilog tasks are documented in the Language Reference Manual IEEE 1364 standard ModelSim Reference Manual v10 1c Commands vcom vcom The vcom command compiles VHDL source code into a specified working library or to the work library by default
271. ion line e lt post gt optional Designates the number of lines to display after the current execution line Example e Display 2 lines before and 5lines after the current execution line see 25 Returns 93 if verbose display Read Write test done gt 94 stop 1 95 gt 3 end end 98 or2 il 99 y t_set Se H HHH H H Ko oO ModelSim Reference Manual v10 1c 225 Commands setenv setenv This command changes or reports the current value of an environment variable The setting is valid only for the current ModelSim session Arguments to this command are order dependent Please read the argument descriptions for more information Syntax setenv lt varname gt lt value gt Arguments e lt varname gt required The name of the environment variable you wish to set or check Must be specified as the first argument to the setenv command e lt value gt optional The new value for lt varname gt If you do not specify a value ModelSim reports the variable s current value Related Topics unsetenv e printenv 226 ModelSim Reference Manual v10 1c Commands shift shift This command shifts macro parameter values left one place so that the value of parameter 2 is assigned to parameter 1 the value of parameter 3 is assigned to 2 and so on The previous value of 1 is discarded The shift command and macro parameters are used in macro files If a macro file req
272. iption UI registration calls Verilog system tasks specific to this product are typically included in verification packages such as AVM and OVM so that key information about the packages is available when debugging the simulation The UI registration calls include 250 e ui_VVInstallInst Defines a region in the context tree which will appear in the Structure window e ui_VVInstallObj Adds an object to the defined parent which will appear in the Objects window when the parent instance is selected in the Structure window e ui_VVInstallPort Adds a port that is an object that connects to another component which will appear in the Objects window when the parent instance is selected in the Structure window e ui_VVSetFilter Specifies which class properties should not be shown in the GUI ModelSim Reference Manual v10 1c Commands ui_VVMode e ui_VVSetAllow Specifies which class properties should be retained that were filtered out with ui_VVSetFilter ModelSim Reference Manual v10 1c 251 Commands unsetenv unsetenv This command deletes an environment variable The deletion is not permanent it is valid only for the current ModelSim session Syntax unsetenv lt varname gt Arguments e lt varname gt required The name of the environment variable you wish to delete Related Topics setenv e printenv 252 ModelSim Reference Manual v10 1c Commands vcd add vcd add
273. irectory gt work ModelSim Reference Manual v10 1c Ht Ht Source File top v Timescale ins ins Occurrences 1 Module proc Architecture fast Library lt directory gt work Source File proc v Timescale ins ins Occurrences 1 ModelSim Reference Manual v10 1c Commands write report 431 Commands write timing write timing This command displays path delays and timing check limits unadjusted for delay net delays for the specified instance When the write timing command reports interconnect delays on a Verilog module instance you will see either MIPDs Module Input Port Delays or MITDs Module Transport Port Delays reported If you specify either the multisource_int_delays or the transport_int_delays switch with the vsim command INTERCONNECT delays will be reported as MITDs Otherwise they will be reported as MIPDs An MIPD report may look like the following top ul mymod src 5 test v 18 MIPD s Port clk_in 6 6 6 An MITD report may look like the following top ul mymod src 5 test v 18 MITDs to port clk_in From port top p y 6 Syntax write timing recursive file lt filename gt lt instance_name1 gt lt instance_nameN gt simvalues Arguments e file lt filename gt optional Specifies the name of the output file where the data is to be written If the file argument is omitted timing informa
274. irtual function virtual function gate chip siga XOR rtl chip siga siga_diff e Create a virtual signal consisting of the logical AND function of top signalA with top signalB and delays it by 10 ns virtual function delay 10 ns top signalA AND top signalB myDelayAandB e Create a one bit signal outbus_diff which is non zero during times when any bit of chip outbus in the gate level version doesn t match the corresponding bit in the rtl version This expression uses the OR reduction operator which takes the logical OR of all the bits of the vector argument virtual function gate chip outbus XOR rtl chip outbus outbus_diff Commands fully compatible with virtual functions add log and log delete describe examine find restart searchlog show Commands not compatible with virtual functions drivers force noforce vcd add when Related Topics virtual count e virtual define virtual delete virtual describe virtual expand virtual hide e virtual log virtual nohide e virtual nolog virtual region virtual save virtual show virtual signal virtual type e Virtual Objects ModelSim Reference Manual v10 1c 311 Commands virtual hide virtual hide This command causes the specified real or virtual signals to not be displayed in the Objects window This is used when you want to replace an expanded bus with a user defined bus You make the signals reappear using the virtual
275. ite or append that have identical names noglitch optional Disables VITAL glitch generation Refer to VHDL Simulation for additional discussion of VITAL no_glitch_msg optional Disable VITAL glitch error messages novhdlvariablelogging optional This switch turns off the ability to log recursively or add process variables to the Wave or List windows Refer to vhdlvariable logging and VhdlVariableLogging modelsim ini variable for more information std_input lt filename gt optional Specifies the file to use for the VHDL TextlO STD_INPUT file std_output lt filename gt optional Specifies the file to use for the VHDL TextIO STD_OUTPUT file ModelSim Reference Manual v10 1c Commands vsim e strictvital optional Specifies to exactly match the VITAL package ordering for messages and delta cycles Useful for eliminating delta cycle differences caused by optimizations not addressed in the VITAL LRM Using this argument negatively impacts simulator performance e togglemaxintvalues lt int gt optional Specifies the maximum number of VHDL integer values to record for toggle coverage This limit variable may be changed on a per signal basis The default value of lt int gt is 100 values e transport_int_delays optional Selects transport mode with pulse control for single source nets one interconnect path By default interconnect delays operate in inertial mode pulses smaller than the delay are
276. ith minimum typical or maximum timing lt delayScale gt scales all values by the specified value For example if you specify sdfmax 1 5 all maximum values in the SDF file are scaled to 150 of their original value ModelSim Reference Manual v10 1c Commands vsim lt instance gt specifies a specific instance for the associated SDF file Use this when not performing backannotation at the top level lt sdf_filename gt specifies the file containing the SDF information e sdfminr sdftypr sdfmaxr lt delayScale gt lt instance gt lt sdf_filename gt optional Specifies when an instance of a Preoptimized Design Unit vopt pdu formerly bbox with an associated default SDF file is to be re annotated with minimum typical or maximum timing from the specified SDF file lt delayScale gt scales all values by the specified value For example if you specify sdfmax 1 5 all maximum values in the SDF file are scaled to 150 of their original value lt instance gt specifies a specific instance for the associated SDF file Use this when not performing back annotation at the top level lt sdf_filename gt specifies the file containing the SDF information Noe a The simulator assumes that the instance timing object hierarchy in the new SDF file is compatible with the SDF file specified together with vopt pdu black boxing The following is a simple usage flow Assume module t
277. itted the search is limited to the selected region You can use the depth argument to specify how many levels of the hierarchy to descend reset optional Turns logging back on for all unlogged signals lt object_name gt optional Specifies the object name which you want to unlog Multiple object names may be specified as a space separated list Wildcard characters are allowed Examples e Unlog all objects in the design nolog r Turn logging back on for all unlogged signals nolog reset Related Topics add list e log e add wave 182 ModelSim Reference Manual v10 1c Commands notepad notepad This command opens a simple text editor It may be used to view and edit ASCH files or create new files This mode can be changed from the Notepad Edit menu Returns nothing Syntax notepad lt filename gt r edit Arguments e lt filename gt optional Name of the file to be displayed e r optional Specifies read only mode e edit optional Specifies editing mode Will not save changes to an existing file that has the Read only attribute turned on default ModelSim Reference Manual v10 1c 183 Commands noview noview This command closes a window in the ModelSim GUI To open a window use the view command Syntax noview lt window_name gt Arguments e lt window_name gt required Specifies the window s to close Multiple window types may be specified in a space s
278. itten pattern A standard TCL glob expression used as a search string e sort ald flnitiplic Specifies whether the report information is sorted in ascending or descending order and which column to sort by Only one column can be specified for sorting a Sort the entries in ascending order d Sort the entries in descending order f Sort by the Full Path column n Sort by the Class Name column t Sort by the Total column p Sort by the Peak column c Sort by the Current column e tcl Returns a tcl list instead of formatted output e x Display classes that do not match the pattern e Z Remove all items from the report with a total instance count of zero Example List the full path of the class types that do not match the pattern uvm vsim gt classinfo types x uvm Returns environment_pkg test_predictor environment_pkg threaded_scoreboard mem_agent_pkg mem_agent 92 ModelSim Reference Manual v10 1c Commands classinfo mem_agent_pkg mem_config mem_agent_pkg mem_driver e Display the current number of class types the maximum number peak number and current number of all class instances vsim gt classinfo stats Returns class type count 451 class instance count total 2070 class instance count peak 1075 class instance count current 1058 e List the current instances for the class type mem_item vsim gt classinfo instances mem_item Retu
279. klib unlocklib lt name gt Arguments archive compact lt percent gt optional Stores design units that are compiled into the created library in archives rather than in subdirectories Refer to Archives for more details You may optionally specify a decimal number between 0 and that denotes the allowed percentage of wasted space before archives are compacted By default archives are compacted when 50 5 of their space is wasted See an example below compact optional Specifies the percentage amount of wasted space before the archives are compacted where the default is 50 0 5 lt percent gt specified as a decimal number betwen 0 and 1 format 113 optional Prepares a library for conversion to be compatible with a previous release by altering the _info file 1 allows you to convert a library to be compatible with the 6 2 series and earlier 3 allows you to convert a library to be compatible with the 6 3 series and newer The usage flow would be 1 Using a current release of the simulator run vlib format 1 current_lib vcom refresh work current_lib to prepare current_lib for conversion back to a 6 2 release 2 Using a 6 2 release of the simulator run vcom refresh work current_lib to refresh current_lib for use with the previous release dos optional Specifies that subdirectories in a library have names that are compatible with DOS Not recommended if you use t
280. l Specifies the name of the dataset or alias for which you want information If you do not specify a dataset name ModelSim uses the dataset of the current environment Related Topics dataset alias e dataset rename dataset clear e dataset restart dataset close e dataset save dataset config e dataset snapshot dataset list environment e e e e e e dataset open ModelSim Reference Manual v10 1c 107 Commands dataset list dataset list This command lists all active datasets Syntax dataset list long Arguments e long optional Lists the dataset name followed by the wlf file to which the dataset name is mapped Related Topics dataset alias dataset clear dataset close dataset config dataset info dataset open dataset rename dataset restart dataset save dataset snapshot 108 ModelSim Reference Manual v10 1c Commands dataset open dataset open This command opens a WLF file either the currently running vsim wlf or a saved WLF file and or UCDB file representing coverage data and assigns it the logical name that you specify The file may be the WLF file for a currently running simulation To close a dataset use dataset close Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax dataset open lt file_name gt lt dataset_name gt Arguments e lt file_name gt required Specifies the WLF file or UCDB file to open as a
281. l radix e time lt time gt optional Specifies the time value between 0 and now for which to examine the objects lt time gt A non negative integer where the default unit is the current time unit If the lt time gt field uses a unit other than the current unit the value and unit must be placed in curly braces For example the following are equivalent for ps resolution exa time 3 6 ns signal_a exa time 3600 signal_a If an expression is specified it will be evaluated at that time The objects to be examined must be logged via the add list add wave or log command in order for the examine command to be able to return a value for a requested time value default Returns value s as a curly braces separated Tcl list Use to toggle off a previous use of name Examples e Return the value of top bus examine top bus1 e Return the value of the subelement of rega that is specified by the index i e 16 Note that you must use curly braces when examining subelements examine rega 16 e Return the value of the contiguous subelements of foo specified by the slice i e 20 22 Note the curly braces examine foo 20 22 e Note that when specifying an object that contains an extended identifier as the last part of the name there must be a space after the closing and before the closing examine top My extended id e In this example the expr option specifies a signal path and user defined T
282. lay_mode_path delay_mode_unit delay_mode_zero dpiforceheader dpiheader lt filename gt E lt filename gt Edebug lt filename gt enumfirstinit Epretty lt filename gt error lt msg_number gt lt msg_number gt f lt filename gt force_refresh lt design_unit gt fsmimplicittrans nofsmimplicittrans fsmresettrans nofsmresettrans fsmsingle nofsmsingle fsmverbose b t w fsmxassign nofsmxassign gen_xml lt design_unit gt lt filename gt hazards ignorepragmaprefix lt prefix gt incdir lt directory gt incr noincr isymfile ModelSim Reference Manual v10 1c 329 Commands vlog 1 lt filename gt libcell nolibcell libext lt suffix gt libmap lt pathname gt libmap_verbose librescan line lt number gt lint Irmclassinit maxdelays mindelays mixedansiports mixedsvvh b s v mfcu sfcu modelsimini lt ini_filepath gt nodbgsym noexcludeternary lt design_unit gt noForceUnsignedToVhdIInteger nologo nospecify note lt msg_number gt lt msg_number gt notimingchecks novtblfixup nowarn lt CODE gt nowarn lt category_number gt oldsv override_timescale lt time_unit gt lt time_precision gt O0 pedanticerrors permissive permit_defunct_sv printinfilenames quiet R lt simargs gt refresh source s sv svex
283. ld scripts project compileall 198 ModelSim Reference Manual v10 1c Commands pwd pwd This Tcl command displays the current directory path in the Transcript window Syntax pwd Arguments e None ModelSim Reference Manual v10 1c 199 Commands quietly quietly This command turns off transcript echoing for the specified command Syntax quietly lt command gt Arguments e lt command gt required Specifies the command for which to disable transcript echoing Any results normally echoed by the specified command will not be written to the Transcript window To disable echoing for all commands use the transcript command with the quietly option Related Topics transcript 200 ModelSim Reference Manual v10 1c Commands quit quit This command exits the simulator If you want to stop the simulation using a when command you must use a stop command within your when statement you must not use an exit or a quit command The stop command acts like a breakpoint at the time it is evaluated Syntax quit f force sim code lt integer gt Arguments f force optional Quits without asking for confirmation If omitted ModelSim asks you for confirmation before exiting The f and force arguments are equivalent sim optional Unloads the current design in the simulator without exiting ModelSim All files opened by the simulation will be closed including the WLF file vsim wif code lt
284. le and verbose You must specify verbose separately certe Enables the integration of the elaborated design in the Certe tool Disables Certe features when specified as certe disable Prevents the UVM Aware debug package from being loaded Changes the results of randomized values in the simulator msglog Enables messages logged in UVM to be integrated into the Message Viewer You must also enable wlf message logging by specifying tran or wlf with vsim msgmode Disables message logging when specified as msglog none Turns off all UVM Aware debug features Useful when multiple uvmcontrol options are specified in a separate script makefile or alias and you want to be sure all UVM debug features are turned off struct default Enables UVM component instances to appear in the Structure window UVM instances appear under uvm_root in the Structure window Disables Structure window support when specified as struct trlog Enables or disables UVM transaction logging Logs UVM transactions for viewing in the Wave window Disables transaction logging when specified as trlog verbose Sends UVM debug package information to the transcript Does not affect functionality Must be specified separately Arguments may be specified as multiple instances of uvmcontrol Multiple arguments are specified as a comma separated list without spaces For example vsim uvmcontrol all trlog enables all UVM features except
285. le with more command line arguments Allows complex argument strings to be reused without retyping Allows gzipped input files Nesting of f options is allowed lt filename gt Refer to the section Argument Files for more information ModelSim Reference Manual v10 1c 277 Commands vcom 278 fatal lt msg_number gt lt msg_number gt optional Changes the severity level of the specified message s to fatal Edit the fatal variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information lt msg_number gt A number identifying the message Multiple message numbers are specified as a comma separated list force_refresh lt design_unit gt optional Forces the refresh of all specified design units By default the work library is updated use work lt library_name gt in conjunction with force_refresh to update a different library for example vcom work lt your_lib_name gt force_refresh lt design_unit gt When the compiler refreshes a design unit it checks each dependency to ensure its source has not been changed and recompiled Sometimes the dependency checking algorithm changes from release to release This can lead to false errors during the integrity checks performed by the refresh argument An example of such a message follows Error vsim 13 Recompile u test dware dware_61le_beta dwpackages because home us
286. libcell libcell Treats all modules found and compiled by source library search as though they contained a celldefine compiler directive thus marking them as cells refer to the v and y arguments of vlog which enable source library search Using the libcell argument matches historical behavior of Verilog XL with respect to source library search Optional nolibcell default Disables treating all modules found and compiled by source library search as though they contained a celldefine compiler directive That is this argument restores the default library search behavior if you have changed it using the libcell nolibcell argument Optional Note 336 By default wildcard logging and code coverage exclude cells For more information refer to the nocovercells and covercells arguments of vlog and to the description of wildcard logging performed by the log command libext lt suffix gt Works in conjunction with the y option Specifies file extensions for the files in a source library directory Optional By default the compiler searches for files without extensions If you specify the libext argument then the compiler will search for a file with the suffix appended to an unresolved name You may specify only one libext option but it may contain multiple suffixes separated by the plus character The extensions are tried in the order you specify them with the libext argument libmap lt pathname g
287. library etc or by the tab name 1 e wavel list3 etc Related Topics e Customizing the Simulator GUI Layout e Configuring Default Windows for Restored Layouts ModelSim Reference Manual v10 1c 155 Commands log log This command creates a wave log format WLF file containing simulation data for all HDL objects whose names match the provided specifications Objects that are displayed using the add list and add wave commands are automatically recorded in the WLF file By default the file is named vsim wlf and stored in the current working directory You can change the default name using the wlf option of the vsim command or by setting the WLFFilename variable in the modelsim ini file If no port mode is specified the WLF file contains data for all objects in the selected region whose names match the object name specification The WLF file contains a record of all data generated for the list and wave windows during a simulation run Reloading the WLF file restores all objects and waveforms and their complete history from the start of the logged simulation run See dataset open for more information For all transaction streams created through the SCV or Verilog APIs logging is enabled by default A transaction is logged to the WLF file if logging is enabled at the beginning of a simulation run when the design calls begin_transaction or begin_transaction The effective start time of the transaction the time passed by the des
288. lied package ModelSim Reference Manual v10 1c Commands vcom noindexcheck optional Disables checking on indexing expressions to determine whether indexes are within declared array bounds e nologo optional Disables display of the startup banner e nonstddriverinit optional Forces ModelSim to match pre 5 7c behavior in initializing drivers in a particular case Prior to 5 7c VHDL ports of mode out or inout could have incorrectly initialized drivers if the port did not have an explicit initialization value and the actual signal connected to the port had explicit initial values Depending on a number of factors ModelSim could incorrectly use the actual signal s initial value when initializing lower level drivers Note that the argument does not cause all lower level drivers to use the actual signal s initial value It does this only in the specific cases where older versions used the actual signal s initial value noothersstaticerror optional Disables warnings that result from array aggregates with multiple choices having others clauses that are not locally static If pedanticerrors is specified this switch is ignored e norangecheck optional Disables run time range checking In some designs this results in a 2X speed increase Range checking is enabled by default or once disabled can be enabled using rangecheck If you run a simulation with range checking disabled any scalar values that are out of ra
289. lies filenames with a v or u suffix any combination of suffixes may be used Only referenced definitions will be compiled vlog top v libext v u y vlog_lib The work option specifies mylib as the library to regenerate refresh rebuilds the library image without using source code allowing models delivered as compiled libraries without source code to be rebuilt for a specific release of ModelSim e If your library contains VHDL design units be sure to regenerate the library with the vcom command using the refresh option as well Refer to Regenerating Your Design Libraries for more information vlog work mylib refresh The incr option determines whether or not the module source or compile options have changed as module v is parsed If no change is found the code generation phase is skipped Differences in compile options are determined by comparing the compiler options stored in the _info file with the compiler options given They must match exactly vlog modulel v u 00 incr ModelSim Reference Manual v10 1c 345 Commands vlog The timescale option specifies the default timescale for module1 v which did not have an explicit timescale directive in effect during compilation Quotes are necessary because the argument contains white spaces vlog modulel v timescale 1 ns 1 ps 346 ModelSim Reference Manual v10 1c Commands vmake vmake The vmake utility allows you to use a UNIX or Window
290. ll continue normally unless your command instructs the tool to quit for example onerror quit f or onerror break However if your onerror command is not successful the simulator will be halted for example onerrror add wave b when you don t have a signal named b The onerror command is executed when a Tcl command for example break encounters an error in the macro file that contains the onerror command note that a run command does not necessarily need to be in process Conversely OnErrorDefaultAction will run even if the macro does not contain a local onerror command This can be useful when you run a series of macros from one script and you want the same behavior across all macros Syntax onerror lt command gt lt command gt Arguments e lt command gt optional Any command can be used as an argument to onerror If you want to use more than one command use a semicolon to separate the commands or place them on multiple lines The entire command string must be placed in curly braces Example e Force the simulator to quit if an error is encountered while the macro is running onerror quit f ModelSim Reference Manual v10 1c 189 Commands onerror Related Topics e abort e Useful Commands for Handling e do Breakpoints and Errors onbreak e Macros DO Files resume status 190 ModelSim Reference Manual v10 1c Commands onfinish onfinish This command controls si
291. ll the time units in a ModelSim command need not be the same Unless you specify otherwise as in the examples above simulation time is always expressed using the resolution units that are specified by the UserTimeUnit variable By default the specified time units are assumed to be relative to the current time unless the value is preceded by the character which signifies an absolute time specification 22 ModelSim Reference Manual v10 1c Syntax and Conventions Argument Files Argument Files You can load additional arguments into some commands by using argument files which are specified with the f argument The following commands support the f argument vlog vcom vencrypt vmake vsim The f lt filename gt argument specifies a file that contains additional command line arguments The following sections outline some syntax rules for argument files e Single Quotes lt Allows you to group arbitrary characters so that no character substitution occurs within the quotes such as environment variable expansion or escaped characters tacc rn mymodule does not treat the as an escape character e Double Quotes Allows you to group arbitrary characters so that Tcl style backslash substitution and environment variable expansion is performed tacc rn mymodule VAR escapes the path separators and substitues your value of SVAR e Unquoted The following are notes on what
292. lob 16 Hbeef d hex replace 16 Hcafe st 7846 end 150000 uut u1 mem3 Returns 7846 cafe e Replace all occurrences of 16 Hbeef with 16 Habe in uut ul mem3 mem search glob 16 Hbeef r 16 Habe addressadix hex all uut u1 mem3 Returns ModelSim Reference Manual v10 1c Commands mem search 1lea5 2750 1lea6 2750 1877 2750 e Search for and print the first occurrence any pattern ending in f mem search glob f e Search for and print the first occurrence of this multiple word pattern mem search glob abe cafe uut u1 mem3 e Search for patterns 0000 0000 or 0001 0000 in m mem mem search data hex regexp 000 0 1 0 4 m mem all e Search for a pattern that has any number of Os followed by any number of 1s as a memory location and which has a memory location containing digits as the value mem search regexp 40 1 d m mem all Search for any initialized location ina VHDL memory mem search regexp U all lt vhdl_memory gt ModelSim Reference Manual v10 1c 175 Commands messages clearfilter messages Clearfilter This command removes any filter you have set in the Message Viewer Refer to the section Message Viewer Filter Dialog Box for additional information about filtering in the Message Viewer Syntax messages clearfilter Arguments e No arguments 176 ModelSim Reference Manual v10 1c Commands messages Setfilter messages setfilter This comman
293. lock waveform Specify an initial value duty cycle and clock period for the waveform wave modify pattern constant Generates a waveform with a constant value Specify a value wave modify pattern counter Generates a waveform from a counting pattern Specify start and end values repeat step count time period and type Binary Gray Johnson OneHot Range and ZeroHot wave modify pattern random Generates a random waveform based upon a seed value Specify the type normal or uniform an initial value and a seed value If you don t specify a seed value Questa uses a default value of 5 wave modify pattern repeater Generates a waveform that repeats Specify an initial value and pattern that repeats You can also specify how many times the pattern repeats wave modify pattern none Creates a placeholder for a waveform Specify an object name Syntax All waveforms wave modify driver freeze deposit driver expectedoutput endtime lt time gt lt unit gt initialvalue lt value gt portmode in out inout internal range lt msb Isb gt starttime lt time gt lt unit gt lt wave_name gt Clock patterns only wave modify pattern clock period lt value gt dutycycle lt value gt lt wave_name gt Constant patterns only wave modify pattern constant driver freeze deposit driver expectedoutput language vhdl verilog value lt value gt lt wave_name gt Counter patterns only
294. log register ScVariable SystemC variable Signal SpecParam VHDL signal Verilog specparam Time Verilog time registers Transaction Variable Transaction stream and stream arrays VHDL shared variables in packages and design units VirtualExpr Virtual expression VirtualSignal Virtual signal Table 1 5 provides a list of the group aliases of WildcardFilter arguments You can set a group value with the set command The expanded list of values is returned Table 1 5 WildcardFilter Argument Groups Group Argument Specific arguments included AIVHDL Signal Variable Constant Generic Alias AllVerilog Vars Parameter Reg Integer Time Real SpecParam Memory NamedEvent ClassReference AllVerilog VirtualSignals Net Parameter Reg Integer Time Real SpecParam Memory NamedEvent Class Cross Covergroup Coverpoint ClassReference VirtualSignal VirtualExpr SystemC ScVariable ANHDLSignals Signal Variable Constant Generic Alias Net Parameter Reg Integer Time Real SpecParam Memory NamedEvent VirtualSignal VirtualExpr ClassReference All Variables ANHDLSignalsVars Variable Constant Generic Alias Parameter Reg Integer Time Real SpecParam Memory NamedEvent ClassReference Signal Variable Constant Generic Alias Net Parameter Reg Integer Time Real SpecParam Memory NamedEvent VirtualSignal Virtu
295. lowed in the specification unless enclosed in quotes when specifying a string value Multiple g options are allowed one for each generic parameter specified as a space separated list ModelSim Reference Manual v10 1c 355 Commands vsim 356 lt Name gt Name of a generic parameter exactly as it appears in the VHDL source case is ignored or Verilog source Name may be prefixed with a relative or absolute hierarchical path to select generics in an instance specific manner For example specifying g top ul tpd 20ns on the command line would affect only the tpd generic on the top u instance assigning it a value of 20ns Specifying gu1 tpd 20ns affects the tpd generic on all instances named u Specifying gtpd 20ns affects all generics named tpd lt Value gt Specifies an appropriate value for the declared data type of a VHDL generic or any legal value for a Verilog parameter Make sure the value you specify fora VHDL generic is appropriate for VHDL declared data types Integers are treated as signed values For example gp 10 overwrites the parameter p with the signed value of 10 If more than one g option selects a given generic the most explicit specification takes precedence For example vsim g top ram ul tpd_hl 10ns gtpd_hl 15ns top This command sets tpd_hl to 10ns for the top ram u1 instance However all other tpd_hl generics on other instances will be set to 15ns Limitation In general generics parameter
296. lt file_size gt Size of WLF file in MB time lt n gt lt unit gt Required if size is not specified Specifies that a snapshot occurs based on simulation time Must be specified as the final argument to the dataset snapshot command lt n gt Any positive integer lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt limit gt and lt unit gt within curly braces Examples 114 e Create the file vsim_snapshot_ lt n gt wlf that is written to every time the current WLF file reaches a multiple of 10 MB i e at 10 MB 20 MB 30 MB etc dataset snapshot size 10 Similar to the previous example but in this case the current WLF file is cleared every time it reaches 10 MB dataset snapshot size 10 mode sequential e Assuming simulator time units are ps this command saves a file called gold_ lt n gt wilf every 1000000 ps If you run the simulation for 3000000 ps three files are saved gold_1 wlf with data from 0 to 1000000 ps gold_2 wif with data from 1000000 to 2000000 and gold_3 wif with data from 2000000 to 3000000 dataset snapshot time 1000000 file gold wlf mode sequential filemode increment Because this example sets the time interval to 1000000 ps if you run the simulation for 3500
297. lt multiplier gt lt time_unit gt tab lt tabfile gt tag lt string gt title lt title gt trace_foreign lt int gt transport_int_delays transport_path_delays typdelays ModelSim Reference Manual v10 1c Commands vsim usenonstdcoveragesavesysf uvmcontrol lt args gt v2k_int_delays vcdstim lt instance gt lt filename gt version vhdlvariablelogging view lt alias_name gt lt WLF_filename gt viewcov lt dataset_name gt lt UCDB_filename gt visual lt visual gt vital2 2b warning lt msg_number gt lt msg_number gt wlf lt file_name gt wlfcachesize lt n gt wlfcollapsedelta wlfcollapsetime nowlfcollapse wlfcompress nowlfcompress wlfdeleteonquit nowlfdeleteonquit wlflock nowlflock wlfopt nowlfopt wlfsimcachesize lt n gt wlfslim lt size gt wlftlim lt duration gt Arguments all languages assertfile lt filename gt optional Designates an alternative file for recording VHDL assertion messages An alternate file may also be specified by the AssertFile modelsim ini variable By default assertion messages are output to the file specified by the TranscriptFile variable in the modelsim ini file Refer to Creating a Transcript File for more information bitblast iopath tcheck optional Enables bit blasting of specify block iopaths and timing checks tchecks with wide atomic ports Withou
298. lt n gt optional Sets the size in megabytes of the WLF reader cache Does not affect the WLF write cache lt n gt Any non negative integer in MB where the default is 256 If you do not specify a value for lt n gt this switch returns the size in megabytes of the WLF reader cache e wlfdeleteonquit 0 I 1 optional Deletes the WLF file automatically when the simulation exits Valid for the current simulation dataset only 0 Disabled default 1 Enabled If you do not specify an argument this switch returns the current setting for the switch e wlfopt 011 optional Optimizes the display of waveforms in the Wave window 0 Disabled 1 Enabled default If you do not specify an argument this switch returns the current setting for the switch Examples Set the size of the WLF reader cache for the dataset gold to 512 MB dataset config gold wlfcachesize 512 104 ModelSim Reference Manual v10 1c Commands dataset config Related Topics e dataset alias e dataset rename e dataset clear dataset restart e dataset close e dataset save e dataset config e dataset snapshot e dataset info WLF File Parameter Overview e dataset list vsim J dataset open ModelSim Reference Manual v10 1c 105 Commands dataset current dataset current This command activates the specified dataset and sets the GUI context to the last selected context of the specified dataset All context depe
299. lt time gt lt unit gt optional The simulation time that the waveform should stop If omitted the waveform stops at 1000 simulation time units lt time gt Specified as an integer or decimal number lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces ModelSim Reference Manual v10 1c 401 Commands wave modify 402 endvalue lt value gt optional The ending value of the counter This option applies to Range counter patterns only All other counter patterns start from 0 and go to the max value for that particular signal for example for a 3 bit signal the start value will be 000 and end value will be 111 lt value gt Any positive integer Initialvalue lt value gt optional The initial value for the waveform Value must be appropriate for the type of waveform you are creating Not applicable to counter patterns lt value gt Any positive integer language vhdl verilog optional Controls which language is used for modifying the wave vhdl default Specifies the VHDL language verilog Specifies the Verilog language period lt value gt required The period of the signal portmode in out inout internal optional Th
300. ltiple filenames can be entered separated by spaces Wildcards can be used Default encryption pragmas will be used as described above if no encryption directives are found during processing e d lt dirname gt optional Specifies where to save encrypted Verilog files If no directory is specified current working directory will be used lt dirname gt Specifies the directory to contain the encrypted Verilog or SystemVerilog files The original file extension v for Verilog and sv for SystemVerilog will be preserved e e lt extension gt optional Specifies a filename extension lt extension gt Any alpha numeric string e f lt filename gt optional Specifies a file with more command line arguments Allows complex arguments to be reused without retyping Nesting of f options is allowed ModelSim Reference Manual v10 1c 293 Commands vencrypt Refer to the section Argument Files for more information lt filename gt Specifies the name of a file containing command line arguments e h lt filename gt optional Concatenates header information into all design files listed with lt filename gt Allows the user to pass a large number of files to the vencrypt utility that do not contain the pragma protect or protect information about how to encrypt the file Saves the user from editing hundreds of files to add in the same pragma protect to every file lt filename gt Specifies an existing file
301. lues are converted to a question mark and cause an error message Though the write tssi command was developed for use with std_ulogic any signal which uses only the values defined for std_ulogic including the VHDL standard type bit will be converted std_ulogic State SEF State Characters Crates Input Output Bidirectional U N X X N X 0 D L 0 1 U H 1 Z Z T F wW N X 2 L D L 0 H U H 1 ModelSim Reference Manual v10 1c 435 Commands write tssi std_ulogic State SEF State Characters Cnaractens Input Output Bidirectional N X Bidirectional logic values are not converted because only the resolved value is available The TSSI TDS ASCII In Converter and ASCII Out Converter can be used to resolve the directionality of the signal and to determine the proper forcing or expected value on the port Lowercase values x z w l and h are converted to the same values as the corresponding capitalized values Any other values will cause an error message to be generated the first time an invalid value is detected on a signal and the value will be converted to a question mark Note _ _ _ A The TDS ASCII In Converter and ASCII Out Converter are part of the TDS software ModelSim outputs a vector file and TSSI tools determine whether the bidirectional signals are
302. m the WLF file to the output WLF file adding or replacing the indexing and optimization information The different modes are intended to be used together For example you might run wlfman profile and identify a signal that accounts for 50 of the WLF file size If you don t actually need that signal you can then run wifman filter to remove it from the WLF file 418 ModelSim Reference Manual v10 1c Commands wlfman Syntax wlfman info lt source_wlffile gt v wlfman items lt source_wlffile gt n v wlfman filter o lt out_wlffile gt lt source_wlffile gt begin lt time gt end lt time gt compress nocompress f lt object_list_file gt index noindex r lt object gt opt noopt s lt symbol gt t lt resolution gt wlfman profile lt source_wlffile gt rank top lt number gt wlfman merge o lt out_wlffile gt lt wlffile1 gt lt wlffile2 gt compress nocompress index noindex opt noopt wlfman monitor f i lt intervalTime gt p lt endTime gt q v lt source_wlffile gt wlfman optimize o lt out_wlffile gt lt source_wlffile gt opt noopt Arguments o lt out_wlffile gt required Specifies the name of the output WLF file The output WLF file will contain all objects specified by the preceding arguments Output WLF files are always written in the latest WLF version regardless of the source WLF file version lt so
303. mand returns an error if the id number you specify is already assigned id lt id_number gt Any positive integer that is not already assigned label lt label gt Associates a name or label with the specified breakpoint Adds a level of identification to the breakpoint The label may contain special characters Quotation marks or braces are required only if lt label gt contains spaces or special characters 82 ModelSim Reference Manual v10 1c Commands bp Note ___J_O Id numbers for breakpoints are assigned from the same pool as those used for the when command So even if you have not specified a given id number for a breakpoint that number may still be used for a when command e inst lt region gt inst lt region gt optional Sets an HDL breakpoint so it applies only to the specified instance To apply multiple instance path conditions on a single breakpoint specify inst lt region gt multiple times By default this overrides the previous breakpoint condition you can use the appendinst argument to append conditions instead lt region gt The full path to the instance specified Note You can also specify this instance by choosing Tools gt Breakpoints from the main menu and using the Modify Breakpoints dialog box e query lt filename gt lt line_number gt optional Returns information about the breakpoint s set in the specified
304. me gt optional Specifies where to save encrypted VHDL files If no directory is specified the current working directory will be used lt dirname gt Specifies the directory to contain the encrypted VHDL files The original file extension vhd or vhdl will be preserved e e lt extension gt optional Specifies a filename extension to be applied to the encrypted file lt extension gt Any alpha numeric string e f lt filename gt optional Specifies a file with more command line arguments Allows complex arguments to be reused without retyping Nesting of f options is allowed Refer to the section Argument Files for more information lt filename gt Specifies the name of a file containing command line arguments e h lt filename gt optional Concatenates header information into all design files listed with lt filename gt Allows the user to pass a large number of files to the vhencrypt utility that do not contain the encryption information between the protect and protect end directives about how to encrypt the file Saves the user from editing hundreds of files to add the same encryption information into every file lt filename gt Specifies an existing file ModelSim Reference Manual v10 1c 299 Commands vhencrypt e lt filename gt optional Redirects log output to the file designated by lt filename gt lt filename gt Specifies a file for saving output e o lt filename g
305. me gt and lt unit gt within curly braces endvalue lt value gt optional recommended when specifying pattern counter The end value for the counter This option applies to patterns specifying type Range only All other counter patterns start from 0 and go to the maximum value for that particular signal for example for a 3 bit signal the start value will be 000 and the end value will be 111 lt value gt Value must be appropriate for the type of waveform you are creating initialvalue lt value gt optional The initial value for the waveform Not applicable to counter patterns lt value gt Value must be appropriate for the type of waveform you are creating language vhdl verilog optional Controls which language is used for the created wave vhdl default Specifies the VHDL language verilog Specifies the Verilog language period lt time gt lt unit gt optional recommended for all patterns except constant Specifies the period of the signal lt time gt Specified as an integer or decimal number Current simulation units are the default unless specifying lt unit gt lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces
306. me into delta time steps if Delta Time mode is currently selected WLFCollapseMode 1 or into event time steps if Event Time mode is currently selected WLFCollapseMode 0 over a time range specified by a start time and an end time 384 ModelSim Reference Manual v10 1c Commands wave Table 2 9 Wave Window Commands for Expanded Time Display cont Display view Commands wave collapse all Description Collapses simulation time over the full range of the simulation from time 0 to the current time wave collapse cursor Collapses simulation time at the time of the active cursor wave collapse range Collapses simulation time over a specific simulation time range Table 2 10 Wave Window Commands for Controlling Display Display view Commands wave interrupt Description Immediately stops wave window drawing wave refresh Cleans wave display and redraws waves wave cursor see Positions the wave display such that the specified or active cursor appears at the specified percent from the left edge of the display 0 is the left edge 100 is the right edge wave seetime Positions the wave display such that the specified time appears at the specified percent from the left edge of the display 0 is the left edge 100 is the right edge Table 2 11 Wave Window Commands for Zooming Zooming Commands wave zoom in Description Zoom in the wave display by the specif
307. me objects that may be visible from a given context will not be found when wildcards are used if they are within a higher enclosing scope e The wildcards and can be used at any level of a name except in the dataset name and inside of a slice specification Square bracket wildcards can also be used e A wildcard character will never match a path separator For example dut will match dut siga and dut clk However dut won t match either of those e Because square brackets are wildcards in the find command only parentheses can be used to index or slice arrays The WildcardFilter Tcl preference variable is used by the find command to exclude the specified types of objects when performing the search See Design Object Names for more information on specifying names Examples Find all signals in the entire design find signals r e Find all input signals in region top that begin with the letters xy find nets in top xy e Find all signals in the design hierarchy at or below the region lt current_context gt ul u2 whose names begin with cl find signals r u1 u2 cl e Find a signal named s Note that you must enclose the object in curly braces because of the square bracket wildcard characters find signals s 1 e Find signals s1 s2 or s3 find signals s 123 Find the element of signal s that is indexed by the value 1 Note that the find command uses parentheses not square br
308. ments e lt timel gt unit lt time gt Specified as an integer or decimal number Current simulation units are the default unless specifying lt unit gt lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid VHDL time units are fs femtosecond aots seconds ps picosecond 10 seconds ns nanosecond 10 seconds us microsecond 10 seconds ms millisecond 10 seconds sec second min minute 60 seconds hr hour 3600 seconds Note that if you put a space between the values you must enclose the argument in braces or quotation marks e lt high_32bit_int gt lt low_32bit_int gt lt high_32bit_int gt The high part of the 64 bit integer lt low_32bit_int gt The low part of the 64 bit integer e lt scale_factor gt a real number to be used as scaling factor Common values can include 0 25 0 5 1 5 2 20 100 242 ModelSim Reference Manual v10 1c Commands Time e 1 commas controls whether commas are displayed in time values commas time values include commas commas time values do not include commas e 1 nodefunit controls whether time values display time units nodefunit time values do not include time units and will be in current time resolution nodefunit time values may include time units e 1 bestu
309. moves down the call stack by level The Locals window displays local variables at the level Syntax stack down n Arguments e n optional Moves down the call stack by n levels The default value is 1 level Related Topics stack frame stack tb stack level stack up ModelSim Reference Manual v10 1c 231 Commands stack frame stack frame This command selects the specified call frame Syntax stack frame lt n gt Arguments e lt n gt Selects call frame number n The currently executing frame is zero also called the innermost frame frame one is the frame that called the innermost and so on The highest numbered frame is that of main Related Topics stack down stack tb stack level stack up 232 ModelSim Reference Manual v10 1c Commands stack level stack level This command reports the current call frame number Syntax stack level Arguments e None Related Topics stack down stack tb stack frame stack up ModelSim Reference Manual v10 1c 233 Commands stack tb stack tb The stack tb command is an alias for the tb command Refer to the tb command for a complete syntax description 234 ModelSim Reference Manual v10 1c Commands stack up stack up This command moves up the call stack If invoked without arguments the command moves up the call stack by 1 level The Locals window displays local variables at the level Syntax stack up n Arguments e n optional Moves up th
310. mulation time values transcript controls echoing of commands executed in a macro file also works at top level in batch mode transcript file sets or queries the pathname for the transcript file transcript path returns the full pathname to the current transcript file transcript sizelimit sets or queries the current value for the transcript fileSizeLimit value saves file when limit is reached and continues simulation tssi2mti converts a vector file in Technology Standard Events Format TSSI into a sequence of force and run commands ui_VVMode specifies behavior when encountering user interface registration calls used by verification packages such as AVM or OVM unsetenv deletes an environment variable ved add ved checkpoint adds the specified objects to the VCD file dumps the current values of all VCD variables to the VCD file vcd comment inserts the specified comment in the VCD file vcd dumpports 44 creates a VCD file that captures port driver data ModelSim Reference Manual v10 1c Command name vcd dumpportsall Commands Table 2 1 Supported Commands cont creates a checkpoint in the VCD file that shows the current values of all selected ports vcd dumpportsflush flushes the VCD buffer to the VCD file vcd dumpportslimit specifies the maximum size of the VCD file ved dumpportsoff turns off VCD dumping and records all dumped p
311. mulator behavior when encountering finish or sc_stop in the design code When you specify this command without an argument it returns the current setting Syntax onfinish ask exit final stop default Arguments ask optional In batch mode the simulation will exit in GUI mode the user is prompted for action exit optional The simulation exits without asking for any confirmation final optional The simulation executes all finish blocks before exiting stop optional The simulation ends but remains loaded in memory allowing for easier post simulation tasks default optional Uses the current setting for the OnFinish variable in the modelsim ini file Related Topics OnFinish modelsim ini variable vsim onfinish ModelSim Reference Manual v10 1c 191 Commands pause pause This command interrupts the execution of a macro and allows you to perform interactive debugging of a macro file The command is placed within the macro to be debugged Syntax pause Arguments e None Description When a macro is interrupted during execution the macro returns the prompt VSIM paused gt This pause prompt notifies you that a macro has been interrupted When a macro is paused you can invoke another macro If the second macro is interrupted you can continue invoking macros up to a nesting level of 50 macros The status command lists summary information about all interrupted macro
312. n parentheses are permitted The command will be executed when the expression is evaluated as TRUE or 1 The formal BNF syntax for an expression is condition Name expression expression expression AND relation expression OR relation relation relation Name Literal Name EVENT expression Literal lt char gt lt bitstring gt lt bitstring gt Name Literal The operator can occur only between a Name and a Literal This means that you cannot compare the value of two signals for example Name Name is not valid You can construct a breakpoint such that the simulation breaks when a SystemVerilog Class is associated with a specific handle or address bp lt filename gt lt line_number gt cond this lt class_handle gt bp lt filename gt lt line_number gt cond this lt class_handle gt where you can obtain the class handle with the examine handle command The string this is a literal that refers to the specific line_number You can construct a breakpoint such that the simulation breaks when a line number is of a specific class type or extends the specified class type bp lt filename gt lt line_number gt cond this ISA lt class_type_name gt where class_type_name is the actual class name not a variable e id lt id_number gt label lt label gt optional Attempts to assign an id number or label to the breakpoint The com
313. n any of the supported formats Verilog binary Verilog hex and MTI memory pattern data finds and prints to the screen the first occurring match of a specified memory pattern in the specified memory instance messages clearfilter removes any filter you have set in the Message Viewer messages setfilter performs the same action as the Message Viewer Filter Dialog Box lets you determine which messages are shown in the Message Viewer messages write modelsim prints the contents of the Message Viewer window to a specified text file starts the ModelSim GUI without prompting you to load a design valid only for Windows platforms noforce nolog removes the effect of any active force commands on the selected object suspends writing of data to the WLF file for the specified signals notepad opens a simple text editor noview nowhen closes a window or set of windows in the ModelSim GUI deactivates selected when commands onbreak onElabError specifies command s to be executed when running a macro that encounters a breakpoint in the source code in effect only during a run command specifies one or more commands to be executed when an error is encountered during elaboration in effect only during a vsim command onerror 42 specifies one or more commands to be executed when a Tcl command in a dofile encounters an error not dependent on a run command ModelSim Reference M
314. n delta cycles Otherwise matches are only tested for at the end of each simulation time step ath gt A path to a design region Wildcards not allowed e event lt time gt optional Indicates to test for a match on a simulation event Otherwise matches are only tested for at the end of each simulation time step e expr lt expr gt optional Specifies a search for a general expression of signal values and simulation time searchlog will search until the expression evaluates to true lt expr gt An expression that evaluates to a boolean true See GUI_expression_format for the format of the expression e reverse optional Specifies to search backwards in time from lt startTime gt e rising optional Specifies a search for rising edge on a scalar signal This option is ignored for compound signals e falling optional Specifies a search for falling edge on a scalar signal This option is ignored for compound signals e anyedge optional Specifies a search for a rising or falling edge on a scalar signal This option is ignored for compound signals default e _startDelta lt num gt optional Indicates a simulation delta cycle on which to start ModelSim Reference Manual v10 1c 223 Commands searchlog lt num gt Any positive integer e value lt string gt optional Specifies a match of a single scalar or compound signal against a specified string lt string gt Specifies a str
315. n string This same information can be obtained using the version argument of the vsim command ModelSim Reference Manual v10 1c 381 Commands vsim_break vsim_break Stop interrupt the current simulation before it runs to completion To stop a simulation and then resume it use this command in conjunction with run continue Syntax vsim_break Arguments None Example e Interrupt a simulation then restart it from the point of interruption vsim_break run continue 382 ModelSim Reference Manual v10 1c Commands vsource vsource This command specifies an alternative file to use for the current source file This command is used when the current source file has been moved The alternative source mapping exists for the current simulation only Syntax vsource lt filename gt Arguments e lt filename gt optional Specifies a relative or full pathname If filename is omitted the source file for the current design context is displayed Examples vsource design vhd vsource old design vhd ModelSim Reference Manual v10 1c 383 Commands wave wave A number of commands are available to manipulate and report on the Wave window The following tables summarize the available options for manipulating cursors for zooming and for adjusting the wave display view in the Wave window Table 2 8 Wave Window Commands for Cursor Cursor Commands Description wave cursor active Sets the active cursor to the s
316. n that accepts a string call sim user_pkg myfcns sf_voidstring first_string e Call using a class instance path to specify the function where the function f_intint of the class type utop tmyfcns accepts an integer call utop tmyfcens f_intint 37 e Call using a class instance path to specify the function and pass in a class instance utop tmyfcns is a class handle call utop tmyfcns f_voidclasscolor utop tmyfcns e Call using a class instance path and pass in a class instance as an argument using a class instance id string call utop tmyfcns f_voidclasscolor myType 3 e Call using a class instance id string to specify the function call myType 543 get_full_name e Call using a declaration path where the function is non static so a class instance must also be supplied The member function f_voidstring accepts a string call sim user_pkg myfcns f_voidstring my class instance some string e Call using a class instance id string to specify the function where the function returns a string VSIM gt call uvm_sequencer__ 3 3 get_full_name Returns test e2_a sequencer e Call using a relative class hierarchical name to specify the function where the function returns a class handle VSIM gt call moduleX who_am_i Returns myClassx 4 ModelSim Reference Manual v10 1c 87 Commands cd cd This command changes the ModelSim local directory to the specified directory This command cannot be e
317. n top e for Verilog modules not under a VHDL instance the minimum value specified for their timescale directives is used ModelSim Reference Manual v10 1c Commands vsim e for Verilog modules under a VHDL instance all their timescale directives are ignored the minimum value for timescale directives in all modules not under a VHDL instance is used If there are no timescale directives in the design the value specified for the Resolution variable in modelsim ini is used Tip After you have started a simulation you can view the current simulator resolution by using the report command as follows report simulator state tab lt tabfile gt optional Specifies the location of a Synopsys VCS tab file tab which the simulator uses to automate the registration of PLI functions in the design lt tabfile gt The location of a tab file contains information about PLI functions The tool expects the tab file to be based on Synopsys VCS version 7 2 syntax Because the format for this file is non standard changes to the format are outside of the control of Mentor Graphics e tag lt string gt optional Specifies a string tag to append to foreign trace filenames Used with the trace_foreign lt int gt option Used when running multiple traces in the same directory e title lt title gt optional Specifies the title to appear for the ModelSim Main window If omitted the current ModelSim
318. n_format top u3 addr and 32 hf 000000 32 hac000000 Evaluates to a boolean true when the upper 8 bits of the 32 bit signal op u3 addr equals hex ac top signalA delayed 10ns This expression returns top signalA delayed by 10 ns top signalA delayed 10 ns amp amp top signalB This expression takes the logical AND of a delayed top signalA with top signalB virtual function 10 top signalA amp amp top signalB mySignalB_AND_DelayedSignalA This evaluates top signalA at 10 simulation time steps before the current time and takes the logical AND of the result with the current value of op signalB The notation uses positive numbers for looking into the future and negative numbers for delay This notation does not support the use of time units NOW gt 23 us amp amp NOW lt 54 us amp amp clk rising amp amp mode writing Evaluates to a boolean true when WLF file time is between 23 and 54 microseconds clk just changed from low to high and signal mode is enumeration writing searchlog expr dbus hasX 0 ns dbus Searches for an X in dbus This is equivalent to the expression dbus 0 x Il dbus 1 x This makes it possible to search for X values without having to write a type specific literal Signal and Subelement Naming Conventions ModelSim supports naming conventions for VHDL and Verilog signal pathnames VHDL array indexing Verilog bit
319. nal The lt enum label gt is any arbitrary string It should surrounded by quotation marks especially if it contains spaces The default entry is optional If present it defines the radix to use if a match is not found for a given value The default entry can appear anywhere in the list it does not have to be at the end color lt value gt optional Designates a color for the waveform and text in the Wave window lt value gt The color value may be a color name or its hex value see example below Example 204 e The radix define command used to create a radix called States which will display state values in the List Watch and Wave windows instead of numeric values radix define States 11 b00000000001 IDLE ModelSim Reference Manual v10 1c Commands radix define 11 b00000000010 CTRL 11 b00000000100 WT_WD_1 11 b00000001000 WT_WD_2 11 b00000010000 WT_BLK_1 11 b00000100000 WT_BLK_2 11 b00001000000 WT_BLK_3 11 b00010000000 WT_BLK_4 11 b00100000000 WT_BLK_5 11 b01000000000 RD_WD_1 11 b10000000000 RD_WD_2 default hex e The following example illustrates how to specify the radix color radix define States 11 b00000000001 IDLE color yellow 11 b00000000010 CTRL color ffee00 11 b00000000100 WT_WD_1 color orange 11 b00000001000 WT_WD_2 color orange 11 b00000010000 WT_BLK_1 11 b00000100000 WT_BLK_2 11 b00001000000 WT_BLK_3 11 b00010000000
320. name gt format lt type gt lt format gt group lt group_name gt lt sig_namel gt height lt pixels gt in inout out ports internal label lt name gt max lt real_num gt min lt real_num gt noupdate position lt location gt lt radix_type gt radix lt type gt radixenumnumeric radixenumsymbolic recursive time lt object_name gt lt object_name gt sig1 sig2 Arguments 60 allowconstants optional For use with wildcard searches Specifies that constants matching the wildcard search should be added to the Wave window By default constants are ignored because they do not change clampanalog 01 1 optional Clamps the display of an analog waveform to the values specified by max and min Specifying a value of 1 prevents the waveform from extending above the value specified for max or below the value specified for min 0 not clamped 1 default clamped color lt standard_color_name gt optional Specifies the color used to display a waveform lt standard_color_name gt You can use either of the following standard X Window color name enclose 2 word names in quotes for example color light blue ModelSim Reference Manual v10 1c Commands add wave rgb value for example color 357f77 depth lt level gt optional Restricts a recursive search as specified with recursive to a specified level of
321. nd Wildcard characters are allowed NOTE The WildcardFilter Tcl preference variable identifies types to ignore when matching objects with wildcard patterns Related Topics e Memory List Window e Using the WildcardFilter Preference Variable 56 ModelSim Reference Manual v10 1c Commands add message add message This command is used within a macro or script and specifies a user defined runtime message that is sent to the transcript and wlf files Messages are displayed in the Message Viewer window in the GUI Refer to Message Viewer Window for information Syntax add message lt message_body gt category lt category gt efftime lt time gt file lt filename gt id lt id_number gt inline line lt linenumber gt noident nolevel objects lt list gt region region severity error note warning Arguments lt message_body gt required User specified message category lt category gt optional Sets the category for the message in the Message Viewer window where the default is USER The Message Viewer window Category column recognizes the following keywords Table 2 2 Message Viewer Categories DISPLAY FLI PA PLI SDF TCHK VCD VITAL WLE MISC USER lt user defined gt efftime lt time gt optional Specifies the simulation time when the message is saved to the log file The time specified is listed in the Message Viewer window Time column when the message is
322. nd implicits explicits optional Logs only a subset of virtuals implicits virtual signals created internally by the tool explicits virtual signals explicitly created by a user such as with the virtual signal command Unique abbreviations are accepted region lt path gt optional Specifies a region of design space in which to look for signals to log lt path gt Specifies an absolute or relative path to the signal s On Windows systems the path separator should be a forward slash recursive optional Specifies that the scope of the search is to descend recursively into subregions If omitted the search is limited to the selected region only optional Specify that only virtual signals as opposed to all signals found by a lt pattern gt containing a wildcard should be logged in optional Specifies that the kernel log data for ports of mode IN whose names match the specification out optional Specifies that the kernel log data for ports of mode OUT whose names match the specification inout optional Specifies that the kernel log data for ports of mode INOUT whose names match the specification ModelSim Reference Manual v10 1c 313 Commands virtual log e internal optional Specifies that the kernel log data for internal non port objects whose names match the specification e ports optional Specifies that the kernel log data for all ports Optional e lt patte
323. ndard ModelSim Reference Manual v10 1c Commands ved checkpoint vcd checkpoint This command dumps the current values of all VCD variables to the specified VCD file While simulating only value changes are dumped Related Verilog tasks dumpall fdumpall Syntax vcd checkpoint lt filename gt Arguments e lt filename gt optional Specifies the name of the VCD file If omitted the command is executed on the file designated by the vcd file command or dump vcd if ved file was not invoked Related Topics vcd add vcd files vcd comment e vcd flush vcd dumpports vcd limit vcd dumpportsall vcd off e vcd dumpportsflush e vcd on vcd dumpportslimit vcd2wif vcd dumpportsoff DumpportsCollapse vcd dumpportson e Value Change Dump VCD Files vcd file e Verilog tasks are documented in the Language Reference Manual IEEE 1364 standard ModelSim Reference Manual v10 1c 255 Commands ved comment vcd comment This command inserts the specified comment in the specified VCD file Arguments to this command are order dependent Please read the argument descriptions for more information Syntax vcd comment lt comment string gt lt filename gt Arguments e lt comment string gt required Comment to be included in the VCD file Must be enclosed by double quotation marks or curly braces Must be specified as the first argument to the ved comment command e lt filename gt
324. ndencies and command line data accessed during a compile whether they contribute data to the initial compile or not Executing this switch can increase compile time in addition to increasing the accuracy of the compile See the vmake command for more information warning lt msg_number gt lt msg_number gt Changes the severity level of the specified message s to warning Optional Edit the warning variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information work lt library_name gt Specifies a logical name or pathname of a library that is to be mapped to the logical library work Optional by default the compiled design units are added to the work library The specified pathname overrides the pathname specified for work in the project file writetoplevels lt fileName gt optional Records the names of all top level module names in a specified file Also records any compilation unit name specified with cuname May only be specified when compiling the top level modules lt fileName gt Required Specifies the name of the file where module names are to be recorded y lt library_directory gt Specifies a source library directory containing definitions for modules packages interfaces and user defined primitives UDPs Usually this is a directory of source files that you want to scan if the compiled versions do not already exist in a library
325. ndent GUI data is updated and all context dependent CLI commands start working with respect to the new context Syntax dataset current lt dataset_name gt Arguments e lt dataset_name gt optional Specifies the dataset name or dataset alias you want to activate If no dataset name or alias is specified the command returns the name of the currently active dataset Related Topics e dataset alias e dataset rename e dataset clear e dataset restart e dataset close e dataset save e dataset info e dataset snapshot dataset list WLF File Parameter Overview e dataset open vsim 106 ModelSim Reference Manual v10 1c Commands dataset info dataset info This command reports a variety of information about a dataset Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax dataset info name file exists lt dataset_name gt Arguments e name file exists required Identifies what type of information you want reported Only one option per command is allowed The current options include name Returns the name of the dataset Useful for identifying the real dataset name of an alias file Returns the name of the WLF file or UCDB file associated with the dataset exists Returns 1 if the dataset is currently open 0 if it does not Must be specified as the first argument to the dataset info command e lt dataset_name gt optiona
326. ng connect Specifies a process signal net or register to add to the Dataflow window Wildcards are allowed Multiple objects are specified as a space separated list Refer to the section Wildcard Characters for wildcard usage as it pertains to the add commands Must be specified as the first argument to the add dataflow command connect lt source_net gt lt destination_net gt optional Computes and displays in the Dataflow window all paths between two nets lt source_net gt The net that originates the path search lt destination_net gt The net that terminates the path search in optional Specifies to add ports of mode IN inout optional Specifies to add ports of mode INOUT out optional Specifies to add ports of mode OUT ports optional Specifies to add all ports This switch has the same effect as specifying in out and inout together internal optional Specifies to add internal non port objects nofilter optional Specifies that the WildcardFilter Tcl preference variable be ignored when finding signals or nets The WildcardFilter Tcl preference variable identifies types to ignore when matching objects with wildcard patterns ModelSim Reference Manual v10 1c 49 Commands add dataflow recursive optional Specifies that the scope of the search is to descend recursively into subregions If omitted the search is limited to the selected region You can specify r as an
327. nge are indicated by showing the value in the following format N where N is the current value Refer to Range and Index Checking for additional information I e note lt msg_number gt lt msg_number gt optional Changes the severity level of the specified message s to note Edit the note variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information lt msg_number gt A number identifying the message Multiple message numbers are specified as a comma separated list e novital optional Causes vecom to use VHDL code for VITAL procedures rather than the accelerated and optimized timing and primitive packages built into the simulator kernel Allows breakpoints to be set in the VITAL behavior process and permits single stepping through the VITAL procedures to debug your model Also all of the VITAL data can be viewed in the Locals or Objects windows novitalcheck optional Disables Vital level 1 and Vital level 0 checks defined in section 4 of the Vital 95 Spec IEEE Std 1076 4 1995 ModelSim Reference Manual v10 1c 283 Commands vcom 284 nowarn lt category_number gt optional Selectively disables a category of warning messages Warnings may be disabled for all compiles via the Main window Compile gt Compile Options menu command or the modelsim ini file Refer to modelsim ini Variables lt category_number gt Specif
328. nge date command from the command line help add_cmdhelp change date 68 ModelSim Reference Manual v10 1c Commands alias alias This command displays or creates user defined aliases Any arguments passed on invocation of the alias will be passed through to the specified commands Returns nothing Existing commands e g run env etc cannot be aliased Syntax alias lt name gt lt cmds gt Arguments e lt name gt optional Specifies the new procedure name to be used when invoking the commands e lt cmds gt optional Specifies the command or commands to be evaluated when the alias is invoked Multiple commands are specified as a semicolon separated list You must enclose the string in quotes Examples e List all aliases currently defined alias e List the alias definition for the specified name if one exists alias lt name gt Create a Tcl procedure myquit that when executed writes the contents of the List window to the file mylist save by invoking write list and quits ModelSim by invoking quit alias myquit write list mylist save quit f ModelSim Reference Manual v10 1c 69 Commands archive load archive load The archive load command allows you to load an archived debug database dbg file that was previously created with the archive write command Syntax archive load lt archive_name gt dbgDir lt directory_name gt wlfFiles lt wlf_file_name gt Arg
329. nges when resolving driver values This argument is an extension to the IEEE 1364 specification Refer to Resolving Values for additional information nomap optional Affects only VHDL signals of type std_logic It specifies that the values recorded in the VCD file shall use the std_logic enumeration characters of UXO1ZWLH This option results in a non standard VCD file because VCD values are limited to the four state character set of x01z By default the std_logic characters are mapped as follows ModelSim Reference Manual v10 1c 265 Commands vcd file VHDL U X 0 1 Z e unique VHDL VCD optional Generates unique VCD variable names for ports even if those ports are connected to the same collapsed net Related Topics 266 ved add ved checkpoint vcd comment vcd dumpports ved dumpportsall vcd dumpportsflush vcd dumpportslimit ved dumpportsoff vcd dumpportson ved files ved flush ved limit ved off ved on ved2wlf DumpportsCollapse Value Change Dump VCD Files Verilog tasks are documented in the Language Reference Manual IEEE 1364 standard ModelSim Reference Manual v10 1c Commands vcd files vcd files This command specifies filenames and state mapping for VCD files created by the ved add command The ved files command is optional If used it must be issued before any ved add commands Related Verilog task fdumpfile Syntax vcd files compress direction lt filename
330. nits controls whether time values display the largest possible time unit for example 8 us instead of 8 000 ns bestunits time values display the largest possible time unit bestunits time values display the default time unit Examples gt ltTime 100ns 1ms Returns 1 gt addTime 1545 ns 455 ns Returns 2 us gt gteTime 1000 ns 1 us Returns 1 gt divTime 1us 10ns Returns 100 gt formatTime bestunit Returns commas nodefunit bestunits gt scaleTime 3ms 1000 Returns 3 sec gt RealToTime 1 345e04 Returns 13450 ns ModelSim Reference Manual v10 1c 243 Commands transcript transcript This command controls echoing of commands executed in a macro file If no option is specified the current setting is reported Syntax transcript on off q quietly Arguments e on optional Specifies that commands in a macro file will be echoed to the Transcript window as they are executed e off optional Specifies that commands in a macro file will not be echoed to the Transcript window as they are executed e q optional Returns 0 if transcripting is turned off or 1 if transcripting is turned on Useful in a Tcl conditional expression e quietly optional Turns off the transcript echo for all commands To turn off echoing for individual commands see the quietly command Examples e Commands within a macro file will be echoed to the Transcript window as they are
331. nits This timescale overrides all timescale directives and all declarations of timeunit and timeprecision Optional ModelSim Reference Manual v10 1c 339 Commands vlog 340 time_unit unit of measurement for times and delays This specification consists of one of three integers 1 10 or 100 representing order of magnitude and one of six character strings representing units of measurement 11101100 sI ms lus Ins Ips fs For example 10 ns time_precision unit of measurement for rounding delay values before being used in simulation Allowable values are the same as for time_unit O0 Lower the optimization to a minimum with O0 capital oh zero Optional Use this to work around bugs increase your debugging visibility on a specific cell or when you want to place breakpoints on source lines that have been optimized out pedanticerrors optional Enforces strict compliance of the IEEE Std 1800 2005 in the following cases Covergroup bin size value range or transition specification must be constant Using new for queues is not legal When strict compliance is not enforced use of new creates a queue of the specified size where all elements are initialized to the default value of the queue element type Using underscore character _ in sized based literals is not legal When you specify this argument an error will occur for literals such as 2 b_01 Omitting the grave accent mark preceding
332. nly be a whole number Must be specified as the first argument to the ved limit command You can specify a unit of Kb Mb or Gb with the numerical value units are case insensitive Do not insert a space between the numerical value and the unit for example 400Mb not 400 Mb e lt filename gt Optional Specifies the name of the VCD file If omitted the command is executed on the file designated by the vcd file command or dump vcd if ved file was not invoked Example e Specify a maximum VCD file size of 6 gigabytes and a VCD file named my_ved_file ved vcd limit 6gb my_vcd_file vcd Related Topics vcd add vcd files vcd checkpoint vcd flush vcd comment vcd off vcd dumpports vcd on vcd dumpportsall vcd2wif e vcd dumpportsflush e DumpportsCollapse e vcd dumpportslimit e Value Change Dump VCD Files vcd dumpportsoff e Verilog tasks are documented in the vcd dumpportson Language Reference Manual IEEE 1364 e vcd file standard 270 ModelSim Reference Manual v10 1c Commands vcd off vcd off This command turns off VCD dumping to the specified file and records all VCD variable values as x Related Verilog tasks dumpoff fdumpoff Syntax ved off lt filename gt Arguments e lt filename gt optional Specifies the name of the VCD file If omitted the command is executed on the file designated by the vcd file command or dump vcd if ved file was not invoked Related
333. nly unique lines are printed identical lines are not printed Mutually exclusive with the noaddress switch e dataradix lt radix_type gt optional Specifies the data radix for the default mti formatted files lt radix_type gt Valid entries or any unique abbreviations are binary decimal unsigned octal hex and symbolic You can change the default radix for the current simulation using the radix command You can change the default radix permanently by editing the DefaultRadix variable in the modelsim ini file 170 ModelSim Reference Manual v10 1c Commands mem save e endaddress lt end gt optional Specifies the end address for a range of addresses to be saved lt end gt Any valid address in the memory e format bin hex mti optional Specifies the format of the output file bin Binary data format hex Hexadecimal format mti MTI format default The bin and hex values are the standard Verilog hex and binary memory pattern file formats These can be used with Verilog memories and with VHDL memories composed of std_logic types In the MTI memory data file format internal file address and data radix settings are stored within the file itself noaddress optional Prevents addresses from being printed Mutually exclusive with the compress switch e lt path gt optional The hierarchical path to the location of the memory instance The default is the current context as sh
334. nohide command Syntax virtual hide kind implicits explicits region lt path gt lt pattern gt Arguments kind implicits explicits optional Hides only a subset of virtuals implicits virtual signals created internally by the tool explicits virtual signals explicitly created by a user such as with the virtual signal command Unique abbreviations are accepted region lt path gt optional Specifies a region of design space in which to look for the signal names lt path gt Specifies an absolute or relative path to the signal s On Windows systems the path separator should be a forward slash lt pattern gt required Indicates which signal names or wildcard patterns should be used in finding the signals to hide where wildcards are allowed and you can specify any number of names or patterns Related Topics virtual nohide e Virtual Objects 312 ModelSim Reference Manual v10 1c Commands virtual log virtual log This command causes the simulation mode dependent signals of the specified virtual signals to be logged by the kernel If wildcard patterns are used it will also log any normal signals found unless the only option is used You unlog the signals using the virtual nolog command Syntax virtual log kind implicits explicits region lt path gt recursive only in out inout internal ports lt pattern gt Arguments ki
335. noupdate format Logic cntr_struct rst add wave noupdate format Logic cntr_struct clk add wave noupdate format Literal cntr_struct d add wave noupdate format Literal cntr_struct q TreeUpdate SetDefaultTree quietly WaveActivateNextPane add wave noupdate format Logic cntr_struct pl add wave noupdate format Logic cntr_struct p2 add wave noupdate format Logic cntr_struct p3 TreeUpdate SetDefaultTree WaveRestoreCursors 0 ns WaveRestoreZoom 0 ns 1 us configure wave namecolwidth 150 configure wave valuecolwidth 100 configure wave Signalnamewidth 0 configure wave justifyvalue left In the example above five signals are added with the noupdate argument to the default window The TreeUpdate command then refreshes all five waveforms The second WaveActivateNextPane command creates a second pane which contains three signals The WaveRestoreCursors command restores any cursors you set during the original simulation and the WaveRestoreZoom command restores the Zoom range you ModelSim Reference Manual v10 1c 425 Commands write format set These four commands are used only in saved Wave format files therefore they are not documented elsewhere Related Topics add list add wave e 426 ModelSim Reference Manual v10 1c Commands write list write list This command records the contents of the List window in a list output file This file contains simulation data for all HDL
336. ns off VCD dumping and records all dumped port values as x Related Verilog task dumpportsoff Syntax vcd dumpportsoff lt filename gt Arguments lt filename gt optional Specifies the name of the VCD file If omitted the command is executed on all open VCD files Related Topics ved add ved checkpoint vcd comment vcd dumpports vcd dumpportsall vcd dumpportsflush vcd dumpportslimit vcd dumpportson vcd file ModelSim Reference Manual v10 1c vcd files vcd flush vcd limit ved off vcd on ved2wlf DumpportsCollapse Value Change Dump VCD Files Verilog tasks are documented in the Language Reference Manual IEEE 1364 standard 263 Commands vcd dumpportson vcd dumpportson This command turns on VCD dumping and records the current values of all selected ports This command is typically used to resume dumping after invoking vcd dumpportsoff Related Verilog task dumpportson Syntax vcd dumpportson lt filename gt Arguments lt filename gt optional Specifies the name of the VCD file If omitted the command is executed on all open VCD files Related Topics ved add ved checkpoint vcd comment vcd dumpports ved dumpportsall vcd dumpportsflush vcd dumpportslimit ved dumpportsoff ved file 264 vcd files vcd flush vcd limit vcd off vcd on ved2wlf DumpportsCollapse Value Change Dump VCD Files Verilog tasks are documented in the Language Reference
337. nscript e i optional Specifies that the simulator be run in interactive mode e initregNBA optional Specifies that initreg settings applied to registers of sequential UDPs should be non blocking This is useful when continuous assignments overwrite register initialization e installcolormap optional For UNIX only Causes vsim to use its own colormap so as not to hog all the colors on the display This is similar to the install switch on Netscape e keeploaded optional Prevents the simulator from unloading reloading any FLI PLI VPI shared libraries when it restarts or loads a new design The shared libraries will remain loaded at their current positions User application code in the shared libraries must reset its internal state during a restart in order for this to work effectively ModelSim Reference Manual v10 1c 357 Commands vsim 358 keeploadedrestart optional Prevents the simulator from unloading reloading any FLI PLI VPI shared libraries during a restart The shared libraries will remain loaded at their current positions User application code in the shared libraries must reset its internal state during a restart in order for this to work effectively We recommend using this option if you l be doing warm restores after a restart and the user application code has set callbacks in the simulator Otherwise the callback function pointers might not be valid if the shared library is loaded into a new posit
338. nspected e lt radix_value gt optional Value of the radix to be set for the specified signal Use empty quotation marks to unset the radix for the specified signal e fpoint lt decimal gt optional Designates a fixed point radix with decimal specifying the number of decimal places of the radix e showbase optional Display the number of bits of the vector and the radix used where binary b decimal d hexidecimal h ASCII a time t For example instead of simply displaying a vector value of 31 a value of 16 h31 may be displayed to show that the vector is 16 bits wide with a hexidecimal radix Related Topics User Defined Radices radix radix define radix list radix delete 210 ModelSim Reference Manual v10 1c Commands readers readers This command displays the names of all readers of the specified object The reader list is expressed relative to the top most design signal net connected to the specified object The output from the readers command which is displayed in the Transcript window as a hypertext link allows you to right click to open a drop down menu and to quickly add signals to various windows It includes a View Declaration item to open the source definition of the signal Figure 2 4 readers Command Results in Transcript Transcript SIM 27 gt readers top dut enable Readers for top dut enable Net top dut enabl
339. numnumeric enumsymbolic showbase symbolic Arguments You can abbreviate the following arguments to any length For example dec is equivalent to decimal 202 ascii optional Display a Verilog object as a string equivalent using 8 bit character encoding binary optional Displays values in binary format enumnumeric optional Causes Verilog and SystemC enums to be displayed as numbers formatted by the current radix This overrides the default behavior of always showing enums symbolically enumsymbolic optional Restores the default behavior of displaying Verilog and SystemC enums as symbols by reversing the action of the enumnumeric option fpoint optional Displays values in fixed point format decimal optional Displays values in decimal format You can specify signed as an alias for this argument hexadecimal optional Displays values in hexadecimal format ModelSim Reference Manual v10 1c Commands radix octal optional Displays values in octal format time optional Displays values of time for register based types in Verilog showbase optional Display the number of bits of the vector and the radix used where binary b decimal d hexidecimal h ASCII a time t For example instead of simply displaying a vector value of 31 a value of 16 h31 may be displayed to show that the vector is 16 bits wide with a hexidecimal radix symbolic option
340. o generate a comprehensive makefile for recompiling the design library By default vecom stores compile data needed for the refresh switch and ignores compile data not needed for refresh The vmake switch forces inclusion of all file dependencies and command line data accessed during a compile whether they contribute data to the initial compile or not Executing this switch can increase compile time in addition to increasing the accuracy of the compile See the vmake command for more information warning lt msg_number gt lt msg_number gt optional Changes the severity level of the specified message s to Warning Edit the warning variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information lt msg_number gt A number identifying the message Multiple message numbers are specified as a comma separated list work lt library_name gt optional Maps a library to the logical library work By default the compiled design units are added to the work library The specified pathname overrides the pathname specified for work in the project file lt library_name gt A logical name or pathname of a library lt filename gt required Specifies the name of a file containing the VHDL source to be compiled One filename is required multiple filenames can be entered separated by spaces Wildcards may be used for example vhd If you don t specify
341. o objects of the specified name can be found in the specified context then an upward search is done to look for a matching object in any visible enclosing scope up to an instance boundary If at least one match is found within a given context no more upward searching is done therefore some objects that may be visible from a given context will not be found when wildcards are used if they are within a higher enclosing scope e The wildcards and can be used at any level of a name except in the dataset name and inside of a slice specification e A wildcard character will never match a path separator For example dut will match dut siga and dut clk However dut won t match either of those See Design Object Names for more information on specifying names Syntax examine lt name gt delta lt delta gt env lt path gt event lt time gt handle in out inout ports internal maxlen lt integer gt expr lt expression gt name 130 ModelSim Reference Manual v10 1c Commands examine lt radix_type gt radix lt type gt radixenumnumeric radixenumsymbolic showbase time lt time gt value Arguments lt name gt required except when specifying expr Specifies the name of any HDL object All object types are allowed except those of the type file Multiple names and wildcards are accepted Spaces square brackets and extended identifiers require curly
342. o stdout with no hotlinks Syntax find insource lt pattern gt exact glob regex inline nocase Arguments lt pattern gt required The string you are searching for You can use regular expression wildcards to further restrict the search You must enclose lt pattern gt in quotes if it includes spaces You must specify the lt pattern gt at the end of the command line any switches specified after lt pattern gt will not be registered exact glob regex optional Defines the style of regular expression used in the lt pattern gt exact Indicates that no characters have special meaning thus disabling wildcard features glob default Allows glob style wildcard characters For more information refer to the Tcl documentation Help gt Tcl Man Pages Select Tcl Commands then string then string match regex Allows Tcl regular expressions For more information refer to the Tcl documentation Help gt Tcl Man Pages Select Tcl Commands then re_syntax inline optional Returns the matches in the form of a Tcl list which disables the hotlink feature but allows for easier post processing nocase optional Treats lt pattern gt as case insensitive Example Figure 2 3 shows a couple of examples of the find insource command and the results ModelSim Reference Manual v10 1c 143 Commands find insource Figure 2 3 find insource Example
343. occurs when some information is not quoted o Tcl backslash substitution Any unquoted backslash will be treated as an escape character tacc rn mymodule the leading is considered an escape character o Environment variable expansion Any unquoted environment variable such as envname will be expanded You can also use curly braces in your environment variable such as envname acc rn SMODULE the leading is considered an escape character and the variable SMODULE is expanded e Newline Character You can specify arguments on separate lines in the argument file with the line continuation character You must use a space before the backslash e Comments Comments within the argument files follow these rules o All text in a line beginning with to its end is treated as a comment o All text bracketed by is treated as a comment o All text in a line beginning with to its end is treated as a comment ModelSim Reference Manual v10 1c 23 Syntax and Conventions Command Shortcuts Command Shortcuts You may abbreviate command syntax but there s a catch the minimum number of characters required to execute a command are those that make it unique Remember as we add new commands some of the old shortcuts may not work For this reason ModelSim does not allow command name abbreviations in macro files This minimizes your need to update macro files as new commands
344. ode IN whose names match the specification e inout optional Specifies that the WLF file is to include data for ports of mode INOUT whose names match the specification e internal optional Specifies that the WLF file is to include data for internal non port objects whose names match the specification e out optional Specifies that the WLF file is to include data for ports of mode OUT whose names match the specification e ports optional Specifies that the scope of the search is to include all ports IN INOUT and OUT recursive optional Specifies that the scope of the search is to descend recursively into subregions If omitted the search is limited to the selected region You can use the depth argument to specify how far down the hierarchy to descend e lt object_name gt required Specifies the object name that you want to log Must be specified as the final argument to the log command Multiple object names are specified as a space separated list Wildcard characters are allowed Note that the WildcardFilter Tcl preference variable identifies types to ignore when matching objects with wildcard patterns By default wildcard card logging does not log the internals of cells Refer to the libcell nolibcell argument of the vlog command for more information Examples e Log all objects in the design log r e Log all output ports in the current design unit log out ModelSim Referenc
345. odelSim Reference Manual v10 1c Commands virtual signal virtual signal num amp 000 fullbus add wave unsigned fullbus e Reconstruct a bus that was fragmented by synthesis and is missing the lower three bits Note that you would have to type in the actual bit names i e num28 num27 and so on represented by the in the syntax above virtual signal num31 amp num30 amp num29 amp amp num4 amp num3 amp 000 fullbus add wave unsigned fullbus e Create a two bit signal with an enumerated type based on the results of the subexpressions For example if aold equals anew then the first bit is true 1 Alternatively if bold does not equal bnew the second bit is false 0 Each subexpression is evaluated independently virtual signal aold anew amp bold bnew myequalityvector e Create signal newbus that is a concatenation of bus1 bit reversed and bus2 7 4 bit reversed Assuming bus has indices running 7 downto 0 the result will be newbus 11 0 with the upper 8 bits being bus1 0 7 and the lower 4 bits being bus2 4 7 See Concatenation Directives for further details virtual signal concat_reverse busl amp bus2 7 4 newbus Commands fully compatible with virtual signals add list add log or log add wave delete describe examine find force and noforce restart searchlog show Commands compatible with virtual signals using virtual expand lt signal gt drivers ved
346. of Operation e Using a Startup File 120 e DOPATH variable e Saving a Transcript File as a Macro DO file ModelSim Reference Manual v10 1c Commands drivers drivers This command displays the names and strength of all drivers of the specified object The driver list is expressed relative to the top most design signal net connected to the specified object If the object is a record or array each sub element is displayed individually The output from the drivers command which is displayed in the Transcript window as a hypertext link allowing you to right click to open a drop down menu and quickly add signals to various windows It includes a View Declaration item to open the source definition of the signal Figure 2 1 drivers Command Results in Transcript a Transcript SIM 26 gt drivers top dut enable Drivers for top dut enable Stl Net top dut enable stl Driver top Git __ op dut IMPLIGIT WiREfenabley i view Declaration VSIM 27 gt E 4idd to List Now 170 170ns Delta 3 Wal ko Schemmel Add to Dataflow Copy Syntax drivers lt object_name gt source Arguments e lt object_name gt required Specifies the name of the signal or net whose drivers are to be shown All signal or net types are valid Multiple names and wildcards are accepted e source optional Returns the source file name and line number for each driver of the specified signal o
347. of are provided in source code form Customer will use the source code only to correct software errors and enhance or modify the Software for the authorized use Customer shall not disclose or permit disclosure of source code in whole or in part including any of its methods or concepts to anyone except Customer s employees or contractors excluding Mentor Graphics competitors with a need to know Customer shall not copy or compile source code in any manner except to support this authorized use 5 3 Customer may not assign this Agreement or the rights and duties under it or relocate sublicense or otherwise transfer the Products whether by operation of law or otherwise Attempted Transfer without Mentor Graphics prior written consent and payment of Mentor Graphics then current applicable relocation and or transfer fees Any Attempted Transfer without Mentor Graphics prior written consent shall be a material breach of this Agreement and may at Mentor Graphics option result in the immediate termination of the Agreement and or the licenses granted under this Agreement The terms of this Agreement including without limitation the licensing and assignment provisions shall be binding upon Customer s permitted successors in interest and assigns 10 11 12 5 4 The provisions of this Section 5 shall survive the termination of this Agreement SUPPORT SERVICES To the extent Customer purchases support services Mentor Gra
348. of doubt this warranty applies only to the initial shipment of Software under an Order and does not renew or reset for example with the delivery of a Software updates or b authorization codes or alternate Software under a transaction involving Software re mix This warranty shall not be valid if Products have been subject to misuse unauthorized modification or improper installation MENTOR GRAPHICS ENTIRE LIABILITY AND CUSTOMER S EXCLUSIVE REMEDY SHALL BE AT MENTOR GRAPHICS OPTION EITHER A REFUND OF THE PRICE PAID UPON RETURN OF THE PRODUCTS TO MENTOR GRAPHICS OR B MODIFICATION OR REPLACEMENT OF THE PRODUCTS THAT DO NOT MEET THIS LIMITED WARRANTY PROVIDED CUSTOMER HAS OTHERWISE COMPLIED WITH THIS AGREEMENT MENTOR GRAPHICS MAKES NO WARRANTIES WITH RESPECT TO A SERVICES B PRODUCTS PROVIDED AT NO CHARGE OR C BETA CODE ALL OF WHICH ARE PROVIDED AS IS 8 2 THE WARRANTIES SET FORTH IN THIS SECTION 8 ARE EXCLUSIVE NEITHER MENTOR GRAPHICS NOR ITS LICENSORS MAKE ANY OTHER WARRANTIES EXPRESS IMPLIED OR STATUTORY WITH RESPECT TO PRODUCTS PROVIDED UNDER THIS AGREEMENT MENTOR GRAPHICS AND ITS LICENSORS SPECIFICALLY DISCLAIM ALL IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT OF INTELLECTUAL PROPERTY LIMITATION OF LIABILITY EXCEPT WHERE THIS EXCLUSION OR RESTRICTION OF LIABILITY WOULD BE VOID OR INEFFECTIVE UNDER APPLICABLE LAW IN NO EVENT SHALL MENTOR GRAPHICS OR ITS LICENSORS
349. ommands environment environment This command has two forms environment and env It allows you to display or change the current dataset and region signal environment Syntax environment dataset nodataset lt pathname gt forward back Arguments dataset optional Displays the specified environment pathname with a dataset prefix Dataset prefixes are displayed by default nodataset optional Displays the specified environment pathname without a dataset prefix lt pathname gt optional Specifies a new pathname for the region signal environment If omitted the command causes the pathname of the current region signal environment to be displayed forward optional Displays the next environment in your history of visited environments back optional Displays the previous environment in your history of visited environments Examples 128 e Display the pathname of the current region signal environment env e Change to another dataset but retain the currently selected context env test e Change all unlocked windows to the context test top foo env test top foo e Move down two levels in the design hierarchy env blk1 u2 e Move to the top level of the design hierarchy env ModelSim Reference Manual v10 1c Commands environment Related Topics Refer to Object Name Syntax for Refer to Setting your Context by information on specifying pathnames Navigating Source Files for mo
350. on of Xs for timing check violations ModelSim Reference Manual v10 1c Commands vsim e nodpiexports optional Instructs ModelSim to not generate C wrapper code for DPI export task and function routines found at elaboration time More specifically the command does not generate the exportwrapper so shared object file For a description on when you should use this argument refer to the section Deprecated Legacy DPI Flows in the User s Manual noexcludehiz optional Instructs ModelSim to include truth table rows that contain Hi Z states in the coverage count Without this argument these rows are automatically excluded e noexcludeternary optional Disables the automatic exclusion of UDB coverage data rows resulting from ternary expressions for the entire design Normal operation for code coverage is to include rows corresponding to the case where two data inputs are the same and the select input is a don t care To disable this automatic exclusion for a specified design unit only use vlog noexcludeternary lt design_unit gt instead nosdferror optional Errors issued by the SDF annotator while loading the design prevent the simulation from continuing whereas warnings do not Changes SDF errors to warnings so that the simulation can continue e nosdfwarn optional Disables warnings from the SDF annotator e nospecify optional Disables specify path delays and timing checks e now
351. on of std_logic to Z high impedance for ports of type OUT and INOUT IEEE Std 1076 1987 VHDL Language Reference Manual LRM compliant behavior is for std_logic to initialize to U uninitialized which is incompatible with the behavior expected by synthesis and hardware display lt display_spec gt optional Specifies the name of the display to use Does not apply to Windows platforms For example display 0 displaymsgmode both tran wlf optional Controls the transcription of display system task messages to the transcript and or the Message Viewer Refer to the section Message Viewer Window in the User s Manual for more information and the displaymsgmode ini file variable both outputs messages to both the transcript and the WLF file tran outputs messages only to the transcript therefore they are not available in the Message Viewer Default behavior wlf outputs messages only to the WLF file Message Viewer therefore they are not available in the transcript The display system tasks displayed with this functionality include display strobe monitor write as well as the analogous file I O tasks that write to STDOUT such as fwrite or fdisplay do lt command_string gt lt macro_file_name gt optional Instructs vsim to use the command s specified by lt command_string gt or the macro file named by lt macro_file_name gt rather than the startup file specified in the ini file
352. onbreak setting is restored The script must be followed by a run command to take effect Use an empty string to change the onbreak command back to its default behavior onbreak In this case the macro will be interrupted after a breakpoint occurs after any associated bp command string is executed If you specify this command in a macro without a script the default behavior is to pause and return control to the command line You can then enter onbreak without arguments on the command line after the macro has paused to return the current onbreak command string Syntax onbreak lt script gt lt script gt Arguments e lt script gt optional Any command or script can be used as an argument to onbreak If you want to use more than one command or script use a semicolon to separate them or place them on multiple lines and enclose the entire script in curly braces or quotation marks You must use the onbreak command before a run run continue or step command If a run or step comand is issued within an onbreak script the script will return immediately and any following commands will not be executed It is an error to execute any commands within an onbreak command string following any of the run commands This restriction applies to any macros or Tcl procedures used in the onbreak command string Examples e Examine the value of the HDL object data when a breakpoint is encountered Then continue the run command
353. once on a previous ModelSim or VSIM prompt in the transcript to copy the command typed at that prompt to the active cursor ModelSim Reference Manual v10 1c Syntax and Conventions Numbering Conventions Table 1 6 Keyboard Shortcuts for Command History cont shows the last few commands up to 50 are kept Numbering Conventions Numbers in ModelSim can be expressed in either VHDL or Verilog style You can use two styles for VHDL numbers and one for Verilog VHDL Numbering Conventions There are two types of VHDL number styles VHDL Style 1 radix value Table 1 7 VHDL Number Conventions Style 1 Element Description indicates a negative number optional can be any base in the range 2 through 16 2 8 10 or 16 by default numbers are assumed to be decimal optional specifies the numeric value expressed in the specified radix required is a delimiter between the radix and the value the first sign is required if a radix is used the second is always optional A can also be used to designate a don t care element when you search for a signal value or expression in the List or Wave window If you want the to be read as a don t care element rather than a negative sign be sure to enclose the number in double quotes For instance you would type 0110 as opposed to 0110 If you don t include the double quotes ModelSim will read the as a negative
354. ond argument to the bp command appendinst optional When specifying multiple breakpoints with inst append each instance path condition to the earlier condition This overrides the default behavior in which each condition overwrites the previous one ModelSim Reference Manual v10 1c Commands bp e disable optional Sets the breakpoint to a disabled state You can enable the breakpoint later using the enablebp command This command enables breakpoints by default e lt command gt optional must be specified as the final argument Specifies one or more commands that are to be executed at the breakpoint You must separate multiple commands with semicolons or place them on multiple lines Braces are required only if the string contains spaces Note aasan You can also specify this command string by choosing Tools gt Breakpoints from the main menu and using the Modify Breakpoints dialog box Any commands that follow a run or step command are ignored A run or step command terminates the breakpoint sequence This rule also applies if you use a macro within the command string If many commands are needed after the breakpoint you could place them in a macro file e cond lt condition_expression gt optional Specifies one or more conditions that determine whether the breakpoint is hit lt condition_expression gt A conditional expression that results in a true false value You must enclose the
355. op contains three instances ul u2 and u3 of a Preoptimized Design Unit named pduMod vlib work vlog pduMod v Preoptimize pduMod and annotate with sdf1 vopt pdu pduMod o pduMod_opt sdfmin pduMod sdf1 vlog top v Use the default SDF file sdf1 for the PDU instance of ul but override the SDF for u2 and u3 vsim top sdf_verbose sdftypr top u2 sdf2 sdfmaxr top u3 sdf3 run all sdfmaxerrors lt n gt optional Controls the number of Verilog SDF missing instance messages to be generated before terminating vsim lt n gt is the maximum number of missing instance error messages to be emitted The default number is 5 sdfnoerror optional Errors issued by the SDF annotator while loading the design prevent the simulation from continuing whereas warnings do not Changes SDF errors to warnings so that the simulation can continue ModelSim Reference Manual v10 1c 363 Commands vsim 364 sdfnowarn optional Disables warnings from the SDF reader Refer to VHDL Simulation for an additional discussion of SDF sdf_report_unannotated_insts optional Enables error messages for any un annotated Verilog instances with specify blocks or VHDL instances with VITAL timing generics that are under regions of SDF annotation sdf_verbose optional Turns on the verbose mode during SDF annotation The Transcript window provides detailed warnings and summaries of the current annotation as well as info
356. optimization will be slower because indexing and optimization require significant memory and CPU resources Disabling indexing makes viewing wave data slower unless the display is near the start of the WLF file Disabling indexing also disables optimization of the WLF file but may provide a significant performance boost when archiving WLF files Indexing and optimization information can be added back to the file using the wlfman optimize command index Enables indexing default noindex Disables indexing and optimization n optional Lists regions only no signals opt noopt optional Controls optimization of the output WLF file opt Enables WLF file optimization default noopt Disables WLF file optimization p lt endTime gt optional Specifies the simulation time at which wlfman will stop monitoring the WLF file lt endTime gt Any positive integer q optional Suppress normal status messages while monitoring r lt object gt optional Specifies an object region to recursively include in the output If lt object gt is a signal the output would be the same as using s rank optional Sorts the wlfman profile report by percentage of the total file space used by each signal s lt symbol gt optional Specifies an object to include in the output By default all objects are included ModelSim Reference Manual v10 1c t lt resolution gt Commands wlfman optional Specifie
357. optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces extend to by required Specifies the format for extending waves ModelSim Reference Manual v10 1c 395 Commands wave edit to Extends the wave to the time specified by time lt time gt by Extends the wave by the amount of time specified by time lt time gt e forward lt time gt lt unit gt required if backward lt time gt is not specified The amount to stretch or move the edge forwards in simulation time lt time gt Specified as an integer or decimal number lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces lt number gt optional The number of editing operations to undo or redo If omitted only one editing operation is undone or redone e lt object_name gt required The pathname of the waveform to edit Must be specified as the last argument to wave edit e start lt time gt lt unit gt required The beginning of the s
358. ors are treated as SystemVerilog logic vectors b treats all scalars and vectors in the package as SystemVerilog bit type 1 treats all scalars and vectors in the package as SystemVerilog logic type r treats all scalars and vectors in the package as SystemVerilog reg type i ignores the range specified with VHDL integer types Can be specified together with b l or r spaces are not allowed between arguments e modelsimini lt ini_filepath gt optional Loads an alternate initialization file that replaces the current initialization file Overrides the file path specified in the MODELSIM environment variable lt ini_filepath gt Specifies either an absolute or relative path to the initialization file On Windows systems the path separator should be a forward slash ModelSim Reference Manual v10 1c 281 Commands vcom 282 nol164 optional Causes the source files to be compiled without taking advantage of the built in version of the IEEE std_logic_1164 package This will typically result in longer simulation times for VHDL programs that use variables and signals of type std_logic noaccel lt package_name gt optional Turns off acceleration of the specified package in the source code using that package lt package_name gt A VHDL package name nocasestaticerror optional Suppresses case statement static warnings VHDL standards require that case statement alternative choices be static at
359. ort that is not on the component and for which there is no error otherwise o A direct recursive subprogram call o In cases involving class SIGNAL formal parameters as described in the IEEE Standard VHDL Language Reference Manual entitled Signal parameters This check only applies to designs compiled using 87 If you compile using 93 it would be flagged as a warning or error even without the lint argument Can also be enabled using the Show_Lint variable in the modelsim ini file e lower optional Forces vecom to convert uppercase letters in object identifiers to lowercase You can also enable this by setting the PreserveCase variable to 0 in the modelsim ini file e IrmVHDLConfigVis optional default Forces vcom to use visibility rules that comply with the Language Reference Manual when processing VHDL configurations Refer to veom oldconfigvis or the oldVHDLConfigurationVisibility variable in the modelsim ini file for more information e mixedsvvh b 111 r i optional Facilitates using VHDL packages at the SystemVerilog VHDL boundary of a mixed language design When you compile a VHDL package with mixedsvvh the package can be included in a SystemVerilog design as if it were defined in SystemVerilog itself Executing mixedsvvh without arguments compiles VHDL vectors in the following ways e VHDL bit_vectors are treated as SystemVerilog bit vectors e VHDL std_logic_vectors std_ulogic_vectors and vl_logic_vect
360. ort values as x vcd dumpportson turns on VCD dumping and records the current values of all selected ports vcd file specifies the filename and state mapping for the VCD file created by a vcd add command vcd files specifies filenames and state mapping for the VCD files created by the vcd add command supports multiple VCD files vcd flush flushes the contents of the VCD file buffer to the VCD file vcd limit vcd off specifies the maximum size of the VCD file turns off VCD dumping and records all VCD variable values as x vcd on turns on VCD dumping and records the current values of all VCD variables vced2wlf translates VCD files into WLF files vcom compiles VHDL design units vdel deletes a design unit from a specified library vdir lists the contents of a design library vencrypt encrypts Verilog code contained within encryption envelopes verror prints a detailed description of a message number vgencomp writes the equivalent VHDL component declaration for a Verilog module to standard output vhencrypt encrypts VHDL code contained within encryption envelopes view virtual count opens a ModelSim window and brings it to the front of the display counts the number of currently defined virtuals that were not read in using a macro file virtual define virtual delete prints the definition of a virtual signal or function in the form
361. orted the max and min arguments provide an easier way to define upper and lower limits of an analog waveform e noupdate optional Prevents the Wave window from updating when a series of add wave commands are executed in series e position lt location gt optional Specifies where the command adds the signals lt location gt Can be any of the following top Adds the signals to the beginning of the list of signals bottom end Adds the signals to the end of the list of signals before above Adds the signals to the location before the first selected signal in the wave window after below Adds the signals to the location after the first selected signal in the wave window lt integer gt Adds the signals beginning at the specified point in the list of signals e lt radix_type gt optional Specifies the radix type for the objects that follow in the command Valid entries or any unique abbreviations are binary ascii unsigned decimal octal hex symbolic time and default If no radix is specified for an enumerated type the default radix is used You can change the default radix for the current simulation using the radix command You can change the default radix permanently by editing the DefaultRadix variable in the modelsim ini file If you specify a radix for an array of a VHDL enumerated type ModelSim converts each signal value to 1 0 Z or X e radix lt type gt optional S
362. orted for GUI Expresssions 0 000 29 Variables Supported for GUI Expresssions nunana nanara 29 Array Variables Supported for GUI Expresssions 00 30 Operators Supported for GUI Expresssions 0 0 00 e ee eee ee 31 Precedence of GUI Expression Operators 0 0 00 ce cece eee 32 Casting Conversions Supported for GUI Expresssions 33 VHDL Logic Values Used in GUI Search 0 00 00 cee eee 37 Verilog Logic Values Used in GUI Search 0 000000 cee ee eee 38 Supported Commands 064 44 4 cetaes case ene bae a Ghee eaaasadaaade 39 Message Viewer Categories 404 2 4504463 445090442 40040995 eoueeee ans 57 runStatus Command States 24422644 cbcndabarabaradavedacaeaeda ae sas 220 runStatus full Command Information 0 0 0 eee eee eee 220 Warning Message Categories for vcom nowarn 0 eee eee ee 284 Desien Unit Properti s 2124 cadec and chaeeaedebeee Phdc ede ANOTE EERS 291 Warning Message Categories for vlog nowarn 000 sees 339 Wave Window Commands for Cursor 0 0 cee eee eee 384 Wave Window Commands for Expanded Time Display 384 Wave Window Commands for Controlling Display 385 Wave Window Commands for Zooming 00 cee eee eee eee 385 ModelSim Reference Manual v10 1c Chapter 1 Syntax and Conventions Documentation Conventions This manual uses
363. ot clocked logic Edit the CheckSynthesis variable in the modelsim ini file to set a permanent default e debugVA optional Prints a confirmation if a VITAL cell was optimized or an explanation of why it was not during VITAL level 1 acceleration e deferSubpgmCheck optional Forces the compiler to report array indexing and length errors as warnings instead of as errors when encountered within subprograms Subprograms with indexing and length errors that are invoked during simulation cause the simulator to report errors which can potentially slow down simulation because of additional checking e error lt msg_number gt lt msg_number gt Optional Changes the severity level of the specified message s to error Edit the error variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information lt msg_number gt A number identifying the message Multiple message numbers are specified as a comma separated list e explicit optional Directs the compiler to resolve ambiguous function overloading by favoring the explicit function definition over the implicit function definition Strictly speaking this behavior does not match the VHDL standard However the majority of EDA tools choose explicit operators over implicit operators Using this switch makes ModelSim compatible with common industry practice e f lt filename gt optional Specifies a fi
364. owing six topics Topic commands debugging execution Tcl Tk incrT CL 152 Description Lists all available commands and topics Lists debugging commands Lists commands that control execution of your simulation Lists all available Tcl commands Lists all available Tk commands Lists all available incrTCL commands ModelSim Reference Manual v10 1c Commands history history This command lists the commands you have executed during the current session History is a Tcl command For more information consult the Tcl Man Pages Help gt Tcl Man Pages Syntax history clear keep lt value gt Arguments e clear optional Clears the history buffer e keep lt value gt optional Specifies the number of executed commands to keep in the history buffer lt value gt Any positive integer where the default is 50 ModelSim Reference Manual v10 1c 153 Commands layout layout This command allows you to perform a number of editing operations on custom GUI layouts such as loading saving maximizing and deleting The command options include Syntax layout active returns the current active window layout current lists the current layout layout delete removes the current layout from the modelsim file UNIX Linux or Registry Windows layout load opens the specified layout layout names lists all known layouts layout normal minimizes the current maximized w
365. own in the Structure window e startaddress lt st gt optional Specifies the start address for a range of addresses to be saved lt st gt Any valid address in the memory e wordsperline lt Nwords gt optional Specifies how many memory values are to be printed on each line lt Nwords gt Any unsigned integer where the default assumes an 80 character display width Examples e Save the memory contents of the instance top m mem 0 10 to memfile written in the mti radix mem save format mti outfile memfile start 0 end 10 top m mem The contents of memfile are as follows memory data file do not edit the following line required for mem load use format mti addressradix d dataradix s version 1 0 O 0000000000000000 0000000000000001 0000000000000010 00000000000000 4 0000000000000100 0000000000000101 0000000000000110 00000000000001 8 0000000000001000 0000000000001001 XXXXXXXXXXXXXXXX ModelSim Reference Manual v10 1c 171 Commands mem save Related Topics mem display e mem load 172 ModelSim Reference Manual v10 1c Commands mem search mem search This command finds and prints to the screen the first occurring match of a specified memory pattern in the specified memory instance Shorthand instance names are accepted Optionally you can instruct the command to print all occurrences The search pattern can be one word or a sequence of words Syntax mem search
366. p optional Directs the compiler to skip all a architectures b bodies c configurations e entities p packages Any combination in any order can be used but one choice is required if you use this switch source optional Displays the associated line of source code before each error message that is generated during compilation By default only the error message is displayed e suppress lt msg_number gt lt msg_number gt optional Prevents the specified message s from displaying The lt msg_number gt is the number preceding the message you wish to suppress You cannot suppress Fatal or Internal ModelSim Reference Manual v10 1c 285 Commands vcom messages Edit the suppress variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information lt msg_number gt A number identifying the message Multiple message numbers are specified as a comma separated list time optional Reports the wall clock time vcom takes to compile the design Note that if many processes are running on the same system wall clock time may differ greatly from the actual cpu time spent on vcom version optional Returns the version of the compiler as used by the licensing tools vmake optional Generates a complete record of all command line data and files accessed during the compile of a design This data is then used by the vmake command t
367. packet examine myPackage packet a 0 examine top my a 0 Both of the above commands return the contents of the first element of the static array a within class packet 14 ModelSim Reference Manual v10 1c Syntax and Conventions Design Object Names examine top my b Return the contents of the instance specific array b examine top my b 0 Return the contents of the first element of the instance specific array b When referring to the contents of a package or class you cannot use the standard path separators a period or a forward slash Specifying Names We distinguish between four types of object names simple relative fully rooted and absolute Simple name does not contain any hierarchy It is simply the name of an object e g clk or data 3 0 in the current context e Relative name does not start with a path separator and may or may not include a dataset name or a hierarchical path e g u data or view clk A relative name is relative to the current context in the current or specified dataset e Fully rooted name starts with a path separator and includes a hierarchical path to an object e g top ul clk There is a special case of a fully rooted name where the top level design unit name can be unspecified e g u clk In this case the first top level instance in the design is assumed e Absolute name is an exactly specified hierarchical name containing a dataset name and
368. pecification of Array Bits and Slices for important information about using square brackets and parentheses in ModelSim commands o Array slicing Slices or part selects of arrays are specified using either parentheses or square brackets around a range specification A range is two numbers separated by one of the following to downto or a colon You must also surround the object and specified array slice with curly braces Refer to Tcl Syntax and Specification of Array Bits and Slices for important information about using square brackets and parentheses in ModelSim commands o Record field selection A record field is specified using a period followed by the name of the field Tcl Syntax and Specification of Array Bits and Slices Because ModelSim is a Tcl based tool you must surround objects and signals with curly braces when specifying array bits or slices with parentheses spaces or square brackets For example toggle add data toggle add data force bus1 1 1 3 0 3 to 0 Further Details Because ModelSim is basd on Tcl its commands follow Tcl syntax One problem you may encounter with ModelSim commands is the use of square brackets parentheses or spaces when specifying array bits and slices As shown on the previous page square brackets are used to specify slices of arrays for example data 3 0 However in Tcl square brackets s
369. pecified cursor or if no cursor is specified reports the active cursor wave cursor add Adds a new cursor at specified time and returns the number of the newly added cursor wave cursor configure Sets or reports values for the specified cursor wave cursor delete Deletes the specified cursor or if no cursor is specified the active cursor wave cursor see Positions the wave display such that the specified or active cursor appears at the specified percent from the left edge of the display 0 is the left edge 100 is the right edge wave cursor time Moves or reports the time of the specified cursor or if no cursor is specified the time of the active cursor Table 2 9 Wave Window Commands for Expanded Time Display Display view Commands Description wave expand mode Selects the expanded time display mode Delta Time Event Time or off wave expand all Expands simulation time into delta time steps if Delta Time mode is currently selected WLFCollapseMode 1 or into event time steps if Event Time mode is currently selected WLFCollapseMode 0 over the full range of the simulation from time 0 to the current time wave expand cursor Expands simulation time into delta time steps if Delta Time mode is currently selected WLFCollapseMode 1 or into event time steps if Event Time mode is currently selected WLFCollapseMode 0 at the simulation time of the active cursor wave expand range Expands simulation ti
370. pecifies a user defined radix The radix lt type gt switch can be used in place of the lt radix_type gt switch For example radix hexadecimal is the same as hex ModelSim Reference Manual v10 1c 63 Commands add wave lt type gt binary ascii unsigned decimal octal hex symbolic time and default This option overrides the global setting of the default radix the DefaultRadix variable in the modelsim ini file for the current simulation only radixenumnumeric optional Causes Verilog and SystemC enums to be displayed as numbers formatted by the current radix This overrides the default behavior of always showing enums symbolically e radixenumsymbolic optional Restores the default behavior of displaying Verilog and SystemC enums as symbols by reversing the action of the radixenumnumeric option recursive optional For use with wildcard searches Specifies that the scope of the search is to descend recursively into subregions If you do not specify this switch the search is limited to the selected region You can use the depth argument to specify how far down the hierarchy to descend e time optional Use time as the radix for Verilog objects that are register based types register vectors time int and integer types e lt object_name gt required unless specifying lt object_name gt sig1 sig2 Specifies the names of objects to be included in the Wave window Must be speci
371. pecifies one or more commands to be executed when an error is encountered during the elaboration portion of a vsim command The command is used by placing it within a macro Use the onElabError command without arguments to return to a prompt Syntax onElabError lt command gt lt command gt Arguments e lt command gt optional Any command can be used as an argument to onElabError If you want to use more than one command use a semicolon to separate the commands or place them on multiple lines The entire command string must be placed in curly braces Related Topics e do 188 ModelSim Reference Manual v10 1c Commands onerror onerror This command is used within a macro before a run command it specifies one or more commands to be executed when a running macro encounters an error Using the onerror command without arguments will return the current onerror command string Use an empty string onerror to change the onerror command back to its default behavior Use onerror with a resume command to allow an error message to be printed without halting the execution of the macro file You can also set the global OnErrorDefaultAction Tcl variable to dictate what action ModelSim takes when an error occurs To set the variable on a permanent basis you must define the variable in a modelsim tcl file Refer to The modelsim tcl File for details When your onerror command is successful the macro wi
372. pecify either of these arguments all breakpoints are enabled Use the bp command with no arguments to find labels and ID numbers for all breakpoints in the current simulation Use the when command with no arguments to find labels and ID numbers of all when statements in the current simulation Related Topics bd onbreak bp resume e disablebp e when 126 ModelSim Reference Manual v10 1c Commands encoding encoding This command translates between the 16 bit Unicode characters used in Tcl strings and a named encoding such as Shift JIS There are four encoding commands used to work with the encoding of your character representations in the GUI e encoding convertfrom Convert a string from the named encoding to Unicode e encoding convertto Convert a string to the named encoding from Unicode e encoding names Returns a list of all valid encoding names e encoding system Changes the current system encoding to a named encoding If a new encoding is omitted the command returns the current system encoding The system encoding is used whenever Tcl passes strings to system calls Syntax encoding convertfrom lt encoding_name gt lt string gt encoding convertto lt encoding_name gt lt string gt encoding names encoding system lt encoding_name gt Arguments e string Specifies a string to be converted e encoding name The name of the encoding to use ModelSim Reference Manual v10 1c 127 C
373. phics will provide Customer updates and technical support for the Products at the Customer site s for which support is purchased in accordance with Mentor Graphics then current End User Support Terms located at http supportnet mentor com about legal AUTOMATIC CHECK FOR UPDATES PRIVACY Technological measures in Software may communicate with servers of Mentor Graphics or its contractors for the purpose of checking for and notifying the user of updates and to ensure that the Software in use is licensed in compliance with this Agreement Mentor Graphics will not collect any personally identifiable data in this process and will not disclose any data collected to any third party without the prior written consent of Customer except to Mentor Graphics outside attorneys or as may be required by a court of competent jurisdiction LIMITED WARRANTY 8 1 Mentor Graphics warrants that during the warranty period its standard generally supported Products when properly installed will substantially conform to the functional specifications set forth in the applicable user manual Mentor Graphics does not warrant that Products will meet Customer s requirements or that operation of Products will be uninterrupted or error free The warranty period is 90 days starting on the 15th day after delivery or upon installation whichever first occurs Customer must notify Mentor Graphics in writing of any nonconformity within the warranty period For the avoidance
374. ples e The command will produce a do file named trigger do from the signal definition file trigger def and the vector file trigger sef tssi2mti trigger def trigger sef gt trigger do e This example is the same as the previous one but uses the standard input instead tssi2mti trigger def lt trigger sef gt trigger do Related Topics e force run write tssi ModelSim Reference Manual v10 1c 249 Commands ui_VVMode ui_ VVMode This command specifies behavior when encountering UI registration calls used by verification packages such as AVM or OVM Returns the current setting when specifies without an argument Syntax ui_VVMode full logclass logobj nolog off Arguments e full optional Enables the context registration of the UI registration call and automatically logs both the class type and the registered object to the WLF file logclass optional Enables the context registration of the UI registration call and automatically logs the class type of the registered object to the WLF file logobj optional Enables the context registration of the UI registration call and automatically logs the registered object to the WLF file nolog optional Enables the context registration of the UI registration call but does not automatically log the registration to the WLF file default off optional Disables context registration and automatic logging when encountering UI registration calls Descr
375. pose BETA CODE 4 1 Portions or all of certain Software may contain code for experimental testing and evaluation Beta Code which may not be used without Mentor Graphics explicit authorization Upon Mentor Graphics authorization Mentor Graphics grants to Customer a temporary nontransferable nonexclusive license for experimental use to test and evaluate the Beta Code without charge for a limited period of time specified by Mentor Graphics This grant and Customer s use of the Beta Code shall not be construed as marketing or offering to sell a license to the Beta Code which Mentor Graphics may choose not to release commercially in any form 4 2 If Mentor Graphics authorizes Customer to use the Beta Code Customer agrees to evaluate and test the Beta Code under normal conditions as directed by Mentor Graphics Customer will contact Mentor Graphics periodically during Customer s use of the Beta Code to discuss any malfunctions or suggested improvements Upon completion of Customer s evaluation and testing Customer will send to Mentor Graphics a written evaluation of the Beta Code including its strengths weaknesses and recommended improvements 4 3 Customer agrees to maintain Beta Code in confidence and shall restrict access to the Beta Code including the methods and concepts utilized therein solely to those employees and Customer location s authorized by Mentor Graphics to perform beta testing Customer agrees that any wri
376. ptions are name time and lock If no option is specified current value of all options are reported lt start time gt lt end time gt optional start time and end time are times that specify an expand collapse or zoom range If neither number is specified the command returns the current range e time lt time gt optional Specifies a cursor time lt time gt Any positive integer e window lt win gt optional All commands default to the active Wave window unless this argument is used to specify a different Wave window lt win gt Specifies the name of a Wave window other than the current active window Examples Either of these commands creates a zoom range with a start time of 20 ns and an end time of 100 ns wave zoom range 20ns 100ns wave zoom range 20 100 Return the name of cursor 2 wave cursor configure 2 name e Name cursor 2 reference cursor and return that name with wave cursor configure 2 name reference cursor e Return the values of all wave cursor configure options for cursor 2 wave cursor configure 2 ModelSim Reference Manual v10 1c 387 Commands wave create wave create This command generates a waveform known only to the GUI You can then modify the waveform interactively or with the wave edit command and use the results to drive simulation Refer to Generating Stimulus with Waveform Editor for more information Some arguments to this command are order dep
377. r in messages of the format ModelSim Reference Manual v10 1c 295 Commands verror lt Level gt lt Tool gt lt Group gt lt MsgNum gt lt FormattedMsg gt You can specify lt msgNum gt any number of times for one verror command in a space separated list Optionally you can specify the toolname prior to the message number similar to how it appears in an error message For example verror vsim 5003 e ranges required when not specifying lt msgNum gt or all Prints the numeric ranges of error message numbers organized by tool Example e Ifyou receive the following message in the transcript Error vsim 3061 foo v 22 Too many Verilog port connections and you would like more information about this message you would type verror 3061 and receive the following output Message 3061 Too many Verilog ports were specified in a mixed VHDL Verilog instantiation Verify that the correct VHDL Verilog connection is being made and that the number of ports matches DOC ModelSim User s Manual Mixed VHDL and Verilog Designs Chapter 296 ModelSim Reference Manual v10 1c Commands vgencomp vgencomp Once a Verilog module is compiled into a library you can use this command to write its equivalent VHDL component declaration to standard output Optional switches allow you to generate bit or vl_logic port types std_logic port types are generated by default This command pro
378. r libraries 290 compiling range checking in VHDL 285 Verilog 329 VHDL 275 at a specified line number 280 selected design units just eapbc 280 441 ABCDEFGH I standard package s 285 342 VHDL 2008 REAL VECTOR 279 compressing files VCD files 257 267 concatenation directives 35 of signals 35 conditional breakpoints 406 configurations simulating 351 configure command 95 constants in case statements 282 values of displaying 117 130 conversion radix 202 D dataset alias command 101 dataset clear command 102 dataset close command 103 dataset config command 104 106 dataset info command 107 dataset list command 108 dataset open command 109 dataset rename command 110 112 dataset restart command 111 dataset snapshot command 113 datasets environment command specifying with 128 declarations hiding implicit with explicit 287 define 331 delay interconnect 359 delay_mode_distributed 332 delay_mode_path 332 delay_mode_unit 332 delay_mode_zero 332 delayed 30 delete command 116 deltas collapsing in WLF files 368 dependencies checking 290 dependency errors 278 333 describe command 117 442 JKLMNOPQRSTUVWX YZ design loading interrupting 351 design units report of units simulated 429 Verilog adding to a library 329 directories mapping libraries 349 disablebp command 118 dividers adding from command line 61 divTime ccommand 241
379. r net If the source location cannot be determined the value n a is returned for that driver Example drivers top dut pkt_cnt 4 Drivers for top dut pkt_cnt 4 StO Net top dut pkt_cnt 4 St0 Driver top dut pkt_counter IMPLICIT WIRE cnt_out 6 In some cases the output may supply a strength value similar to 630 or 52x which indicates an ambiguous verilog strength ModelSim Reference Manual v10 1c 121 Commands drivers Related Topics e readers e Verilog Language Reference Manual Std 1365 2005 section 7 10 2 Ambiguous strengths sources and combinations 122 ModelSim Reference Manual v10 1c Commands dumplog64 dumplog64 This command dumps the contents of the specified WLF file in a readable format to stdout The WLF file cannot be opened for writing in a simulation when you use this command This command cannot be used in a DO file Syntax dumplog64 lt filename gt Arguments e lt filename gt required The name of the WLF file to be read ModelSim Reference Manual v10 1c 123 Commands echo echo This command displays a specified message in the Transcript window Syntax echo lt text_string gt Arguments e lt text_string gt required Specifies the message text to be displayed If the text string is surrounded by quotes blank spaces are displayed as entered If quotes are omitted two or more adjacent blank spaces are compressed into one space Examples e If the curr
380. r propagating pulse errors see pulse_e_style_onevent e pulse_e_style_onevent optional Selects the on event style of propagating pulse errors see pulse_e Default A pulse error propagates to the output as an X and the on event style is to schedule the X to occur at the same time and for the same duration that the pulse would have occurred if it had propagated through normally e pulse_r lt percent gt optional Controls how pulses are propagated through specify path delays where lt percent gt is a number between 0 and 100 that specifies the rejection limit as a percentage of the path delay A pulse less than the rejection limit is suppressed from propagating to the output If the error limit is not specified by pulse_e then it defaults to the rejection limit e sdf_nocheck_celltype optional Disables the error check a for mismatch between the CELLTYPE name in the SDF file and the module or primitive name for the CELL instance It is an error if the names do not match e show_cancelled_e optional Drives a pulse error state X for the duration of a negative pulse on a specify path delay By default ModelSim filters negative pulses e sv_lib lt shared_obj gt required for use with DPI import libraries Specifies the name of the DPI shared object with no extension Refer to DPI Use Flow for additional information ModelSim Reference Manual v10 1c 377 Commands vsim sv_liblist lt
381. range lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt limit gt and lt unit gt within curly braces lt topindex gt optional An integer that specifies the vertical scroll position of the window You must specify a zoom range to specify topindex The number identifies which object the window should be scrolled to For example specifying 20 means the Wave window will be scrolled down to show the 20th object ModelSim Reference Manual v10 1c 75 Commands bookmark add wave Examples e Add a bookmark named foo to the current default Wave window The bookmark marks a zoom range from 10ns to 1000ns and a scroll position of the 20th object in the window bookmark add wave foo 10 ns 1000 ns 20 Related Topics bookmark delete wave bookmark goto wave bookmark list wave write format 76 ModelSim Reference Manual v10 1c Commands bookmark delete wave bookmark delete wave This command deletes bookmarks from the specified Wave window You can also interactively delete a bookmark through the GUI by selecting the Wave gt Bookmarks gt Bookmarks menu item Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax bookma
382. ranscript transcript file e Close the current transcript file named trans1 txt and open a new transcript file incrementing the file name by 1 transcript file trans txt Closes trans1 txt and opens trans2 txt e This series of commands results in the transcript containing only data from the second millisecond of the simulation The first transcript file command closes the transcript so no data is being written to it The second transcript file command opens a new transcript and records data from ms to 2 ms transcript file run1ms transcript file transcript run 1 ms ModelSim Reference Manual v10 1c 245 Commands transcript file Related Topics e Creating a Transcript File Setting Preference Variables from the GUI Transcript Window 246 transcript path transcript sizelimit ModelSim Reference Manual v10 1c Commands transcript path transcript path This command returns the full pathname to the current transcript file Syntax transcript path Arguments e None Related Topics e Creating a Transcript File e Transcript Window e Setting Preference Variables from the transcript file GUI ModelSim Reference Manual v10 1c 247 Commands transcript sizelimit transcript sizelimit This command sets or queries the current preference value for the transcript fileSizeLimit value If the size limit is reached the transcript file is saved and simulation continues Synta
383. re information about forward and back ModelSim Reference Manual v10 1c 129 Commands examine examine This command has two forms examine and exa It examines one or more objects and displays current values or the values at a specified previous time in the Transcript window It can also compute the value of an expression of one or more objects The following objects can be examined e VHDL signals shared variables process variables constants and generics e Verilog nets registers parameters and variables To display a previous value specify the desired time using the time option To compute an expression use the expr option The expr and the time options may be used together Virtual signals and functions may also be examined within the GUI actual signals are examined in the kernel The following rules are used by the examine command to locate an HDL object Ifthe name does not include a dataset name then the current dataset is used e Ifthe name does not start with a path separator then the current context is used e Ifthe name is a path separator followed by a name that is not the name of a top level design unit then the first top level design unit in the design is used e For a relative name containing a hierarchical path if the first object name cannot be found in the current context then an upward search is done up to the top of the design hierarchy to look for a matching object name e Ifn
384. re design no_path_edge optional Causes ModelSim to ignore the input edge specified in a path delay The result of this argument is that all edges on the input are considered when selecting the output delay Verilog XL always ignores the input edges on path delays no_pulse_msg optional Disables the warning message for specify path pulse errors A path pulse error occurs when a pulse propagated through a path delay falls between the pulse rejection limit and pulse error limit set with the pulse_r and pulse_e options A path pulse error results in a warning message and the pulse is propagated as an X The no_pulse_msg option disables the warning message but the X is still propagated no_risefall_delaynets optional Disables the rise fall delay net delay negative timing check algorithm This argument is provided to return ModelSim to its pre 6 0 behavior where violation regions must overlap in order to find a delay net solution In 6 0 versions and later ModelSim uses separate rise fall delays so violation regions need not overlap for a delay solution to be found no_show_cancelled_e optional Filters negative pulses on specify path delays so they don t show on the output Default Use show_cancelled_e to drive a pulse error state no_tchk_msg optional Disables error messages issued by timing check system tasks when timing check violations occur Notifier registers are still toggled and may result in the propagati
385. re is no design loaded checkpoint A checkpoint is being created do not interrupt this process cready initializing The design is loaded and is ready to run in C debug mode The user interface initialization is in progress Table 2 4 runStatus full Command Information bkpt stopped at breakpoint bkpt_builtin stopped at breakpoint on builtin process end reached end of requested run fatal_error encountered fatal error such as divide by 0 iteration_limit iteration limit reached possible feedback loop silent_halt mti_BreakSilent called step run step completed step_builtin 220 run step completed on builtin process ModelSim Reference Manual v10 1c Commands runStatus Table 2 4 runStatus full Command Information cont step_wait_suspend run step completed time advanced user_break run interrupted do to break key or C SIGINT user_halt mti_Break called user_stop stop or finish requested from vpi stop command etc gate_oscillation Verilog gate iteration limit reached pli stop_simulation called ModelSim Reference Manual v10 1c 221 Commands searchlog searchlog This command searches one or more of the currently open logfiles for a specified condition It can be used to search for rising or falling edges for signals equal to a specified value or for when a generalized expression becomes true A
386. re supported Verilog VHDL and C language styles The values are interpreted without regard to the size of the bus to be mapped Bus widths up to 64 bits are supported If the string contains spaces the string must be enclosed in quotation marks If they contain special characters square brackets curly braces backslashes they need to be quoted within curly braces See the examples below for further syntax lt name gt Required if delete is not used The user defined name of the virtual type Case is not ignored Use alpha numeric and underscore characters only unless you are using VHDL extended identifier notation If using VHDL extended identifier notation lt name gt needs to be quoted with double quotes or with curly braces Examples e Using positional notation associates each string with an enumeration index starting at zero and increasing by one in the positive direction When myConvertedSignal is displayed in the Wave List or Objects window the string stateO will appear when mysignal 0 statel when mysignal 1 state2 when mysignal 2 and so on ModelSim Reference Manual v10 1c 325 Commands virtual type virtual type stated statel state2 state3 mystateType virtual function mystateType mysignal myConvertedSignal add wave myConvertedSignal e Use sparse mapping of bus values to alphanumeric strings for an 8 bit one hot encoding It shows the variety of syntax
387. reakpoint at the time it is evaluated Syntax exit force code lt integer gt Argument e force optional Quits without asking for confirmation If this argument is omitted ModelSim asks you for confirmation before exiting You can also use f as an alias for this switch e code lt integer gt optional Quits the simulation and issues an exit code lt integer gt This is the value of the exit code You should not specify an exit code that already exists in the tool Refer to the section Exit Codes in the User s Manual for a list of existing exit codes You can also specify a variable in place of lt integer gt You should always print a message before executing the exit code command to explicitly state the reason for exiting Examples You can use exit code to instruct a vmake command to exit when it encounters an assertion error The onbreak command can specify commands to be executed upon an assert failure of sufficient severity after which the simulator can be made to return an exit status This is shown in the following example set broken 0 onbreak set broken 88 resume run all if broken puts failure exit status S broken exit code broken else puts success quit f The resume command gives control back to the commands following the run all to handle the condition appropriately ModelSim Reference Manual v10 1c 135 Commands find find This command loc
388. reates a VCD file Defaults to the current working directory and the filename dumpports vcd Multiple filenames can be opened during a single simulation lt filename gt Specifies a filename When specified with a gz extension the file is compressed force_direction optional Causes ved dumpports to use the specified port direction instead of driver location to determine whether the value being dumped is input or output This argument overrides the default use of the location of drivers on the net to determine port direction this is because Verilog port direction is not enforced by the language or by ModelSim in optional Includes ports of mode IN out optional Includes ports of mode OUT inout optional Includes ports of mode INOUT ModelSim Reference Manual v10 1c 257 Commands ved dumpports e no_strength_range optional Ignores strength ranges when resolving driver values This argument is an extension to the IEEE 1364 specification Refer to Resolving Values for additional information e unique optional Generates unique VCD variable names for ports even if those ports are connected to the same collapsed net vcdstim optional Ensures that port name order in the VCD file matches the declaration order in the instance module or entity declaration Refer to Port Order Issues for further information e lt object_name gt required Specifies one or more Verilog VHDL or SystemC obj
389. recommended when specifying pattern random Specifies a seed value for a randomly generated waveform lt value gt Any non negative integer where the default is 5 e sequence lt vall gt lt val2 gt optional recommended when specifying pattern repeater The set of values that you want repeated lt vall gt Value must be appropriate for the type of waveform you are creating Multiple values are entered as a space separated list and enclosed in curly braces e starttime lt time gt lt unit gt optional The simulation time at which the waveform should start If omitted the waveform starts at 0 simulation time units lt time gt Specified as an integer or decimal number lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces ModelSim Reference Manual v10 1c 391 Commands wave create e startvalue lt value gt required when specifying pattern counter The initial value of the counter This option applies to patterns specifying type Range only All other counter patterns start from 0 and go to the maximum value for that particular signal e g for a 3 bit signal the start value will be 000 and the end value will be 111 lt value
390. rence Manual v10 1c Commands write report write report This command prints a summary of the design being simulated including a list of all design units VHDL configurations entities and packages and Verilog modules with the names of their source files The summary includes a list of all source files used to compile the given design The Simulation Report contains the following information Design Simulated directory path of the design s top level module Number of signals nets in the design Number of processes in the design Simulator Parameters including o Current directory o Project file directory o Simulation time resolution List of design units used including o Module name o Architecture if applicable o Library directory o Source file o Timescale o Occurrences Some arguments to this command are order dependent Please read through the argument descriptions for more information Syntax write report capacity 1 s qdas 1 I s tcl lt filename gt Arguments e capacity optional Reports data on memory usage of various types of SystemVerilog constructs in the design ModelSim collects memory usage data for dynamic objects Must be specified first when specifying qdas To display memory data for all object types specify capacity l ModelSim Reference Manual v10 1c 429 Commands write report lt filename gt optional Specifies the name of the output file
391. required A can also be used to designate a don t care element when you search for a signal value or expression in the List or Wave windows If you want the to be read as a don t care element rather than a negative sign be sure to enclose the number in double quotes For instance you would type 0110 as opposed to 7 b 0110 If you don t include the double quotes ModelSim will read the as a negative sign For example b11111110 8 b11111110 Hffca23 21 H1fca23 23749 26 ModelSim Reference Manual v10 1c Syntax and Conventions GUI_expression_format GUL _expression_format The GUI_expression_format is an option of several simulator commands that operate within the ModelSim GUI environment The expressions help you locate and examine objects within the List and Wave windows expressions may also be used through the Edit gt Search menu in both windows The commands that use the expression format are configure examine searchlog virtual function virtual signal Expression Typing GUI expressions are typed The supported types consist of the following scalar and array types Scalar Types The scalar types are as follows boolean integer real time 64 bit integer enumeration and signal state Signal states are represented by the nine VHDL std_logic states U X 0 P 2 W Is 7A and map Verilog states 0 1 x and z are mapped into these states and the Verilog
392. rguments to this command are order dependent Please read the argument descriptions for more information Syntax searchlog command lt cmd gt count lt n gt deltas endtime lt time gt lt unit gt env lt path gt event lt time gt expr lt expr gt reverse rising falling anyedge startDelta lt num gt value lt string gt lt startTime gt lt unit gt lt pattern gt Description If at least one match is found it returns the time and optionally delta at which the last match occurred and the number of matches found in a Tcl list lt time gt lt matchCount gt where lt time gt is in the format lt number gt lt unit gt If the deltas option is specified the delta of the last match is also returned lt time gt lt delta gt lt matchCount gt If no matches are found a TCL_ERROR is returned If one or more matches are found but less than the number requested it is not considered an error condition and the time of the farthest match is returned with the count of the matches found Arguments e command lt cmd gt optional Specifies a Tcl command that will be called for each event on the specified signal lt cmd gt A Tcl command that receives four arguments and returns one of three values wey empty continue stop or The command will be passed four arguments the reason for the call the time of the event the delta for the event and the value
393. rk delete wave lt label gt all Arguments e lt label gt all required Controls which bookmarks to delete Must be specified as the first argument to the bookmark delete wave command lt label gt Specifies the name of the bookmark to delete all Specifies that all bookmarks in the window be deleted Examples e Delete the bookmark named foo from the current default Wave window bookmark delete wave foo Related Topics bookmark add wave bookmark goto wave bookmark list wave write format ModelSim Reference Manual v10 1c 77 Commands bookmark goto wave bookmark goto wave This command zooms and scrolls a Wave window using the specified bookmark You can also interactively navigate between bookmarks through the GUI by selecting the Wave gt Bookmarks gt Bookmarks menu item Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax bookmark goto wave lt label gt Arguments e lt label gt required Specifies the bookmark to go to Must be specified as the first argument to the bookmark goto wave command Related Topics bookmark add wave bookmark delete wave bookmark list wave e write format 78 ModelSim Reference Manual v10 1c Commands bookmark list wave bookmark list wave This command displays a list of available bookmarks in the Transcript window Syntax bookmark list wave Related Topic
394. rk goto wave 78 bookmark list wave 79 bp breakpoint 80 call 86 cd change directory 88 change 89 classinfo 91 configure 95 dataset alias 101 dataset clear 102 dataset close 103 dataset config 104 106 dataset info 107 dataset list 108 dataset open 109 dataset rename 110 112 dataset restart 111 dataset snapshot 113 delete 116 describe 117 disablebp 118 do 119 drivers 121 dumplog64 123 echo 124 edit 125 enablebp 126 environment 128 examine 130 exit 135 find 136 force 145 layout 154 log 156 Ishift 159 Isublist 160 440 JKLMNOPQRSTUVWX YZ mem compare 161 mem display 162 mem list 165 mem load 166 mem save 170 mem search 173 messages clearfilter 176 177 messages write 178 noforce 180 nolog 181 notation conventions 1 notepad 183 noview 184 nowhen 185 onbreak 186 onElabError 188 onerror 189 pause 192 printenv 193 194 process report 195 pwd 199 quietly 200 quit 201 radix 202 radix define 204 radix list 208 radix name 209 readers 211 report 212 restart 214 resume 216 run 217 runStatus 220 searchlog 222 see 225 setenv 226 shift 227 show 228 simstats 229 stack down 231 stack frame 232 stack level 233 stack tb 234 stack up 235 status 236 ModelSim Reference Manual v10 1c ABCDEFGH stop 238 suppress 239 tb traceback 240 Time 241 transcript 244 transcript file
395. rmation including the module name source file name and line number suppress lt msg_number gt lt msg_number gt optional Prevents the specified message s from displaying You cannot suppress Fatal or Internal messages Edit the suppress variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information sync optional Executes all X server commands synchronously so that errors are reported immediately Does not apply to Windows platforms t lt multiplier gt lt time_unit gt optional Specifies the simulator time resolution lt time_unit gt must be one of the following fs ps ns us ms sec The default is 1ps the optional lt multiplier gt may be 1 10 or 100 Note that there is no space between the multiplier and the unit for example 10fs not 10 fs If you omit the t argument the default simulator time resolution depends on design type o Ina VHDL design the value specified for the Resolution variable in modelsim ini is used o Ina Verilog design with timescale directives the minimum specified time precision of all directives is used o Ina Verilog design with no timescale directives the value specified for the Resolution variable in the modelsim ini file is used o Ina mixed design with VHDL on top the value specified for the Resolution variable in the modelsim ini file is used o Ina mixed design with Verilog o
396. rn gt required Indicates which signal names or wildcard patterns should be used in finding the signals to log where you can specify any number of names or wildcard patterns Related Topics virtual nolog e Virtual Objects 314 ModelSim Reference Manual v10 1c Commands virtual nohide virtual nohide This command reverses the effect of a virtual hide command causing the specified real or virtual signals to reappear the Objects window Syntax virtual nohide kind implicits explicits region lt path gt lt pattern gt Arguments kind implicits explicits optional Unhides only a subset of virtuals implicits virtual signals created internally by the tool explicits virtual signals explicitly created by a user such as with the virtual signal command Unique abbreviations are accepted region lt path gt optional Specifies a region of design space in which to look for the signal names lt path gt Specifies an absolute or relative path to the signal s On Windows systems the path separator should be a forward slash lt pattern gt required Indicates which signal names or wildcard patterns should be used in finding the signals to hide where wildcards are allowed and you can specify any number of names or patterns Related Topics virtual hide e Virtual Objects ModelSim Reference Manual v10 1c 315 Commands virtual nolog virtual nolog This command re
397. rn the complete definition of a radix if a name is given If no name is given it will list all the defined radices Syntax radix list lt name gt Arguments e lt name gt optional Returns the complete definition of the named radix Related Topics User Defined Radices radix radix define radix delete radix names radix signal 208 ModelSim Reference Manual v10 1c radix names This command returns a list of currently defined radix names Syntax radix names Arguments None Related Topics User Defined Radices radix radix define radix delete radix list radix signal ModelSim Reference Manual v10 1c Commands radix names 209 Commands radix signal radix signal This command sets or inspects radix values for the specified signal in the Objects Locals Schematic and Wave windows EE Noe The intent is for this command to be used for a small number of signals If the majority of signals in a design are to use a particular radix value then set that value as the default radix with the radix command and use the radix signal command for the rest When no argument is used the radix signal command returns a list of all signals with a radix Syntax radix signal lt signal_name gt lt radix_value gt fpoint lt decimal gt showbase Arguments e lt signal_name gt optional Name of the signal for which the radix will be set if lt radix_value gt is specified or i
398. rnished by Mentor Graphics b the modification of the Product other than by Mentor Graphics c the use of other than a current unaltered release of Software d the use of the Product as part of an infringing process e a product that Customer makes uses or sells f any Beta Code or Product provided at no charge g any software provided by Mentor Graphics licensors who do not provide such indemnification to Mentor Graphics customers or h infringement by Customer that is deemed willful In the case of h Customer shall reimburse Mentor Graphics for its reasonable attorney fees and other costs related to the action 12 4 THIS SECTION 12 IS SUBJECT TO SECTION 9 ABOVE AND STATES THE ENTIRE LIABILITY OF MENTOR GRAPHICS AND ITS LICENSORS FOR DEFENSE SETTLEMENT AND DAMAGES AND CUSTOMER S SOLE AND EXCLUSIVE REMEDY WITH RESPECT TO ANY ALLEGED PATENT OR COPYRIGHT INFRINGEMENT OR TRADE SECRET MISAPPROPRIATION BY ANY PRODUCT PROVIDED UNDER THIS AGREEMENT TERMINATION AND EFFECT OF TERMINATION If a Software license was provided for limited term use such license will automatically terminate at the end of the authorized term 13 1 Mentor Graphics may terminate this Agreement and or any license granted under this Agreement immediately upon written notice if Customer a exceeds the scope of the license or otherwise fails to comply with the licensing or confidentiality provisions of this Agreement or b becomes insolvent files a bankrup
399. rns mem_item 140 mem_item 139 Q mem_item 138 mem_item 80 mem_item 76 mem_item 72 mem_item 68 mem_item 64 EOE HEHE SHE HEHE HE e Create a report of all class instances in descending order in the Total column Print the Class Names Total Peak and Current columns List only the first six lines of that report vsim gt classinfo report s dt c ntpc m 6 Returns Class Name Total Peak Current uvm pool_ 11 318 315 315 uvm_event 286 55 52 uvm_callback_iter__1 273 3 2 uvm_queue__3 197 13 10 uvm_object_string_pool__1 175 60 58 mem_item 140 25 23 Find the class instance mem_item 87 VSIM gt classinfo find mem_item 87 Returns mem_item 87 has been destroyed Find the class instance mem_item 200 VSIM gt classinfo find mem_item 200 ModelSim Reference Manual v10 1c 93 Commands classinfo Returns mem_item 200 not yet created Related Topics e ClassDebug modelsim ini variable vsim classdebug 94 ModelSim Reference Manual v10 1c Commands configure configure The configure command invokes the List or Wave widget configure command for the current default List or Wave window To change the default window use the view command Some arguments to this command are order dependent Please read through the arguments for further information Syntax configure list wave lt option gt lt value gt List Window Arguments
400. rol ROL rotate left bitwise logical ror ROR rotate right bitwise logical sla SLA shift left arithmetic bitwise logical sll SLL shift left logical bitwise logical sra SRA shift right arithmetic bitwise logical srl SRL shift right logical bitwise logical not NOT unary bitwise inversion bitwise logical boolean and boolean boolean not boolean ModelSim Reference Manual v10 1c boolean or boolean 31 Syntax and Conventions GUIL_expression_format Table 1 14 Operators Supported for GUI Expresssions cont Operator Description Kind equal boolean exact equal boolean exact not equal boolean greater than boolean greater than or equal boolean less than boolean less than or equal boolean not equal boolean amp lt vector_expr gt AND reduction reduction l lt vector_expr gt OR reduction reduction lt vector_expr gt XOR reduction reduction 1 This operator is allowed to be compatible with other simulators Table 1 15 Precedence of GUI Expression Operators delayed falling rising event hasX amp l unary not NOT boolean mod MOD rem REM arithmetic nand NAND nor NOR bitwise logical and AND bitwise logical xor XOR xnor XNOR bitwise logical bitwise logical arithmetic concat bitwise logical boolean
401. s bookmark add wave bookmark delete wave bookmark goto wave write format ModelSim Reference Manual v10 1c 79 Commands bp bp This command sets either a file line breakpoint or returns a list of currently set breakpoints It allows enum names as well as literal values to be used in condition expressions Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax Setting an HDL breakpoint bp lt filename gt lt line_number gt appendinst cond lt condition_expression gt disable id lt id_number gt label lt label gt inst lt region gt inst lt region gt lt command gt Querying a breakpoint bp query lt filename gt lt line_number gt Reporting all breakpoints If you specify this command with no arguments it returns a list of all breakpoints in the design containing information about each breakpoint For example bp returns bp top vhd 70 2 o bp an echo of the command o lt file_name gt o lt line_number gt o lt id_number gt Arguments 80 lt filename gt required to set an HDL breakpoint Specifies the name of the source file in which to set the breakpoint Must be specified as the first argument to the bp command lt line_number gt required to set an HDL breakpoint Specifies the line number where the breakpoint is to be set Must be specified as the sec
402. s Use the resume command to resume execution of the macro Use the abort command to stop execution of some or all of the macros Related Topics abort e do resume run status 192 ModelSim Reference Manual v10 1c Commands precision precision This command determines how real numbers display in the graphic interface e g Objects Wave Locals and List windows It does not affect the internal representation of a real number and therefore precision values over 17 are not allowed Executing the precision command without any arguments returns the current precision setting Syntax precision lt digits gt Arguments e lt digits gt optional Specifies the number of digits to display where the default is 6 A suffix that forces the display of trailing zeros See examples for more details Examples e Results in 4 digits of precision precision 4 For example 1 234 or 6543 e Results in 8 digits of precision including trailing zeros precision 8 For example 1 2345600 or 6543 2100 e Results in 8 digits of precision but doesn t print trailing zeros precision 8 For example 1 23456 or 6543 21 ModelSim Reference Manual v10 1c 193 Commands printenv printenv This command prints to the Transcript window the current names and values of all environment variables If variable names are given as arguments returns only the names and values of the specified variables
403. s e maxdelays Selects maximum delays from the min typ max expressions Optional If preferred you can defer delay selection until simulation time by specifying the same option to the simulator e mindelays Selects minimum delays from the min typ max expressions Optional If preferred you can defer delay selection until simulation time by specifying the same option to the simulator e mixedansiports Permits partial port redeclarations e mixedsvvh b Is v Facilitates using SystemVerilog packages at the SystemVerilog VHDL boundary of a mixed language design When you compile a SystemVerilog package with mixedsvvh the package can be included in a VHDL design as if it were defined in VHDL itself Optional b treats all scalars vectors in the package as VHDL bit bit_vector s treats all scalars vectors in the package as VHDL std_logic std_logic_vector v treats all scalars vectors in the package as VHDL vl_logic vl_logic_vector e mfcu Instructs the compiler to treat all files within a compilation command line as a single compilation unit Optional The default behavior is to treat each file listed in a command as a separate compilation unit per the SystemVerilog standard Prior versions concatenated the contents of the multiple files into a single compilation unit by default You can also enable this option using the MultiFileCompilationUnit variable in the modelsim ini file ModelSim Reference Manual v10 1
404. s MAKE program to maintain individual libraries You run vmake on a compiled design library This utility operates on multiple source files per design unit it supports Verilog include files as well as Verilog and VHDL PSL vunit files Note If a design is spread across multiple libraries then each library must have its own makefile and you must build each one separately By default the output of vmake is sent to stdout however you can send the output to a makefile by using the shell redirect operator gt along with the name of the file You can then run the makefile with a version of MAKE not supplied with ModelSim to reconstruct the library This command must be invoked from either the UNIX or the Windows DOS prompt A MAKE program is included with Microsoft Visual C C as well as many other program development environments After running the vmake utility MAKE recompiles only the design units and their dependencies that have changed You run vmake only once then you can simply run MAKE to rebuild your design If you add new design units or delete old ones you should re run vmake to generate a new makefile The vmake utility ignores library objects compiled with nodebug This command provides additional information with the help switch Syntax vmake cygdrive du lt design_unit_name gt f lt filename gt fullsrcpath ignore lt library_name gt modelsimini lt ini_filepath gt Arguments e
405. s a body default default options dir source directory dpnd depends on entcfg configuration for entity fulloptions Full compile options inline module inlined lock lock unlock status Irm language standard mtime source modified time name short name opcode opcode format options compile options pdu preoptimized design unit root optimized Verilog design root src source file top top level model ver version string vlogv e r Verilog version optional Prints architecture information for each entity in the output Examples List the architectures associated with the module named and2 that reside in the default library work vdir l and2 Library vendor Model Technology Maximum unnamed designs 3 ModelSim Reference Manual v10 1c 291 Commands vdir 292 MODULE and2 Verilog version Version string Source directory C examples dataflow_verilog Source modified time Tue Apr 28 22 48 56 2009 HDL source file Source file Start Opcode format location lt XO d _mSdz 12Fz9b _Z3 3EdggZ gt V3z51fE gt K 51 2 gates v gates v gates v 18 10 1a VLOG SE Object version 51 Optimized Verilog design root 1 VHDL 1 Compil language standard 1 le options L mtiAvm L mtiOvm L mtiUvm L mti
406. s differ in only one bit Also known as a reflected binary counter johnson Specifies a twisted ring or Johnson counter onehot Specifies a shift counter where only one bit at a time is set to on 1 range default Specifies a binary counter where the values range between startvalue and endvalue zerohot Specifies a shift counter where only one bit at a time is set to off 0 ModelSim Reference Manual v10 1c 403 Commands wave modify e 6 value lt value gt optional recommended when specifying pattern constant Specifies a value for the constant pattern lt value gt Value must be appropriate for the type of waveform you are creating e lt wave_name gt required The name of an existing waveform created with the wave create command Related Topics e wave create e Generating Stimulus with Waveform Editor e Creating Waveforms from Patterns 404 ModelSim Reference Manual v10 1c Commands wave sort wave sort This command sorts signals in the Wave window by name or full path name Syntax wave sort ascending descending fa fd Arguments ascending descending fa fd required Sort signals in one of the following orders ascending Sort in ascending order by signal name descending Sort in descending order by signal name fa Sort in ascending order by the full path name fd Sort in descending order by full path name Examples wave
407. s not specified all PDUs found in compiled libraries will be ignored Otherwise the PDU specified by lt instpath gt will be ignored This option may be specified multiple times with different lt instpath gt s Equivalet to the deprecated ignore_bbox option e permissive optional Allows messages in the LRM group of error messages to be downgraded to a warning e plicompatdefault latest 2005 2001 optional Specifies the VPI object model behavior within vsim This switch applies globally not to individual libraries latest This is equivalent to the 2009 argument This is the default behavior if you do not specify this switch or if you specify the switch without an argument 2009 Instructs vsim to use the object models as defined in IEEE Std P1800 2009 unapproved draft standard You can also use 09 as an alias 2005 Instructs vsim to use the object models as defined in IEEE Std 1800 2005 and IEEE Std 1364 2005 You can also use 05 as an alias 2001 Instructs vsim to use the object models as defined in IEEE Std 1364 2001 When you specify this argument SystemVerilog objects will not be accessible You can also use 01 as an alias You can also control this behavior with the PliCompatDefault variable in the modelsim ini file where the plicompatdefault argument will override the PliCompatDefault variable You should note that there are a few cases where the 2005 VPI object model is incompatibl
408. s of composite type arrays and records cannot be set from the command line However you can set string arrays std_logic vectors and bit vectors if they can be set using a quoted string For example gstrgen This is a string gslv 01001110 The quotation marks must make it into vsim as part of the string because the type of the value must be determinable outside of any context Therefore when entering this command from a shell put single quotes around the string For example gstrgen This is a string If working within the ModelSim GUI you would enter the command as follows gstrgen This is a string You can also enclose the value escaped quotes for example gstrgen This is a string G lt Name gt lt Value gt optional Same as g see above except that it will also override generics parameters that received explicit values in generic maps instantiations or from defparams Note there is a space between G and lt Name gt lt Value gt however no spaces are allowed in the specification unless enclosed in quotes when specifying a string value This argument is the only way for you to alter the generic parameter such as its length other than its value after the design has been loaded lt Name gt Name of a generic parameter exactly as it appears in the VHDL source case is ignored or Verilog source Name may be prefixed with a relative or absolute ModelSim Reference Manual
409. s on the format specified by the format option If you choose bin or hex format the memory is filled low to high to be compatible with readmem commands This is in contrast to the default MTI format which fills the memory according to the memory declaration from left index to right index For Verilog objects and VHDL integers and std_logic types if the word width in a file is wider than the word width of the memory the leftmost bits msb in the data words are ignored To allow wide words use the truncate option which will ignore the msb bits that exceed the memory word size If the word width in the file is less than the width of the memory and the leftmost digit of the file data is not X then the leftmost bits are zero filled Otherwise they are X filled The type of data required for the filldata argument is dependent on the filltype specified a fixed value or one that governs an incrementing decrementing or random sequence e For fixed pattern values the fill pattern is repeatedly tiled to initialize the memory block specified The pattern can contain multiple word values for this option e For incrementing or decrementing patterns each memory word is treated as an unsigned quantity and each successive memory location is filled in with a value one higher or lower than the previous value The initial value must be specified e Fora random pattern a random data sequence will be generated to fill in the memory values T
410. s that fail to the end of the list This is repeated until there are no more compile errors close optional Closes the current project compileall n optional Compiles all files in the project using the defined compile order n optional Returns a list of the compile commands this command would execute without actually executing the compiles ModelSim Reference Manual v10 1c Commands project e compileorder optional Returns the current compile order list e compileoutofdate n optional Compiles all files that have a newer date time stamp than the last time the file was compiled n Returns a list of the compile commands this command would execute without actually executing the compiles e delete lt filename gt optional Deletes a project file lt filename gt Any mpf file e filenames Returns the absolute pathnames of all files contained in the currently open project e env optional Returns the current project file and path e history optional Lists a history of manipulated projects Must be used outside of a simulation session e new lt home_dir gt lt proj_name gt lt defaultlibrary gt lt intialini gt 0 1 optional Creates a new project under a specified home directory with a specified name and optionally a default library The name of the work library will default to work unless specified A new project cannot be created while a project is currently open or a simulation
411. s the time resolution of the new WLF file By default the resolution is the same as the source WLF file e top lt number gt optional Filters the wlfman profile report so that only the top lt number gt signals in terms of file space percentage are displayed e y optional Produces verbose output that lists the object type next to each object Examples The output from this command would look something like this wlfman profile rank top_vh wlf Returns Repeated ID s mean those Space in the wlf file Signals share the same ID Transitions File Name 1 2192 33 top_vh pdata 1 top_vh processor data 1 top_vh cache pdata 1 top_vh cache gen__0 s data 1 top_vh cache gen_ 1 s data top_vh cache gen_ 2 s data 1 top_vh cache gen__3 s data 2 1224 18 top_vh ptrans 3 1216 18 top_vh sdata 3 top_vh cache sdata 3 top_vh memory data 4 675 10 top_vh strans 5 423 6 top_vh cache gen__3 s data_out 6 135 3 top_vh paddr e wifman profile top 3 top_vh wlf The output from this command would look something like this ModelSim Reference Manual v10 1c 421 Commands wlfman ray H WWW Nd Transitions File Name 2192 33 top_vh pdata top_vh processor data top_vh cache pdata top_vh cache gen__0 s data top_vh cache gen__1 s data top_vh cache gen__2 s data top_vh cache gen__3 s data 1224 8 top_vh ptrans 1216 8 top_vh sdata
412. selection VHDL subrange specification and Verilog part selection Examples in Verilog and VHDL syntax top chip vlogsig top chip vhdlsig vlogsig 3 vhdlsig 9 vlogsig 5 2 vhdlsig 5 downto 2 Grouping and Precedence Operator precedence generally follows that of the C language but we recommend liberal use of parentheses 34 ModelSim Reference Manual v10 1c Syntax and Conventions GUI_expression_format Concatenation of Signals or Subelements Elements in the concatenation that are arrays are expanded so that each element in the array becomes a top level element of the concatenation But for elements in the concatenation that are records the entire record becomes one top level element in the result To specify that the records be broken down so that their subelements become top level elements in the concatenation use the concat_flatten directive Currently we do not support leaving full arrays as elements in the result Please let us know if you need that option If the elements being concatenated are of incompatible base types a VHDL style record will be created The record object can be expanded in the Objects and Wave windows just like an array of compatible type elements Concatenation Syntax for VHDL lt signalOrSliceNamel gt amp lt signalOrSliceName2 gt amp Concatenation Syntax for Verilog amp lt signalOrSliceNamel gt lt signalOrSliceName2 gt amp lt count gt lt signalOrSliceN
413. sign For example 16 FFca23 2 11111110 23749 VHDL Style 2 base value Table 1 8 VHDL Number Conventions Style 2 Flement base specifies the base binary B octal O hex X required ModelSim Reference Manual v10 1c 25 Syntax and Conventions Numbering Conventions Table 1 8 VHDL Number Conventions Style 2 cont Flement specifies digits in the appropriate base with optional underscore separators default is decimal required For example B 11111110 X FFcoa23 Searching for VHDL Arrays in the Wave and List Windows Searching for signal values in the Wave or List window may not work correctly for VHDL arrays if the target value is in decimal notation You may get an error that the value is of incompatible type Since VHDL does not have a radix indicator for decimal the target value may get misinterpreted as a scalar value Prefixing the value with the Verilog notation d should eliminate the problem even if the signal is VHDL Verilog Numbering Conventions Verilog numbers are expressed in the style size base value Table 1 9 Verilog Number Conventions Element Description indicates a negative number optional the number of bits in the number optional specifies the base binary b or B octal o or O decimal d or D hex h or H optional specifies digits in the appropriate base with optional underscore separators default is decimal
414. strengths are ignored Conversion is done automatically when referencing Verilog nets or registers Array Types The supported array types are signed and unsigned arrays of signal states This would correspond to the VHDL std_logic_array type Verilog registers are automatically converted to these array types The array type can be treated as either UNSIGNED or SIGNED as in the IEEE std_logic_arith package Normally referencing a signal array causes it to be treated as UNSIGNED by the expression evaluator to cause it to be treated as SIGNED use casting as described below Numeric operations supported on arrays are performed by the expression evaluator via ModelSim s built in numeric_standard and similar package routines The expression evaluator selects the appropriate numeric routine based on SIGNED or UNSIGNED properties of the array arguments and the result The enumeration types supported are any VHDL enumerated type Enumeration literals may be used in the expression as long as some variable of that enumeration type is referenced in the expression This is useful for sub expressions of the form memory state reading Expression Syntax GUI expressions generally follow C language syntax with both VHDL specific and Verilog specific conventions supported These expressions are not parsed by the Tcl parser and so do ModelSim Reference Manual v10 1c 27 Syntax and Conventions GUIL_expression_format not support general Tcl
415. symbolic time and default If no radix is specified for an enumerated type the default radix is used You can change the default radix for the current simulation using the radix command You can change the default radix permanently by editing the DefaultRadix variable in the modelsim ini file radix lt type gt optional Specifies a user defined radix The radix lt type gt switch can be used in place of the lt radix_type gt switch For example radix hexadecimal is the same as hex lt type gt binary ascii unsigned decimal octal hex symbolic time and default This option overrides the global setting of the default radix the DefaultRadix variable in the modelsim ini file radixenumnumeric optional Causes Verilog and SystemC enums to be displayed as numbers formatted by the current radix This overrides the default behavior of always showing enums symbolically radixenumsymbolic optional Restores the default behavior of displaying Verilog and SystemC enums as symbols by reversing the action of the radixenumnumeric option ModelSim Reference Manual v10 1c Commands examine e showbase optional Display the number of bits of the vector and the radix used where binary b decimal d hexidecimal h ASCII a time t For example instead of simply displaying a vector value of 31 a value of 16 h31 may be displayed to show that the vector is 16 bits wide with a hexidecima
416. t lt name gt required The name you define for the virtual signal Case is ignored unless installed in a Verilog region Use alpha numeric and underscore characters only unless you are using VHDL extended identifier notation If using VHDL extended identifier notation lt name gt needs to be quoted with double quotes or with curly braces Examples 310 e Create a signal chip section1 clk_n that is the inverse of chip section1 clk virtual function not chip sectionl clk clk_n e Create a std_logic_vector equivalent of a Verilog register rega and installs it as chip rega_slv virtual function install chip std_logic_vector chip vlog rega rega_slv e Create a boolean signal chip addr_eq_fab that is true when chip addr 11 0 is equal to hex fab and false otherwise It is acceptable to mix VHDL signal path notation with Verilog part select notation virtual function chip addr 11 0 Oxfab addr_eq_fab e Create a signal that is high only during times when signal chip siga of the gate level version of the design does not match chip siga of the rtl version of the design Because there is no common design region for the inputs to the expression siga_diff is installed in region virtuals Functions The virtual function siga_diff can be added to the Wave window and when expanded will show the two original signals that are being compared ModelSim Reference Manual v10 1c Commands v
417. t Specifies a Verilog 2001 library map file Optional You can omit this argument by placing the library map file as the first option on the vlog invocation e g vlog top map top v top_cfg v libmap_verbose Displays library map pattern matching information during compilation Optional Use to troubleshoot problems with matching filename patterns in a library file librescan Scans libraries in command line order for all unresolved modules Optional line lt number gt Starts the compiler on the specified line in the Verilog source file Optional By default the compiler starts at the beginning of the file lint optional Issues warnings on the following lint style static checks o when Module ports are NULL o when assigning to an input port ModelSim Reference Manual v10 1c Commands vlog o when referencing undeclared variables nets in an instantiation This switch generates additional array bounds checking code which can slow down simulation to check for the following o index warnings for dynamic arrays o when an index for a Verilog unpacked variable array reference is out of bounds The warnings are reported as WARNING 8 You can also enable this option using the Show_Lint variable in the modelsim ini file e Irmclassinit Changes initialization behavior to match the SystemVerilog specification per IEEE Std 1800 2007 where all superclass properties will be initialized before any subclass propertie
418. t l lt extension gt l lt extension gt svinputport net var relaxed skipprotected skipprotectedmodule suppress lt msg_number gt lt msg_number gt svO5compat svO9compat sv12compat time timescale lt time_units gt lt time_precision gt typdelays u v lt library_file gt version vlog01compat vlog95compat vmake warning lt msg_number gt lt msg_number gt work lt library_name gt writetoplevels lt fileName gt y lt library_directory gt Arguments 330 Specifies that the VHDL interface to Verilog modules use VHDL 1076 1993 extended identifiers to preserve case in Verilog identifiers that contain uppercase letters Optional addpragmaprefix lt prefix gt optional Enables recognition of synthesis and coverage pragmas with a user specified prefix If this argument is not specified pragmas are treated as comments All regular synthesis and coverage pragmas are honored lt prefix gt Specifies a user defined string where the default is no string indicated by quotation marks ModelSim Reference Manual v10 1c Commands vlog You may also set this with the AddPragmaPrefix variable in the vlog section of the modelsim ini file e compat Disables optimizations that result in different event ordering than Verilog XL Optional ModelSim Verilog generally duplicates Verilog XL event ordering but there are cases where it
419. t optional Combines all encrypted output into a single file lt filename gt Specifies a file for saving output e p lt prefix gt optional Prepends encrypted file names with a prefix lt prefix gt Any alpha numeric string e quiet optional Disables encryption messages Related Topics vencrypt e Protecting Your Source Code in the User s Manual 300 ModelSim Reference Manual v10 1c Commands view view This command opens the specified window If you specify this command without arguments it returns a list of all open windows in the current layout To remove a window use the noview command The view command with one or more options and no window names specified applies the options to the currently open windows See examples for additional details Syntax view lt window_type gt aliases names title New Window Title undock icon height lt n gt width lt n gt x lt n gt y lt n gt dock Arguments e lt window_type gt required Specifies the window type to view You do not need to type the full type name see the examples below implicit wildcards are accepted multiple window types are accepted Available window types are assertions atv browser calltree canalysis capacity classgraph classtree covergroups dataflow details duranked exclusions fcovers files fsmcoverage fsmlist fsmview instance library list locals memdata memory msgviewer objects process profiled
420. t Customer shall capture and provide at Mentor Graphics request Customer shall make records available in electronic format and shall fully cooperate with data gathering to support the license review Mentor Graphics shall bear the expense of any such review unless a material non compliance is revealed Mentor Graphics shall treat as confidential information all information gained as a result of any request or review and shall only use or disclose such information as required by law or to enforce its rights under this Agreement The provisions of this Section 17 shall survive the termination of this Agreement CONTROLLING LAW JURISDICTION AND DISPUTE RESOLUTION The owners of certain Mentor Graphics intellectual property licensed under this Agreement are located in Ireland and the United States To promote consistency around the world disputes shall be resolved as follows excluding conflict of laws rules this Agreement shall be governed by and construed under the laws of the State of Oregon USA if Customer is located in North or South America and the laws of Ireland if Customer is located outside of North or South America All disputes arising out of or in relation to this Agreement shall be submitted to the exclusive jurisdiction of the courts of Portland Oregon when the laws of Oregon apply or Dublin Ireland when the laws of Ireland apply Notwithstanding the foregoing all disputes in Asia arising out of or in relation to this Agreement shall be
421. t close e dataset restart e dataset config e dataset save e dataset info e dataset snapshot e dataset list e log e dataset open e Recording Simulation Results With Datasets 102 ModelSim Reference Manual v10 1c Commands dataset close dataset close This command closes an active dataset To open a dataset use the dataset open command Syntax dataset close lt dataset_name gt all Arguments e lt dataset_name gt all required Closes active dataset s lt dataset_name gt Specifies the name of the dataset or alias you wish to close all Closes all open datasets and the simulation Related Topics dataset alias dataset clear dataset config dataset info dataset list dataset open dataset rename dataset restart dataset save dataset snapshot ModelSim Reference Manual v10 1c 103 Commands dataset config dataset config This command configures WLF parameters for an open dataset and all aliases mapped to that dataset It has no effect on coverage datasets UCDB Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax dataset config lt dataset_name gt wlfcachesize lt n gt wlfdeleteonquit 0 1 wlfopt 0 1 Arguments e lt dataset_name gt required Specifies a open dataset or dataset alias you wish to configure Must be specified as the first argument to the dataset config command e wlfcachesize
422. t the optional qualifiers the switch operates on both specify paths and tchecks The qualifiers work as follows bitblast iopath bit blasts only specify paths with wide ports bitblast tcheck bit blasts only tchecks with wide ports This switch is intended for use with applications employing SDF annotation C optional Specifies that the simulator is to be run in command line mode Refer to Modes of Operation for more information capacity optional Enables the fine grain analysis display of memory capacity where the default is coarse grain analysis display colormap new optional Specifies that the window should have a new private colormap instead of using the default colormap for the screen debugdb lt db_pathname gt optional Instructs ModelSim to generate a database of connectivity information to be used for post sim debug in the Dataflow and Schematic windows The database pathname should have a dbg extension If a database pathname is not specified ModelSim creates a database file named vsim dbg in the current directory ModelSim Reference Manual v10 1c 353 Commands vsim 354 An existing dbg file will be reused and a note printed to the transcript when the debugdb switch is specified and your design has not changed since the database was created Refer to Post Simulation Debug Flow Details for more information defaultstdlogicinittoz optional Sets the default VHDL initializati
423. t the scope of the search is to include internal non port objects nofilter optional Specifies that the WildcardFilter Tcl preference variable be ignored when finding signals or nets ModelSim Reference Manual v10 1c Commands find out optional Specifies that the scope of the search is to include ports of mode OUT ports optional Specifies that the scope of the search is to include all ports Has the same effect as specifying in out and inout together recursive optional Specifies that the scope of the search is to descend recursively into subregions If omitted the search is limited to the selected region Arguments for instances and blocks When searching for instances the find command returns the primary design unit name bydu lt design_unit gt Searches for a design unit Mutually exclusive with file and lt object_name gt lt design_unit gt Name of a single design unit to search for This argument matches the pattern specified by primary lt design_unit gt of the instance only Library and Secondary names are not supported file lt file_name gt Writes a complete list of the instances in a design to a file Mutually exclusive with bydu and lt object_name gt lt file_name gt A string specifying the name for a file lt object_name gt Specifies the name of an instance or block for which you want to search Multiple instances and wildcard characters are allowed Mutually excl
424. t will recreate all debug windows all file line breakpoints and all signal breakpoints created using the when command If the ShutdownFile modelsim ini variable is set to this do filename it will call the write format restart command upon exit The file created is primarily a list of add list or add wave commands though a few other commands are included see Output below This file may be invoked with the do command to recreate the window format on a subsequent simulation run When you load a format file ModelSim verifies the existence of the datasets required by that file ModelSim displays an error message if the requisite datasets do not all exist To force the execution of the format file even if all datasets are not present use the force switch with your do command For example VSIM gt do format do force Note Note that using the force switch when datasets are not present will result in error messages for signals referencing the nonexistent datasets Also force is recognized by the format file not the do command Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax write format assertions breakpoints coverdirective export_hier_config list memory msgviewer testbrowser watch wave restart lt filename gt Arguments e assertions breakpoints coverdirective export_hier_config list memory msgviewer testbrowser
425. t wlf The suffix wlf will be appended to specified filename and possibly an incrementing suffix When the duration of the simulation run is not a multiple of the interval specified by size or time the incomplete portion is saved in the file vsim wlf filemode overwrite increment optional Specifies whether to overwrite the snapshot file each time a snapshot occurs overwrite default increment A new file is created for each snapshot An incrementing suffix 1 to n is added to each new file for example vsim_snapshot_l wlf mode cumulative sequential optional Specifies whether to keep all data from the time signals are first logged cumulative default sequential The current WLF file is cleared every time a snapshot is taken ModelSim Reference Manual v10 1c 113 Commands dataset snapshot report optional Lists current snapshot settings in the Transcript window All other options are ignored if you specify report reset optional Resets values back to defaults The behavior is to reset to the default then apply the remainder of the arguments on the command line See examples below If specified by itself without any other arguments reset disables dataset snapshot and resets the values size lt file_size gt Required if time is not specified Specifies that a snapshot occurs based on WLF file size Must be specified as the final argument to the dataset snapshot command
426. tain values other than 1 and 0 ModelSim does a lexical comparison position number for values other than 1 and 0 For example ModelSim Reference Manual v10 1c 409 Commands when 0000 lt This evaluates to true H000 lt This evaluates to false 001X gt 0010 This also evaluates to false lt command gt required if a when expression is specified The command s for this argument are evaluated by the Tcl interpreter within the ModelSim GUI Any ModelSim or Tcl command or series of commands are valid with one exception the run command cannot be used with the when command The command sequence usually contains a stop command that sets a flag to break the simulation run after the command sequence is completed Multiple line commands can be used Note If you want to stop the simulation using a when command you must use a stop command within your when statement DO NOT use an exit command or a quit command The stop command acts like a breakpoint at the time it is evaluated Examples 410 The when command below instructs the simulator to display the value of object c in binary format when there is a clock event the clock is 1 and the value of b is 01100111 Finally the command tells ModelSim to stop when label whenl clk event and clk 1 and b 01100111 echo Signal c is exa bin c stop The when command below echoes the simulator time when slice 3 1 of
427. tancelist txt w foreach inst Silist Print instance path one per line puts S fhandle Sinst Close the file done close S fhandle Related Topics Design Object Names e Wildcard Characters 140 ModelSim Reference Manual v10 1c Commands find connections find connections This command returns the set of nets that are electrically equivalent to a specified net Syntax find connections lt net gt e lt net gt required A net in the design Returns a list of nets connected to the specified net For example find connections top p strb returns Connected nets for strb output top p strb i internal top pstrb input top c pstrb ModelSim Reference Manual v10 1c 141 Commands find infiles find infiles This command searches for a string in the specified file s and prints the results to the Transcript window The results are individually hotlinked and will open the file and display the location of the string When you execute this command in command line mode from outside of the GUI the results are sent to stdout with no hotlinks Arguments to this command are order dependent Follow the order specified in the Syntax section Syntax find infiles lt string_pattern gt lt file gt Arguments e lt string_pattern gt required The string you are searching for You can use Tcl regular expression wildcards to further restrict the search capability e lt file gt
428. tats tcl o lt outfile gt classinfo types tcl n o lt outfile gt x pattern Arguments e c fntpc Display the report columns in the specified order in a report The default is to display all columns in the following order Full Path Class Name Total Peak Current You can specify one or more columns in any order f The Full Path column displays the full relative path name n The Class Name column displays the name of the class instance t The Total column displays the total number of instances of the named class p The Peak column displays the maximum number of instances of the named class that existed simultanously at any time in the simulation c The Current column displays the current number of instances of the named class e class instance name required for classinfo find Name of the class item in the following format lt name gt e classname required for classinfo types Name of the class or the full path of the class type ModelSim Reference Manual v10 1c 91 Commands classinfo m lt maxout gt Display the specified number of lines of the report lt maxout gt Any non negative integer e n Returns class names only Does not include the path unless required to resolve name ambiguity e o lt outfile gt Sends the results of the command to lt outfile gt instead of the transcript lt outfile gt Specifies the name of the file where the output will be wr
429. tcy petition institutes proceedings for liquidation or winding up or enters into an agreement to assign its assets for the benefit of creditors For any other material breach of any provision of this Agreement Mentor Graphics may terminate this Agreement and or any license granted under this Agreement upon 30 days written notice if Customer fails to cure the breach within the 30 day notice period Termination of this Agreement or any license granted hereunder will not affect Customer s obligation to pay for Products shipped or licenses granted prior to the termination which amounts shall be payable immediately upon the date of termination 13 2 Upon termination of this Agreement the rights and obligations of the parties shall cease except as expressly set forth in this Agreement Upon termination Customer shall ensure that all use of the affected Products ceases and shall return hardware and either return to Mentor Graphics or destroy Software in Customer s possession including all copies and documentation and certify in writing to Mentor Graphics within ten business days of the termination date that Customer no longer possesses any of the affected Products or copies of Software in any form EXPORT The Products provided hereunder are subject to regulation by local laws and United States government agencies which prohibit export or diversion of certain products and information about the products to certain countries and certain persons Customer
430. te Ree eae eee eee 127 CNVITONMENE 2 5 ee fo Sosa has wh S ls aek dea Sw clan ead aE wie dew Bo Slee we wi G TRS day Sw ke ae 128 CX AMINES Sry eee amp dechure wend amp aeenuraecind wd Reread amp athena ecard a dedhene ane amp anus EEE 130 ERI e oe a OR TE SN Pe RE A PTS 135 f der pet SO ee oe Ee She ee be OW Pde DEeS Dba SU eee a EE See eGe we 136 find connections s 0 0 cee eee eee eee ee eee eee e eee eee Eaa 141 PATI AMES saae eevee eee oy aes ate ay cect a se cit eee ee ee He 142 find MS OULCE 6 6 ons 6 sk sed ceed aa a dah were SOE west E dered a eG Saeed ery oe 143 TOLCC a e cle es og et ee te es Se ee alte us Mee te bee a tak 145 format Mmes 210640 eS edad ne Dee dew ee hae eo Ae een BS Baile ete Dee e ae awa 151 NelPudactiseseddachentercieenedbaderspetekeeeedsaases RAE bee aud Seu 152 HISTOTY 3 00 2 cuss s 82s ea ee aa i tes obese ees SOR S E ai tae nee ede 153 layout Gt bese ued esos see ee eee E E e oon sea see reue ds cee segues Se 154 IOS coeesuee ste rete sae estes ede essen Pee een e er de roses tae ee ee ester eee Ree 156 ModelSim Reference Manual v10 1c Table of Contents SHIP csiice sce s et endann dh GE s Geen dad pve bs ae ee dae plen bP M eae ee bed 159 ISUbliSt 2 ace eee ots nae ys cee ae So ade ene Se a ee ye es Se ees 160 INGMPCOMPALG 45 62 2st eave esdeestees Reeunesadeeuhe cade eayeee deer neeanedads 161 memi display 4 eu eee bee es audeee heey ieen seb eed eae eee see eke k 162 MCT St oh he be SH
431. teger or decimal number lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces ModelSim Reference Manual v10 1c 397 Commands wave export Related Topics wave create wave import e Generating Stimulus with Waveform Editor 398 ModelSim Reference Manual v10 1c Commands wave import wave import This command imports an extended VCD file that was created with the wave export command It cannot read extended VCD file created by software other than ModelSim Use this command to apply a VCD file as stimulus to the current simulation Syntax wave import lt VCD_file gt Arguments e lt VCD_file gt required The name of the extended VCD file to import Related Topics e wave create wave export e Generating Stimulus with Waveform Editor ModelSim Reference Manual v10 1c 399 Commands wave modify wave modify This command modifies waveform parameters set by a previous wave create command Some arguments to this command are order dependent Please read through the argument descriptions for more information The following table summarizes the available wave modification options Command Description wave modify pattern clock Generates a c
432. th gt Arguments e addressradix d h optional Specifies the address radix for the default MTI formatted files d Decimal radix default if format is specified as mti h Hex radix e compress optional Specifies that identical lines not be printed Reduces the file size by replacing exact matches with a single line containing an asterisk These compressed files are automatically expanded during a mem load operation e dataradix lt radix_type gt optional Specifies the data radix for the default MTT formatted files If unspecified the global default radix is used lt radix_type gt A specified radix type Valid entries or any unique abbreviations are binary decimal unsigned octal hex symbolic and default If no radix is specified for an enumerated type the symbolic representation is used 162 ModelSim Reference Manual v10 1c Commands mem display You can change the default radix type for the current simulation using the radix command or make the default radix permanent by editing the DefaultRadix variable in the modelsim ini file e endaddress lt end gt optional Specifies the end address for a range of addresses to be displayed lt end gt Any valid address in the memory If unspecified the default is the end of the memory e format bin hex mti optional Specifies the output format of the contents bin Specifies a binary output hex Specifies a hex output mti M
433. th the specified prefixname All affected pragmas will be treated as regular comments Edit the IgnorePragmaPrefix modelsim ini variable to set a permanent default lt prefix gt Specifies a user defined string e ignoreStandardRealVector optional Instructs ModelSim to ignore the REAL_VECTOR declaration in package STANDARD when compiling with veom 2008 Edit the ignoreStandardReal Vector modelsim ini variable to set a permanent default For more information refer to the REAL_VECTOR section in Help gt Technotes gt vhdl2008migration ModelSim Reference Manual v10 1c 279 Commands vcom 280 ignorevitalerrors optional Directs the compiler to ignore VITAL compliance errors The compiler still reports that VITAL errors exist but it will not stop the compilation You should exercise caution in using this switch as part of accelerating VITAL packages we assume that compliance checking has passed initoutcompositeparam optional Causes initialization of subprogram parameters for array and record types when the subprogram is executed in designs compiled with LRM 1076 2002 and earlier This argument forces the output parameters to their default initial left values when entering a subprogram By default initoutcompositeparam is enabled for designs compiled with vcom 2008 and later You can also enable this by setting the Initi1OutCompositeParam variable to 1 in the modelsim ini file noinitoutcompositeparam
434. that can be used for values The value default has special meaning and corresponds to any value not explicitly specified virtual type 0 NULL_STATE 1 st1 2 st2 0x04 st3 16 h08 st4 h10 st5 16 20 st6 0b01000000 st7 0x80 st8 default BAD_STATE myMappedType virtual function myMappedType mybus myConvertedBus add wave myConvertedBus Delete the virtual type mystateType virtual type delete mystateType e Create a virtual type that includes don t cares the character virtual type 0x01 add 0x02 sub default bad mydecodetype e Create a virtual type using a mask for don t cares The middle field is the mask and the mask should have bits set to 1 for the bits that are don t care virtual type 0x0100 Oxff add 0x0200 Oxff sub default bad mydecodetype Related Topics virtual function e Virtual Objects 326 ModelSim Reference Manual v10 1c Commands vlib vlib The command creates a design library You must use vlib rather than operating system commands to create a library directory or index file If the specified library already exists as a valid ModelSim library the vlib command will exit with a warning message without touching the library This command provides additional information with the help switch Syntax vlib archive compact lt percent gt format 1 13 dos short unix long lock unlock lt design_unit gt loc
435. the mpf file ModelSim is using All library mappings are taken from here when a project is open If the design is not loaded through a project this line displays the modelsim ini file in the current directory Syntax where Arguments e None Examples e Design is loaded through a project VSIM gt where Returns Current directory is D Client Project is D Client monproj mpf e Design is loaded with no project indicates the modelsim ini file is under the mydesign directory VSIM gt where Returns Current directory is C Client testcase mydesign Project is modelsim ini 414 ModelSim Reference Manual v10 1c Commands wlf2log wlf2log This command translates a ModelSim WLF file vsim wi f to a QuickSim II logfile It reads the vsim wlf WLF file generated by the add list add wave or log commands in the simulator and converts it to the QuickSim II logfile format Note This command should be invoked only after you have stopped the simulation using quit sim or dataset close sim Syntax wlf2log lt wlffile gt bits fullname help inout input internal lt instance_path gt lower o lt outfile gt output quiet Arguments lt wlffile gt required Specifies the ModelSim WLF file that you are converting bits optional Forces vector nets to be split into 1 bit wide nets in the log file fullname optional Shows the full hierarchical pathname when
436. the typical value Has no effect if you specified the min typ max selection at compile time If you specify the mindelays typdelays or maxdelays flag with vopt and specify a different flag with vsim the simulation will be able to use the delay value based upon the flag specified with vopt You must specify vsim novopt to force the simulator to use the delay flag specified with vsim no_autodtc optional Turns off auto detection of optimized cells with negative timing checks and auto application of delayed_timing_checks to those cells ModelSim Reference Manual v10 1c 373 Commands vsim 374 no_cancelled_e_msg optional Disables negative pulse warning messages By default vsim issues a warning and then filters negative pulses on specify path delays You can drive an X for a negative pulse using show_cancelled_e no_neg_tchk optional Disables negative timing check limits by setting them to zero By default negative timing check limits are enabled This is just the opposite of Verilog XL where negative timing check limits are disabled by default and they are enabled with the neg_tchk option no_ notifier optional Disables the toggling of the notifier register argument of all timing check system tasks By default the notifier is toggled when there is a timing check violation and the notifier usually causes a UDP to propagate an X This argument suppresses X propagation on timing violations for the enti
437. this Agreement including any updates modifications revisions copies documentation and design data Software are copyrighted trade secret and confidential information of Mentor Graphics or its licensors who maintain exclusive title to all Software and retain all rights not expressly granted by this Agreement Mentor Graphics grants to Customer subject to payment of applicable license fees a nontransferable nonexclusive license to use Software solely a in machine readable object code form except as provided in Subsection 5 2 b for Customer s internal business purposes c for the term of the license and d on the computer hardware and at the site authorized by Mentor Graphics A site is restricted to a one half mile 800 meter radius Customer may have Software temporarily used by an employee for telecommuting purposes from locations other than a Customer office such as the employee s residence an airport or hotel provided that such employee s primary place of employment is the site where the Software is authorized for use Mentor Graphics standard policies and programs which vary depending on Software license fees paid or services purchased apply to the following a relocation of Software b use of Software which may be limited for example to execution of a single session by a single user on the authorized hardware or for a restricted period of time such limitations may be technically implemented through the use of a
438. tion is written to the Transcript window lt filename gt Any valid filename May include special characters and numbers e lt instance_namel gt lt instance_nameN gt required The name s of the instance s for which timing information will be written If lt instance_name gt is omitted the command returns nothing recursive optional Generates timing information for the specified instance and all instances underneath it in the design hierarchy e simvalues optional Displays optimization adjusted values for delay net delays Examples e Write timing about top u and all instances underneath it in the hierarchy to the file timing txt write timing r f timing txt top u1 432 ModelSim Reference Manual v10 1c Commands write timing e Write timing information about the designated instances to the Transcript window write timing top u1 top u2 top u3 top u8 ModelSim Reference Manual v10 1c 433 Commands write transcript write transcript This command writes the contents of the Transcript window to the specified file The resulting file can then be modified to replay the transcribed commands as a DO file macro The command cannot be used in batch mode In batch mode use the standard Transcript file or redirect stdout Syntax write transcript lt filename gt Arguments e lt filename gt optional Specifies the name of the output file where the data is to be written If the lt filen
439. tional Changes the severity level of the specified message s to error Edit the error variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information e errorfile lt filename gt optional Designates an alternative file for recording error messages An alternate file may also be specified by the ErrorFile modelsim ini variable By default error messages are output to the file specified by the TranscriptFile variable in the modelsim ini file refer to Creating a Transcript File e f lt filename gt optional Specifies a file with more vsim command arguments Allows complex argument strings to be reused without retyping Refer to the section Argument Files for more information e fatal lt msg_number gt lt msg_number gt optional Changes the severity level of the specified message s to fatal Edit the fatal variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information e g lt Name gt lt Value gt optional Assigns a value to all specified VHDL generics and Verilog parameters that have not received explicit values in generic maps instantiations or via defparams such as top level generics parameters and generics parameters that would otherwise receive their default values Note there is a space between g and lt Name gt lt Value gt however no spaces are al
440. to the current directory This argument is intended only for making a copy of the default modelsim ini file to the current directory Do not use it while making your library mappings or the mappings may end up in the incorrect copy of the modelsim ini del lt logical_name gt optional Deletes the mapping specified by lt logical_name gt from the current project file You can specify multiple logical name arguments to the del switch to delete multiple library mappings lt logical_name gt lt path gt optional Maps a logical library name to the specified physical library If you do not specify lt path gt the command returns the current mapping for lt logical_name gt modelsimini lt path modelsim ini gt optional Loads an alternate initialization file that replaces the current initialization file Overrides the file path specified in the MODELSIM environment variable Specifies either an absolute or relative path to the initialization file On Windows systems the path separator should be a forward slash Examples e Map two logical libraries to the physical library work then delete the two logical libraries vlib work vmap libraryl work vmap library2 work e Display information about the logical library library 1 ModelSim Reference Manual v10 1c 349 Commands vmap vmap libraryl e Delete the logical library mappings vmap del libraryl library2 350 ModelSim Reference Manual v
441. to be simulated lt entity gt lt architecture gt optional Specifies the name of the top level VHDL entity to be simulated The entity may have an architecture optionally specified if omitted the last architecture compiled for the specified entity is simulated An entity is not valid if a configuration is specified 1 Most UNIX shells require arguments containing to be single quoted to prevent special parsing by the shell See the examples below e lt MPF_file_name gt optional Opens the specified project e lt WLEFE_file_name gt optional Opens the specified dataset When you open a WLF file using the following command vsim test wlf The default behavior is to not automatically load any signals into the Wave window You can change this behavior such that the Wave window contains all signals in the design by setting the preference PrefWave OpenLogAutoAddWave to 1 true e lt text_file_name gt optional Opens the specified text file in a Source window Examples e Invoke vsim on the entity cpu and assigns values to the generic parameters edge and VCC vsim gedge low high gVCC 4 75 cpu If working within the ModelSim GUI you would enter the command as follows vsim gedge low high gVCC 4 75 cpu Instruct ModelSim to view the results of a previous simulation run stored in the WLF file sim2 wlf The simulation is displayed as a dataset named fest Use the wlf option to specify the name of
442. top nowhen a_100 stop Time based breakpoints You can build time based breakpoints into a when statement with the following syntax For absolute time indicated by use when Snow 1750 ns stop You can also use when errorFlag 1 OR Snow 2 ms stop This example adds 2 ms to the simulation time at which the when statement is first evaluated then stops The white space between the value and time unit is required for the time unit to be understood by the simulator You can also use variables as shown in the following example set time 1000 when Snow time stop The quotes instruct Tcl to expand the variables before calling the command So the when command sees when Snow 1000 stop Note that now has the escaped This prevents Tcl from expanding the variable because if it did you would get when 0 1000 stop 412 ModelSim Reference Manual v10 1c Commands when Related Topics bp disablebp enablebp nowhen ModelSim Reference Manual v10 1c 413 Commands where where This command displays information about the system environment It is useful for debugging problems where ModelSim cannot find the required libraries or support files The command displays two results on consecutive lines current directory This is the current directory that ModelSim was invoked from or that was specified on the ModelSim command line current project file This is
443. tream at the time when the transaction was begun An entire span of a transaction is either logged or not logged regardless of the begin and end times specified for that transaction Syntax nolog all depth lt level gt howmany in inout internal out ports recursive reset lt object_name gt Arguments e all optional Turns off logging for all signals currently logged e depth lt level gt optional Restricts a recursive search specified with the recursive argument to a certain level of hierarchy lt level gt An integer greater than or equal to zero For example if you specify depth 1 the command descends only one level in the hierarchy e howmany optional Returns an integer indicating the number of signals found e in optional Turns off logging only for ports of mode IN whose names match the specification e inout optional Turns off logging only for ports of mode INOUT whose names match the specification e internal optional Turns off logging only for internal non port objects whose names match the specification ModelSim Reference Manual v10 1c 181 Commands nolog out optional Turns off logging only for ports of mode OUT whose names match the specification ports optional Specifies that the scope of the search is to include all ports recursive optional Specifies that the scope of the search is to descend recursively into subregions If om
444. ts the global setting of the default radix the DefaultRadix variable in the modelsim ini file to symbolic recursive optional For use with wildcard searches Specifies that the scope of the search is to descend recursively into subregions If omitted the search is limited to the selected region You can use the depth argument to specify how far down the hierarchy to descend You can use r as an alias to this switch trigger notrigger optional Specifies whether objects should be updated in the List window when the objects change value trigger default Update objects in the List Window when their values change notrigger Do not update objects in the List Window when their values change e width lt integer gt optional Formats the column width integer A positive integer specifying the column width in characters Examples e Listall objects in the design ModelSim Reference Manual v10 1c 53 Commands add list add list r List all objects in the region add list List all input ports in the region add list in Display a List window containing three columns headed a sig and array_sig 9 to 23 add list a label sig top lower sig array_sig 9 to 23 List clk a b c and d only when clk changes add list clk notrigger abcd Lists clk a b c and d every 100 ns config list strobeperiod 100 ns strobestart 0 ns usestrobe 1 add list notrigger clkabcd Creates a
445. tten evaluations and all inventions product improvements modifications or developments that Mentor Graphics conceived or made during or subsequent to this Agreement including those based partly or wholly on Customer s feedback will be the exclusive property of Mentor Graphics Mentor Graphics will have exclusive rights title and interest in all such property The provisions of this Subsection 4 3 shall survive termination of this Agreement RESTRICTIONS ON USE 5 1 Customer may copy Software only as reasonably necessary to support the authorized use Each copy must include all notices and legends embedded in Software and affixed to its medium and container as received from Mentor Graphics All copies shall remain the property of Mentor Graphics or its licensors Customer shall maintain a record of the number and primary location of all copies of Software including copies merged with other software and shall make those records available to Mentor Graphics upon request Customer shall not make Products available in any form to any person other than Customer s employees and on site contractors excluding Mentor Graphics competitors whose job performance requires access and who are under obligations of confidentiality Customer shall take appropriate action to protect the confidentiality of Products and ensure that any person permitted access does not disclose or use it except as permitted by this Agreement Customer shall give Mentor Graphics writt
446. turns a 1 true or O false if lt time1 gt is greater than or equal to lt time2 gt addTime lt time1 gt unit lt time2 gt unit Returns the sum of adding lt time1 gt to lt time2 gt subTime lt timel1 gt unit lt time2 gt unit Returns the value of subtracting lt time2 gt from lt time1 gt mulTime lt time1 gt unit lt integer gt Returns the value of multiplying lt time1 gt by an lt integer gt divTime lt timel1 gt unit lt time2 gt unit Returns an integer that is the value of dividing lt time1 gt by lt time2 gt Specifying 0 for lt time2 gt results in an error intToTime lt high_32bit_int gt lt low_32bit_int gt ModelSim Reference Manual v10 1c 241 Commands Time Returns a 64 bit time value based on two 32 bit parts of a 64 bit integer This command is useful when you ve performed an integer calculation that results in a 64 bit value and need to convert it to a time unit scaleTime lt time1 gt unit lt scale_factor gt Returns a time value scaled by a real number and truncated to the current time resolution RealToTime lt real gt Returns a time value equivalent to the specified real number and truncated to the current time resolution validTime lt time gt Returns a 1 true or O false if the given string is a valid time for use with any of these Time calculations formatTime commas nodefunit bestunits Sets display properties for time values Argu
447. uires more than nine parameters they can be accessed using the shift command To determine the current number of macro parameters use the argc variable Syntax shift Arguments e None Description For a macro file containing nine macro parameters defined as 1 to 9 one shift command shifts all parameter values one place to the left If more than nine parameters are named the value of the tenth parameter becomes the value of 9 and can be accessed from within the macro file Related Topics e do ModelSim Reference Manual v10 1c 227 Commands show show This command lists HDL objects and subregions visible from the current environment The objects listed include e VHDL signals processes constants variables and instances e Verilog nets registers tasks functions instances variables and memories The show command returns formatted results to stdout To eliminate formatting to use the output in a Tcl script use the Show form of the command instead Syntax show all lt pathname gt Arguments e all optional Displays all names at and below the specified path recursively e lt pathname gt optional Specifies the pathname of the environment for which you want the objects and subregions to be listed if omitted the current environment is assumed Examples e List the names of all the objects and subregion environments visible in the current environment show e List the names of all the obj
448. umber gt lt code_string gt lt code_string gt Arguments e clear lt msg_number gt lt msg_number gt optional Clears suppression of one or more messages identified by message number lt msg_number gt A number identifying the message Multiple message numbers are specified as a comma separated list e lt msg_number gt lt msg_number gt optional A number identifying the message to be suppressed Multiple message numbers are specified as a comma separated list e lt code_string gt lt code_string gt optional A string identifier of the message to be suppressed Disables warning messages in the category specified by lt CODE gt Warnings that can be disabled include the lt CODE gt name in square brackets in the warning message Examples Return the message numbers of all suppressed messages suppress e Suppress messages by message number suppress 8241 8242 8243 8446 8447 e Suppress messages by numbers and code categories suppress 8241 TFMPC CNNODP 8446 8447 e Clear message suppression for the designated messages suppress clear 8241 8242 e Return the message numbers of all suppressed messages and clear suppression for all suppress clear suppress ModelSim Reference Manual v10 1c 239 Commands tb tb This traceback command traceback displays a stack trace for the current process in the Transcript window This lists the sequence of HDL function calls that
449. uments e designunit lt name gt required Specifies a design unit for which you want to export created waves If omitted the command exports waves from the active design unit lt name gt Specifies a design unit in the simulation e endtime lt time gt lt unit gt required The simulation time at which you want to stop exporting lt time gt Specified as an integer or decimal number lt unit gt optional A suffix specifying a unit of time where the default is to specify the current simulation resolution by omitting lt unit gt Valid time units are fs ps ns us ms sec min and hr If lt unit gt is specified you must enclose lt time gt and lt unit gt within curly braces e file lt filename gt required The filename for the saved export file lt name gt Any user specified string e format force vcd vhdl verilog required The format of the saved stimulus file The format options include force A Tcl script that recreates the waveforms The file should be sourced when reloading the simulation ved An extended VCD file Load using the vedstim argument to vsim vhdl A VHDL test bench Compile and load the file as your top level design unit verilog A Verilog test bench Compile and load the file as your top level design unit e starttime lt time gt lt unit gt required The simulation time at which you want to start exporting lt time gt Specified as an in
450. uments e lt archive_name gt Specifies the name of the archived file to be opened for reading e dbgDir lt directory_name gt optional Specifies a location to extract files into Files are extracted on demand when Modelsim needs them The current working directory is used if the switch is not specified e wlfFiles lt wlf_file_name optional Specifies the WLF files to open for analysis The argument can be a single file or a list of files A list of file names must be enclosed in curly braces The name of the wlf file must be exactly the same as that specified in the archive write command including the pathname if provided 70 ModelSim Reference Manual v10 1c Commands archive write archive write The archive write command allows you to create a debug archive file with the file extension dgb that contains one or more WLF files debug information captured from the design library an optional connectivity debug database file and optional HDL source files With this archived file you can perform post simulation debugging in different location from that which the original simulation was run Syntax archive write lt archive_name gt wlf lt wlf_file_name gt include_src dbg lt dbg _file_name gt Arguments lt archive_name gt Specifies the name of the archived file to be created wlf lt wlf_file_name gt Specifies the name of the WLF file to use for post simulation analysis lt wlf_file_name gt may b
451. upported formats Verilog binary Verilog hex and MTI memory pattern data This command works identically to the mem display command except that its output is written to a file rather than a display The order in which the data is placed into the saved file depends on the format specified by the format argument If you choose bin or hex format the file is populated from low to high to be compatible with readmem commands This is in contrast to the default mti format which populates the file according to the memory declaration from left index to right index You can use the mem save command to generate relocatable memory data files The noaddress option omits the address information from the memory data file You can later load the generated memory data file using the memory load command Syntax mem save outfile lt filename gt addressradix dec hex dataradix lt radix_type gt format bin hex mti compress noaddress lt path gt startaddress lt st gt endaddress lt end gt wordsperline lt Nwords gt Arguments e outfile lt filename gt required Specifies that the memory contents are to be stored in a file lt filename gt The name of the file where the specified memory contents are to be stored e addressradix dec hex optional Specifies the address radix for the default mti formatted files dec Decimal default hex Hexadecimal e compress optional Specifies that o
452. urce_wlffile gt required Specifies the WLF file from which you want information lt wlffilel gt lt wlffile2 gt required Specifies the WLF files whose objects you want to copy into one WLF file Specified as a space separated list begin lt time gt optional Specifies the simulation time at which to start reading information from the source WLF file where the default is to include the entire length of time recorded in lt source_wlffile gt compress nocompress optional Controls compression of the output WLF file compress Enables compression default nocompress Disables compression end lt time gt optional Specifies the simulation time at which you want to end reading information from lt source_wlffile gt f optional Repeat status update every 10 seconds of real time unless an alternate time interval is specified with i lt intervalTime gt ModelSim Reference Manual v10 1c 419 Commands wlfman 420 f lt object_list_file gt optional Specifies an object_list_file created by wlfman items to include in lt out_wlffile gt i lt intervalTime gt optional Specifies the time delay before the next status update where the default is 10 seconds of real time if not specified lt intervalTime gt Any positive integer index noindex optional Controls indexing when writing the output WLF file Indexing makes viewing wave data faster however performance during
453. urrent State Variable s_state fpu rtl vhdl serial_mul vhd 76 Clock clk_i Reset States are waiting busy State Set is busy waiting Transition table is aS eee ae eee See eee eS ee ee busy gt waiting Line 114 gt 114 busy gt busy Line 111 gt 111 waiting gt waiting Line 120 gt 120 114 gt 114 waiting gt busy Line 111 gt 111 When you do not specify this switch you will receive a message similar to Note vcom 143 Detected 1 FSM s in design unit serial_mul rtl e gen_xml lt design_unit gt lt filename gt optional Produces an XML tagged file containing the interface definition of the specified entity lt design_unit gt The name of an entity or design unit in the Work library Wildcards and multiple design unit names are not allowed lt filename gt A user specified name for the file For example This option requires a two step process where you must 1 compile lt filename gt into a library with vcom without gen_xml then 2 execute vcom with the gen_xml switch vlib work vcom counter vhd vcom gen_xml counter counter xml e ignoredefaultbinding optional Instructs the compiler not to generate a default binding during compilation You must explicitly bind all components in the design to use this switch e ignorepragmaprefix lt prefix gt optional Directs vcom to ignore synthesis and coverage pragmas wi
454. ursive to a certain level of hierarchy lt level gt an integer greater than or equal to zero For example if you specify depth 1 the command descends only one level in the hierarchy in optional For use with wildcard searches Specifies that the scope of the search is to include ports of mode IN if they match the object specification inout optional For use with wildcard searches Specifies that the scope of the search is to include ports of mode INOUT if they match the object specification out optional For use with wildcard searches Specifies that the scope of the search is to include ports of mode OUT if they match the object specification ports optional For use with wildcard searches Specifies that the scope of the search is to include all ports This switch has the same effect as specifying in out and inout together internal optional For use with wildcard searches Specifies that the scope of the search is to include internal objects non port objects if they match the object specification VHDL variables are not selected label lt name gt optional Specifies an alternative signal name to be displayed as a column heading in the listing lt name gt Specifies the label to be used at the top of the column You must enclose lt name gt in braces if it includes any spaces This alternative name is not valid in a force or examine command nodelta optional Specif
455. us named mybus consisting of three signals Scalar and scalar2 are of type std_logic and vector is of type std_logic_vector 7 downto 1 The bus is displayed in hex add wave hex mybus scalar1 vector1 scalar2 Slices and arrays may be added to the bus using either VHDL or Verilog syntax For example add wave vector3 1 add wave vector3 1 add wave vector3 4 downto 0 add wave vector3 4 0 e Add the object vec to the Wave window using symbolic values adds vec2 in hexadecimal and adds vec3 and vec4 in decimal add wave vec1 hex vec2 dec vec3 vec4 e Add a divider with the name Example Note that for this to work the first hyphen of the name must be preceded by a space add wave divider Example Add an unnamed divider add wave divider add wave divider add wave divider ModelSim Reference Manual v10 1c 65 Commands add wave Related Topics 66 add list log Concatenation Directives Extended Identifiers Using the WildcardFilter Preference Variable Refer to Wave Window for more information on analog formats of waveform signals ModelSim Reference Manual v10 1c Commands add_cmdhelp add_cmdhelp This command adds the specified command name description and command arguments to the command line help You can then access the information using the help command To delete an entry invoke the command with an empty command description and arguments See examples
456. user defined bus named mybus consisting of three signals the bus is displayed in hex add list hex mybus msb opcode 8 downto 1 data Lists the object vec using symbolic values lists vec2 in hexadecimal and lists vec3 and vec4 in decimal add list vec1 hex vec2 dec vec3 vec4 Related Topics 54 add wave Extended Identifiers Using the WildcardFilter Preference Variable ModelSim Reference Manual v10 1c Commands add memory add memory This command displays the contents and sets the address and data radix of the specified memory in the MDI frame of the Main window Refer to Wildcard Characters for wildcard usage as it pertains to the add commands Arguments to this command are order dependent Please read the argument descriptions for more information Syntax add memory addressradix decimal hex dataradix lt type gt radixenumnumeric radixenumsymbolic wordsperline lt num gt lt object_name gt Arguments e addressradix decimal hex optional Specifies the address radix for the memory display decimal default Sets the radix to decimal You can abbreviate this argument to d hex Sets the radix to hexadecimal You can abbreviate this argument to h e dataradix lt type gt optional Specifies the data radix for the memory display If you do not specify this switch the command uses the global default radix lt type gt binary ascii unsigned
457. usive with file and bydu recursive optional Specifies that the scope of the search is to descend recursively into subregions If omitted the search is limited to the selected region nodu optional Removes the du string from the names of design units found with bydu argument Arguments for virtuals When searching for virtuals all optional arguments must be specified before any object names lt object_name gt required Specifies the virtual object for which you want to search Multiple virtuals and wildcard characters are allowed kind lt kind gt optional Specifies the kind of virtual object for which you want to search ModelSim Reference Manual v10 1c 137 Commands find lt kind gt A virtual object of one of the following kinds e designs e explicits e functions e implicits e signals unsaved Specifies that ModelSim find only virtuals that have not been saved to a format file Arguments for classes e lt class name gt optional Specifies the incrTcl class for which you want to search Wildcard characters are allowed The options for class_name include nets objects signals and virtuals If you do not specify a class name the command returns all classes in the current namespace context See incrTcl commands in the Tcl Man Pages Help gt Tcl Man Pages for more information Arguments for objects e class lt class_name gt optional Restricts the search to objects whose most
458. uthorization codes or similar devices and c support services provided including eligibility to receive telephone support updates modifications and revisions For the avoidance of doubt if Customer requests any change or enhancement to Software whether in the course of receiving support or consulting services evaluating Software performing beta testing or otherwise any inventions product improvements modifications or developments made by Mentor Graphics at Mentor Graphics sole discretion will be the exclusive property of Mentor Graphics ESC SOFTWARE If Customer purchases a license to use development or prototyping tools of Mentor Graphics Embedded Software Channel ESC Mentor Graphics grants to Customer a nontransferable nonexclusive license to reproduce and distribute executable files created using ESC compilers including the ESC run time libraries distributed with ESC C and C compiler Software that are linked into a composite program as an integral part of Customer s compiled computer program provided that Customer distributes these files only in conjunction with Customer s compiled computer program Mentor Graphics does NOT grant Customer any right to duplicate incorporate or embed copies of Mentor Graphics real time operating systems or other embedded software products into Customer s products or applications without first signing or otherwise agreeing to a separate agreement with Mentor Graphics for such pur
459. values between 2 31 1 and 2 32 from being converted to a VHDL generic By default untyped Verilog parameters that are initialized with unsigned values between 2 31 1 and 2 32 are converted to VHDL INTEGER generics Because VHDL INTEGER parameters are signed numbers the Verilog values 2 31 1 to 2 32 are converted to negative VHDL values in the range from 2 31 to 1 the 2 s complement value noincr Disables incremental compilation previously turned on with incr argument Optional Default nologo Disables the startup banner Optional nospecify Disables specify path delays and timing checks Optional note lt msg_number gt lt msg_number gt Changes the severity level of the specified message s to note Optional Edit the note variable in the modelsim ini file to set a permanent default Refer to Changing Message Severity Level for more information ModelSim Reference Manual v10 1c Commands vlog e notimingchecks Removes all timing check entries from the design as it is parsed Optional e novtblfixup Causes virtual method calls in SystemVerilog class constructors to behave as they would in normal class methods which prevents the type of a this reference from changing during construction This overrides default behavior where the type of a this reference is treated as if it is a handle to the type of the active new method while a constructor is executing which implies that virtual method calls
460. ve waveSelectEnabled 0 default Highlighting is disabled 1 Highlighting is enabled There are more options than are listed here See the output of a configure list or configure wave command for all options Examples e Display the current value of the strobeperiod attribute config list strobeperiod e Set the period of the list strobe and turns it on config list strobeperiod 50 ns strobestart 0 usestrobe 1 e Set the wave vector color to blue config wave vectorcolor blue e Set the display in the current Wave window to show only the leaf path of each signal config wave signalnamewidth 1 Related Topics view Simulator GUI Preferences 100 ModelSim Reference Manual v10 1c Commands dataset alias dataset alias This command maps an alternate name alias to an open dataset A dataset can have any number of aliases but all dataset names and aliases must be unique even when more than one dataset is open Aliases are not saved to the w f file and must be remapped if the dataset is closed and then re opened Arguments to this command are order dependent Please read through the argument descriptions for more information Syntax dataset alias lt dataset_name gt lt alias_name gt Arguments e lt dataset_name gt required Specifies a dataset name or currently assigned dataset alias Must be specified as the first argument to the dataset alias command Returns a list of all aliases mapped to th
461. verses the effect of a virtual log command It causes the simulation dependent signals of the specified virtual signals to be excluded unlogged by the kernel If wildcard patterns are used it will also unlog any normal signals found unless the only option is used Syntax virtual nolog kind implicits explicits region lt path gt recursive only in out inout internal ports lt pattern gt Arguments 316 kind implicits explicits optional Excludes only a subset of virtuals implicits virtual signals created internally by the tool explicits virtual signals explicitly created by a user such as with the virtual signal command Unique abbreviations are accepted region lt path gt optional Specifies a region of design space in which to look for signals to unlog lt path gt Specifies an absolute or relative path to the signal s On Windows systems the path separator should be a forward slash recursive optional Specifies that the scope of the search is to descend recursively into subregions If omitted the search is limited to the selected region only optional Specify that only virtual signals as opposed to all signals found by a lt pattern gt containing a wildcard should be unlogged in optional Specifies that the kernel exclude data for ports of mode IN whose names match the specification out optional Specifies that the kernel
462. version is the window title Useful when running multiple simultaneous simulations Text strings with spaces must be in quotes e g my title e trace_foreign lt int gt optional Creates two kinds of foreign interface traces a log of what functions were called with the value of the arguments and the results returned and a set of C language files to replay what the foreign interface side did The purpose of the logfile is to aid the debugging of your PLI VPI code The primary purpose of the replay facility is to send the replay file to MTI support for debugging co simulation problems or debugging problems for which it is impractical to send the PLI VPI code e usenonstdcoveragesavesysf optional Replaces implementation of the built in IEEE 1800 compliant system function with the non standard variant and thus affects all calls to coverage_save The action of this switch is global ModelSim Reference Manual v10 1c 365 Commands vsim 366 uvmcontrol lt args gt optional Controls UVM Aware debug features These features work with either a standard Accelera released open source toolkit or the pre compiled UVM library package in ModelSim lt args gt You must specify at least one argument You can enable or disable some arguments by prefixing the argument with a dash Refer to the argument descriptions for more information all Enables all UVM Aware functionality and debug options except disab
463. verted O_O This command should be invoked only after you have stopped the simulation using quit sim or dataset close sim Syntax wlf2vcd lt wlffile gt help o lt outfile gt quiet Arguments e lt wiffile gt required Specifies the ModelSim WLF file that you are converting e help optional Displays a list of command options with a brief description for each e o lt outfile gt optional Specifies a filename for the output where the default destination for the VCD output is stdout lt outfile gt A user specified filename e quiet optional Disables warning messages that are produced when an unsupported type for example records is encountered in the WLF file ModelSim Reference Manual v10 1c 417 Commands wlfman wifman This command allows you to get information about and manipulate saved WLF files The command performs four functions depending on which mode you use wlfman info returns file information resolution versions and so forth about the source WLF file wlfman items generates a list of HDL objects i e signals from the source WLF file and outputs it to stdout When redirected to a file the output is called an object_list_file and it can be read in by wlfman filter The object_list_file is a list of objects one per line Comments start with a and continue to the end of the line Wildcards are legal in the leaf portion of the name Here is an example top foo
464. vides additional information with the help switch Syntax vgencomp lib lt library_name gt b modelsimini lt ini_filepath gt s v lt module_name gt Arguments lib lt library_name gt optional Specifies the working library where the default is to use the work library lt library_name gt Specifies the path and name of the working library b optional Causes vgencomp to generate bit port types modelsimini lt ini_filepath gt optional Loads an alternate initialization file that replaces the current initialization file Overrides the file path specified in the MODELSIM environment variable lt ini_filepath gt Specifies either an absolute or relative path to the initialization file On Windows systems the path separator should be a forward slash S optional Used for the explicit declaration of default std_logic port types V optional Causes vgencomp to generate vl_logic port types lt module_name gt required Specifies the name of the Verilog module to be accessed Examples e This example uses a Verilog module that is compiled into the work library The module begins as Verilog source code ModelSim Reference Manual v10 1c 297 Commands vgencomp module top il ol o2 iol parameter width parameter delay 4 5 parameter filename file in I w CO gt input il output 7 0 o1 output 4 7 02 inout width 1 0 iol endmodule After compiling
465. view mode dataset Must be specified as the first argument to the dataset open command Specify vsim wlf to open the currently running WLF file e lt dataset_name gt optional Specifies a name for the open dataset This is a name that will identify the dataset in the current session By default the dataset prefix will be the name of the specified WLF or UCDB file Examples Open the dataset file last wlf and assign it the name fest dataset open last wlf test Related Topics dataset list dataset rename dataset restart dataset save dataset snapshot vsim view option e dataset alias e dataset clear e dataset close e dataset config e dataset info ModelSim Reference Manual v10 1c 109 Commands dataset rename dataset rename This command changes the name of a dataset to the new name you specify Arguments to this command are order dependent Follow the order specified in the Syntax section Syntax dataset rename lt dataset_name gt lt new_dataset_name gt Arguments e lt dataset_name gt Specifies the existing name of the dataset e lt new_dataset_name gt Specifies the new name for the dataset Examples Rename the dataset file test to test2 dataset rename test test2 Related Topics dataset list dataset open dataset restart dataset save dataset snapshot dataset alias dataset clear dataset close dataset config dataset info 110 ModelSim Reference Manual v10 1c Commands dataset
466. w to a specified text file Syntax messages write lt filename gt Arguments e lt filename gt required Specifies the name of the file where the contents of the Message Viewer window are to be saved Related Topics e displaymsgmode modeslim ini variable e Message Viewer Window e msgmode modeslim ini variable 178 ModelSim Reference Manual v10 1c Commands modelsim modelsim The modelsim command starts the ModelSim GUI without prompting you to load a design This command is valid only for Windows platforms and may be invoked in one of three ways e from the DOS prompt e from a ModelSim shortcut e from the Windows Start gt Run menu To use modelsim arguments with a shortcut add them to the target line of the properties of that shortcut As expected arguments also work on the DOS command line You can invoke the simulator from either the ModelSim gt prompt after the GUI starts or from a DO file called by modelsim Syntax modelsim do lt macrofile gt lt license_option gt nosplash Arguments e do lt macrofile gt optional Executes a DO file when modelsim is invoked lt macrofile gt The name of a DO file Note In addition to the macro called by this argument if a DO file is specified by the STARTUP variable in modelsim ini it will be called when the vsim command is invoked e lt license_option gt optional Restricts the search of the license manager e nosplash optional
467. window lt win gt wave seetime window lt win gt at lt percent gt time lt time gt wave zoom in window lt win gt lt factor gt wave zoom out window lt win gt lt factor gt wave zoom full window lt win gt wave zoom last window lt win gt wave zoom range window lt win gt lt start time gt lt end time gt Arguments e at lt percent gt optional Positions the display such that the time or cursor is the specified lt percent gt from the left edge of the wave display lt percent gt Any non negative number where the default is 50 0 is the left edge of the Wave window and 100 is the right edge e lt cursor num gt optional Specifies a cursor number If not specified the active cursor is used e lt factor gt optional A number that specifies how much you want to zoom into or out of the wave display Default value is 2 0 e lock lt 0 I1 gt optional Specify the lock state of the cursor 0 default Unlocked 1 Locked 386 ModelSim Reference Manual v10 1c Commands wave e name lt name gt optional Specify the name of the cursor lt name gt Any string where the default is Cursor lt n gt where lt n gt is the cursor number e off deltas events optional Specifies the expanded time display mode for the Wave window Default is off e lt option gt lt value gt optional Specify a value for the designated option Currently supported o
468. wire 15 0 count matches the hexadecimal value 7 and simulation time is between 70 and 111 nanoseconds when Snow gt 70ns and count 3 1 3 h7 amp amp Snow lt 111ns echo count 3 1 matched 3 h7 at time Snow The commands below show an example of using a Tcl variable within a when command Note that the curly braces have been replaced with double quotes set clkb_path tb ps dprb_0 udprb ucar_reg uint_ram clkb when label whenl Sclkb_path event and S clkb_path 1 echo Detected Clk edge at path clkb_path The when command below is labeled a and will cause ModelSim to echo the message b changed whenever the value of the object b changes when label a b echo b changed The multi line when command below does not use a label and has two conditions When the conditions are met ModelSim runs an echo command and a stop command ModelSim Reference Manual v10 1c Commands when when b 1 and c 0 echo b is 1 and c is not 0 stop e In the example below for the declaration wire 15 0 a the when command will activate when the selected bits match a 7 when a 3 1 3 h7 echo matched at time Snow e In the example below we want to sample the values of the address and data bus on the first falling edge of clk after sstrb has gone high Strobe is our state variable set strobe Zero This signal breakpoint only fires when sstrb changes to a 1
469. wn in the command examples ModelSim Reference Manual v10 1c 11 Syntax and Conventions File and Directory Pathnames File and Directory Pathnames Several ModelSim commands have arguments that point to files or directories For example the y argument to vlog specifies the Verilog source library directory to search for undefined modules Spaces in file pathnames must be escaped or the entire path must be enclosed in quotes For example vlog top v y C Documents and Settings projects dut or vlog top v y C Documents and Settings projects dut Design Object Names Design objects are organized hierarchically Each of the following objects creates a new level in the hierarchy e VHDL component instantiation statement block statement and package e Verilog module instantiation named fork named begin task and function e SystemVerilog class package program and interface Object Name Syntax The syntax for specifying object names in ModelSim is as follows lt dataset_name gt lt datasetSeparator gt lt pathSeparator gt lt hierarchicalPath gt lt objectName gt lt elementSelection gt where e dataset_name is the name mapped to the WLF file in which the object exists The currently active simulation is the sim dataset Any loaded WLF file is referred to by the logical name specified when the WLF file was loaded Refer to the chapter Recording Simulation Results With Datasets
470. ws a diagonal line format analog backstep analog backstep Analog backstep plots the new Y before moving to the new time format event event Displays a mark at every transition ModelSim Reference Manual v10 1c 61 Commands add wave 62 The Y axis range of analog signals is bounded by max and min switches group lt group_name gt lt sig_namel gt optional Creates a wave group with the specified group_name lt group_name gt Specifies the name of the group You must enclose this argument in quotes or braces if it contains any spaces lt sig_name gt Specifies the signals to add to the group Multiple signals are entered as a space separated list This command creates an empty group if you do not specify any signal names height lt pixels gt optional Specifies the height of the waveform in pixels lt pixels gt Any positive integer in optional For use with wildcard searches Specifies that the scope of the search is to include ports of mode IN if they match the object_name specification out optional For use with wildcard searches Specifies that the scope of the search is to include ports of mode OUT if they match the object_name specification inout optional For use with wildcard searches Specifies that the scope of the search is to include ports of mode INOUT if they match the object_name specification ports optional For use with wildcard searches Spec
471. x transcript sizelimit lt size gt Arguments e lt size gt optional Specifies the size in KB of the transcript file where the default is O or unlimited The actual file size may be larger by as much as one buffer size usually about 4k depending on the operating system default buffer size and the size of the messages written to the transcript Noe You can set the size of the transcript file with the PrefMain fileSizeLimit Tcl variable in the Preferences dialog Refer to Setting Preference Variables from the GUI for more information Related Topics e Creating a Transcript File e Transcript Window e Setting Preference Variables from the e transcript file GUI 248 ModelSim Reference Manual v10 1c Commands tssi2mti tssi2mti This command is used to convert a vector file in TSSI Format into a sequence of force and run commands The stimulus is written to the standard output The source code for tssi2mti is provided in the examples directory as lt install_dir gt examples tssi2mti tssi2mti c Syntax tssi2mti lt signal_definition_file gt lt sef_vector_file gt Arguments e lt signal_definition_file gt required Specifies the name of the TSSI signal definition file describing the format and content of the vectors e lt sef_vector_file gt optional Specifies the name of the file containing vectors to be converted If none is specified standard input is used Exam
472. xecuted while a simulation is in progress Also executing a cd command will close the current project Syntax cd lt dir gt Arguments e lt dir gt optional Specifies a full or relative directory path for QuestaSim to use as the local directory If you do not specify a directory the command changes to your home directory 88 ModelSim Reference Manual v10 1c Commands change change This command modifies the value of a e VHDL constant generic or variable e Verilog register or variable Syntax change lt variable gt lt value gt Arguments e lt variable gt required A string that specifies the name of an object The name can be a full hierarchical name or a relative name where a relative name is relative to the current environment Wildcards are not permitted The following sections list supported objects e VHDL Scalar variable constant or generics of all types except FILE Generates a warning when changing a VHDL constant or generic You can suppress this warning by setting the TCL variable WarnConstantChange to 0 or in the vsim section of the modelsim ini file Scalar subelement of composite variable constant and generic of all types except FILE One dimensional array of enumerated character types including slices Access type An access type pointer can be set to null the value that an access type points to can be changed as specified above e Verilog O O
473. y ee eaGes 6oS ue eyes eee ee Out use daees Et 23 Command SHorteUtS esee carere rtie e E AEE E EE Ea ES 24 Command History Shortcuts s esseen sanane 24 N mbering Conventions ssercerecir ter err er E ELETT chee ene tenet eect ESEESE 25 VHDL Numbering Conventions os 1ge 4 sedis eee tdaoteseseesueseeenseenees 25 Verilog Numbering Conventions 0 0 cece eee eee eee nen eee 26 GUI Sx pression format sses sses erden d RED Ree RoE eo eee eee use ddA Nese ens 21 Expression Typing jo ic2edcecseaeaded eens ouadaeneeeadedadaiarsuneahadede 27 Expression OY Mike sce seess ienaa aa aaa aa perdoa a a E aa a a a a a e 27 Signal and Subelement Naming Conventions 0 00 raene 34 Grouping and Precedence n nnna nunnan 34 Concatenation of Signals or Subelements nnna nananana 35 Record Field Members 22s 24seb end bavtiwddeasd eonecasd dee era ne Ran 36 Searching for Binary Signal Values in the GUI 0 0 00 e eee eee 37 Chapter 2 COMINGNGS 0625 654 0654 0e ei 00544 Cea ee eee E LEELA ARMs Reseda es Heke snadss 39 BOO cadence eek Ree He aE ee oe eb eos aa esate Not eben Gee a Saleen Se 48 add dataflow e a 0nb oe tates dia ceira a badd San aaa tens ee eee aR Deke 49 add iSto rae ene a amp ahead ea Stew sare eee ae Ca Dee ee tases E 51 add memory se ereed e kaned e E 9 ac we a dW ee ie oa ae en aa ee wae eae e oe 55 add Messie lt 24 5445 eke See Oe ee Eee E O See Pe eo See Sees 57 add WOH cersetori rea
474. ystemVerilog extensions into a specified working library or to the work library by default The vlog command may be invoked from within ModelSim or from the operating system command prompt It may also be invoked during simulation Compiled libraries are major version dependent When moving between major versions you have to refresh compiled libraries using the refresh argument to vlog This is not true for minor versions letter releases All arguments to the vlog command are case sensitive WORK and work are not equivalent The IEEE P1800 Draft Standard for SystemVerilog requires that the default behavior of the vlog command is to treat each Verilog design file listed on the command line as a separate compilation unit This behavior is a change in vlog from versions prior to 6 2 wherein all files in a single command line were concatenated into a single compilation unit To treat multiple files listed within a single command line as a single compilation unit use either the vlog mfcu argument or the MultiFileCompilationUnit modelsim ini file variable This command provides additional information with the help switch Syntax vlog options lt filename gt lt filename gt options 93 addpragmaprefix lt prefix gt compat compile_uselibs lt directory_name gt convertallparams cuname define lt macro_name gt lt macro_text gt deglitchalways nodeglitchalways delay_mode_distributed de

Download Pdf Manuals

image

Related Search

Related Contents

取扱説明書 - 日立の家電品  Manual de instrucciones  The Marratech Client, Introduction  Hard Disk Manager™ 14 Suite  

Copyright © All rights reserved.
Failed to retrieve file