Questa Sim Ref
Questa Sim Ref
Manual
Questa® ADMS
This document contains information that is confidential and proprietary to Mentor Graphics Corporation, Siemens
Industry Software Inc., or their affiliates (collectively, "Siemens"). 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 confidential and proprietary information.
This document is for information and instruction purposes. Siemens 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 Siemens to determine whether any changes have been made.
The terms and conditions governing the sale and licensing of Siemens products are set forth in written agreements
between Siemens and its customers. End User License Agreement — You can print a copy of the End User
License Agreement from: mentor.com/eula.
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 Siemens whatsoever.
SIEMENS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
AND NON-INFRINGEMENT OF INTELLECTUAL PROPERTY.
SIEMENS SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL OR
PUNITIVE DAMAGES, LOST DATA OR PROFITS, EVEN IF SUCH DAMAGES WERE FORESEEABLE, ARISING
OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT, EVEN IF SIEMENS
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
LICENSE RIGHTS APPLICABLE TO THE U.S. GOVERNMENT: This document explains the capabilities of
commercial products that were developed exclusively at private expense. If the products are acquired directly or
indirectly for use by the U.S. Government, then the parties agree that the products and this document are
considered "Commercial Items" and "Commercial Computer Software" or "Computer Software Documentation," as
defined in 48 C.F.R. §2.101 and 48 C.F.R. §252.227-7014(a)(1) and (a)(5), as applicable. Software and this
document may only be used under the terms and conditions of the End User License Agreement referenced above
as required by 48 C.F.R. §12.212 and 48 C.F.R §227.7202. The U.S. Government will only have the rights set forth
in the End User License Agreement, which supersedes any conflicting terms or conditions in any government order
document, except for provisions which are contrary to applicable mandatory federal laws.
TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property of Siemens or
other parties. No one is permitted to use these Marks without the prior written consent of Siemens or the owner of
the Marks, as applicable. The use herein of third party Marks is not an attempt to indicate Siemens as a source of a
product, but is intended to indicate a product from, or associated with, a particular third party. A list of Siemens'
trademarks may be viewed at: www.plm.automation.siemens.com/global/en/legal/trademarks.html and
mentor.com/trademarks.
The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of Linus
Torvalds, owner of the mark on a world-wide basis.
Chapter 1
Syntax and Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Documentation Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
File and Directory Pathnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Design Object Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Object Name Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Tcl Syntax and Specification of Array Bits and Slices . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
SystemC Class, Structure, and Union Member Specification . . . . . . . . . . . . . . . . . . . . . . 21
SystemVerilog Scope Resolution Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Specifying Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Environment Variables and Pathnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Name Case Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Extended Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Wildcard Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Supported Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Using the WildcardFilter Preference Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Simulator Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Simulation Time Units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Optionsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Argument Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Command Shortcuts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Command History Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Numbering Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
VHDL Numbering Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Verilog Numbering Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
GUI_expression_format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Expression Typing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Expression Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Signal and Subelement Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Grouping and Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Concatenation of Signals or Subelements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Record Field Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Searching for Binary Signal Values in the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Chapter 2
Commands (A - M) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
.main clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
add atv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
add button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
add dataflow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
add list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
add memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
add message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
add schematic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
add testbrowser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
add watch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
add wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
add_cmdhelp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
add_menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
add_menucb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
add_menuitem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
add_separator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
add_submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
archive load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
archive write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
assertion action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
assertion active. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
assertion count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
assertion enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
assertion fail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
assertion pass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
assertion profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
assertion report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
atv log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
batch_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
bd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
bookmark add wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
bookmark delete wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
bookmark goto wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
bookmark list wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
bp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
capstats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
cd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
cdbg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
change_menu_cmd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
check contention add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
check contention config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
check contention off. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
check float add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
check float config. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
check float off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
check stable off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
check stable on. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
classinfo ancestry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
classinfo descriptive. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
classinfo find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
lshift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
lsublist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
mem compare. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
mem display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
mem list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
mem load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
mem save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
mem search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
msgZeroMessageCounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
Chapter 3
Commands (N - Z) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
next. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
noforce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
nolog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
notepad. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
noview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
nowhen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
onbreak. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
onElabError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
onerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
onfinish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
pa autotestplan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
pa msg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
pa report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
pause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
pop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
power add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
power off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
power on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
power report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
power reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
precision. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
printenv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
process report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
profile clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
profile clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
profile configure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
profile interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
profile off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
profile on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
profile open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
profile option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
profile report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
profile save. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
profile status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
profile summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526
property list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
property wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
push . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
pwd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
qrun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
questasim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
quietly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
quit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
qverilog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
radix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551
racedetect off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554
racedetect on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555
radix define . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
radix delete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
radix list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561
radix names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562
radix signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
readers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
restore. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
resume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
runStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
sccom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
scgenmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
sdfcom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
searchlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
see . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
seetime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
setenv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606
shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607
show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
simstats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
simstatslist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
stack down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
stack frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
stack level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
stack tb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
stack up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
stop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
suppress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
sv_reseed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
tb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
tcheck_set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
tcheck_status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636
toggle add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
toggle disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
toggle enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646
toggle report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647
toggle reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650
tr color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
tr order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654
tr uid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
transcribe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658
transcript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
transcript file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
transcript path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
transcript sizelimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663
transcript wrapcolumn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664
transcript wrapmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665
transcript wrapwscolumn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
triage dbfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667
triage dbinsert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
triage dbrefresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
triage passfail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
triage query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
triage report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
triage view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
tssi2mti. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
typespec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
ui_VVMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
unsetenv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691
up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
uvm call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695
uvm configtracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698
uvm displayobjections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700
uvm findregisters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
uvm findsequences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706
uvm handle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708
uvm mapmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710
uvm printconfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712
uvm printfactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
uvm printstreams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
uvm printtopology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
uvm setverbosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
uvm simpath. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
uvm traceobjections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726
uvm uvmpath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728
vcd add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
vcd checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
vcd comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734
vmake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 949
vmap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 952
vopt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954
vsim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046
vsim<info>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1122
vsim_break. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1123
vsource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1124
wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1125
wave create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1131
wave edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1137
wave export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1140
wave import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1142
wave modify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1143
wave sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1148
when. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1149
where . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1157
wlf2log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1158
wlf2vcd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1161
wlfman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1162
wlfrecover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1169
write cell_report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1170
write format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1171
write list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1174
write preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1175
write report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1176
write timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1180
write transcript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1182
write tssi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1183
write wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1185
xml2ucdb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1187
xprop assertlimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1194
xprop disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1195
xprop enable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1196
End-User License Agreement
with EDA Software Supplemental Terms
Figure 2-1. Graphical representation of tolLead and tolTrail - compare add . . . . . . . . . . . . 203
Figure 2-2. Graphical representation of tolLead and tolTrail . . . . . . . . . . . . . . . . . . . . . . . . 220
Figure 2-3. drivers Command Results in Transcript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Figure 2-4. find infiles Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Figure 2-5. find insource Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Figure 3-1. readers Command Results in Transcript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
Figure 3-2. UVM Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
This chapter describes the typographical conventions used in this manual to define Questa SIM
command syntax.
Documentation Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
File and Directory Pathnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Design Object Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Wildcard Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Simulator Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Simulation Time Units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Optionsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Argument Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Command Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Command History Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Numbering Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
GUI_expression_format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Documentation Conventions
The following conventions are used to define ModelSim command syntax
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
File and Directory Pathnames
Note
Command examples do not show either the prompt at the beginning of a line nor the
<Enter> keystroke at the end of a line.
or
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Design Object Names
where
• dataset_name — 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 “Recording
Simulation Results With Datasets” in the User’s Manual for more information.
• datasetSeparator — The character used to terminate the dataset name. The default is
colon ( : ), although you can specify a different character (except for a backslash ( \ )) as
the dataset separator by using the DatasetSeparator variable in the modelsim.ini file.
(Refer to DatasetSeparator in the User’s Manual.) This character must be different than
the pathSeparator character.
• pathSeparator — The character used to separate hierarchical object names. The default
path separator for both VHDL and Verilog is a forward slash ( / ), although you can
specify a different character (except for a backslash ( \ )) by using the PathSeparator
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Tcl Syntax and Specification of Array Bits and Slices
variable in the modelsim.ini file. (Refer to PathSeparator in the User’s Manual.) This
character must be different than the datasetSeparator.
Both ( . ) and forward slash ( / ) can be used for SystemC.
Neither ( . ) nor ( / ) can be used when referring to the contents of a SystemVerilog
package or class.
• hierarchicalPath — 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.
• objectName — The name of an object in a design.
• elementSelection — 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
Specification of Array Bits and Slicesfor important information about using square
brackets and parentheses in Questa SIM 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 Questa SIM commands.
o Record field selection— A record field is specified using a period ( . ) followed by
the name of the field.
o C++ class, structure, and union member selection — A class, structure, or union
member is specified using the record field specification syntax, described just above.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
SystemC Class, Structure, and Union Member Specification
Further Details
Because Questa SIM is based on Tcl, its commands follow Tcl syntax. One problem you may
encounter with Questa SIM commands is the use of square brackets ( [] ), parentheses ( () ), or
spaces when specifying array bits and slices. As noted, square brackets specify slices of arrays
(for example, data[3:0]). However, in Tcl, square brackets signify command substitution.
Consider the following example:
Questa SIM evaluates the find command first and then sets variable aluinputs to the result of the
find command. Obviously, you do not want this type of behavior when specifying an array slice,
so you would use brace escape characters, as follows:
You must also use the escape characters if using VHDL syntax with spaces:
Refer to Tcl Command Syntax in the User’s Manual for more information.
<instance>.<base_member>
However, in Questa SIM you must include the name of the base class according to the
following:
<instance>.<base>.<base_member>
class dog
{
private:
int value;
};
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
SystemVerilog Scope Resolution Operator
sc_signal<beagle> spot;
spot
spot.*
spot.value
spot.dog
spot.dog.*
spot.dog.value
Now, to examine the member value of the base class dog, you would type:
exa spot.dog.value
exa spot.d.value
exa spot.value
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
SystemVerilog Scope Resolution Operator
package myPackage;
class packet;
static int a[0:1] = {1, 2};
int b[0:1];
int c;
function new;
b[0] = 3;
b[1] = 4;
c = a[0];
endfunction
endclass
endpackage : myPackage
module top;
myPackage::packet my = new;
int myint = my.a[1];
endmodule
The following examples of the examine command 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 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.
examine /top/my.b
examine /top/my.b(0)
When referring to the contents of a package or class, you cannot use the standard path
separators, a period ( . ) or a forward slash ( / ).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Specifying Names
Specifying Names
Questa SIM distinguishes 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 (such
as clk or data[3:0]) in the current context.
• Relative name — does not start with a path separator and may or may not include a
dataset name or a hierarchical path (such as u1/data or view:clk). A relative name is
relative to the current context in the current or specified dataset.
• Fully-rooted name — starts with a path separator and includes a hierarchical path to an
object (for example,/top/u1/clk). There is a special case of a fully-rooted name where the
top-level design unit name can be unspecified (such as /u1/clk). In this case, the first top-
level instance in the design is assumed.
• Absolute name — is an exactly specified hierarchical name containing a dataset name
and a fully rooted name (such as sim:/top/u1/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.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Specifying Names
For example, when you set a breakpoint on line 5 of the following code:
package p;
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::I=p::factorial(3);
$display(p::I);
$display(p::factorial(4));
end
endmodule: top
examine n
stack up;examine n
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Environment Variables and Pathnames
vlog -v $lib_path/und1
Assuming you have defined $lib_path on your system, vlog will locate the source library file
und1 and search it for undefined modules. Refer to Environment Variables in the User’s Manual
for more information.
Extended Identifiers
The following are supported formats for extended identifiers for any command that takes an
identifier.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Extended Identifiers
{\ext ident!\ }
# Note that trailing space before closing brace is required
\\ext\ ident\!\\
# All non-alpha characters escaped
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Wildcard Characters
Wildcard Characters
You can use wildcard characters in HDL object names in many simulator commands.
Supported Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Using the WildcardFilter Preference Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Supported Commands
There are a number of commands that support wildcard characters.
The following is a partial list of the commands:
• add dataflow
• add list
• add memory
• add watch
• add wave
• describe
• dumpports
• examine
• find (see the Examples section in the find command for wildcard searches in foreach
loops to be applied with commands that do not accept wildcards.)
• log
• vcd add
When you execute any of these commands with a wildcard, the default behavior is to exclude
the following object types:
• VHDL shared variables in packages and design units, constants, generics, and
immediate assertions
• Verilog parameters, specparams, memories
• SystemVerilog multi-dimensional arrays and class objects
• PSL and SystemVerilog assertions, covers, and endpoints
• Signals in cells
• Non-dynamic objects of a size equal to or greater than the level specified in the
WildcardSizeThreshold modelsim.ini variable, if the variable has been enabled. Refer to
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Using the WildcardFilter Preference Variable
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.
set WildcardFilter
or
echo $WildcardFilter
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Using the WildcardFilter Preference Variable
Note that you must enclose the space-separated list of arguments in quotation marks.
• To add one or more values to the current list enter the following command:
lappend WildcardFilter <arg1 arg2 ...>
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 [lsearch -not -all -inline $WildcardFilter Endpoint]
Changing the WildcardFilter Settings back to the Default
Enter the following command:
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Using the WildcardFilter Preference Variable
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Using the WildcardFilter Preference Variable
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Simulator Variables
Simulator Variables
You can reference Questa SIM variables in a simulator command by preceding the name of the
variable with the dollar sign ($) character.
Questa SIM 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.
The report command returns a list of current settings for either the simulator state or simulator
control variables.
Note that all the time units in a Questa SIM 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. Refer to
UserTimeUnit in the User’s Manual for more information.
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.
Optionsets
By defining and calling optionsets, you can easily use and combine common command line
options.
The executable expands these optionsets and passes them to the tool as if they appeared directly
on the command line. The behavior is similar to the -f <file> option.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Optionsets
Defining an Optionset
Define your optionsets in the [DefineOptionset] section of the modelsim.ini file, where the
syntax is:
<optionset_name> = <command_arguments>
• <optionset_name> — a string that begins with a letter, and contains only letters,
numbers, or underscores. The name is case-insensitive.
• <command_arguments> — a list of arguments as you would specify them on the
command line. This list of arguments can:
o Refer to another <optionset_name>, enclosed in percent-signs (%).
o Include shell environment variables, preceded by a dollar-sign ($). If you embed the
variable in a string, you must surround it with parentheses.
You can instruct the executable to return all the values of any optionsets as they are read with
the following entry in the [optionsets] section.
PRINT_OPTIONSET_VALUE = 1
Calling an Optionset
Call your defined optionsets with the -optionset argument to the commands: vlog, vcom, sccom,
vopt and vsim.
[DefineOptionset]
UVMINCLUDES = +incdir+$UVM_HOME/src
UVMDEBUG = -uvmcontrol=all -msgmode both
DEBUGALL = -classdebug -assertdebug %UVMDEBUG%
VLOGUVM = -vopt %UVMINCLUDES%
you can execute the following commands (note that optionset names are case-insensitive):
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
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:
• sccom
• vlog
• vcom
• vencrypt
• vmake
• vopt
• vsim
The -f <filename> argument specifies a file that contains additional command line arguments.
The following conventions describe some syntax rules for argument files.
• Unquoted — The following are notes on what occurs when some information is not
quoted:
o Backslash substitution — Any unquoted backslash ( \ ) will be treated as an escape
character.
+acc=rn\\mymodule
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Command Shortcuts
• Newline Character — You can specify arguments on separate lines in the argument file
with a backslash ( \ ), which is the line continuation character. You must use a space
before the backslash.
• 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.
Command Shortcuts
The following shortcut techniques are available on the command line.
• You can abbreviate command syntax, but the minimum number of characters required to
run a command are those that make it unique. This means the addition of new
commands may prevent an older shortcut from working. For this reason, Questa SIM
does not allow command name abbreviations in macro files. This minimizes your need
to update macro files as new commands are added.
• You can enter multiple commands on one line if they are separated by semi-colons (;).
For example:
Questa SIM> 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
Although it seems as if the simstats results should display in the Transcript window,
they do 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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Command History Shortcuts
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Numbering Conventions
Numbering Conventions
Numbers in Questa SIM can be expressed in either VHDL or Verilog style. You can use two
styles for VHDL numbers and one for Verilog.
VHDL Numbering Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Verilog Numbering Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
VHDL Style 1
[ - ] [ radix # ] value [ # ]
A hyphen (-) can also 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 as a negative sign, be sure to enclose the number in quotation marks. For instance,
you would type "-0110--" as opposed to -0110--. If you do not include the quotation marks,
Questa SIM will read the ‘-’ as a negative sign. For example:
16#FFca23#
2#11111110
-23749
VHDL Style 2
base "value"
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Verilog Numbering Conventions
B"11111110"
X"FFca23"
A hyphen (-) can also 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 do not include the double quotes,
Questa SIM will read the ‘-’ as a negative sign. For example:
’b11111110 8’b11111110
’Hffca23 21’H1fca23
-23749
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
GUI_expression_format
GUI_expression_format
The GUI_expression_format is an option of several simulator commands that operate within the
Questa SIM GUI environment. The expressions help you locate and examine objects within the
List and Wave windows (expressions may also be used through the Edit > Search menu in both
windows). The commands that use the expression format are:
Expression Typing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Expression Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Signal and Subelement Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Grouping and Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Concatenation of Signals or Subelements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Record Field Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Searching for Binary Signal Values in the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
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’ ’1’ ’Z’
’W’ ’L’ ’H’ and ’-’.
Verilog states 0, 1, x, and z are mapped into these states and the Verilog strengths are ignored.
Conversion is done automatically when referencing Verilog nets or registers.
SystemC scalar types supported are: all the C/C++ types except class, structure, union, and
array, as well as SystemC types sc_logic and sc_bit.
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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax
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)
The supported SystemC aggregate types are the C/C++ array types: union, class, structure, and
array. Also supported are the SystemC array types: sc_bv<w>, sc_lv<w>, sc_int<w>, and so
on.
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
not support general Tcl; 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.
$<name>
Constants
Table 1-10. Constants Supported for GUI Expressions
Type Values
boolean value true false TRUE FALSE
integer [0-9]+
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax
Variables
Table 1-12. Variables Supported for GUI Expressions
Variable Type
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
• SystemC primitive channels of type scalar (bool, int, and so on)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax
Array variables
Table 1-13. Array Variables Supported for GUI Expressions
Variable Type
Name of a signal • VHDL signals of type bit_vector or std_logic_vector
• Verilog register
• Verilog net array
• SystemC primitive channels of type vector (sc_bv, sc_int, and so on)
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
<name>’event
<name>’rising
<name>’falling
<name>’delayed()
<name>’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 (for example, #-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.
Operators
Table 1-14. Operators Supported for GUI Expressions
Operator Description Kind
+ arithmetic add arithmetic
/ arithmetic divide arithmetic
mod/MOD arithmetic modulus arithmetic
* arithmetic multiply arithmetic
rem/REM arithmetic remainder arithmetic
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax
Note
Arithmetic operators use the std_logic_arith package.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax
Casting
Table 1-16. Casting Conversions Supported for GUI Expressions
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
This expression takes the bitwise AND function of signal /top/bus and the array constant
contained in the global Tcl variable bit_mask.
This expression evaluates to a boolean true when signal clk changes and signal /top/xyz is equal
to hex ffae; otherwise is false.
Evaluates to a boolean true when signal clk 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.
Evaluates to a boolean true when the upper 8 bits of the 32-bit signal /top/u3/addr equals hex ac.
/top/signalA'delayed(10ns)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Signal and Subelement Naming Conventions
This expression takes the logical AND of a delayed /top/signalA with /top/signalB.
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 /top/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 > 23 us) && (NOW < 54 us)) && clk’rising && (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.
Searches for an ’X’ in dbus. This is equivalent to the expression: {dbus(0) == 'x' || dbus(1) ==
'x'}. This makes it possible to search for X values without having to write a type specific literal.
top.chip.vlogsig
/top/chip/vhdlsig
vlogsig[3]
vhdlsig(9)
vlogsig[5:2]
vhdlsig(5 downto 2)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Concatenation of Signals or Subelements
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, leaving full arrays as elements
in the result is not supported. (Please contact Mentor Graphics 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.
Note that the concatenation syntax begins with "&{" 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,
Questa SIM will create the concatenation with a descending index range from (n-1) down to 0,
where n is the number of elements in the array.
(concat_ascending) <concatenationExpr>
The concat_ascending directive specifies that the index start at zero and increment upwards.
(concat_flatten) <concatenationExpr>
(concat_noflatten) <concatenationExpr>
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, the
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Record Field Members
new signal looks just like a group of signals. The directive can be used hierarchically with no
limits on depth.
(concat_sort_wild_ascending) <concatenationExpr>
(concat_reverse) <concatenationExpr>
Examples of Concatenation
&{ "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.)
Specifies the index range to be 13 downto 4, with the signals gathered by name in descending
order.
(concat_ascending)&{ "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)&{"mybusbasename*" })
Specifies an ascending range of 0 to n-1, with the signals gathered by name in ascending order.
Specifies that the bits of bus1 and bus2 be reversed in the output virtual signal.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Searching for Binary Signal Values in the GUI
Examples:
vhdlsig.field1
vhdlsig.field1.subfield1
vhdlsig.(5).field3
vhdlsig.field4(3 downto 0)
For comparing VHDL std_logic/std_ulogic objects, Questa SIM 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
U X 0 1 Z W L H -
U 1 1 0 0 0 0 0 0 1
X 1 1 2 2 2 2 2 2 1
0 0 2 1 0 0 0 1 0 1
1 0 2 0 1 0 0 0 1 1
Z 0 2 0 0 1 0 0 0 1
W 0 2 0 0 0 1 0 0 1
L 0 2 1 0 0 0 1 0 1
H 0 2 0 1 0 0 0 1 1
- 1 1 1 1 1 1 1 1 1
For comparing Verilog net values, Questa SIM uses the table shown below. An entry of “2” is a
match only if you set the Tcl variable “VLOG_X_MatchesAnything” to 1.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Searching for Binary Signal Values in the GUI
This table also applies to SystemC types: sc_bit, sc_bv, sc_logic, sc_int, sc_uint, sc_bigint,
sc_biguint.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Searching for Binary Signal Values in the GUI
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Chapter 2
Commands (A - M)
This chapter describes Questa SIM commands, listed alphabetically from A through M, that you
can enter either on the command line of the Main window or in a DO 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 > Tcl > Man Pages).
Table 2-1 provides a brief description of each Questa SIM command and whether the command
is supported for use in batch simulation mode (vsim -batch), and/or command-line mode (vsim
-c). Refer to General Modes of Operation for more information about batch and command-line
simulation. For more information on command details, arguments, and examples, click the link
in the Command name column.
Table 2-1. Supported Commands
Command name Action -batch -c
.main clear This command clears the Main window Transcript N N
window.
abort This command halts the execution of a DO file Y Y
interrupted by a breakpoint or error.
add atv This command opens an Assertion Thread View N N
(ATV) window for the specified assert or cover
directive (designated by its pathname), at the
specified evaluation attempt start time.
add button This command adds a user-defined button to the N N
Main window button bar. New buttons are added
to the right side of the Standard toolbar.
add dataflow This command adds the specified process, signal, N N
net, or register to the Dataflow window. Wildcards
are allowed.
add list This command adds the following objects and their Y Y
values to the List window:
add log also known as the log command; see “log” on Y Y
page 418
add memory This command displays the contents and sets the N N
address and data radix of the specified memory in
the MDI frame of the Main window.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
.main clear
.main clear
Clears the Main window Transcript window.
Note
Selecting Edit > Clear when the Transcript window is active produces the same results.
Syntax
.main clear
Arguments
None
Related Topics
Main Window [Questa SIM GUI Reference Manual]
Transcript Window [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
abort
abort
Halts the execution of a DO file interrupted by a breakpoint or error.
When DO files are nested, you can choose to abort the last DO file script only, to abort a
specified number of nesting levels, or to abort all DO files. You can specify this command
within a DO file to return early.
Syntax
abort [<n> | all]
Arguments
• <n>
(optional) The number of nested DO file script levels to abort. Specified as an integer
greater than 0, where the default value is 1.
• all
(optional) Instructs the tool to abort all levels of nested DO files.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add atv
add atv
Opens an Assertion Thread View (ATV) window for the specified assert or cover directive
(designated by its pathname), at the specified evaluation attempt start time. Arguments to this
command are order-dependent.
Syntax
add atv <pathname> <time>
Arguments
• <pathname>
(required) Specifies the path of an assert or cover directive. Must be the first argument.
• <time>
(required) Specifies the start time of an evaluation attempt of the assert or cover directive
instance. Must be the second argument.
Related Topics
atv log
Viewing Assertion Threads in the ATV Window [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add button
add button
Adds a user-defined button to the Main window button bar. New buttons appear on the right
side of the Standard toolbar.
Syntax
add button <text> {<cmd>[; ...]} [Disable | NoDisable] [{<option> <value> ...}]
Arguments
• <text>
(required) Specifies the label to appear on the face of the button. Must be the first argument.
• <cmd>[; ...]
(required) Specifies the command(s) to execute when the button is clicked. Separate
multiple commands with a semicolon ( ; ). Must be the second argument.
Commands that contain any spaces or non-alphanumeric characters must be enclosed in
braces ( {} ).
To echo the command and display the return value in the Transcript window, prefix the
command with the transcribe command. The transcribe command also echos the results to
the Transcript window.
• Disable | NoDisable
(optional) Specifies the appearance of the button.
Disable — (default) The button is inactive and grayed-out during a run.
NoDisable — The button is active and available during a run.
• <option> <value>
(optional) Specifies Tk button option(s) to apply to the button. Must be preceded by Disable
or NoDisable.
<option> — Any legal Tk button option.
<value> — Specifies the value for the Tk button option(s).
Enter multiple <option><value> Tk button options as a space separated list. You must
enclose your option/value pairs in braces ( {} ).
Note
To specify any option/value pairs, you must specify either Disable or NoDisable.
You can access the Tk documentation for button options from Help > Tcl Man Pages. Then
select the links: Tk commands, then buttons.
You can use any properties belonging to Tk button widget. Useful options are foreground
color (-fg), background color (-bg), width (-width), and relief (-relief).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add button
For a complete list of available options, use the configure command addressed to the newly
created option. For example:
.dockbar.tbf0.standard.tb.button_51 config
Description
Returns the path name of the button widget created. You may want to remember this path name,
which is similar to:
# .dockbar.tbf0.standard.tb.button_49
To remove a previously added button, you can use the destroy Tcl command with the button’s
path name as an argument. For example:
destroy .dockbar.tbf0.standard.tb.button_49
Arguments to this command are order-dependent. Please read the argument descriptions for
more information.
Examples
• Create a button labeled “pwd” that invokes the transcribe command with the pwd Tcl
command, and echoes the command and its results to the Transcript window. The button
remains active during a run.
add button pwd {transcribe pwd} NoDisable
• Create a button labeled “date” that echoes the system date to the Transcript window. The
button is disabled during a run; its colors are: blue foreground, yellow background, and
red active background.
add button date {transcribe exec date} Disable \
{-fg blue -bg yellow -activebackground red}
• Create a “doit” button and underline the second character of the label, the "o" of "doit".
add button doit {run 1000 ns; echo did it} Disable {-underline 1}
• Change the command that the button executes to "run 10000" and the button’s
background color to red. To do this, you need to know the button’s path name that was
returned after the initial creation of the button.
.dockbar.tbf0.standard.tb.button_13 config -command {run 10000} -bg red
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add dataflow
add dataflow
Adds the specified process, signal, net, or register to the Dataflow window. Wildcards are
allowed.
Syntax
add dataflow <object> ... [-connect <source_net> <destination_net>]
{[-in] [-out] [-inout] | [-ports]} [-internal] [-nofilter] [-recursive]
Arguments
• <object> ...
(required, unless specifying -connect) Specifies a process, signal, net, or register to add to
the Dataflow window. Must be specified as the first argument to the add dataflow command.
Wildcards are allowed. Multiple objects are specified as a space separated list, Refer to the
section “Wildcard Characters” on page 28 for wildcard usage as it pertains to the add
commands.
• -connect <source_net> <destination_net>
(optional) Computes and displays in the Dataflow window all paths between two nets.
<source_net> — The net that originates the path search.
<destination_net> — 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.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
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 alias to this switch.
Examples
• Add all objects in the design to the dataflow window.
add dataflow -r /*
Related Topics
Automatically Tracing All Paths Between Two Nets [Questa SIM User's Manual]
Dataflow Window [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add list
add list
Adds objects and their values to the List window.
Syntax
add list {<object> ... | <object_name> {sig ...}} [-allowconstants] [-depth <level>] [-filter <f> |
-nofilter <f>] {[-in] [-inout] [-out] | [-ports]} [-internal] [-label <name>] [-nodelta] [-
optcells] [-<radix_type> | -radix <type>]
[-radixenumnumeric | -radixenumsymbolic] [-recursive] [-trigger | -notrigger] [-width
<integer>] [-window <wname>]
Description
Use add list to display the following types of objects and their values in the List window:
Refer to Wildcard Characters for wildcard usage as it pertains to the add commands.
Arguments
• <object> ...
(required, if <object_name >{sig ...} is not specified.) Specifies the name of the object to be
listed. When you use this argument, you must specify it as the first argument to the add list
command. Enter multiple objects as a space separated list. Wildcards are allowed. Refer to
the section “Wildcard Characters” for wildcard usage as it pertains to the add commands.
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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add list
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}}
• -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 <level>
(optional) Restricts a recursive search, as specified with -recursive, to a certain level of
hierarchy.
<level> — an integer greater than or equal to zero.
For example, if you specify -depth 1, the command descends only one level in the hierarchy.
• -filter <f> | -nofilter <f>
(optional) Allows a one-time modification of the WildcardFilter in the command
invocation. The add list command can take as many [-filter <f>] and [-nofilter <f>]
arguments as you want to specify. Valid filters, <f>, are exactly the same set of words that
you can apply to the WildcardFilter. The order filters are applied during a command is
WildcardFilter first, then any user specified filters. The -filter values are added to the filter,
the -nofilter values are removed from the filter. The filters are applied in the order specified
so conflicts are resolved with the last specified wins.
• -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.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add list
• -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 <name>
(optional) Specifies an alternative signal name to be displayed as a column heading in the
listing.
<name> — Specifies the label to be used at the top of the column. You must enclose
<name> in braces ( {} ) if it includes any spaces.
This alternative name is not valid in a force or examine command.
However, you can use the alternate name when invoking the search command with
<window_name> specified as list.
• -nodelta
(optional) Specifies that the delta column not be displayed when adding signals to the List
window. Identical to configure list -delta none.
• -optcells
(optional) For use with wildcard searches. 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.
• -<radix_type>
(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, sfixed,
symbolic, ufixed, 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.
(Refer to DefaultRadix in the User’s Manual.)
If you specify a radix for an array of a VHDL enumerated type, Questa SIM converts each
signal value to 1, 0, Z, or X.
• -radix <type>
(optional) Specifies a user-defined radix. The -radix <type> switch can be used in place of
the -<radix_type> switch. For example, -radix hexadecimal is the same as -hex.
<type> — binary, ascii, unsigned, decimal, octal, hex, sfixed, symbolic, time, ufixed,
and default.
Refer to the radix command for information about sfixed and ufixed radix types.
This option overrides the global setting of the default radix (the variable in the modelsim.ini
file) for the current simulation only.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add list
• -radixenumnumeric
This option overrides the global setting of the default radix (the variable in the modelsim.ini
file).
• -radixenumsymbolic
(optional) Reverses the action of -radixenumnumeric and sets the global setting of the
default radix (the 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.
• -width <integer>
(optional) Formats the column width. The maximum width, when not specifying this
argument is 30,000 characters, which you can override with this switch.
integer — A positive integer specifying the column width in characters.
• -window <wname>
(optional) Adds objects to the specified List window (for example, list2).
<wname> — The window to add objects to. Used to specify a particular window when
multiple instances of that window type exist.
This option selects an existing window, but does not create a new window. Use the view
command with the -new option to create a new window.
Examples
• List all objects in the design.
add list -r /*
• 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)}
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add list
• Creates a 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 vec1 using symbolic values, lists vec2 in hexadecimal, and lists vec3 and
vec4 in decimal.
add list vec1 -hex vec2 -dec vec3 vec4
• Open a new List window with "SV_Signals" as its title, then add signals to it.
set SV_Signals [view list -new -title SV_Signals]
add list -window $SV_Signals /top/mysignals
The custom window title "SV_Signals" is saved as a TCL variable, then called using the
’$’ prefix.
Related Topics
add wave
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add memory
add memory
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.
Syntax
add memory [-addressradix {decimal | hex}] [-dataradix <type>]
[-radixenumnumeric | -radixenumsymbolic] [-wordsperline <num>] <object_name> ...
Arguments
• -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".
• -dataradix <type>
(optional) Specifies the data radix for the memory display. If you do not specify this switch,
the command uses the global default radix.
<type> — binary, ascii, unsigned, decimal, octal, hex, sfixed, symbolic, time, ufixed,
and default.
Refer to the radix command for information about sfixed and ufixed radix types.
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. (Refer to DefaultRadix in the User’s Manual.) 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.
• -radixenumsymbolic
(optional) Restores the default behavior of displaying Verilog and SystemC enums as
symbols by reversing the action of the -radixenumnumeric option.
• -wordsperline <num>
(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.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add memory
Related Topics
Memory List Window [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add message
add message
Used within a DO file or script to specify a user-defined runtime message to be sent to the
transcript and .wlf files. Messages are displayed in the Message Viewer window in the GUI.
Refer to the GUI Reference Manual for more information on this window.
Syntax
add message <message_body> [-category <category>] [-efftime <time>] [-file <filename>]
[-id <id_number>] [-inline] [-line <linenumber>] [-noident] [-nolevel] [-objects <list>]
[-region region] [-severity {error | note | warning}]
Arguments
• <message_body>
(required) User specified message.
• -category <category>
(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 WLF
MISC USER <user-defined>
• -efftime <time>
(optional) Specifies the simulation time when the message is saved to the log file. The
Message Viewer window Time column lists the time specified when the message is called.
Useful for placing messages at specific times in the simulation.
<time> — Specified as an integer or decimal number.
• -file <filename>
(optional) Displays a user specified string in the File Info column of the Message Viewer
window.
• -id <id_number>
(optional) Assigns an identification number to the message.
<id_number> — Any non-negative integer from 0 - 9999 where the default is 0. The
number is added to the base identification number of 80000.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add message
• -inline
(optional) Causes the message to also be returned to the caller as the return value of the add
message command.
• -line <linenumber>
(optional) Displays the user specified number in File Info column of the Message Viewer
window.
• -noident
(optional) Prevents return of the ID number of the message.
• -nolevel
(optional) Prevents return of the severity level of the message.
• -objects <list>
(optional) List of related design items shown in the Objects column of the Message Viewer
window.
<list> — A space separated list enclosed in curly braces ({}) or quotation marks (" ").
• -region region
(optional) Displays the message in the Region column of the Message Viewer window.
• -severity {error | note | warning}
(optional) Sets the message severity level.
error — Questa SIM cannot complete the operation.
note — (default) The message is informational.
warning — There may be a problem that will affect the accuracy of the results.
Examples
• Create a message numbered 80304.
add message -id 304 <message>
Related Topics
displaymsgmode [Questa SIM User's Manual]
msgmode [Questa SIM User's Manual]
Message Viewer Window [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add schematic
add schematic
Adds the specified process, signal, net, or register to the Incremental or Full view of the
Schematic window. Wildcards are allowed.
Syntax
add schematic <object> ... [-connect <source_net> <destination_net>] [-incr | -full]
{[-in] [-out] [-inout] | [-ports]} [-internal] [-nofilter] [-recursive] [-window <wname>]
Arguments
• <object> ...
(required unless specifying -connect) Specifies a process, signal, net, or register to add to
the Schematic window. Must be specified as the first argument to the add schematic
command. Specify multiple objects as a space separated list. Wildcards are allowed. Refer
to the section “Wildcard Characters” on page 28 for wildcard usage as it pertains to the add
commands.
• -connect <source_net> <destination_net>
(optional) Computes and displays in the Schematic window all paths between two nets.
<source_net> — The net that originates the path search.
<destination_net> — The net that terminates the path search.
• -incr | -full
(optional) Adds the specified process, signal, net, or register to the Incremental (-incr) or
Full (-full) view of the Schematic window. If neither is specified, the object is displayed in
the current default mode of the Schematic window. If the Schematic window is not yet open,
the default is -incr.
• -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.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add schematic
• -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.
• -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 alias to this switch.
• -window <wname>
(optional) Adds the object(s) to the specified Schematic window.
<wname> — the name of the schematic window, as shown in the window’s tab.
This switch is useful when you have multiple schematic windows open.
You can open a new schematic window by entering:
view schematic -new
Examples
• Add all objects in the design to the schematic window.
add schematic -r /*
• Open a new Schematic window with "SFLOW" as its title, then add signals to it.
set SFLOW [view schematic -new -title SFLOW]
add schematic -window $SFLOW /top/mysignals
The custom window title "SFLOW" is saved as a TCL variable, then called using the ’$’
prefix.
Related Topics
Automatically Tracing All Paths Between Two Nets [Questa SIM User's Manual]
Schematic Window [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add testbrowser
add testbrowser
Adds .ucdb file(s) to the test management browser.
Syntax
add testbrowser <ucdb_filename> [<ucdb_filename>...]
Arguments
• <ucdb_filename> [<ucdb_filename>...]
(required: at least one .ucdb) Specifies the name of the .ucdb file(s) to add. Specify multiple
filenames as a space separated list.
Wildcard characters are allowed. (Note that the WildcardFilter Tcl preference variable
identifies the types to ignore when matching objects with wildcard patterns.)
Related Topics
“Verification Management Browser Window” [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add watch
add watch
Adds signals and variables to the Watch window in the Main window.
SystemC objects and user-defined buses may also be added.
Refer to “Wildcard Characters” for wildcard usage as it pertains to the add commands.
Syntax
add watch <object_name> ... [-radix <type>] [-radixenumnumeric | -radixenumsymbolic]
Arguments
• <object_name> ...
(required) Specifies the name of the object to be added. Multiple objects are entered as a
space-separated list. Must be the first argument to the add watch command.
Wildcard characters are allowed. (Note that the WildcardFilter Tcl preference variable
identifies the types to ignore when matching objects with wildcard patterns.) Wildcard
expansion is limited to 150 items. If you exceed this limit, a dialog box will ask you to
accept the limit or cancel the operation.
Variables must be preceded by the process name. For example,
add watch myproc/int1
• -radix <type>
(optional) Specifies a user-defined radix. If you do not specify this switch, the command
uses the global default radix.
<type> — binary, ascii, unsigned, decimal, octal, hex, sfixed, symbolic, time, ufixed,
and default.
Refer to the radix command for information about sfixed and ufixed radix types.
You can change the default radix for the current simulation with the radix command. You
can change the default radix permanently by editing the DefaultRadix variable in the
modelsim.ini file. (Refer to DefaultRadix in the User’s Manual.)
• -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.
Related Topics
Watch window [Questa SIM GUI Reference Manual]
DefaultRadix [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add wave
add wave
Adds objects to the Wave window.
Syntax
add wave [-allowconstants] [-clampanalog {0 | 1}] [-color <standard_color_name>] [-depth
<level>] [[-divider [<divider_name> ...] [-expand <signal_name>] [-filter <f> | -nofilter
<f>] [-format <type> | -<format>] [-group <group_name> [<sig_name1> ...]] [-height
<pixels>] {[-in] [-inout] [-out] | [-ports]} [-internal] [-label <name>] [-max <real_num>] [-
min <real_num>] [-mvcall] [-mvcovm] [-mvcreccomplete] [-noupdate] [-numdynitem
<int>] [-optcells] [-position <location>] [-queueends] [-<radix_type> | -radix <type>] [-
radixenumnumeric | -radixenumsymbolic] [-recursive] [-startdynitem <int>] [-time] [-
window <wname>] [<object_name> ...] [{<object_name> {sig1 sig2 ...}}]
Description
Note
In live-simulation, the add wave command implicitly logs the object to the qwavedb or
WLF file.
Use add wave to display the following types of objects in the Wave window:
Refer to “Wildcard Characters” on page 28 for wildcard usage as it pertains to the add
commands.
Arguments to this command are order dependent, as described in the argument descriptions.
Arguments
• -allowconstants
(optional) For use with wildcard searches. Specifies to add constants matching the wildcard
search to the Wave window.
By default, constants are ignored because they do not change.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add wave
• -clampanalog {0 | 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 <standard_color_name>
(optional) Specifies the color used to display a waveform.
<standard_color_name> — You can use either of the following:
standard X Window color name — enclose 2-word names in quotes ("), for example:
-color "light blue"
• -depth <level>
(optional) Restricts a recursive search, as specified with -recursive, to a specified level of
hierarchy.
<level> — Any integer greater than or equal to zero. For example, if you specify
-depths 1, the command descends only one level in the hierarchy.
• -divider [<divider_name> ...]
(optional) Adds a divider to the Wave window. If you do not specify this argument, the
command inserts an unnamed divider.
<divider_name> ... — Specifies the name of the divider, which appears in the pathnames
column. Enter multiple objects as a space separated list.
When you specify more than one <divider_name>, the command creates a divider for
each name.
You can begin a name with a space, but you must enclose the name within quotation
marks (") or braces ({ }) You cannot begin a name with a hyphen (-).
• -expand <signal_name>
(optional) Instructs the command to expand a compound signal immediately, but only one
level down.
<signal_name> — Specifies the name of the signal. This string can include wildcards.
• -filter <f> | -nofilter <f>
(optional) Allows a one-time modification of the WildcardFilter in the command
invocation. The add list command can take as many [-filter <f>] and [-nofilter <f>]
arguments as you want to specify. Valid filters, <f>, are the exact set of words that apply to
the WildcardFilter. The WildcardFilter is used first during a command, followed by the user
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add wave
specified filters, if any. The -filter values are added to the filter, the -nofilter values are
removed from the filter. They are applied in the order specified, so conflicts are resolved
with the last specified wins.
• -format <type> | -<format>
(optional) Specifies the display format of the objects. Valid entries are:
-format <type> -<format> 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- -analog-step Analog-step changes to
step the new time before
plotting the new Y.
-format analog- -analog- Analog-interpolated
interpolated interpolated draws a diagonal line.
-format analog- -analog- Analog-backstep plots
backstep backstep the new Y before
moving to the new
time.
-format event -event Displays a mark at
every transition.
The way each state is displayed is specified by the logic type display preference. (Refer to
“modelsim.ini Variables” in the User’s Manual).
The Y-axis range of analog signals is bounded by -max and -min switches.
• -group <group_name> [<sig_name1> ...]
(optional) Creates a wave group with the specified group_name.
<group_name> — Specifies the name of the group. You must enclose this argument in
quotation marks (") or braces ({ }) if it contains any spaces.
<sig_name> ... — Specifies the signals to add to the group. Enter multiple signals as a
space separated list. This command creates an empty group if you do not specify any
signal names.
• -height <pixels>
(optional) Specifies the height of the waveform in pixels.
<pixels> — Any positive integer.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add wave
• -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. Specifies 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 <name>
(optional) Specifies an alternative name for the signal being added. For example,
add wave -label c clock
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add wave
Note
Although -offset and -scale are still supported, the -max and -min arguments provide
an easier way to define upper and lower limits of an analog waveform.
• -mvcall
(optional) Specifies the inclusion of all Questa Verification IP protocol transactions when a
wildcard is used (for example, add wave -r /*). By default, Questa Verification IP
transactions are sometimes excluded from view with normal wildcard usage.
• -mvcovm
(optional) Specifies the inclusion of all UVM or OVM sequence transactions when a
wildcard is used (for example, add wave -r /*). By default, UVM/OVM sequence
transactions are sometimes excluded from view with normal wildcard usage.
• -mvcreccomplete
(optional) Enables the logging of all Questa Verification IP transaction instances that have
been recognized as completed, whether or not they become used as legal protocol. By
default, only transactions that become used as legal protocol are visible, which can prevent
the transaction instances of interest from being logged soon enough to observe an issue.
• -noupdate
(optional) Prevents the Wave window from updating when a series of add wave commands
execute in series.
• -numdynitem <int>
(optional) Specifies the number of child elements of a queue or dynamic array to display in
the Wave window. For example, if you specify the value 3, then only three elements display
in the Wave window.
<int> — Any non-negative integer from 0 to the number of elements of the specified
queue or dynamic array.
• -optcells
(optional) Specifies that optimized cell ports are visible when using wildcards. By default,
optimized cell ports are not selected even if they match the specified wildcard pattern.
• -position <location>
(optional) Specifies where the command adds the signals.
<location> — 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.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add wave
<integer> — Adds the signals beginning at the specified point in the list of signals.
• -queueends
(optional) Adds a SystemVerilog queue to the Wave window and displays the first and last
elements of the queue.
<queue> — The relative or full path to a queue.
• -<radix_type>
(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, sfixed,
symbolic, time, ufixed, and default.
If you do not specify a radix 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. (Refer to DefaultRadix variable in the User’s Manual.)
If you specify a radix for an array of a VHDL enumerated type, Questa SIM converts each
signal value to 1, 0, Z, or X.
• -radix <type>
(optional) Specifies a user-defined radix. You can use the -radix <type> switch in place of
the -<radix_type> switch. For example, -radix hexadecimal is the same as -hex.
<type> — binary, ascii, unsigned, decimal, octal, hex, sfixed, symbolic, time, ufixed,
and default.
Refer to the radix command for information about sfixed and ufixed radix types.
This option overrides the global setting of the default radix (the variable in the modelsim.ini
file) for the current simulation only.
• -radixenumnumeric
(optional) Causes Verilog and SystemC enums to display 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.
• -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.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add wave
• -startdynitem <int>
(optional) Specifies the index of a queue or dynamic array from where the Wave window
starts displaying the data. For example, if a queue has 10 elements and -startdynitem 3 is
specified, the display starts from q[3].
<int> — Any non-negative integer where 0 is the default.
• -time
(optional) Use time as the radix for Verilog objects that are register-based types (register
vectors, time, int, and integer types).
• -window <wname>
(optional) Adds objects to a specified window. Used to specify a particular wave window
when multiple wave windows exist.
<wname> — The name of the wave window (for instance, wave2). Must be an existing
window. Does not create a new window.
Use the view command with the -new option to create a new window.
• <object_name> ...
(required unless specifying {<object_name> {sig1 sig2 ...}) Specifies the names of objects
to include in the Wave window. Must be specified as the final argument to the add wave
command. Wildcard characters are allowed. Enter multiple objects as a space separated list.
Note that the WildcardFilter Tcl preference variable identifies types to ignore when
matching objects with wildcard patterns.
You can add variables by preceding them with the process name. For example,
add wave myproc/int1
Examples
• Display an object named out2. The object is specified as being a logic object presented
in gold.
add wave -logic -color gold out2
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add wave
• Create a user-defined bus named "mybus" consisting of three signals. Scalar1 and
scalar2 are of type std_logic and vector1 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]}
• Add the object vec1 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
• 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- "
• Open a new Wave window with "SV_Signals" as its title, then add signals to it.
set SV_Signals [view wave -new -title SV_Signals]
add wave -window $SV_Signals /top/mysignals
The custom window title "SV_Signals" is saved as a TCL variable, then called using the
’$’ prefix.
Related Topics
add list
Wave Window [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_cmdhelp
add_cmdhelp
Adds the specified command name, description, and command arguments to the command-line
help. You can then access the information using the help command.
Note
To delete an entry, invoke the command with an empty command description and
arguments. (See examples.)
Syntax
add_cmdhelp {<command_name>} {<command_description>} {<command_arguments>}
Arguments
• {<command_name>}
(required) Specifies the command name to enter as an argument to the help command. Must
be enclosed in braces ({ }). The command_name cannot be the same as an existing
command_name. Must be specified as the first argument to the add_cmdhelp command.
• {<command_description>}
(required) Specifies a description of the command. Must be enclosed in braces ({ }). Must
be specified as the second argument to the add_cmdhelp command.
• {<command_arguments>}
(required) A space-separated list of arguments for the command. Must be enclosed in braces
({ }). If the command does not have any arguments, enter {}. Must be specified as the third
argument to the add_cmdhelp command.
Examples
• Add a command named "date" with no arguments.
add_cmdhelp date {Displays date and time.} {}
Entering:
Returns:
Entering:
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_cmdhelp
Returns:
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_menu
add_menu
Adds a menu to the menu bar of the specified window, using the specified menu name. Use the
add_menuitem, add_separator, add_menucb, and add_submenu commands to complete the
menu.
Returns the full Tk pathname of the new menu.
You can change color and other Tk properties of the menu, after creation, with the Tk menu
widget configure command.
Syntax
add_menu <window_name> <menu_name> [<shortcut> [-hide_menubutton]]
Arguments
• <window_name>
(required) Specifies the Tk path of the window to contain the menu. Must be the first
argument to the add_menu command.
To add a menu to the Main window you must express this value as: "". For example,
add_menu "" mymenu
To add a menu to any other window, you need to determine the window_name by entering
the view command. For example:
view wave
Returns:
# .main_pane.wave
Note that the <window_name> for each window, except the Main window, begins with a
period (.).
• <menu_name>
(required) Specifies the name to be given to the Tk menu widget. Must be specified as the
first argument to the add_menu command.
• <shortcut>
(optional) An integer that corresponds to the place of a letter in the menu name that is to be
used as the shortcut. Numbering starts with 0 (first letter = 0, second letter = 1, third letter =
2, and so on). Optional, unless you specify -hide_menubutton, in which case <shortcut> is
required. Default is "-1", indicating no shortcut.
• -hide_menubutton
(optional) Specifies not to display the new menu. You can add the menu later by calling
tk_popup on the menu path widget. Note that you must specify <shortcut> if you specify
-hide_menubutton.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_menu
Examples
The following Tcl code is an example of creating user-customized menus. It adds a menu
containing a top-level item labeled "Do My Own Thing...", which prints
"my_own_thing.signals", and adds a cascading submenu labeled "changeCase" with two
entries, "To Upper" and "To Lower", which echo "my_to_upper" and "my_to_lower"
respectively. Also adds a checkbox that controls the value of myglobalvar (.signals:one).
set myglobalvar 0
set wname [view wave]; #Gets path to Wave window
proc AddMyMenus {wname} {
global myglobalvar
set cmd1 "echo my_own_thing $wname"
set cmd2 "echo my_to_upper $wname"
set cmd3 "echo my_to_lower $wname"
# WindowName Menu MenuItem label Command
# ---------- ---- -------------------- -------
add_menu $wname mine
add_menuitem $wname mine "Do My Own Thing..." $cmd1
add_separator $wname mine ;#------------------ -------
add_submenu $wname mine changeCase
add_menuitem $wname mine.changeCase "To Upper" $cmd2
add_menuitem $wname mine.changeCase "To Lower" $cmd3
add_submenu $wname mine vars
add_menucb $wname mine.vars "Feature One" -variable
myglobalvar
-onvalue 1
-offvalue 0
-indicatoron 1
}
AddMyMenus $wname
You can run the DO file to add the "Mine" menu shown in the illustration, or modify the file for
different results.
To execute the DO file, select Tools > Execute Macro (Main window), or use the do
command.
Related Topics
add_menucb
add_separator
change_menu_cmd
add_menuitem
add_submenu
User Defined Buttons and Menus [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_menucb
add_menucb
Creates a checkbox within the specified menu of the specified window. A checkbox is a small
box with a label. Clicking on the box toggles the state from on to off, or off to on.
When the box is "on", the Tcl global variable <var> is set to <onval>. When the box is "off", the
global variable is set to <offval>. If any operation changes the global variable, the state of the
checkbox also changes. Returns nothing.
Syntax
add_menucb <window_name> <menu_name> <text> [-indicatoron {0 | 1}]
[-onvalue <onval>] [-offvalue <offval>] [-variable <var>]
Arguments
• <window_name>
(required) Specifies the Tk path of the window to contain the menu. Must be the first
argument to the add_menucb command.
To add a menu to the Main window you must express this value as: "". For example:
add_menucb "" mymenu
To add a menu to any other window, you must determine the window_name by executing
the view command, for example:
view wave
Returns:
# .main_pane.wave
Note that all windows, other than the Main window, begin with a period (.).
• <menu_name>
(required) Specifies the name of the Tk menu widget. Must be the second argument to the
add_menucb command.
• <text>
(required) Specifies the text to display next to the checkbox. Must be the third argument to
the add_menucb command.
• -indicatoron {0 | 1}
(optional) Specifies whether or not to display the status indicator.
0 — off
1 — (default) on
• -onvalue <onval>
(optional) Specifies the value of the global Tcl variable when the box is "on".
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_menucb
Related Topics
add_menu
add_separator
add_submenu
change_menu_cmd
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_menuitem
add_menuitem
Creates a menu item within the specified menu or submenu of the specified window.
Returns nothing.
Syntax
add_menuitem <window_name> <menu_path> <text> <cmd> [<shortcut>]
Arguments
The arguments <window_name>, <menu_path>, <text>, and <cmd> are order dependent and
must be entered as specified in the Syntax section.
• <window_name>
(required) Specifies the Tk path of the window to contain the menu. Must be the first
argument to the add_menuitem command.
To add a menu to the Main window you must express this value as: "". For example,
add_menu "" mymenu
To add a menu to any other window, you must determine the window_name by executing
the view command, for example:
view wave
Reurns:
# .main_pane.wave
Note that all windows, other than the Main window, begin with a period (.).
• <menu_path>
(required) Specifies the name of the Tk menu widget plus submenu path. Must be the
second argument to the add_menuitem command.
• <text>
(required) Specifies the text to display. Must be the third argument to the add_menuitem
command.
• <cmd>
(required) Specifies the command to execute when selecting the menu item with the left
mouse button. Must be the fourth argument to the add_menuitem command.
To echo the command and display the return value in the Main window, prefix the
command with the transcribe command. The transcribe command also echos the results to
the Transcript window.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_menuitem
• <shortcut>
(optional) An integer that corresponds to the place of the letter in the menu name to use as
the shortcut, where the default is -1, no shortcut. Numbering starts with 0 (first letter = 0,
second letter = 1, third letter = 2, and so on).
Examples
add_menuitem $wname user "Save Results As..." $my_save_cmd
Related Topics
add_menu
add_menucb
add_separator
add_submenu
change_menu_cmd
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_separator
add_separator
Adds a separator as the next item in the specified menu path in the specified window.
Returns nothing.
Syntax
add_separator <window_name> <menu_path>
Arguments
The arguments <window_name> and <menu_path> are order-dependent and must be entered as
specified in the Syntax section.
• <window_name>
(required) Specifies the Tk path of the window to contain the menu. Must be the first
argument to the add_separator command.
To add a menu to the Main window you must express this value as: "". For example,
add_menu "" mymenu
To add a menu to any other window, you must determine the window_name by executing
the view command, for example:
view wave
Returns:
# .main_pane.wave
Note that all windows, other than the Main window, begin with a period (.).
• <menu_path>
(required) Specifies the name of the Tk menu widget plus submenu path. Must be the
second argument to the add_separator command.
Examples
add_separator $wname user
Related Topics
add_menu
add_menuitem
add_submenu
change_menu_cmd
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_submenu
add_submenu
Creates a cascading submenu within the specified menu path of the specified window. Can be
used within a submenu.
Returns the full Tk path to the new submenu widget.
Syntax
add_submenu <window_name> <menu_path> <name> [<shortcut>]
Arguments
The arguments <window_name>, <menu_path>, and <name> are order dependent and must be
specified as shown in the Syntax section.
• <window_name>
(required) Specifies the Tk path of the window to contain the menu. Must be the first
argument to the add_submenu command.
To add a menu to the Main window you must express this value as: "". For example:
add_menu "" mymenu
To add a menu to any other window, you must determine the window_name by executing
the view command. For example:
view wave
Returns:
# .main_pane.wave
Note that all windows, other than the Main window, begin with a period (.).
• <menu_path>
(required) Specifies the name of the Tk menu widget plus submenu path. Must be the
second argument to the add_submenu command.
• <name>
(required) Specifies the name to be displayed on the submenu. Must be the third argument to
the add_submenu command.
• <shortcut>
(optional) An integer that corresponds to place of the letter in the menu name that is to be
used as the shortcut, where the default is -1, no shortcut. Numbering starts with 0 (first letter
= 0, second letter = 1, third letter = 2, and so on).
Examples
This command is used in the add_menu example.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_submenu
Related Topics
add_menu
add_menucb
add_menuitem
add_separator
change_menu_cmd
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
alias
alias
Displays or creates user-defined aliases. Any arguments passed on invocation of the alias are
passed through to the specified commands.
Returns nothing. Existing commands (for example, run, env, and so forth) cannot be aliased.
Syntax
alias [<name> ["<cmds>"]]
Arguments
• <name>
(optional) Specifies the new procedure name to use when invoking the commands.
• "<cmds>"
(optional) Specifies the command or commands to evaluate when invoking the alias.
Specify multiple commands as a semicolon (;) separated list. You must enclose the string in
quotes (““).
Examples
• List all aliases currently defined.
alias
• List the alias definition for the specified name, if one exists.
alias <name>
• Create a Tcl procedure named "myquit" that, when executed, invokes write list to write
the contents of the List window to the file mylist.save, and then invokes quit to exit
Questa SIM.
alias myquit "write list ./mylist.save; quit -f"
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
archive load
archive load
Enables you to load an archived debug database (.dbar) file that was previously created with the
archive write command. The archived file may include a number of WLF files, design source
files, and a DBG file.
Syntax
archive load <archive_name> [-dbgDir <directory_name>] -wlf <wlf_file_name>
Arguments
• <archive_name>
(required) Specifies the name of the archived file to open for reading. A suggested suffix is
.dbar.
• -dbgDir <directory_name>
(optional) Specifies a location to extract files into. Files are extracted on demand when
Questa SIM needs them. If you do not specify this switch, the command extracts to the
current working directory.
• -wlf <wlf_file_name>
(required) Specifies the WLF files to open for analysis.
<wlf_file_name> — can be a single file or a list of files. If you use a list of file names,
you must enclose it in curly braces {}. The name of the wlf file must exactly match
the name and file path (if provided) specified in the archive write command.
Related Topics
archive write
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
archive write
archive write
Enables you to create a debug archive file, with the file extension .dbar, 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. You can use this archived file to perform
post-simulation debugging in a location that differs from where the original simulation was run.
Syntax
archive write <archive_name> -wlf <wlf_file_name> [-include_src] [-dbg <dbg_file_name>]
Arguments
• <archive_name>
(required) Specifies the name of the archive file to create. A suggested suffix is .dbar.
• -wlf <wlf_file_name>
(required) Specifies the name of the WLF file to use for post-simulation analysis.
<wlf_file_name> — can be a single file, or a list of files enclosed in curly braces {} if
you want to capture more than one WLF file in the archive.
• -include_src
(optional) Indicates to capture source files in the archive. This is off by default, which
means no source is captured in the archive.
• -dbg <dbg_file_name>
(optional) Specifies the name of an existing debug database (.dbg) file to include in the
archive.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion action
assertion action
Enables you to set the assertion action for concurrent assertion starts, failures, passes, and
antecedent matches.
Syntax
assertion action -cond [start | antecedent | pass | fail | failup | faildown | threads
<num_of_threads> | global_fail_limit <value>] -exec [continue | break | exit | tcl_subroutine
| kill | off] -actionblock [passon | passoff | failon | failoff | nonvacuouson | vacuousoff] [-
assert | -cover] [-filter <pattern>] [-recursive] [-severity info | note | warning | error | failure |
fatal] <path> [<path> ...]
Description
The actions for this command can be: continue, break, exit, or a tcl subroutine call.
You can define a tcl subroutine in a .do file and call it on a specific assertion event.
Restriction
The action setting for start, antecedent, and pass conditions works only if:
• The assertion is browseable – for example, the +acc=a argument is used with the vopt
command.
• Assertion debugging is set – for example, the -assertdebug switch is used with the vsim
command.
Arguments
• -cond [start | antecedent | pass | fail | failup | faildown | threads <num_of_threads> |
global_fail_limit <value>]
(required) Designates the assertion condition.
start — When a new assertion attempt starts.
pass — When an assertion passes.
fail — When an assertion fails.
failup —
faildown —
antecedent — When the antecedent (left hand side) of an implication succeeds.
threads <num_of_threads> — Used in conjunction with -exec [kill | off] to designate the
limit of the number of assertion or cover directive threads. Default number of threads
is unlimited. You can change this limit with the AssertionThreadLimit or
CoverThreadLimit variables, set in the modelsim.ini file. (Refer to
AssertionThreadLimit or CoverThreadLimit in the User’s Manual.)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion action
global_fail_limit <value> — When the total fail count (<value>) for all assertions in the
design is reached. Can be used with -severity to set actions for global fail limits based
on severity of assertions.
• -exec [continue | break | exit | tcl_subroutine | kill | off]
(required) Specifies the action to take on the designated assertion condition.
continue — (default) No action taken. This is the default value if you do not specify this
switch.
break — Halt simulation and return to the Questa SIM prompt.
exit — Halt simulation and exit Questa SIM.
tcl_subroutine — Execute tcl subroutine.
kill — Used only with -cond threads <num_of_threads> to designate the action to take
when the thread count limit is reached. When limit is reached, all existing threads are
terminated and no new attempts are initiated.
off — Used only with -cond threads <num_of_threads> to designate the action to take
when the threadcount limit is reached. When limit is reached, all existing thread
attempts continue evaluating, however no new attempts are initiated.
• -actionblock [passon | passoff | failon | failoff | nonvacuouson | vacuousoff]
(optional) Controls the execution of assertions in action blocks. The '-cond' and '-exec'
arguments cannot be combined with this argument. The following options control the
execution of action blocks:
passon - Enables execution of pass action for vacuous and nonvacuous passes.
passoff - Disables execution of pass action for vacuous and nonvacuous passes.
failon - Enables execution of fail action for failures.
failoff - Disables execution of fail action for failures.
nonvacuouson - Enables execution of pass action for nonvacuous passes.
vacuousoff - Disables execution of pass action for vacuous passes.
• -assert | -cover
(optional) The -assert switch specifies that the action applies only to assertions. The -cover
switch specifies that the action applies only to cover directives. If neither is specified, the
action applies to both assertions and cover directives.
• -filter <pattern>
(optional) Specifies that the assertion action arguments affect only assertions whose names
match the specified pattern.
<pattern> — Specifies the character(s) to match in the search. Wildcards are permitted.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion action
• -recursive
(optional) For use with wildcard matching. Specifies that the scope of the matching is to
descend recursively into subregions. If omitted, the search is limited to the selected region.
Applies to all paths specified in the command. You can abbreviate this switch to “-r”.
• -severity info | note | warning | error | failure | fatal
(optional) Specifies the assertion severity level. When -severity is specified, only assertions
with the same or higher severity are selected. If not specified, assertions of all severities are
selected. Can be used to set actions for global fail limits based on severity of assertions.
• <path> [<path> ...]
(required) A space separated list of paths, that specifies the assertions to be affected.
Multiple paths and wildcards are allowed. The path specifies assertions or a design region
containing multiple assertions. Must be the final argument to the assertion active command.
You must specify at least one <path> argument, but can also specify more in a space-
separated list.
Examples
• In the following command example:
assertion action -cond global_fail_limit 100 -exec break
a simulation break occurs when the total number of failed assertions reaches 100.
Related Topics
assertion active
assertion count
assertion enable
assertion fail
assertion pass
assertion profile
atv log
Viewing Assertions in the Assertions Window [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion active
assertion active
Instructs the simulator to report on any active assertion directives at the end of simulation
(EOS). Active assertion directives are then indicated in the Assertions tab of the Analysis
window, with the text “active at end of simulation” in the EOS Note column. If the PSL assert
directive is strong, the EOS Note column reports both the usual “active at end of simulation”
note and a PSL strong error message.
Syntax
assertion active [-eosnote {off | on}] [-filter <pattern>] [-recursive] [-severity info | note |
warning | error | failure | fatal] <path> [<path> ...]
Arguments
• -eosnote {off | on}
(optional) Controls the reporting of active assertion directives in the EOS Note column of
the Assertions tab of the Analysis window. The EOS Note message scopes match those that
appear in assertion messages during runtime.
off — (default) Reporting of active assertion directives turned off.
on — Reporting of active assertion directives turned on.
• -filter <pattern>
(optional) Limits EOS reporting to only those assertion directives that are active and whose
names match the specified pattern.
<pattern> — Specifies the character(s) to be matched in the search. Wildcards are
permitted.
• -recursive
(optional) For use with wildcard matching. Specifies that the scope of the matching is to
descend recursively into subregions. If omitted, the search is limited to the selected region.
Applies to all paths specified in the command. You can abbreviate this switch to “-r”.
• -severity info | note | warning | error | failure | fatal
(optional) Specifies the assertion severity level. When -severity is specified, only assertions
with the same or higher severity are selected. If not specified, assertions of all severities are
selected.
• <path> [<path> ...]
(required) A space-separated list of paths that specifies the assertions to be affected.
Multiple paths and wildcards are allowed. The path specifies assertions or a design region
containing multiple assertions. Must be the final argument to the assertion active command.
You must specify at least one <path> argument, but can also specify more in a space-
separated list.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion active
Examples
assertion active -eosnote on -r /*
assertion active -eosnote off /tb/assert*
assertion active -eosnote on /tb/assert* /tb/cntrl/*
Related Topics
assertion action
assertion count
assertion enable
assertion fail
assertion pass
assertion profile
atv log
Viewing Assertions in the Assertions Window [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion count
assertion count
Returns the sum of the assertion failure counts for the specified set of assertion directive
instances. Returns a “No matches” warning if the given path does not contain any assertions.
Syntax
assertion count {-fails | -failattempts} [-lang sva | psl | vhdl | vhdlams | spice] [-concurrent | -
immediate | -soa | -extract | -meas] [-filter <pattern>] [-severity info | note | warning | error |
failure | fatal] [-recursive] <path> [<path> ...]
Arguments
• -fails | -failattempts
(required) Controls reporting of assertion directive failures. Must be the first argument to
the assertion count command.
-fails — Returns the sum of the given assertion directive instances that have a non-zero
fail count.
-failattempts — Returns the sum of all of the fail counts of the specified assertion
directive instances.
• -lang sva | psl | vhdl | vhdlams | spice
(optional) Specifies assertions of a specific language. You can specify multiple languages
by using this option multiple times. If you do not use this option, all languages are specified
by default.
• -concurrent | -immediate | -soa | -extract | -meas
(optional) Reports only on the specified type of assertions:
-concurrent — Concurrent assertions.
-immediate — Immediate assertions.
-soa — Save Operating Area assertions in SPICE.
-extract — Extract Waveform characteristics in SPICE.
-meas — Measure Waveform Characteristics in SPICE.
These are mutually exclusive options. If you do not specify an argument, all are selected.
• -filter <pattern>
(optional) Specifies that the command affects only the assertions whose names match the
specified pattern.
<pattern> — Specifies the character(s) to be matched in the search. Wildcards are
permitted.
• -severity info | note | warning | error | failure | fatal
(optional) Specifies the assertion severity level. Specifying -severity selects only assertions
with the same or higher severity level. If not specified, selects assertions of all severities.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion count
• -recursive
(optional) For use with wildcard matching. Specifies that the scope of the matching is to
descend recursively into subregions. Omitting -recursive limits the search to the selected
region. Applies to all paths you specify in the command. You can abbreviate this switch to
“-r”.
• <path> [<path> ...]
(required) A space-separated list of paths specifying the assertions to be affected. Multiple
paths and wildcards are allowed. The path specifies assertions or a design region containing
multiple assertions. Must be the final argument to the assertion count command.
Examples
assertion count -fails -r /
Related Topics
assertion action
assertion active
assertion enable
assertion fail
assertion pass
assertion profile
atv log
Configuring Assertions [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion enable
assertion enable
Enables and disables assertions and cover directives.
Syntax
assertion enable -on | -off | -release [-assert | -cover] [-concurrent | -immediate | -soa | -extract | -
meas] [-filter <pattern>] [-force] [-lang sva | psl | vhdl | vhdlams | spice]... [-recursive] [-
severity info | note | warning | error | failure | fatal] <path> [<path> ...]
Arguments
• -on | -off | -release
(required) Controls assertions and cover directives. Must be the first argument to the
assertion enable command.
-on — Enables assertions and cover directives specified by <path>.
-off — Disables assertions and cover directives.
-release — Returns the status of the assertions (specified by <path>) to the status at the
last issued second level command, whether the second level command was issued
before or after the use of -force with assertion enable. (Refer to the Examples
section.)
• -assert | -cover
(optional) Specifies that the command applies only to assertions (-assert) or to cover
directives (-cover). If not specified, the command applies to both.
• -concurrent | -immediate | -soa | -extract | -meas
(optional) Reports only on the specified type of assertions:
-concurrent — Concurrent assertions.
-immediate — Immediate assertions.
-soa — Save Operating Area assertions in SPICE.
-extract — Extract Waveform characteristics in SPICE.
-meas — Measure Waveform Characteristics in SPICE.
These are mutually exclusive options. If you do not specify an argument, all are selected.
• -filter <pattern>
(optional) Enables only those assertions whose names match the specified pattern.
<pattern> — Specifies the character(s) to be matched in the search. Wildcards are
permitted.
• -force
(optional) Forces the command to take precedence over any other invocation of the
command, or of any use of the $asserton/$assertoff/$assertkill system task. (Refer to
Example.)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion enable
If you do not use the -force argument, assertion enable is a second-level command—that is, it is
the same level as the $asserton/$assertoff/$assertkill system tasks. Second-level commands
override each other depending on the one that is issued last.
The -release argument returns the status of the assertions specified by the path to the status
based on last issued second level command, whether it was issued before or after -force (see
Example).
Examples
• Understanding first-level and second-level commands and the use of -force and -release.
If the following command is used:
assertion enable -on -r assert1 /tb/assert* /tb/cntrl/*
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion enable
the -force option is released and the assert1 assertion is disabled due to the use of a
previous -off option.
If the following command is used:
assertion enable -off -force -r assert1
it has no affect right away, due to the use of the -force option.
If the following command is used:
assertion enable -release -r assert1
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion enable
atv log
Configuring Assertions [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion fail
assertion fail
This command configures simulator behavior in response to a SystemVerilog or PSL assertion
failure.
Syntax
assertion fail [-action {continue | break | exit}] [-filter <pattern>] [-limit {none | <count>}] [-log
{on | off}] [-lvlog] [-print_msg] [-recursive] <path> [<path> ...]
Arguments
• -action {continue | break | exit}
(optional) Specifies the action to take when an assertion fails. You can specify this option
multiple times; it applies to all paths that follow it in the command line.
continue — (default) No action taken. This is not the same as disabling an assertion,
since logging may still be enabled for the directive. This is the default value if you do
not specify -action.
break — Halt simulation and return to the Questa SIM prompt.
exit — Halt simulation and exit Questa SIM.
You can change the default by setting the AssertionFailAction variable in the modelsim.ini
file. (Refer to AssertionFailActionin the User’s Manual.)
• -filter <pattern>
(optional) Specifies that the assertion fail arguments affect only the assertions whose names
match the specified pattern.
<pattern> — Specifies the character(s) to be matched in the search. Wildcards are
permitted.
• -limit {none | <count>}
(optional) Sets a limit on the number of times Questa SIM responds to an assertion failing.
none — No limit; failure tracking remains enabled for the duration of the simulation.
This is the default behavior if you do not specify -limit.
<count> — Specify a whole number.
Once the limit is reached for a particular assertion, Questa SIM disables that assertion.
Questa SIM continues to respond to assertions that have not reached their limit. You can
change the default by setting the AssertionLimit variable in the modelsim.ini file. (Refer to
AssertionLimit in the User’s Manual.)
• -log {on | off}
(optional) Specifies whether to write a transcript message when an assertion fails. You can
specify this argument multiple times; each instance applies to all paths that follow it in the
command line.
on — (default) Enable transcript logging for all types of assertion failures (PSL).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion fail
• Set the failure response limit to 4 for all assertions in mydesign. Each assertion failure is
responded to a maximum of 4 times during the current simulation.
assertion fail -r / -limit 4 mydesign
Related Topics
assertion action
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion fail
assertion active
assertion count
assertion enable
assertion pass
assertion profile
atv log
Configuring Assertions [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion pass
assertion pass
Configures simulator behavior in response to a SystemVerilog or PSL assertion pass.
Syntax
assertion pass [-log {on | off}] [-filter <pattern>] [-recursive] <path> [<path> ...]
Arguments
• -log {on | off}
(optional) Specifies whether to write a transcript message when a SystemVerilog or PSL
assertion passes. You can specify this option multiple times; it applies to all paths that
follow it in the command line.
on — Enable transcript logging. (default)
off — Disable transcript logging.
You can change the default by setting the AssertionPassLog variable in the modelsim.ini
file. (Refer to AssertionPassLog in the User’s Manual.)
The -log argument does not apply to SystemVerilog assertion messages coming from action
blocks, which are always logged and are controlled by severity system tasks ($fatal, $error,
$warning and $info). You can choose to ignore these system tasks in the GUI or by setting
variables in the modelsim.ini file; refer to IgnoreSVAError, IgnoreSVAFatal,
IgnoreSVAInfo, and IgnoreSVAWarning in the User’s Manual.
• -filter <pattern>
(optional) Specifies that the assertion pass arguments affect only the assertions whose
names match the specified pattern.
<pattern> — Specifies the character(s) to match in the search. You can use wildcards.
• -recursive
(optional) For use with wildcard matching. A switch that specifies that the scope of the
matching is to descend recursively into subregions. Omitting -recursive limits the search to
the selected region. Applies to all paths specified in the command.
• <path> [<path> ...]
(required) Specifies the assertions to be affected. Specify multiple paths as a space-
separated list. Must be the final argument to the assertion pass command. You can use
multiple paths and wildcards. The path specifies assertions or a design region containing
multiple assertions.
Examples
• Turn on logging for assertion a.b.c.assert__0 but not a.b.c.assert__1.
assertion pass -log on a.b.c.assert__0 -log off a.b.c.assert_1
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion pass
Related Topics
assertion action
assertion active
assertion count
assertion enable
assertion fail
assertion profile
atv log
Configuring Assertions [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion profile
assertion profile
Generates a fine grained profile of memory usage for assertions and cover directives, including:
current memory used, peak memory used (as well as the simulation run time at which it
peaked), and the cumulative thread count for the assertion or cover directive.
Syntax
assertion profile [-threadthreshold <number_of_threads>] {on | off}
Arguments
• -threadthreshold <number_of_threads>
(optional) Causes the assertion engine to generate messages in the transcript any time the
number of threads in an assertion or cover directive exceeds the thread threshold at a clock
edge. Functions only when assertion profiling is “on.”
<number_of_threads> — Any positive integer.
• {on | off}
(required) Enables or disables the collection of assertion and cover directive memory profile
data. Must be the final argument to the assertion profile command. You can give assertion
profile on at any time during simulation.
on — Collection of memory profile data enabled.
off — Collection of memory profile data disabled.
Description
The assertion profile command reports fine-grained memory usage profile data in the Assertions
Browser and Cover Directives Browser, in four columns: current memory, peak memory, peak
memory time, and cumulative threads.
If you use assertion profile in the middle of the simulation, memory usage profiling starts|stops
from that simulation time onwards. The command does not require that you compile designs
with +acc, or that you run vsim in the -assertdebug mode. You can give the command in a fully
optimized simulation run.
Examples
• Thread threshold is reached.
assertion profile -threadthreshold 100 on
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion profile
Note
The message is generated at every clock edge for every assertion, cover directive,
and endpoint whose current thread count is more than the threshold. It also shows
the memory usage, which should match that shown in the current memory column of the
Assertions Browser and Cover Directives Browser.
Related Topics
assertion action
assertion active
assertion count
assertion enable
assertion fail
assertion pass
assertion report
atv log
Configuring Assertions [Questa SIM User's Manual]
Assertions Window [Questa SIM GUI Reference Manual]
Cover Directives Window [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion report
assertion report
Generates a status report for each SystemVerilog or PSL assertion matching the path
specification.
Syntax
assertion report [-append] [-failed] [-file <filename>] [-filter <pattern>] [-lang psl | sva | vhdl |
vhdlams | spice] [-noconcurr] [-noimmed] [-recursive] [-severity info | note | warning | error
| failure | fatal] [-totalmemory] [-verbose] [-xml] <path>
Arguments
• -append
(optional) Appends the current assertion statistics to the named output file (-file
<filename>).
• -failed
(optional) Displays only failed assertions in report.
• -file <filename>
(optional) Specifies a file name for the report. Default is to write the report to the Transcript
window. You can use environment variables in the pathname.
• -filter <pattern>
(optional) Specifies that the command affects only those assertion objects whose name
matches the specified pattern.
<pattern> — Specifies the character(s) to match in the search. Permits wildcards.
• -lang psl | sva | vhdl | vhdlams | spice
(optional) Specifies assertions of a specific language. You can specify multiple languages
by using this option multiple times. If you do not use this option, all languages are specified
by default.
• -noconcurr
(optional) Disables reporting of any concurrent assertions.
• -noimmed
(optional) Disables reporting of any immediate assertions.
• -nosoa
(optional) Disables reporting of any SPICE Safe Operating Area assertions.
• -noextract
(optional) Disables reporting of any SPICE Extract Waveform Characteristics.
• -nomeas
(optional) Disables reporting of any SPICE Measure Waveform Characteristics.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion report
• -recursive
(optional) Recursively selects objects under the given scope.
• -severity info | note | warning | error | failure | fatal
(optional) Specifies the assertion severity level. When -severity is specified, only assertions
with the same or lower severity are selected. If not specified, assertions of all severities are
selected.
• -totalmemory
(optional) Reports the total memory used by the assertion engine. This data is printed if
assertions are being profiled. You can use 'assertion profile on/off' to switch the profiling for
assertions on or off.
• -verbose
(optional) Generates a verbose report showing full assertion information, including other
counts like the vacuous, attempted, disabled, and active counts.
• -xml
(optional) Generates assertion report in xml format
• <path>
(required) Specifies the path of an assertion object. Permits wildcards.
Examples
Consider the following example test module, which contains four assertions: b1, b2, c1, and c2.
module test;
reg a, b;
reg clk;
initial clk =0;
always #50 clk = ~clk;
initial
begin
a=0; b=1;
#200 a=1; b=1;
#100 a=0; b=1;
#500 $finish;
end
endmodule
You can use the assertion report command to report on all assertions.
assertion report *
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion report
#------------------------------------------------------------
#Name File (Line) Failure Pass
Count Count
#------------------------------------------------------------
#/test/b1 src/miscreport01.sv(9) 0 0
#/test/b2 src/miscreport01.sv(10) 0 0
#/test/c1 src/miscreport01.sv(11) 0 0
#/test/c2 src/miscreport01.sv(12) 0 0
#
If you are interested in seeing a report on only assertion b1, use the -filter b1 argument with the
assertion report command.
#------------------------------------------------------------
#Name File (Line) Failure Pass
Count Count
#------------------------------------------------------------
#/test/b1 src/miscreport01.sv(9) 0 0
#
#------------------------------------------------------------
#Name File (Line) Failure Pass
Count Count
#------------------------------------------------------------
#/test/c1 src/miscreport01.sv(11) 0 0
#/test/c2 src/miscreport01.sv(12) 0 0
#
Related Topics
assertion action
assertion active
assertion count
assertion enable
assertion fail
assertion profile
atv log
Configuring Assertions [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion report
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
atv log
atv log
Prerequisites:
• Run the vopt command with the +acc=a argument or the vsim command with -
voptargs=+acc=a argument.
• Run the vsim command with the -assertdebug argument.
Enables or disables assertion thread viewing (ATV) for the specified assertion or assertions.
Specify multiple assertions by their pathnames.
Syntax
atv log {-enable | -disable} [-asserts] [-covers] [-recursive] <path> [<path> ...]
Arguments
• -enable | -disable
(required) Controls assertion thread viewing for the specified assertions. Must be the first
argument to the atv log command.
-enable — Turns on assertion thread viewing.
-disable — Turns off assertion thread viewing.
• -asserts
(optional) Enables thread viewing for assertions only. Thread viewing for cover directives is
not enabled. If you do not specify -asserts or -covers, the default behavior is to enable both
assertions and cover directives.
• -covers
(optional) Enables thread viewing for cover directives only. Thread viewing for assertions is
not enabled. If you do not specify -asserts or -covers, the default behavior is to enable both
assertions and cover directives.
• -recursive
(optional) For use with wildcard matching. Specifies that the scope of the matching is to
descend recursively into subregions. If omitted, the search is limited to the selected region.
• <path> [<path> ...]
(required) A space separated list of paths, that specifies the affected assertions. Must be the
final argument to the atv log command. You can use wildcards. Each path specifies an
assertion or a design region containing multiple assertions.
Related Topics
assertion action
assertion active
assertion count
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
atv log
assertion enable
assertion fail
assertion pass
assertion profile
Configuring Assertions [Questa SIM User's Manual]
Viewing Assertions in the Assertions Window [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
batch_mode
batch_mode
Returns “1” if Questa SIM is operating in batch mode, otherwise it returns “0.” 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 works both
in and out of batch mode, use the batch_mode command to determine which command to use.
For example:
if [batch_mode] {
log /*
} else {
add wave /*
}
Related Topics
General Modes of Operation [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bd
bd
Deletes a breakpoint. You can delete multiple breakpoints by specifying separate information
groupings on the same command line.
Syntax
bd {<filename> <line_number>}
bd {<id_number> | <label>} ...
Arguments
• <filename>
(required when not specifying <id_number> or <label>.) A string that specifies the name of
the source file in which to delete the breakpoint. The filename must match the one used to
set the breakpoint, including whether you used a full pathname or a relative name. Must be
the first argument to the bd command, if you do not specify <id_number> or <label>.
• <line_number>
(required) A string that specifies the line number of the breakpoint to delete.
• <id_number> | <label>
(required when not specifying <filename>.) Specifies the identification of breakpoints using
markers assigned by the bp command. Must be the first argument to the bd command, if you
do not specify <filename>.
<id_number — A string that specifies the identification number of the breakpoint to
delete. Use the -id argument to the bp command to set the identification number. If
you are deleting a C breakpoint, the identification number will have a "c" prefix.
<label> — A string that specifies the label of the breakpoint to delete. Use the -label
switch to the bp command to set the label.
Examples
• Delete the breakpoint at line 127 in the source file named alu.vhd.
bd alu.vhd 127
• Delete the breakpoint with id# 6 and the breakpoint at line 234 in the source file named
alu.vhd.
bd 6 alu.vhd 234
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bd
bd c.4
Related Topics
bp
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bookmark add wave
Syntax
bookmark add wave <label> [[<range_start> [<unit>]] [<range_end> [<unit>]] [<topindex>]] [-
window <window_name>]
Arguments
• <label>
(required) A string that specifies the name for the bookmark. Must be the first argument to
the bookmark add wave command.
• <range_start> [<unit>]
(optional) Specifies the beginning point of the zoom range where the default starting point is
zero (0).
<unit> — (optional) A suffix specifying a unit of time, where the default is to specify
the current simulation resolution by omitting <unit>. Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr. If <unit> is specified, you must enclose <limit> and <unit>
within curly braces ({}).
You must also enclose the complete grouping of <range_start> and <range_end> in braces
({ }) or quotes (" "). For example:
{{100 ns} {10000 ns}}
{10000}
• <range_end> [<unit>]
(optional) Specifies the end point of the zoom range.
<unit> — (optional) A suffix specifying a unit of time, where the default is to specify
the current simulation resolution by omitting <unit>. Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr. If <unit> is specified, you must enclose <limit> and <unit>
within curly braces ({}).
• <topindex>
(optional) An integer specifying the vertical scroll position of the window. You must
specify a zoom range before you specify topindex. The number identifies which object to
scroll the window to. For example, specifying 20 will scroll the Wave window down to
show the 20th object.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bookmark add wave
• -window <window_name>
(optional) Specifies the window to add the bookmark to. If you omit this argument, the
bookmark is added to the current default Wave window.
Examples
• 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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bookmark delete wave
Syntax
bookmark delete wave {<label> | -all} [-window <window_name>]
Arguments
• <label> | -all
(required) Controls which bookmarks to delete. Must be the first argument to the bookmark
delete wave command.
<label> — Specifies the name of the bookmark to delete.
-all — Specifies to delete all bookmarks in the window.
• -window <window_name>
(optional) Specifies the window in which to delete the bookmark. If you omit this argument,
the command deletes bookmark(s) in the current default Wave window.
<window_name> — The name of the wave window containing the bookmark to delete.
Examples
• 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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bookmark goto wave
Syntax
bookmark goto wave <label> [-window <window_name>]
Arguments
• <label>
(required) Specifies the bookmark to go to. Must be the first argument to the bookmark goto
wave command.
• -window <window_name>
(optional) Specifies the Wave window to which the bookmark applies. You can use a
bookmark only in the window it was created in.
<window_name> — The name of the wave window containing the specified bookmark.
Related Topics
bookmark add wave
bookmark delete wave
bookmark list wave
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bookmark list wave
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bp
bp
Either sets a file-line breakpoint, or returns information about breakpoint(s). Allows condition
expressions to use enum names, as well as literal values.
Note
A set breakpoint affects every SystemC instance in the design, unless you use the -inst
<region> argument. Since C Debug is invoked when you set a breakpoint within a SystemC
module, your C Debug settings must be in place prior to setting a breakpoint. Refer to “Setting
Up C Debug” for more information.
Note
Your ability to set breakpoints when running a fully optimized design may be limited. You
can restrict optimizations to allow breakpoints by using the +acc=l argument for vopt. Refer
to “Optimizing Designs with vopt” in the User's Manual for more information.
Syntax
Setting an HDL breakpoint
bp {[<filename> <line_number> | <filename>:<line_number> | in} [-ancestor] [-appendinst] [-
cond "<condition_expression>"] [-disable] [-id <id_number> | -label "<label>"] [-inst
<region> [-inst <region> ...]] [-randstate <string>] [-uvm] [<command>…]
Setting a C breakpoint
bp -c {<function_name> | [<file_name>:]<line_number> | *0x<hex_address>}} [-appendinst]
[-cond "<condition_expression>"] [-disable] [-id <id_number> | -label "<label>"] [ in ] [-
inst <region> [-inst <region> ...]] [<command>…]
Querying a breakpoint
bp [-query <filename> [{<start_line_number> <end_line_number>} | <line_number>]]
Reporting all breakpoints
bp
Note
Specifying bp with no arguments returns a list of all breakpoints in the design, containing
information about each breakpoint. For example, the command “bp” might return:
# bp top.vhd 70;# 2
Arguments
• <filename>
(optional) Specifies the name of the source file in which to set the breakpoint. If you do not
specify a filename, the command uses the source file of the current context.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bp
• <line_number>
(required to set an HDL breakpoint) Specifies the line number on which to set the
breakpoint.
• in
(required for task or function breakpoints) Supports the lookup of Verilog and
SystemVerilog task and function names as an alternative to file name and line numbers.
Places a breakpoint on the first executable line of the specified task or function. Does not
work for VHDL or SystemC.
• -c
(required to set a C breakpoint) Applies the bp command and its arguments to SystemC
instances in the design. Must be the first argument to the bp command.
• <function_name> | [<file_name>:]<line_number> | *0x<hex_address>
(required) Controls the location of a C breakpoint. Must be the second argument to the bp
command.
<function_name> — Sets the C breakpoint at the entry to the specified function.
[<file_name>:]<line_number> — Sets the C breakpoint at the specified line number of
the specified file. If you do not specify a file name, the breakpoint is set at the line
number of the current C or SystemC file.
*0x<hex_address> — Sets the C breakpoint at the specified hex address.
• -ancestor
(optional) Stops the simulation only when an ancestor parent of the process matches the
given process-name.
• -appendinst
(optional) When specifying multiple breakpoints with -inst, appends each instance-path
condition to the earlier condition. This overrides the default behavior, in which each
condition overwrites the previous one.
• -disable
(optional) Sets the breakpoint to a disabled state. You can enable the breakpoint later using
the enablebp command. The bp command enables breakpoints by default.
• <command>…
(optional, must be specified as the final argument) Specifies one or more commands to
execute 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
You can also specify this command string by choosing Tools > Breakpoints from
the main menu and using the Modify Breakpoints dialog box.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bp
Any commands that follow a run or step command are ignored. A run or step command
terminates the breakpoint sequence. This also applies if you use a DO file script within the
command string.
You cannot use a restore command.
If you need to enter many commands after the breakpoint, you could place them in a DO file
script.
• -cond "<condition_expression>"
(optional) Specifies one or more conditions that determine whether the breakpoint is hit.
"<condition_expression>" — A conditional expression that results in a true/false value.
You must enclose the 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 behavior differs from previous
Questa SIM 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
You can also specify a condition expression by choosing Tools > 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 ( {} ).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bp
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 <filename> <line_number> -cond "this==<class_handle>"
bp <filename> <line_number> -cond "this!=<class_handle>"
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 <filename> <line_number> -cond "this ISA <class_type_name>"
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bp
Returns:
# 1 1 top.vhd 70 2 1
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bp
• -randstate <string>
(optional) The randstate of the executing process is compared to the specified randstate
string. If they match, the simulation stops at the breakpoint. Note that the comparison is
against the randstate of the process at the beginning the of specified line.
• -uvm
Specifies UVM-style instance name(s) for setting source breakpoints on class instances in
the UVM hierarchy. Must be followed by the -inst <instance_name> option.
Examples
• List all existing breakpoints in the design, including the source file names, line numbers,
breakpoint id numbers, labels, and any commands that have been assigned to the
breakpoints.
bp
• Set a breakpoint at line 153 of the source file of the current context:
bp 153
• Set a breakpoint on line 22 of test.vhd. When the breakpoint is hit, the values of
variables var1 and var2 are examined. This breakpoint is initially disabled; 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 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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bp
• List the line number and enabled/disabled status (1 = enabled, 0 = disabled) of all
breakpoints in testadd.vhd.
bp -query testadd.vhd
• Set a C breakpoint for all instances whose name begins with sctop.a.c.
bp -c -inst "sctop.a.c*"
Related Topics
add button
bd
Editing File-Line Breakpoints [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
call
call
Calls SystemVerilog static functions and class functions (but not tasks) from the vsim command
line in live simulation mode. Calls PLI and VPI system tasks and system functions. Returns
function return values to the vsim shell as a Tcl string. Returns class references as class instance
IDs.
Syntax
Note
The grouping of arguments can vary depending on how you want the command to perform a
search on a system task or function name. For example:
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
call
• -builtin
(optional) Search only built-in system functions or task names. (The $ is understood to be a
prefix.)
• -usertf
(optional) Search only user-defined system functions or task names. (The $ is understood to
be a prefix.)
• <systfName>
(required when calling a system task or function) The system task or function to execute.
You can specify the sysfName according to the following syntax rules:
o \$<systfName> (for example, \$display or \$mytask)
o With –usertf or –builtin flags (as the case may be). (for example, –usertf mytask or –
builtin display)
o <systfName> (for example, display or mytask) In this case SystemVerilog static
functions and class functions are searched first for a match, and then the PLI/VPI
system tasks/functions.
• <arg1> [<arg2>] …[<argN>]
(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 can 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. Strings containing spaces or special characters must be enclosed in quotation
marks (" ") 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 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
Calling a System Verilog Static of Class Function
• Call using a static declaration path, where the function sf_voidstring() is a static class
function that accepts a string:
call sim:/user_pkg::myfcns::sf_voidstring first_string
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
call
• 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/tmyfcns.f_intint 37
• 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
• 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
• 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"
• Call using a class instance id string to specify the function where the function returns a
string:
call @[email protected]_full_name
Returns:
# test.e2_a.sequencer
• Call using a relative class hierarchical name to specify the function where the function
returns a class handle:
call moduleX.who_am_i
Returns:
# @myClassX@4
Returns:
# Hello from TCL!
Returns:
# 2999
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
call
Returns:
# ** Error: Expected user-defined system task $display not found in
the context(/top2).
Returns:
# top2.i=5 top2.r=110
Returns:
# 2
call \$pow 3 2
Returns:
# 9
Returns:
# 512
Returns:
# 7
Returns:
# 2
Returns:
# 49
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
capstats
capstats
Generates detailed reports and databases to capture simulation memory use in your design.
Note
The capstats command, with any allowed arguments, is more accurate when used in
conjunction with the vsim -capacity command.
Usage
capstats [[-du [+summary | +details | +duname=<duname>]] [-decl] [-line] [-filename
<filename>]] [-save <filename>] [-open <filename>]
Arguments
• none
Generates a summary report under the top-level categories.
• -du
When used in conjunction with the vsim -capacity argument, generates a design unit based
report of memory use.
+summary — provides a summary report for the memory usage within a design unit.
+details — provides a more expansive report that includes details about dynamic
allocations.
+duname=<duname> — enables you to generate a report that covers only the specified
design unit. You can use +duname=<duname> multiple times to specify multiple
design units.
• -decl
When used in conjunction with the vsim -capacity argument, generates a declaration based
report for SystemVerilog dynamic objects.
• -line
When used in conjunction with the vsim -capacity=line argument, generates a line based
report for SystemVerilog dynamic objects.
• -filename <filename>
Prints the report to the specified file. If you do not specify a filename, the report prints to the
transcript.
• -save <filename.cdb>
Saves simulation memory usage data to a capstats database. The database does not save
object names from protected code.
Specify -capacity with vsim before saving for more accurate reports, and to enable the use
of the -du and -decl arguments after opening the database. Specify -capacity=line to enable
the -line argument.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
capstats
• -open <filename.cdb>
Opens a capstats database.
Examples
This example illustrates the basic flow for saving a capstats database, opening it, and generating
a report.
1. Begin your simulation. Specify -capacity as an argument to vsim if detailed memory use
data is important.
2. Conduct simulation runs.
3. Save a capstats database.
capstats -save mycapstats_db.cdb
6. Generate a report. In this example, the -du argument results in a design unit based
memory usage report.
capstats -du -filename mycapstats_rpt
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
cd
cd
Changes the Questa SIM local directory to the specified directory.
Syntax
cd [<dir>]
Arguments
• <dir>
(optional) Specifies a full or relative directory path for Questa SIM to use as the local
directory. If you do not specify a directory, the command changes to your home directory.
Description
Executing a cd command closes the current project. You cannot execute this command while a
simulation is in progress.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
cdbg
cdbg
This command provides command-line equivalents of the menu options that are available for C
Debug.
Note
Some cdbg commands require the "on | off" argument. The value must be either “on” or
“off.” For example:
cdbg enable_auto_step on
cdbg stop_on_quit off
Syntax
cdbg allow_lib_step {on | off}
cdbg auto_find_bp
cdbg debug_on
cdbg enable_auto_step {on | off}
cdbg init_mode_complete
cdbg init_mode_setup
cdbg interrupt
cdbg keep_user_init_bps {on | off}
cdbg quit
cdbg refresh_source_window
cdbg set_debugger <path>
cdbg show_source_balloon {on | off}
cdbg stop_on_quit {on | off}
cdbg trace_entry_point {on | off} [<function_name>]}
Arguments
• allow_lib_step {on | off}
Enables stepping out from OSCI library functions. When you try to step inside OSCI library
functions, C Debug automatically steps out to the last called user function. Note that setting
this argument to “on” disables the stepping out action.
on — Disables stepping out from OSCI library functions.
off — Enables stepping out from OSCI library functions.
• auto_find_bp
Sets breakpoints on all currently known function entry points.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
cdbg
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
cdbg
• set_debugger <path>
Sets the path to your gdb installation.
<path> — The complete pathname to the gdb executable. For example:
cdbg set_debugger /usr/bin/gdb
Equivalent to selecting Tools > C Debug > C Debug Setup and entering a custom path.
• show_source_balloon {on | off}
Toggles the source balloon popup.
on — Enables balloon popup.
off — Disables balloon popup.
Equivalent to toggling the 'Show balloon' button on the C Debug setup dialog.
• stop_on_quit {on | off}
Toggles debugging capability when the simulator is exiting.
on — Enables debugging when the simulator is exiting.
off — Disables debugging when the simulator is exiting.
Equivalent to toggling the 'Stop on quit' button on the C Debug setup dialog.
• trace_entry_point {on | off} [<function_name>]
Helps debug an FLI/PLI application when a design is loaded with vsim -trace_foreign.
Questa SIM stops at a C breakpoint each time your application calls a named FLI or PLI
function. Once at the breakpoint, use the tb and pop commands to investigate the C code at
the place the function was called.
on — Enables debugging.
off — Disables debugging.
<function_name> — An FLI or PLI function call.
Related Topics
Debugging Functions During Elaboration [Questa SIM User's Manual]
Debugging Functions when Quitting Simulation [Questa SIM User's Manual]
Finding Function Entry Points with Auto Find bp [Questa SIM User's Manual]
Identifying All Registered Function Calls [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
change
change
This command modifies the value of a: VHDL constant, generic, or variable; Verilog register or
variable; or C variable if running C Debug.
Syntax
change <variable> <value>
Description
You cannot use this command on generics or parameters if you optimized the design, unless you
used the vopt -floatgenerics or vopt -floatparameters arguments. These arguments allow the
generics and parameters to remain floating after the optimization. Using the change command
on a floating generic or parameter will change its value, but will not recompute dependent
expressions. Refer to the section “Optimization of Parameters and Generics” in the User’s
Manual for more information.
For VHDL constants, the change command may not affect all uses of deferred (or other)
constants, because the simulation depends on constants not changing after elaboration. You
must treat VHDL constants as immutable after compilation.
Arguments
• <variable>
(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.
Supported objects include:
o VHDL
• Scalar variable, constant, and 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 sub-element 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.
o Verilog
• Parameter.
• Register or memory.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
change
• Integer, real, realtime, time, and local variables in tasks and functions.
• Sub-elements 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.
o C
• Scalar C variables of type int, char, double, or float.
• Individual fields of a C structure.
• Not supported — SystemC primitive channels.
• <value>
(required) Defines a value for <variable>. The specified value must be appropriate for the
type of the variable. You must place <value> within quotation marks (“”). If the string
contains spaces, the quoted string must be placed inside curly braces ({ }).
Note
The initial type of <variable> determines the type of value that it can be given. For
example, if <variable> 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 does not modify any design
elements that depended on the parameter or generic during elaboration (for example,
sizes of arrays).
Examples
• Change the value of the variable count to the hexadecimal value FFFF.
change count 16#FFFF
• Change the value of the element of rega that is specified by the index (for example, 16).
change {rega[16]} 0
• Change the value of the set of elements of foo that is specified by the slice (for example,
20:22).
change {foo[20:22]} 011
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
change
• Set val_b (type char *) to point to the string my string. Since there is a space in the value
“my string,” it must be enclosed by curly braces.
change val_b {“my string”}
• Set the Verilog register file_name to "test2.txt". Note that the quote marks are escaped
with ’\’.
change file_name \"test2.txt\"
• Set the time value of the mytimegeneric variable to 500 ps. The time value is enclosed in
curly braces because of the space between the value and the units.
change mytimegeneric {“500 ps”}
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
change_menu_cmd
change_menu_cmd
Changes the command executed by a specified menu item label, in a specified menu, in a
specified window. Returns nothing.
Note
This command functions only on already existing menu paths and labels.
Syntax
change_menu_cmd <window_name> <menu_path> <label> <cmd>
Arguments
The arguments <window_name>, <menu_path>, <cmd>, and <label> are order dependent. You
must enter them in the order shown in the Syntax section.
• <window_name>
(required) Specifies the Tk path of the window containing the menu. You must use double
quotes ("") in place of <window_name> to identify the Main window. All other window
pathnames begin with a period (.).
• <menu_path>
(required) Specifies the name of an existing Tk menu widget plus any submenu path.
• <label>
(required) Specifies the current label on the menu item.
• <cmd>
(required) Specifies the new Tcl command to execute when the menu item is selected.
Related Topics
add_menu
add_menucb
add_menuitem
add_separator
add_submenu
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check contention add
Detection of a bus fight returns an error message that specifies the node and its drivers’ current
driving values. If a node's drivers later change value, and the node is still in contention, a new
message gives the new values of the drivers. A message is also issued when the contention ends.
You can use the bus contention checking commands on VHDL and Verilog designs.
You can set a time limit (the default is zero) for contention checking with the -time <limit>
argument to the check contention config command. If you choose to modify the limit, do so
prior to invoking any check contention add commands.
Arguments
• -in
(optional) Enables checking on nodes of mode IN.
• -inout
(optional) Enables checking on nodes of mode INOUT.
• -out
(optional) Enables checking on nodes of mode OUT.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check contention add
• -ports
(optional) Enables checking on nodes of modes IN, OUT, or INOUT. Default behavior if no
arguments are specified.
• -internal
(optional) Enables checking on internal (non-port) objects. Default behavior if no arguments
are specified.
• -r
(optional) Specifies to enable contention checking recursively into subregions. If omitted,
enables contention checking to only the current region.
• <node_name>...
(required) Specifies the name of a node. Must be the final argument to the check contention
add command.
Related Topics
check contention config
check contention off
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check contention config
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check contention off
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check float add
The allowed nodes are Verilog nets and VHDL signals of type std_logic and std_logic_vector.
Other types are silently ignored.
You can set a time limit (the default is zero) for float checking with the -time <limit> argument
to the check float config command. If you choose to modify the limit, do so prior to invoking
any check float add commands.
Arguments
• -r
(optional) Enables float checking recursively into subregions. If omitted, limits float
checking to the current region.
• -in
(optional) Enables checking on nodes of mode IN.
• -out
(optional) Enables checking on nodes of mode OUT.
• -inout
(optional) Enables checking on nodes of mode INOUT.
• -internal
(optional) Enables checking on internal (non-port) objects.
• -ports
(optional) Enables checking on nodes of modes IN, OUT, or INOUT.
• <node_name>...
(required) Enables checking for the named node(s). Must be the final argument to the check
float add command.
Related Topics
check contention config
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check float add
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check float config
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check float off
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check stable off
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check stable on
check stable on
Enables stability checking on the entire design.
Syntax
check stable on [-period <time> [<unit>]] [-file <filename>] [-strobe <time> [<unit>]]
Description
Design stability checking detects when circuit activity has not settled within a period you define
for synchronous designs. You specify the clock period for the design, and the strobe time within
that period during which the circuit must be stable. If there are pending driver events at the
strobe time, an error message informs you that a violation has been detected. The message
identifies the driver that has a pending event, the node that it drives, and the cycle number. You
can use design stability checking commands on VHDL and Verilog designs.
Arguments
• -period <time> [<unit>]
(required the first time you invoke the check stable on command.) Specifies the clock period
(which is assumed to begin at the time the check stable on command is issued). Must be the
first argument to the check stable on command.
<time> — Any non-negative integer.
<unit> — (optional) A suffix specifying a unit of time. Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr. The default is to specify the current simulation resolution by
omitting <unit>. If you specify <unit>, you must enclose <time> and <unit> within
curly braces ({}).
This argument is not required if you later re-enable checking after it was disabled with the
check stable off command.
• -file <filename>
(optional) Writes the error messages to a specified file. If you select this option, messages
do not display to the screen.
<filename> — Specifies the name of the file to save error messages to.
• -strobe <time> [<unit>]
(optional) Specifies the time to wait during each clock cycle before performing the stability
check. The default strobe time is the time specified in -period. If the strobe time falls on a
period boundary, the check is actually performed one timestep earlier. Normal practice is to
specify the strobe time as less than or equal to -period, but if it is greater than -period, then
the check will skip cycles.
<time> — Any non-negative integer.
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. If you specify <unit>, you must
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
check stable on
enclose <time> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr.
Examples
• Performs a stability check 99 ps into each even-numbered clock cycle (where cycle
numbers start at 1).
check stable on -period "100 ps" -strobe "199 ps"
Related Topics
check stable off
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
checkpoint
checkpoint
Saves the state of your simulation as a checkpoint file that you can restore.
Syntax
checkpoint [-dir] <pathname>
checkpoint <pathname>/[<filename>]
Description
The states of simulation that you can save include:
• modelsim.ini settings.
• the simulation kernel state.
• the vsim.wlf file.
• the list of the design objects shown in the List and Wave windows.
• the file pointer positions for files opened under VHDL and the Verilog $fopen system
task.
• the states of foreign architectures.
• VCD output.
• Toggle statistics (see the toggle report command).
During a simulation, you can use a saved checkpoint file with the restore command to restore
the simulation to a previous state. You can also use the vsim -restore command to start a vsim
session with a checkpoint file.
If a checkpoint occurs while Questa SIM is writing a VCD file, the entire VCD file gets copied
into the checkpoint file. Because VCD files can be very large, disk space problems could occur.
Consequently, Questa SIM issues a warning in this situation.
If you checkpoint DPI code that works with heap memory, use mti_Malloc() rather than raw
malloc() or new. Any memory allocated with mti_Malloc() is guaranteed to be restored
correctly. Any memory allocated with raw malloc() will not be restored correctly, and simulator
crashes can result.
Restrictions
• Checkpoint files are platform dependent—you cannot run checkpoint on one platform
and restore on another.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
checkpoint
• Changes you made interactively while running vsim are not saved. For example,
macros, virtual objects, command-line interface additions such as user-defined
commands, and states of graphical user interface are not saved.
• Transactions are not saved.
• For most designs containing SystemC, the checkpoint command is not supported once
the design has been loaded. However, some SystemC modules do support the use of the
checkpoint command with vsim -scchkpntrestore. For more information, refer to
Checkpoint and Restore in a SystemC Design in the User’s Manual.
Arguments
• -dir
(optional) Creates a directory with the specified pathname for containing checkpoint data.
The two valid scenarios for specifying a directory with the <pathname> are:
o The "-dir" option is specified with a <pathname>. The command creates a new
directory if the specified directory does not exist.
o The "-dir" option is not specified with the <pathname>. The <pathname> represents
a pre-existing directory.
In both of these cases, the command creates a a checkpoint file named 'vsim.cpt' in the
specified directory. In addition, in both of these cases, the command stores other checkpoint
data in the specified directory. The checkpoint data can be in more than one file.
• <filename>
(optional) Specifies the name of the checkpoint file. When <filename> is not specified, the
default vsim.cpt filename is used.
• <pathname>
(required) Specifies the pathname of the directory where the command saves the vsim.cpt
checkpoint file.In addition, specifies the pathname of the checkpoint directory when “-dir”
is present, or the pathname of the single checkpoint filename when “-dir” is absent.
Examples
checkpoint -dir <pathname>
This syntax creates the directory named <pathname> in the current directory. <pathname> can
be hierarchical. You cannot specify the name of the CPT file; it is always vsim.cpt. For
example:
• checkpoint -dir foo — creates the directory "foo" in the current directory as well as the
vsim.cpt checkpoint file.
• checkpoint -dir 1/2/3 — creates the hierarchy "1/2/3/" in the current directory as well as
the vsim.cpt checkpoint file.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
checkpoint
• checkpoint -dir ../test — creates the directory one level above the current directory as
well as the vsim.cpt checkpoint file.
checkpoint <pathname>/[<filename>]
This syntax assumes the directory structure specified by <pathname> exists and creates the CPT
file named <filename> in that directory. If you do not specify <filename> the command creates
a checkpoint file with the default filename, vsim.cpt, in the <pathname> directory.
• checkpoint foo — creates a checkpoint file with the default filename vsim.cpt in the foo/
directory.
• checkpoint foo/bar — creates a checkpoint file with the default filename vsim.cpt in the
foo/bar/ directory.
• checkpoint foo/test.cpt — creates a checkpoint file named test.cpt in the foo/ directory.
• checkpoint test.cpt — creates a checkpoint file named test.cpt in the current directory.
Related Topics
Checkpointing and Restoring Simulations [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo ancestry
classinfo ancestry
Returns class inheritance hierarchy for a named class type.
Syntax
classinfo ancestry [-dataset <name>] [-n] [-o <outfile>] [-tcl] <class_type>
Arguments
• <class_type>
(required) Name of the class type or the full path to the class type.
• -dataset <name>
(optional) Specifies an open dataset to search for class information. The default is to search
the currently active dataset.
<name> — The name of an open dataset.
• -n
(optional) Returns class type names only. Does not include the path unless required to
resolve name ambiguity.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of the transcript.
<outfile> — Specifies the name of the file to write output to.
• -tcl
(optional) Returns a tcl list instead of formatted output.
Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo descriptive
classinfo find
classinfo instances
classinfo isa
classinfo report
classinfo stats
classinfo trace
classinfo types
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo descriptive
classinfo descriptive
Returns the descriptive class name for the specified authoritative class name.
Syntax
classinfo descriptive [-dataset <name>] [-exact | -glob | -regexp] [-tcl] [-o <outfile>]
<class_type>
Arguments
• <class_type>
(required) Treats <class_type> as a glob-style expression and returns all matches to the
transcript. Wildcard characters asterisk ( * ) and question mark ( ? ) are permitted.
• -dataset <name>
(optional) Specifies an open dataset to search for class information. The default is to search
the currently active dataset.
<name> — The name of an open dataset.
• -exact
(optional) Returns results that match <class_type> exactly.
• -glob
(optional, default) Treats <class_type> as a glob-style expression. Wildcard characters
asterisk ( * ) and question mark ( ? ) are permitted.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of the transcript.
<outfile> — Specifies the name of the file to write the output to.
• -regexp
(optional) Treats <class_name> as a regular expression.
• -tcl
(optional) Returns a tcl list instead of formatted output.
Related Topics
ClassDebug [Questa SIM User's Manual]
Logging Class Types and Class Instances [Questa SIM User's Manual]
Working with Class Types [Questa SIM User's Manual]
Analyzing Class Types [Questa SIM User's Manual]
classinfo ancestry
classinfo find
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo descriptive
classinfo instances
classinfo isa
classinfo report
classinfo stats
classinfo trace
classinfo types
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo find
classinfo find
Reports on the current state of a specified class instance; whether it exists, has not yet been
created, or has been destroyed.
Syntax
classinfo find [-dataset <name>][-tcl] [-o <outfile>] <class_instance_identifier>
Arguments
• <class_instance_identifier>
(required) Class instance identifier of the specific class instance to find.
• -dataset <name>
(optional) Specifies an open dataset to search for class information. The default is to search
the currently active dataset.
<name> — The name of an open dataset.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of the transcript.
<outfile> — Specifies the name of the file to write the output to.
• -tcl
(optional) Returns a tcl list instead of formatted output.
Examples
• Find the class instance @mem_item@87
VSIM> classinfo find @mem_item@87
Returns:
# @mem_item@87 has been destroyed
Returns:
# @mem_item@200 not yet created
Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo ancestry
classinfo descriptive
classinfo instances
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo find
classinfo isa
classinfo report
classinfo stats
classinfo trace
classinfo types
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo implements
classinfo implements
Displays a list of the classes which implement a specified SystemVerilog interface class. The
type of the class argument affects the contents of the list.
Syntax
classinfo implements [-dataset <name>] [-tcl] [-o <outfile>] <class_type>
Arguments
• <class_type>
(required) Name of the SystemVerilog class to use to generate the output listing. The type of
this class determines the type of classes listed, as follows:
o If <class_type> is not an interface class, the output indicates which interface classes
that class implements.
o If <class_type> is an interface class, the output indicates which classes implement
that interface class.
• -dataset <name>
(optional) Specifies an open dataset to search for class information. The default is to search
the currently active dataset.
<name> — The name of an open dataset.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of the transcript.
<outfile> — Specifies the name of the file where the output will be written.
• -tcl
(optional) Returns a tcl list instead of formatted output.
Examples
The following module defines classes labeled A, B, C1, C2, M, N, X, Y:
module test8;
interface class M; endclass
interface class N; endclass
interface class X extends M, N; endclass
interface class Y extends M; endclass
class A implements M; endclass
class B extends A implements X; endclass
class C1 extends B implements Y; endclass
class C2 extends B; endclass
endmodule
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo implements
Output list:
# /test8/A implements /test8/M
# /test8/B implements /test8/M
# /test8/C1 implements /test8/M
# /test8/C2 implements /test8/M
Output list:
# /test8/A implements /test8/M
Output list:
# /test8/B implements /test8/M
# /test8/B implements /test8/N
# /test8/B implements /test8/X
Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo descriptive
classinfo find
classinfo instances
classinfo interfaces
classinfo isa
classinfo report
classinfo stats
classinfo trace
classinfo types
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo instances
classinfo instances
Reports the list of existing class instances of a specific class type. You can use this to determine
the class instances to log or examine, and to debug excessive memory use problems caused by
class instances that are not cleaned up properly.
Syntax
classinfo instances [-dataset <name>] [-tcl] [-verbose] [-o <outfile>] <class_type>
Arguments
• <class_type>
(required) Name of the class type or the full path of the class type. If this is an interface
class, the output lists all instances that implement that interface class.
• -dataset <name>
(optional) Specifies an open dataset to search for class information. The default is to search
the currently active dataset.
<name> — The name of an open dataset.
• -tcl
(optional) Returns a tcl list instead of formatted output.
• -verbose
(optional) Includes the classname in the output along with the instance name.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of the transcript.
<outfile> — Specifies the name of the file to write the output to.
Examples
• List the current instances for the class type mem_item.
vsim> classinfo instances mem_item
Returns:
# @mem_item@140
# @mem_item@139
# @mem_item@138
# @mem_item@80
# @mem_item@76
# @mem_item@72
# @mem_item@68
# @mem_item@64
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo instances
The following commands show the difference between using and omitting the -verbose
argument.
vsim> classinfo instances -verbose M
Returns:
# @A@1 /test8/A
# @B@1 /test8/B
Returns:
# @A@1 /test8/A
Returns:
# @A@1
# @B@1
Returns:
# @A@1
Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo ancestry
classinfo descriptive
classinfo find
classinfo implements
classinfo interfaces
classinfo isa
classinfo report
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo instances
classinfo stats
classinfo trace
classinfo types
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo interfaces
classinfo interfaces
Lists the interface class types that match a specified pattern. Finds all interface classes that
match a regular expression and determines the full path of interface class types.
Syntax
classinfo interfaces [-dataset <name>] [-tcl] [-o <outfile>] [<class_type>]
Arguments
• <class_type>
(optional) Name of the interface class type or the full path to the interface class type. If
omitted, all interface classes are listed.
• -dataset <name>
(optional) Specifies an open dataset to search for interface class information. The default is
to search the currently active dataset.
<name> — The name of an open dataset.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of the transcript.
<outfile> — Specifies the name of the file to write the output to.
• -tcl
(optional) Returns a tcl list instead of formatted output.
Examples
The following module defines classes labeled A, B, C1, C2, M, N, X, Y:
module test8;
interface class M; endclass
interface class N; endclass
interface class X extends M, N; endclass
interface class Y extends M; endclass
class A implements M; endclass
class B extends A implements X; endclass
class C1 extends B implements Y; endclass
class C2 extends B; endclass
endmodule
• Used with no argument, the command returns the names of all interface classes:
vsim> classinfo interfaces
Output list:
# /test8/M
# /test8/N
# /test8/X
# /test8/Y
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo interfaces
Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo descriptive
classinfo find
classinfo implements
classinfo instances
classinfo isa
classinfo report
classinfo stats
classinfo trace
classinfo types
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo isa
classinfo isa
Returns to the transcript a list of all classes extended from the specified class type.
Syntax
classinfo isa [-dataset <name>] [-n] [-o <outfile>] [-tcl] <class_type>
Arguments
• <class_type>
(required) Name of the class type or the full path of the class type.
• -dataset <name>
(optional) Specifies an open dataset to search for class information. The default is to search
the currently active dataset.
<name> — The name of an open dataset.
• -n
(optional) Returns class names only. Does not include the path unless required to resolve
name ambiguity.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of the transcript.
<outfile> — Specifies the name of the file to write the output to.
• -tcl
(optional) Returns a tcl list instead of formatted output.
Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo ancestry
classinfo descriptive
classinfo find
classinfo instances
classinfo report
classinfo stats
classinfo trace
classinfo types
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo report
classinfo report
Prints detailed reports on class instance usage. Displays columns for class type names and their
current, peak and total class instance counts.
Syntax
classinfo report [-c [fntpc]] [-dataset <name>] [-m <maxout>] [-o <outfile>]
[-sort [a | d] [f | n | t | p | c]] [-tcl] [-z]
Arguments
• -c [fntpc]
(optional) 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 path name.
n — The Class Name column displays the class name, and for parameterized classes, it
displays the internally generated class specialization name.
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 simultaneously at any time in the simulation.
c — The Current column displays the current number of instances of the named class.
• -dataset <name>
(optional) Specifies an open dataset to search for class information. The default is to search
the currently active dataset.
<name> — The name of an open dataset.
• -m <maxout>
(optional) Display the specified number of lines of the report.
<maxout> — Any non-negative integer.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of to the transcript.
<outfile> — Specifies the name of the file to write the output to.
• -sort [a | d] [f | n | t | p | c]
(optional) Specifies whether to sort report information in ascending or descending order,
and which column to sort by. You can specify only one column for sorting.
a — Sort the entries in ascending order.
d — Sort the entries in descending order.
f — Sort by the Full Path column
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo report
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
Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo ancestry
classinfo descriptive
classinfo find
classinfo instances
classinfo isa
classinfo stats
classinfo trace
classinfo types
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo stats
classinfo stats
Prints statistics about the total number of class types and total, peak, and current class instance
counts during the simulation.
Syntax
classinfo stats [-dataset <name>] [-tcl] [-o <outfile>]
Arguments
• -dataset <name>
(optional) Specifies an open dataset to search for class information. The default is to search
the currently active dataset.
<name> — The name of an open dataset.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of the transcript.
<outfile> — Specifies the name of the file to write the output to.
• -tcl
(optional) Returns a tcl list instead of formatted output.
Examples
• Display the current number of class types, the maximum number, peak number and
current number of all class instances.
vsim> classinfo stats
Returns:
# class type count 451
# class instance count (total) 2070
# class instance count (peak) 1075
# class instance count (current) 1058
Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo ancestry
classinfo descriptive
classinfo find
classinfo instances
classinfo isa
classinfo report
classinfo trace
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo stats
classinfo types
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo trace
classinfo trace
Displays the active references to the specified class instance. Useful in debugging situations
where class instances are not being destroyed as expected because something in the design is
still referencing them. Finding those references can lead to uncovering bugs in class reference
management, and lead to large memory savings.
Syntax
classinfo trace [-dataset <name>] [-m <maxout>] [-tcl] [-o <outfile>] <class_instance_name>
Arguments
• <class_instance_name>
(required) Name of the class item in the following format @<name>@#.
• -dataset <name>
(optional) Specifies an open dataset to search for class information. The default is to search
the currently active dataset.
<name> — The name of an open dataset.
• -m <maxout>
(optional) Display the specified number of lines of the report.
<maxout> — Any non-negative integer.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of the transcript.
<outfile> — Specifies the name of the file to write the output to.
• -tcl
(optional) Returns a tcl list instead of formatted output.
Examples
• Report the active references to @mem_item@200
VSIM> classinfo trace @uvm_resource__14@2
Returns:
#{uvm_pkg::uvm_resources.rtab["mem_interface"].queue[15]}
#{uvm_pkg::uvm_config_db::uvm_config_db__12::m_rsc[@uvm_root@1].
pool["uvm_test_topmem_interface"]}
Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo ancestry
classinfo descriptive
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo trace
classinfo find
classinfo instances
classinfo isa
classinfo report
classinfo stats
classinfo types
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo types
classinfo types
Lists the class types that match or do not match a specified pattern. Finds all classes that match
a regular expression and determines the full path of class types.
Syntax
classinfo types [-dataset <name>] [-exact | -glob | -regexp] [-n] [-o <outfile>] [-tcl] [-x]
<pattern>
Arguments
• <pattern>
(required) A standard TCL glob expression used as a search string.
• -dataset <name>
(optional) Specifies an open dataset to search for class information. The default is to search
the currently active dataset.
<name> — The name of an open dataset.
• -exact
(optional) Returns results that match <pattern> exactly.
• -glob
(optional) Returns glob styles matches for <pattern>.
• -n
(optional) Returns class names only. Does not include the path unless required to resolve
name ambiguity.
• -o <outfile>
(optional) Sends the results of the command to <outfile> instead of the transcript.
<outfile> — Specifies the name of the file to write the output to.
• -regexp
(optional) Returns regular expressions that match <pattern>.
• -tcl
(optional) Returns a tcl list instead of formatted output.
• -x
(optional) Display classes that do not match the pattern.
Examples
• List the full path of the class types that do not match the pattern *uvm*.
vsim> classinfo types -x *uvm*
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo types
Returns:
# /environment_pkg::test_predictor
# /environment_pkg::threaded_scoreboard
# /mem_agent_pkg::mem_agent
# /mem_agent_pkg::mem_config
# /mem_agent_pkg::mem_driver
Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo ancestry
classinfo descriptive
classinfo find
classinfo implements
classinfo instances
classinfo interfaces
classinfo isa
classinfo report
classinfo stats
classinfo trace
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare add
compare add
Creates an object that is a comparison of signals in a reference design to signals in a test design.
You can specify whether to compare two signals, all signals in the region, just ports or a subset
of ports. Ignores constant signals such as parameters and generics.
Syntax
compare add -all{[-in] [-inout] [-out] | [-ports]} [-internal] [-label <label>] [-list] [-rebuild]
[-recursive] [-separator <string>] [<testPath>] [-tol <time> [<unit>]]
[-tolLead <time> [<unit>]] [-tolTrail <time> [<unit>]] [-verbose]
[-vhdlmatches {<ref-logic-value>=<test-logic-value>:…}]
[-vlogmatches {<ref-logic-value>=<test-logic-value>:…}] [-wave] [-wavepane <n>]
[-when {“<expression>”}] [-win <wname>] [-nowin] {-clock <name>} <referencePath>
Description
Refer to “Waveform Compare” in the User’s Manual for a general overview of waveform
comparisons.
<path>/\refSignalName<>testSignalName\
If you compare two signals from different regions, the signal names include the uncommon part
of the path. Table 2-3 shows the results of comparisons between specified reference objects and
test objects.
Table 2-3. Comparing Reference Objects to Test Objects
Reference Test Result
object object
signal signal compare the two signals
signal region compare a signal with a name
matching the reference signal in
the specified test region
region region compare all matching signals in
both regions
glob signal legal only if the glob expression
expression selects only one signal
glob region compare all signals matching the
expression glob expression that match signals
in the test region
The compare add command supports arguments that specify how each signal state matches
std_logic or Verilog values (for example, see the -vhdlmatches argument). Since you can also
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare add
set state matching on a global basis with the compare options command or PrefCompare() Tcl
variables, Questa SIM follows state match settings in the following order:
1. Use the local matching values specified when the comparison was created with compare
add, or subsequently configured with compare configure.
1. If no local values were set, use global matching values set with the compare options
command.
1. If no compare options were set, use default matching values specified by PrefCompare
Tcl variables.
Arguments
• -all
(optional) Specifies comparison of all signals.
• -help
(optional) Lists the description and syntax for the compare add command in the Transcript
window.
• -in
(optional) Specifies comparison of ports of mode IN. You can specify multiple modes in the
same command.
• -inout
(optional) Specifies comparison of ports of mode INOUT. You can specify multiple modes
in the same command.
• -out
(optional) Specifies comparison of ports of mode OUT. You can specify multiple modes in
the same command.
• -ports
(optional) Specifies comparison of all ports. This switch has the same effect as specifying
-in, -out, and -inout together.
• -internal
(optional) Specifies comparison of internal (non-port) signals. You can specify multiple
modes in the same command.
• -label <label>
(optional) Specifies the name to display when the comparison is shown in the Wave
window.
<label> — The name for the comparison.
• -list
(optional) Displays specified comparisons in the default List window.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare add
• -rebuild
(optional) Rebuilds a fragmented bus in the test design region and compares it with the
corresponding bus in the reference design region. Ignored if a signal is found that has the
same name as the reference signal. When rebuilding the test signal, the name of the
reference signal is used as the wildcard prefix.
• -recursive
(optional) Specifies to also select signals in all nested subregions, recursively.
• -separator <string>
(optional) Used with the -rebuild argument. Specifies a separator to insert between a base
bus name and the bit indication. When a bus has been broken into bits (bit blasted) by a
synthesis tool, Questa SIM expects a separator between the base bus name and the bit
indication. For example, the signal "mybus" might be broken down into "mybus_0",
"mybus_1", and so forth.
<string> — Specifies the character(s) to use as a separator between the base bus name
and the bit indication. The default is an underline “_”.
• <testPath>
(optional) Specifies an absolute or relative path to the test signal or region. Cannot be a glob
expression. If omitted, the test path defaults to the same path as <referencePath>, except for
the dataset name.
• -tol <time> [<unit>]
(optional) Specifies the maximum amount of time to allow a test signal edge to lead or trail
a reference edge in an asynchronous comparison.
<time> — Any non-negative integer where the default is 0.
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. Valid time units are: fs, ps, ns, us,
ms, sec, min, and hr. If you specify <unit>, you must enclose <time> and <unit>
within curly braces ({}).
• -tolLead <time> [<unit>]
(optional) Specifies the maximum amount of time to allow a test signal edge to lead a
reference edge in an asynchronous comparison.
<time> — Any non-negative integer where the default is 0.
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. Valid time units are: fs, ps, ns, us,
ms, sec, min, and hr. If you specify <unit>, you must enclose <time> and <unit>
within curly braces ({}).
• -tolTrail <time> [<unit>]
(optional) Specifies the maximum amount of time to allow a test signal edge to trail a
reference edge in an asynchronous comparison.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare add
• -verbose
(optional) Prints the signals selected for comparison, and any type conversions employed, in
the Transcript window.
• -vhdlmatches {<ref-logic-value>=<test-logic-value>:…}
(optional) Specifies how to match VHDL signal states in the reference dataset to values in
the test dataset. Specify values in a colon-separated list of match values. For example:
-vhdlmatches {X=XUD:Z=ZD:1=1HD}
Default is:
{U=UWXD:X=UWXD:0=0LD:1=1HD:Z=ZD:W=UWXD:L=0LD:H=1HD:D=UX01ZWLHD}
The 'D' character represents the '-' "don’t care" std_logic value.
• -vlogmatches {<ref-logic-value>=<test-logic-value>:…}
(optional) Specifies how Verilog signal states in the reference dataset should match values
in the test dataset. Specify values in a colon-separated list of match values. For example:
-vlogmatches {0=0:1=1:Z=Z}
Default is:
{0=0:1=1:Z=Z:X=X}.
• -wave
(optional) Specifies to add compare signals automatically to the default Wave window.
(default)
• -wavepane <n>
(optional) Specifies the pane of the Wave window in which to place the differences.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare add
<n> — A positive integer corresponding to the pane of the Wave window. Wave
window panes are numbered in sequence starting with 1 for the initial wave window.
• -when {“<expression>”}
(optional) Specifies a conditional expression that must evaluate to "true" or "1" for
differences to be reported. The expression is evaluated at the start of an observed difference.
See GUI_expression_format for legal expression syntax.
"<expression>" — A conditional expression that results in a true/false value. You must
enclose the condition expression within quotation marks (“ ”).
• -win <wname>
(optional) Adds objects to a specified window. Used to specify a particular window when
multiple instances of that window type exist.
<wname> — The name of the window to which to add objects.
• -nowin
(optional) Specifies not to add compare signals to any window. The default is to add
compare signals to the default Wave window. See -wave.
• -clock <name>
(required for clocked comparisons; not used for asynchronous comparisons.) Specifies the
clock definition to use when sampling the specified regions.
<name> — Specifies the name of the clock definition.
• <referencePath>
(required) Specifies the path to the reference signal or region. Can be an absolute path, a
relative path, or a glob expression. Relative paths are relative to the current context of the
reference dataset. A glob expression matches signals only in the containing context. Must be
the final argument to the compare add command.
Examples
• Select signals in the reference and test dataset top region according to the default mode.
This example uses asynchronous comparison with the default tolerances, and assumes
that the top regions of the reference and test datasets have the same name and contain the
same signals with the same names.
compare add /*
• Select all signals in the cpu region, to be compared asynchronously using the default
tolerances. Requires that the reference and test relative hierarchies and signal names
within the cpu region be identical, but they need not be the same above the cpu region.
compare add -r gold:/top/cpu test:/testbench/cpu
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare add
• Specify to sample the signal gold:.top.s1 at clock12, and compare it with test:.top.s1,
also sampled at clock12.
compare add -clock clock12 gold:.top.s1
Related Topics
compare annotate
compare clock
compare configure
compare continue
compare delete
compare end
compare info
compare list
compare options
compare reload
compare reset
compare run
compare savediffs
compare saverules
compare see
compare start
compare stop
compare update
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare annotate
compare annotate
Either flags a comparison difference as ignore, or adds a text string annotation to the difference.
The text string appears when viewing the comparison difference in info popups or in the output
of a compare info command.
Syntax
compare annotate [-ignore] [-noignore] [-text <message>] <idNum1> <idNum2>…]
Arguments
• -ignore
(optional) Flags the specified difference as "ignore."
• -noignore
(optional) Undoes a previous -ignore argument.
• -text <message>
(optional) Adds a text string annotation to the difference that appears wherever you view the
difference.
• <idNum1> <idNum2>…
(required) Identifies the difference number to annotate. You can obtain a difference number
from the compare start command, or from the popup window that appears when you place
the cursor over the logged difference in the Wave window. Difference numbers are ordered
by time of the difference start, but more than one difference can start at a given time.
Specify multiple id numbers as a space-separated list. Must be the final argument to
compare annotate.
If you specify this argument with no other arguments, it returns the current annotations
recorded for the specified IDs. For example:
compare annotate 40
returns:
# Diff 40: -ignore -text "This is a not a critical problem."
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare annotate
Related Topics
compare add
compare info
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare clock
compare clock
Defines a clock to use for clocked-mode comparisons. In clocked-mode comparisons, signals
are sampled and compared at or just after a specified signal edge.
Syntax
compare clock [-delete] [-offset <delay>[<unit>]] [-rising | -falling | -both]
[-when {“<expression>”}}] {<clock_name> <signalization>}
Arguments
• -delete
(optional) Deletes an existing compare clock.
• -offset <delay>[<unit>]
(optional) Specifies how long to delay the sample time beyond the specified signal edge.
<delay> — Any non-negative integer where the default is 0.
<unit> — (optional) A suffix specifying a unit of time. If <unit> is specified, you must
enclose <delay> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr. The default is to specify the current simulation resolution by
omitting <unit>.
• -rising
(optional) Specifies to use the rising edge of the specified signal. (default)
• -falling
(optional) Specifies to use the falling edge of the specified signal. The default is rising.
• -both
(optional) Specifies to use both the rising and the falling edge of the specified signal. The
default is rising.
• -when {“<expression>”}
(optional) Specifies a conditional expression that must evaluate to "true" or "1" for that
clock edge to be used as a strobe. The expression is evaluated at the time of the clock edge,
rather than after the delay has been applied. Refer to “GUI_expression_format” for legal
expression syntax.
"<expression>" — The conditional expression to evaluate. You must enclose the
condition expression within quotation marks (“ ”).
• <clock_name>
(required) A name for this clock definition. This name is used with the compare add
command when doing a clocked-mode comparison. Must precede the <signal_path>
argument.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare clock
• <signalization>
(required) A full path to the signal whose edges are to be used as the strobe trigger. Must be
the final argument to the compare clock command.
Examples
• Define a clocked compare strobe named “strobe” that samples signals on the rising edge
of signal gold:.top.clock.
compare clock -rising strobe gold:.top.clock
• Define a clocked compare strobe named “clock12” that samples signals 12 ns after the
rising edge of signal gold:/mydesign/clka.
compare clock -rising -delay {12 ns} clock12 gold:/mydesign/clka
Related Topics
compare add
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare configure
compare configure
Modifies options for compare signals and regions. Applies the modified options to all objects in
the specified compare path.
Syntax
compare configure [-clock <name>] [-recursive] [-tol <time>[<unit>]]
[-tolLead <time>[unit]] [-tolTrail <time>[unit]]
[-vhdlmatches {<ref-logic-value>=<test-logic-value>:…}]
[-vlogmatches {<ref-logic-value>=<test-logic-value>:…}] [-when {“<expression>”}]
<comparePath>
Arguments
• -clock <name>
(optional) Changes the strobe signal for the comparison. If the comparison is currently
asynchronous, it will be changed to clocked. You cannot use this switch with the -tol,
-tolLead, and -tolTrail options.
<name>
• -recursive
(optional) Specifies to also select signals in all nested subregions, and subregions of those,
and so forth.
• -tol <time>[<unit>]
(optional) Specifies the default maximum amount of time to allow the test signal edge to
trail or lead the reference edge in an asynchronous comparison.
<time> — Any non-negative integer where the default is 0.
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. If you specify <unit>, you must
enclose <time> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr.
• -tolLead <time>[unit]
(optional) Specifies the maximum amount of time to allow a test signal edge to lead a
reference edge in an asynchronous comparison.
<time> — Any non-negative integer where the default is 0.
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. If you specify <unit>, you must
enclose <time> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr.
• -tolTrail <time>[unit]
(optional) Specifies the maximum time to allow a test signal edge to trail a reference edge in
an asynchronous comparison.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare configure
Default is:
{U=UWXD:X=UWXD:0=0LD:1=1HD:Z=ZD:W=UWXD:L=0LD:H=1HD:-=UX01ZWLHD}
• -vlogmatches {<ref-logic-value>=<test-logic-value>:…}
(optional) Specifies how to match Verilog signal states in the reference dataset to values in
the test dataset. Values are specified in a colon-separated list of match values. For example:
-vlogmatches {0=0:1=1:Z=Z}
Default is:
{0=0:1=1:Z=Z:X=X}
• -when {“<expression>”}
(optional) Specifies a conditional expression that must evaluate to "true" or "1" for
differences to be reported. The expression is evaluated at the start of an observed difference.
Refer to “GUI_expression_format” for legal expression syntax.
"<expression>" — A conditional expression that results in a true/false value. You must
enclose the condition expression within quotation marks (“ ”).
• <comparePath>
(required) Identifies the path of a compare signal, region, or glob expression. Must be the
final argument to the compare configure command.
Related Topics
compare add
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare continue
compare continue
Continues comparison difference computations that were suspended with the compare stop
button or Control-C. If the comparison was not suspended, compare continue has no effect.
Syntax
compare continue
Arguments
None
Related Topics
compare stop
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare delete
compare delete
Deletes a comparison object from the currently open comparison.
Syntax
compare delete [-recursive] {<objectPath>}
Arguments
• -recursive
(optional) Deletes a region recursively.
• {<objectPath>}
(required) Path to the comparison object to delete (for example, {compare:/top/\clk<>clk\}).
The comparison object must be "escaped" correctly, so the braces ’{}’ and trailing space are
required. Must be the final argument to the compare delete command.
Related Topics
compare add
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare end
compare end
Closes the active comparison without saving any information.
Syntax
compare end
Arguments
None
Related Topics
compare add
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare info
compare info
Lists the results of the comparison in the Main window transcript. Includes a -write argument to
save the information to a file.
Syntax
compare info [-all] [-count] [-primaryonly] [-signals] [-secondaryonly]
[<startNum> [<endNum>]] [-summary [-write <filename>]
Arguments
• -all
(optional) Lists all differences (even those marked as "ignore") in the output. The default is
to not list ignored differences in the output.
• -count
(optional) Returns the total number of primary differences found.
• -primaryonly
(optional) Lists only differences on individual bits, ignoring aggregate values such as a bus.
• -signals
(optional) Returns a Tcl list of compare signal names that have at least one difference.
• -secondaryonly
(optional) Lists only aggregate value differences such as a bus, ignoring the individual bits.
• <startNum> [<endNum>]
(optional) Specifies the difference numbers to start and end the list with. If omitted,
Questa SIM starts the listing with the first difference and ends it with the last. If just
endNum is omitted, Questa SIM ends the listing with the last difference.
• -summary
(optional) Lists only summary information.
• -write <filename>
(optional) Saves the summary information to <filename> rather than the Main window
transcript.
Examples
• List all errors in the Main window transcript.
compare info
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare info
Related Topics
compare add
compare annotate
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare list
compare list
Displays a list in the Transcript window of all the compare add commands currently in effect.
Syntax
compare list [-expand]
Arguments
• -expand
(optional) Expands groups specified by the compare add command to individual signals.
Related Topics
compare add
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare options
compare options
Sets defaults for various waveform comparison commands. The defaults are used when other
compare commands are invoked during the current session.
Syntax
compare options [-addwave] [-all] {[-in] [-inout] [-out] | [-ports]} [-internal] [-noaddwave]
[-ignoreVlogStrengths] [-noignoreVlogStrengths] [-maxsignal <n>] [-maxtotal <n>]
[-listwin <name>] [-separator <string>] [-tol <time>[<unit>]] [-tolLead <time>[<unit>]]
[-tolTrail <time>[<unit>]] [-track] [-notrack]
[-vhdlmatches {<ref-logic-value>=<test-logic-value>:…}]
[-vlogmatches {<ref-logic-value>=<test-logic-value>:…}] [-wavepane <n>]
[-wavewin <name>]
Arguments
• -addwave
(optional) Specifies to automatically add new comparison objects to the Wave window.
(default) You can use the -noaddwave argument to specify not to automatically add objects .
Related Tcl variable is PrefCompare(defaultAddToWave).
• -all
(optional) Specifies comparison of all signals.
• -in
(optional) Specifies comparison of ports of mode IN. Multiple modes can be specified in the
same command.
• -inout
(optional) Specifies comparison of ports of mode INOUT. Multiple modes can be specified
in the same command.
• -ignoreVlogStrengths
(optional) Specifies to ignore Verilog net strengths when comparing two Verilog nets.
(default) Related Tcl variable is PrefCompare(defaultIgnoreVerilogStrengths).
• -internal
(optional) Specifies comparison of internal (non-port) signals. Multiple modes can be
specified in the same command.
• -listwin <name>
(optional) Causes specified comparisons to display in the specified List window. Related
Tcl variable is PrefCompare(defaultListWindow).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare options
• -maxsignal <n>
(optional) Specifies an upper limit for the total differences encountered on any one signal.
When the limit is reached,Questa SIM stops computing differences on that signal. Related
Tcl variable is PrefCompare(defaultMaxSignalErrors).
<n> — Any positive integer where the default is 100.
• -maxtotal <n>
(optional) Specifies an upper limit for the total differences encountered. When the limit is
reached, Questa SIM stops computing differences. Related Tcl variable is
PrefCompare(defaultMaxTotalErrors).
<n> — Any positive integer where the default is 100.
• -noaddwave
(optional) Specifies not to automatically add new comparison objects to the Wave window.
The default is to add comparison objects automatically. Related Tcl variable is
PrefCompare(defaultAddToWave).
• -noignoreVlogStrengths
(optional) Specifies not to ignore Verilog net strengths when comparing two Verilog nets.
Related Tcl variable is PrefCompare(defaultIgnoreVerilogStrengths).
• -notrack
(optional) Specifies that the waveform comparison should not track the current simulation.
Related Tcl variable is PrefCompare(defaultTrackLiveSim).
• -out
(optional) Specifies comparison of ports of mode OUT. Multiple modes can be specified in
the same command.
• -ports
(optional) Specifies comparison of all ports. This switch has the same effect as specifying
-in, -out, and -inout together.
• -separator <string>
(optional) Used with the -rebuild option of the compare add command. When a synthesis
tool bit blasts a bus (breaks it into bits), Questa SIM expects a separator between the base
bus name and the bit indication. This option identifies that separator. The default is an
underscore ( _ ). For example, the signal "mybus" might be broken down into "mybus_0",
"mybus_1", and so forth. Related Tcl variable is PrefCompare(defaultRebuildSeparator).
<string> — Specifies the character(s) to use as a separator between the base bus name
and the bit indication where the default is an underline ( _ ).
• -tol <time>[<unit>]
(optional) Specifies the default maximum amount of time to allow the test signal edge to
trail or lead the reference edge in an asynchronous comparison.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare options
You can use -tolLead and -tolTrail to specify different values for the leading and trailing
tolerances.
<time> — Any non-negative integer where the default is 0.
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. If you specify <unit>, you must
enclose <time> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr.
• -tolLead <time>[<unit>]
(optional) Specifies the default maximum amount of time to allow the test signal edge to
lead the reference edge in an asynchronous comparison. Related Tcl variables are
PrefCompare(defaultLeadTolerance) and PrefCompare(defaultLeadUnits).
<time> — Any non-negative integer where the default is 0.
<unit> — (optional) A suffix specifying a unit of time where the default is to specify the
current simulation resolution by omitting <unit>. If <unit> is specified, you must
enclose <time> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr.
• -tolTrail <time>[<unit>]
(optional) Specifies the default maximum amount of time to allow the test signal edge to
trail the reference edge in an asynchronous comparison. Related Tcl variables are
PrefCompare(defaultTrailTolerance) and PrefCompare(defaultTrailUnits).
<time> — Any non-negative integer where the default is 0.
<unit> — (optional) A suffix specifying a unit of time where the default is to specify the
current simulation resolution by omitting <unit>. If <unit> is specified, you must
enclose <time> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr.
Figure 2-2. Graphical representation of tolLead and tolTrail
• -track
(optional) Specifies to have the waveform comparison track the current simulation. (default)
The differences are updated at the end of each run command. To see differences soon after
they occur, use many relatively short run commands. Related Tcl variable is
PrefCompare(defaultTrackLiveSim).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare options
• -vhdlmatches {<ref-logic-value>=<test-logic-value>:…}
(optional) Specifies how to match VHDL signal states in the reference dataset to values in
the test dataset. Values are specified in a colon-separated list of match values. For example:
-vhdlmatches {X=XUD:Z=ZD:1=1HD}
Default is:
{U=UWX-:X=UWXD:0=0LD:1=1HD:Z=ZD:W=UWXD:L=0LD:H=1HD:-=UX01ZWLHD}
Default is:
{0=0:1=1:Z=Z:X=X}
Examples
• Return the current value of all options.
compare options
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare options
Related Topics
compare add
compare clock
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare reload
compare reload
Reloads comparison differences for viewing without re-computation.
Syntax
compare reload <rulesFilename> <diffsFilename>
Arguments
• <rulesFilename>
(required) Specifies the name of a file that was previously saved using the compare
saverules command. Must be the first argument to the compare reload command.
• <diffsFilename>
(required) Specifies the name of a file that was previously saved using the compare
savediffs command.
Description
Prior to invoking compare reload, you must open the relevant datasets, using the same names
that were used during the original comparison.
Related Topics
compare add
compare run
compare savediffs
compare saverules
compare start
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare reset
compare reset
Clears the current compare differences, allowing execution of another compare run command.
Does not modify any of the compare options or any of the signals selected for comparison. This
enables you to re-run the comparison with different options or with a modified signal list.
Syntax
compare reset
Arguments
None
Related Topics
compare add
compare run
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare run
compare run
Runs the difference computation on signals you select via a compare add command. Reports in
the Transcript window the total number of errors found.
Syntax
compare run [<startTime>[<unit>] [<endTime>[<unit>]]
Arguments
• <startTime>[<unit>]
(optional) Specifies when to start computing differences. Any positive integer, where the
default is zero ( 0 ). You can change the simulation resolution with the -t argument of the
vsim command).
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. If you specify <unit>, you must
enclose <startTime> and <unit> within curly braces ({}). Valid time units are: fs, ps,
ns, us, ms, sec, min, and hr.
• <endTime>[<unit>]
(optional) Specifies when to end computing differences. Can be any positive integer. The
default is the end of the dataset simulation run that ends earliest.
<unit> — (optional) A suffix specifying a unit of time. |The default is to specify the
current simulation resolution by omitting <unit>. If you specify <unit>, you must
enclose <endTime> and <unit> within curly braces ({}). Valid time units are: fs, ps,
ns, us, ms, sec, min, and hr.
Examples
• Compute differences over the entire time range.
compare run
Related Topics
compare add
compare end
compare start
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare savediffs
compare savediffs
Saves the comparison results to a file for later reloading.
Note
To be able to reload the file, you must also save the comparison setup using the compare
saverules command.
Syntax
compare savediffs <diffsFilename>
Arguments
• <diffsFilename>
(required) Specifies the name of the file to create.
Related Topics
compare add
compare reload
compare saverules
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare saverules
compare saverules
Saves the comparison setup information (or "rules") to a file you can re-execute later. Saves
compare options, clock definitions, and region and signal selections.
Syntax
compare saverules [-expand] <rulesFilename>
Arguments
• -expand
(optional) Expands groups specified by the compare add command to individual signals. If
you used the compare add command to add a region, and then deleted signals from that
region, you must use the -expand argument for the rules to reflect the signal deletions.
• <rulesFilename>
(required) Specifies the name of the file to which to save the rules. To load the file at a later
time, use the compare reload command. Must be the final argument to the compare
saverules command.
Related Topics
compare add
compare reload
compare savediffs
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare see
compare see
Displays the specified comparison difference in the Wave window, using any necessary
horizontal and vertical scrolling. Highlights the signal containing the specified difference, and
positions the active cursor at the starting time of the difference.
Syntax
compare see [-first] [-last] [-next] [-nextanno] [-previous] [-prevanno] [-wavepane <n>]
[-wavewin <name>]
Arguments
• -first
(optional) Shows the first difference, ordered by time. Performs the same action as the Find
First Difference button in the Wave window.
• -last
(optional) Shows the last difference, ordered by time. Performs the same action as the Find
Last Difference button in the Wave window.
• -next
(optional) Shows the next difference (in time) after the currently selected difference.
Performs the same action as the Find Next Difference button in the Wave window.
• -nextanno
(optional) Shows the next annotated difference (in time) after the currently selected
difference. Performs the same action as the Next Annotated Difference button in the Wave
window.
• -previous
(optional) Shows the previous difference (in time) before the currently selected difference.
Performs the same action as the Previous Difference button in the Wave window.
• -prevanno
(optional) Shows the previous annotated difference (in time) before the currently selected
difference. Performs the same action as the Previous Annotated Difference button in the
Wave window.
• -wavepane <n>
(optional) Specifies the pane of the Wave window in which to place the differences.
<n> — A positive integer corresponding to the pane of the Wave window. Wave
window panes are numbered in sequence starting with 1 for the initial wave window.
• -wavewin <name>
(optional) Adds objects to a specified window. Used to specify a particular window when
multiple instances of that window type exist.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare see
• Show the next difference (in time) in the default Wave window.
compare see -next
Related Topics
compare add
compare run
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare start
compare start
Begins a new dataset comparison. The datasets to compare must already be open.
Syntax
compare start [-batch] [-maxsignal <n>] [-maxtotal <n>] [-refDelay <delay>[<unit>] ]
[-testDelay <delay>[<unit>]] [<reference_dataset>] <test_dataset>
Arguments
• -batch
(optional) Specifies not to automatically insert comparisons into the Wave window.
• -maxsignal <n>
(optional) Specifies an upper limit for the total differences encountered on any one signal.
When the limit is reached, Questa SIM stops computing differences on that signal. You can
change the default with the compare options command, or by editing the
PrefCompare(defaultMaxSignalErrors) variable in the pref.tcl file.
<n> — Any integer. The default is 100.
• -maxtotal <n>
(optional) Specifies an upper limit for the total differences encountered. When Questa SIM
reaches the limit, it stops computing differences. You can change the default with the
compare options command, or by editing the PrefCompare(defaultMaxTotalErrors) variable
in the pref.tcl file.
<n> — Any integer. The default is 100.
• -refDelay <delay>[<unit>]
(optional) Delays the reference dataset relative to the test dataset. The simulator applies
delays to comparison reference signals you create with the compare add command,
appending the signal name with "_d". The Wave window displays these created signals as
comparison objects. The delay does not apply to signals you create when using the -when
argument to the compare add command.
<delay> — Any non-negative integer.
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. If you specify <unit>, you must
enclose <delay> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr.
• -testDelay <delay>[<unit>]
(optional) Delays the test dataset relative to the reference dataset. The simulator applies
delays to comparison test signals you create with the compare add command, appending the
signal name with "_d". The Wave window displays these created signals as comparison
objects. The delay does not apply to signals you create when using the -when argument to
the compare add command.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare start
• Open two datasets and start a comparison between the two using greater than default
limits for total differences encountered.
dataset open gold_typ.wlf gold
dataset open bad_typ.wlf test
compare start -maxtotal 5000 -maxsignal 1000 gold test
Related Topics
compare add
compare options
compare stop
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare stop
compare stop
Used internally by the compare stop button to suspend comparison computations in progress.
Syntax
compare stop
Arguments
None
Description
Has no effect on compare runs that have already returned to the VSIM prompt. Under Unix,
entering Control-C in the window that invoked Questa SIM has the same effect as compare
stop.
Related Topics
compare run
compare start
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare update
compare update
Primarily used internally to update the comparison differences when comparing a live
simulation against a .wlf file.
Syntax
compare update
Arguments
None
Description
Called automatically at the completion of each simulation run if the compare options -track is in
effect. You can also call compare update periodically during a long simulation run to cause
difference computations to catch up with the simulation. This command does nothing if the
compare option -track command is not in effect when the run command is executed.
Related Topics
compare run
compare options
Waveform Compare [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
configure
configure
Invokes the List or Wave widget configure command for the current default List or Wave
window.
Syntax
Base Command Usage
configure list | wave [-window <wname>] [<option> <value>]
List Window Arguments
[-delta [all | collapse | events | none]] [-gateduration [<duration_open>]]
[-gateexpr [<expression>]] [-usegating [off | on]] [-strobeperiod [<period>[<unit>]]]
[-strobestart [<start_time>[<unit>]]] [-usesignaltriggers [0 | 1]] [-usestrobe [0 | 1]]
Wave Window Arguments
[-childrowmargin [<pixels>]] [-cursorlockcolor [<color>]] [-gridauto [off | on]]
[-gridcolor [<color>]][-griddelta [<pixels>]] [-gridoffset [<time>[<unit>]]]
[-gridperiod [<time>[<unit>]]] [-namecolwidth [<width>]] [-rowmargin [<pixels>]]
[-signalnamewidth [<value>]] [-timecolor [<color>]] [-timeline [0 | 1]]
[-timelineunits [fs | ps | ns | us | ms | sec | min | hr]] [-valuecolwidth [<width>]]
[-vectorcolor [<color>]] [-waveselectcolor [<color>]] [-waveselectenable [0 | 1]]
Description
The command works in three modes:
• With no options or values, it returns a list of all attributes and their current values.
• With just an option argument (without a value), it returns the current value of that
attribute.
• With one or more option-value pairs, it changes the values of the specified attributes to
the new values.
The returned information includes 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
Note
This list of arguments is not exhaustive. To get the full list of arguments, execute either of
the following commands: lecho [configure list], or lecho [configure wave].
• list | wave
(required) Controls the widget to configure. Must be the first argument to the configure
command.
list — Specifies the List widget.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
configure
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
configure
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
configure
• -cursorlockcolor [<color>]
(optional) Specifies the color of a locked cursor. Related Tcl variable is
PrefWave(cursorLockColor).
<color> — Any Tcl color. The default is red.
• -gridauto [off | on]
(optional) Controls the grid period when in simulation time mode.
off — (default) Uses a user-specified grid period.
on — The major tick marks in the time line determine the grid period.
• -gridcolor [<color>]
(optional) Specifies the background grid color. Related Tcl variable is
PrefWave(gridColor).
<color> — Any color. The default is grey50.
• -griddelta [<pixels>]
(optional) Specifies how close (in pixels) two grid lines can be drawn before intermediate
lines are removed. Related Tcl variable is PrefWave(gridDelta).
<pixels> — Any non-negative integer. The default is 40.
• -gridoffset [<time>[<unit>]]
(optional) Specifies the time (in user time units) of the first grid line. Related Tcl variable is
PrefWave(gridOffset).
<time> — Any non-negative integer. The default is 0.
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. If you specify <unit>, you must
enclose <delay> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr.
• -gridperiod [<time>[<unit>]]
(optional) Specifies the time (in user time units) between subsequent grid lines. Related Tcl
variable is PrefWave(gridPeriod).
<time> — Any non-negative integer. The default is 1.
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. If you specify <unit>, you must
enclose <delay> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr.
• -namecolwidth [<width>]
(optional) Specifies the width of the name column in pixels. Related Tcl variable is
PrefWave(nameColWidth).
<width> — Any non-negative integer. The default is 150.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
configure
• -rowmargin [<pixels>]
(optional) Specifies the distance between top-level signals in pixels. Related Tcl variable is
PrefWave(rowMargin).
<pixels> — Any non-negative integer. The default is 4.
• -signalnamewidth [<value>]
(optional) Controls the number of hierarchical regions displayed as part of a signal name
shown in the pathname pane. Related Tcl variable is PrefWave(SignalNameWidth). Can
also be set with the WaveSignalNameWidth variable in the modelsim.ini file.
<value> — Any non-negative integer. 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.
• -timecolor [<color>]
(optional) Specifies the time axis color. Related Tcl variable is PrefWave(timeColor).
<color> — Any color. The default is green.
• -timeline [0 | 1]
(optional) Specifies whether the horizontal axis displays simulation time or grid period
count. Related Tcl variable is PrefWave(timeline).
0 — (default) Display simulation time.
1 — Display grid period count.
• -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 (10-15 seconds)
ps — picosecond (10-12 seconds)
ns — nanosecond (10-9 seconds) (default)
us — microsecond (10-6 seconds)
ms — millisecond (10-3 seconds)
sec — second
min — minute (60 seconds)
hr — hour (3600 seconds)
• -valuecolwidth [<width>]
(optional) Specifies the width of the value column, in pixels. Related Tcl variable is
PrefWave(valueColWidth).
<width> — Any non-negative integer. The default is 100.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
configure
• -vectorcolor [<color>]
(optional) Specifies the vector waveform color. Default is #b3ffb3. Related Tcl variable is
PrefWave(vectorColor).
<color> — Any color. The default is #b3ffb3.
• -waveselectcolor [<color>]
(optional) Specifies the background highlight color of a selected waveform. Related Tcl
variable is PrefWave(waveSelectColor).
<color> — Any color. The default is grey30.
• -waveselectenable [0 | 1]
(optional) Specifies whether the waveform background highlights when an object is
selected. Related Tcl variable is PrefWave(waveSelectEnabled).
0 — (default) Highlighting is disabled.
1 — Highlighting is enabled.
Examples
• Display the current value of the strobeperiod attribute.
config list -strobeperiod
• Set the display in the current Wave window to show only the leaf path of each signal.
config wave -signalnamewidth 1
Related Topics
Setting GUI Preferences [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
context
context
Provides operations to return information, and in some cases manipulate, a context's name. The
argument you specify determines the operation.
Syntax
context children <name>
context current <name>
context dataset
context du <name>
context exists <name>
context fullpath <name>
context isCell <name>
context isHierBlock <name>
context isInst <name>
context isLoggable <name>
context isNet <name>
context isPrimitive <name>
context isProc <name>
context isProcessScope <name>
context isScope <name>
context isVar <name>
context isVhdl <name>
context join <name> <name> ...
context name <name>
context parent <name>
context path <name>
context split <name>
context tail <name>
context type <name>
context visibility <name>
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
context
Arguments
• children <name>
Returns a list of declared signals, nets, and scopes within the named instance.
<name> — (required) Name of a valid instance.
• current <name>
Returns the currently active instance [env] for the given dataset.
<name> — (required) Name of the active dataset or dataset alias.
• dataset
Returns the open dataset name.
• du <name>
Returns the following design unit information: library path, primary design unit name, and
secondary design unit name for the named instance.
<name> — (required) Name of a valid design unit.
• exists <name>
Returns true (1) if <name> exists in the design.
<name> — (required) Name of a context object or region. Does not have to be a valid
object name.
• fullpath <name>
Returns the full path (including the dataset prefix) of the specified <name>.
<name> — (required) Name of a context object or region.
• isCell <name>
Returns true (1) if the specified instance is a cell.
<name> — (required) Name of a ‘celldefine or vital cell.
• isHierBlock <name>
Returns true (1) if the named instance is a scope.
<name> — (required) Name of a block scope or generate scope.
• isInst <name>
Returns true (1) if <name> is an instance pathname.
<name> — (required) Name of a context object or region. Does not have to be a valid
object name.
• isLoggable <name>
Returns true (1) if the named object is loggable with the log, add wave, and add list
commands.
<name> — (required) Name of a valid object.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
context
• isNet <name>
Returns true (1) if <name> is a Signal or Net pathname.
<name> — (required) Name of a context object or region. Does not have to be a valid
object name.
• isPrimitive <name>
Returns true (1) if the named instance is a Verilog primitive.
<name> — (required) Name of a valid instance.
• isProc <name>
Returns true (1) if <name> is valid Process pathname.
<name> — (required) Name of a context object or region. Does not have to be a valid
object name.
• isProcessScope <name>
Returns true (1) if the specified name is a process scope.
<name> — (required) Name of a valid instance.
• isScope <name>
Returns true (1) if the specified name is a scope or instance name.
<name> — (required) Name of an instance or scope.
• isVhdl <name>
Returns true (1) if the named object is a VHDL object.
<name> — (required) Name of an object.
• join <name> <name> ...
Takes one or more <name> and combines them, using the correct path separator.
<name> — (required) Name of a context object or region. Does not have to be a valid
object name.
• parent <name>
Returns the parent path of <name> by removing the tail (see context tail).
<name> — (required) Name of a context object or region.
• path <name>
Returns the pathname portion of <name>, removing the dataset name.
<name> — (required) Name of a context object or region.
• split <name>
Returns a list whose elements are the path components in <name>. The first element of the
list is the dataset name, if one is present in the name, including the dataset separator. For
example, context split /foo/bar/baz returns / foo bar baz.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
context
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze
coverage analyze
Displays test information based on a merged UCDB created by a vcover merge operation.
Note
Some arguments for this command require that you perform the merge to create the data
with vcover merge -testassociated, to provide data that is not available by default.
Syntax
coverage analyze <miscellaneous coverage and filter args> <output mode args>
where <miscellaneous coverage and filter args> are:
Miscellaneous Arguments
[-precision <int>] [-testextract <testspec>+] [-file <filename> [-append]]
Arguments to specify results by coverage type
-code {b | c | e | f | s | t}...[-codeAll] [-assert] [-cvg] [-directive] [-select instance]
Arguments to specify coverage by path or context
[[-du <spec>] [-path <obj>]] | [-plansection <obj> [-section] | [-nosection] | [-showattribute
<attribute_key_string>]] [-recursive]
Arguments to specify by query of results
[-select attr <name> {([-lt|-gt|-le|-ge]<int>)|-eq|-ne|-[n]regexp} {<value>}]
[-select coverage {-lt|-gt|-le|-ge|-eq|-ne} <float>]
[-select dateattribute <name> {-lt|-gt|-le|-ge|-eq|-ne} {<value>}]
[-select instance]
[-select name {-eq|-ne|-[n]regexp} < string >]
[-select tag {-eq|-ne|-[n]regexp} <string>]
[-select unlinked]
[-select weight {-lt|-gt|-le|-ge|-eq|-ne} <int>]
[-anyselected | -allselected] [-aggregate preselected | postselected]
[-hideexcluded] [-nozeroweights] [-prunechildren | -noprunechildren]
Specifying output mode (mutually exclusive)
[-coverage most | least | zero | nonzero]
| [-samples most | least | zero | nonzero]
| [-summary [hier | local]]
| [-total]
Arguments
• -aggregate preselected | postselected
(optional: Only has an effect with the -select options (other than instance), can only be used
with -plansection.)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze
Compute coverage for parent nodes before the selection of children, in other words based on
all children (preselected)-- or after the selection, in other words based only on selected
children (postselected).
• -anyselected | -allselected
(optional: Has an effect only with multiple -select options (does not work with -select
instance). These switches are mutually exclusive and you can use only one on each
command line.) Use any select criteria (logical OR) or all select criteria (logical AND) to
determine what the report displays. Default is -allselected.
• -append
(optional) Appends to output file, if -file option was given.
• -assert
(optional) Reports tests in which assertions contributed to coverage data. Assertions
contribute to coverage based on "% non-vacuous passes".
• -code {b | c | e | f | s | t}...
(optional) Reports tests in which a particular code coverage type (branch, condition,
expression, statement, toggle, FSM) contributed to coverage.
• -codeAll
(optional) Reports tests in which any coverage type contributed to coverage. Equivalent to
-code bcestf.
• [-coverage most | least | zero | nonzero]
(optional) Reports which test yields most / least / zero / coverage for the specified
parameters. This argument is on a per test basis. This argument requires that a test-
associated merge (vcover merge -testassociated) has been previously executed.
• -cvg
(optional) Specifies the command apply to covergroup data.
• -directive
(optional) Specifies the command apply to directive data.
• -du <spec>
(optional, though -plansection, -du or -path must be specified.)
Restricts analyze results to specified design units.
• -file <filename>
(optional) Write to output file.
• -hideexcluded
(optional) Prevents any excluded coverage items from appearing in the report.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze
• -nosection
(optional) Excludes section numbers (specified with -plansection) from the test information
displayed. Allows for more concise output. Mutually exclusive with -section.
• -nozeroweights
(optional) Prevents any items with zero weights from appearing in the report, including all
zero-weighted coverage items and testplan sections.
Has no effect on coverage numbers.
• -path <obj>
(optional, though -plansection, -du or -path must be specified.)
Restricts coverage analysis results to design (non-testplan) paths matching the specified
object. The <obj> can be used to specify a dataset other than the current dataset. (Refer to
“Object Name Syntax” for instructions on how to specify a dataset.) If no dataset is
specified, the current dataset is used. Only one dataset name per command invocation may
be used or an error will result. This switch can be combined with the -du switch to be du-
relative.
• -plansection <obj>
(optional) Restricts the analyze results to the given testplan path. By default, the query
applies to all testplan scopes in the database. It also applies to all linked coverage, instance,
or design unit scopes. Either -du, -path, or -plansection must be specified.
• -precision <int>
(optional) Precision for output.
• -prunechildren | -noprunechildren
(optional) The -prunechildren switch prunes children from nodes surviving a selection (after
-select is applied) from the report. By default (-noprunechildren), the children of nodes are
included in the coverage analyze report: the report includes all children of coverage items or
testplan sections that survive a -select filter. This is useful in cases where you want to
subdivide a testplan report by category or area of responsibility.
• -recursive
(optional) Specifies that the analyze is applied recursively. The default is for the query to be
restricted to the single object or objects specified in the command.
• [-samples most | least | zero | nonzero]
(optional) Reports which test has the optionally computed sample count, meeting the
specified criteria. The specified criteria are: most samples, least samples, no samples, or any
samples. This argument is on a per test basis. Using this argument implies the use of -cvg,
since only covergroups and covergroup instances have sample counts. This argument is only
compatible with a merge (vcover merge) performed with -testassociated.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze
• -section
(optional) Includes section numbers (specified with -plansection) in the test information
displayed. This is the default. Mutually exclusive with -nosection.
• -select attr <name> {([-lt|-gt|-le|-ge]<int>)|-eq|-ne|-[n]regexp} {<value>}
(optional) Displays user attributes in the report. The <name> of the user-defined attribute is
a string and must be given as the second argument. The <value> can be a float, integer or
string. The following rules apply to name/value pairs:
o -lt|-gt|-le|-ge require <int>, an integer numerical argument.
-lt is "less than", -gt is "greater than", -ge is "greater than or equal to", -le is "less
than or equal to", -eq is "equal to", and -ne is "not equal to", -regexp is "regular
expression match", -nregexp is "regular expression does not match".
o -regexp and -nregexp require a string argument.
o The -regexp option uses Tcl regular expression matching (as in the memory
window); this offers alternative and more sophisticated matching. One crucial
difference is that "match anything starting with 'a'" is expressed differently in the
two semantics: as "-eq a*" and "-regexp ^a.*".
o For -eq or -ne, the argument is held as a string and will match int or float or double
attribute values as appropriate (for example, "2" could match any type attribute).
o In cases where an attribute is of a type incompatible with the specified value, a
single warning is issued.
• -select dateattribute <name> {-lt|-gt|-le|-ge|-eq|-ne} {<value>}
(optional) Selects results whose dates match the criteria specified. The <name> must be a
string and must be given as the second argument. The <value> must also a string (the date
being selected for filtering).
The following rules apply to name/value pairs: -lt|-gt|-le|-ge|-eq|-ne
o -lt is "less than"
o -gt is "greater than"
o -ge is "greater than or equal to"
o -le is "less than or equal to"
o -eq is "equal to"
o -ne is "not equal to"
The <value> is the date you are selecting (or filtering out). The formats accepted for
<value> are:
o mm/dd[/yy]
o monthname dd[, yy]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze
o dd monthname [yy]
o [yy]yymmdd (for example, trend date)
o [yy]yy-mm-dd
o dd-monthname-[yy]yy
In the formats where the year specification is optional, the default is the current year.
Abbreviations are allowed for months, and upper and/or lowercase is accepted.
• -select coverage {-lt|-gt|-le|-ge|-eq|-ne} <float>
(optional) Includes the coverage of the items in the test information displayed.
• -select instance
(optional) Includes design instances only in the report: Verilog module, program, and
interface instances, VHDL architectures, and package instances.
• -select name {-eq|-ne|-[n]regexp} < string >
(optional) Displays all unlinked coverage and/or testplan items, as specified with either the
-plan, -path or -du argument. The -select name filter must be used with -eq, -ne, or
-[n]regexp arguments and a string, where <string> can be a pattern with wildcards.
o -eq is "equal to"
o -ne is "not equal to"
o -regexp is "regular expression match", and -nregexp is "regular expression does not
match"
The -regexp and -nregexp options use Tcl regular expression matching
• -select unlinked
(optional) Reports on objects that are "unlinked" for the purposes of test traceability. See
coverage unlinked command for further details.
• -select tag {-eq|-ne|-[n]regexp} <string>
(optional) Reports the tag used to associate the specified object with the testplan, or to
associate the object with the other objects. The tag is assigned with the coverage tag
command. Tags can be used for primitive (non-hierarchical) grouping of coverage in the
database. Tags are used for testplan to coverage linking as well.
o tag can only be used with -eq, -ne, or -[n]regexp and a string. <string> can be a
pattern with wildcards.
-eq is "equal to", and -ne is "not equal to", -regexp is "regular expression match",
-nregexp is "regular expression does not match".
o The -regexp option uses Tcl regular expression matching (as in the memory
window); this offers alternative and more sophisticated matching. One crucial
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze
difference is that "match anything starting with 'a'" is expressed differently in the
two semantics: as "-eq a*" and "-regexp ^a.*".
• -select weight {-lt|-gt|-le|-ge|-eq|-ne} <int>
(optional) Includes the weights of the coverage objects in the test information displayed.
You set the weight for coverage objects using the coverage weight (-du|-path|-plan)
command.
o -lt is "less than", -gt is "greater than", -ge is "greater than or equal to", -le is "less
than or equal to", -eq is "equal to", and -ne is "not equal to", -regexp is "regular
expression match", -nregexp is "regular expression does not match". Optional.
• -showattribute <attribute_key_string>
(optional) Reports the specified testplan attribute. Can only be used with -plansection.
Multiple instances are allowed. Only testplan attribute keys may be used. All other values of
"attribute_key_string" will result in a warning message. Wildcards are not supported.
• -summary [hier | local]
(optional) Generates a summary (stats) style report for the given path(s). The default
argument to -summary is "hier".
o "hier" generates statistics recursively including sub-instances of the design
hierarchy, if used with -path. If used with -plansection, "hier" is testplan section
recursive.
o "local" generates statistics for the local instance only.
This argument can not be used with -du. If used with -path, the -select instance argument is
applied automatically, which restricts the command to design instance scopes; the summary
report is most useful (for example, shows multiple kinds of coverage) if used with design
instances. For other types of coverage, such as covergroup and FSM coverage hierarchy, the
-totals report is much more concise.
The summary report generated by this option includes Assertion Passes and/or Successes,
Failures, and Attempts, depending on whether -assertcounts is present. See vsim -
assertcounts for details.
• -testextract <testspec>+
(optional) For a vcover merge, this reconstructs a report for the specified test or tests.
<testspec> is a list of TESTNAME attribute names for all tests in the UCDB. Merge must
have been performed with the -testassociated switch to vcover merge.
• -total
(optional) Generates a hierarchical report of coverage totals — as a single number — for
testplan sections, based on children nodes and linked coverage items and instances or design
units (those sharing a tag with the testplan scope). When used non-recursively, -total
supports bin paths. Could also be used for HDL design unit or instance scopes. It calculates
the average of all different types of coverage found, for example, an average of results
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze
obtained with -summary. For instances or design units, the total coverage is an average of all
types. The "coverage" is the total coverage number computed for a coverage object:
o Weighted average of different kinds of coverage found within a design instance or
design unit.
• Design units only "contain" code coverage, not functional coverage or
assertions.
• The global per-type weights set with coverage weight can be used to affect the
weighted average, but these weights apply globally.
o Coverage result is for a particular kind of coverage object: FSM, covergroups, cover
directive, toggle, branch, and so forth.
o Non-vacuous pass result (100% if any, 0% if none) for an assertion.
Hierarchically computed weighted average of children of a testplan section, can be
computed pre- or post-selection by using -aggregate preselected|postselected.
Description
This command is available only during post-simulation processing, when a UCDB file is
opened with vsim -viewcov.
For all -select arguments, the selection criteria of -eq (equals) includes matched items in the
results, while -ne (not equal) excludes the matched items.
The coverage statistics displayed in the output of this command are calculated in accordance
with the coverage aggregation algorithm shown in “Calculation of Total Coverage”.
Examples
• Display all coverage items in a specified path:
coverage analyze -path /top/*
You can use variations of this command to find the path for any specific coverage object
in /top, such as a statement.
• List tests that covered a particular statement:
coverage analyze -path /top/#stmt#11#1# -coverage nonzero
Returns:
#
# Tests with Non-Zero Coverage:
#
# /top/#stmt#11#1#
# test1_0 100.00%
#
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze
• Show the test which has least coverage for the named testplan. Show summary.
vsim> coverage analyze -plansection /test1.0/test1.2 -coverage least -summary
test13:
Coverage Summary BY INSTANCES ...
• Show the test which has most coverage for the named testplan. Show total only.
vsim> coverage analyze -plansection /test1.0/test1.3 -coverage most -total test27:
99%
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze
• Display a list of items which are less than 100% covered within the top level plan
section, belonging to a particular engineer:
coverage analyze -plansection / -r -select cover -lt 100 -select Engineer -eq mike
• Match a user-defined attribute "myattr" whose value starts with "a", or one which does
not start with "a":
coverage analyze -plansection / -r -select attr myattr -regexp "^a.*"
coverage analyze -plansection / -r -select attr myattr -nre "^a.*"
where the asterisk (*) means “match any number of the preceding characters (i.e 'g' or
'ggggg')” and the period (.) means “match any single character”]
Related Topics
Code Coverage [Questa SIM User's Manual]
Calculation of Total Coverage [Questa SIM User's Manual]
Coverage and Verification Management in the UCDB [Questa SIM User's Manual]
Verification Management Browser [Questa SIM GUI Reference Manual]
Viewing Test Data in the Tracker Window [Questa Verification Management User's Manual]
Verification Management Overview [Questa Verification Management User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze
coverage attribute
coverage goal
coverage report
coverage save
coverage tag
coverage unlinked
coverage weight
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage attribute
coverage attribute
Used to display, set, or delete object, test, and UCDB attributes in the currently loaded database.
Syntax
To display, set, or delete test attributes
coverage attribute [-test <testname>]
([-seed [<num>]] [-command [<str>]] [-comment [<str>]] [-compulsory [0|1]] ) |
([-name <str> -value <int> [-name <str> -value <int>]...] [-delete] )
[-tcl] [-concise]
To display, set, or delete UCDB (global) attributes
coverage attribute -ucdb [-name <str> -value <int> [-name <str> -value <int>]...] [-delete] [-tcl]
[-concise]
To display, set, or delete object attributes
coverage attribute ([<coverage_types>] [-match <str> | -path <obj> | -plansection <obj>]
[-du <duname>] [-history <history_name>] [-select instance]
[-name <str> -value <int> [-name <str> -value <int>]...] [-delete] [-tcl] [-concise]
where <coverage_types> =
[-assert] [-code {b | c | e | f | s | t}...] [-codeAll] [-cvg] [-directive]
To create attributes to capture trending data
coverage attribute [-ucdb [-trendable]] -name <str> -value <int>
Description
• Test Attributes — Attributes for each test attribute record (one record is created for each
simulation that is saved). These attributes are name value pairs that represent testcase
information. Refer to “Predefined Attribute Data” in the User’s Manual for a complete
list of these attributes.
• UCDB Attributes — Attached globally to the UCDB file, and read or written with
“coverage attribute -ucdb”. Unlike test attributes, these are merged together during a
vcover merge. In the current system, the only attributes Questa SIM creates are those
related to the test-associated merge (vcover merge -testassociated). However, you can
create attributes for your own use, accessible through this CLI or the UCDB API.
• Object Attributes — Attached to particular objects stored in the UCDB (ex. design units,
design instance scopes, a particular covergroup, or a particular cover directive). Some
attributes for different kinds of objects are created by Questa SIM, but you can create or
read any attribute in the CLI or the UCDB API.
You can use this command during simulation or with “vsim -viewcov”, though in simulation
you can use it only for test attributes (the single test attribute record that exists in simulation).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage attribute
Arguments
• -assert
(optional) Specifies this command applies to assertion data.
• -code {b | c | e | f | s | t}...
(optional) Specifies this command applies to corresponding code coverage types: branch,
condition, expression, statement, toggle, FSM.
• -codeAll
(optional) Specifies this command applies to all coverage types. Equivalent to -code bcestf.
• -command [<str>]
(optional) Command to run the test: script command line, “knob settings”, and so forth. If
<str> is specified, it sets the command to run; if not, displays the commands used.
• -comment [<str>]
(optional) Comment on the testcase. If <str> is specified, sets a comment; if not, displays
comments.
• -compulsory [0|1]
(optional) Indicates test is compulsory. By default, it is not compulsory (0).
• -concise
(optional) Print attribute values only, do not print other information.
• -cvg
(optional) Specifies the command apply to covergroup data.
• -delete
(optional) Delete specified name attributes.
• -directive
(optional) Specifies the command apply to directive data.
• -du <duname>
(optional) Apply to a design unit, for example, “lib.primary(secondary)” secondary for
VHDL only.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage attribute
• -history <history_name>
(optional) Displays all attributes on the <history_node_name>. Optionally, can be used with
the -name arguments to specify particular attribute or attribute/value pairs to display. With -
name and -value, this argument can also overwrite the value of an existing attribute on a
specific history node. See examples below.
• -match <str>
(optional) Recursively matches the given pattern against the specified coverage types in the
entire instance tree. If -duname is specified, it matches against the specified coverage types
in the design unit. You can use wildcards.
• -name <str> -value <int>
Required for setting attributes; optional for displaying them. Sets attribute name and value.
Adds user defined attributes to either a test, a UCDB, or a particular object in the UCDB.
You can specify multiple -name <name> -value <value> pairs for each coverage attribute
command.
For more information on these attributes, and a list of predefined attribute fields that exist in
a UCDB Test Attribute Record, refer to “Predefined Attribute Data” in the User’s Manual.
For example, before you save the test data to a UCDB, you can assign a unique test name for
each test run using the command “coverage attr -name TESTNAME -value run_1”. Then,
when you merge the tests for later analysis, the test data records remain unique, preventing
data conflicts.
• -path <obj>
(optional) Apply to a path in the UCDB. You can use <obj> to specify a dataset other than
the current dataset. (Refer to “Object Name Syntax” for instructions on how to specify a
dataset.) If you do not specify a dataset, the current dataset is used. Use only one dataset
name per command invocation, or an error will result. Wildcards are acceptable. You can
use a relative path in conjunction with the -du switch.
• -plansection <obj>
(optional) Apply to a testplan section in the UCDB, as specified by <obj>. Wildcards are
acceptable. You can use a relative path in conjunction with -du.
• -seed [<num>]
(optional) Random seed of the test run. Without <num>, the seed is displayed. Specifying
<num> sets the seed.
• -select instance
(optional) Restricts the command to apply to design instance scopes (VHDL architectures,
interface instances, and so forth.).
• -tcl
(optional) Prints attribute information in a Tcl format.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage attribute
• -test <testname>
(Required when used with vsim -viewcov; optional otherwise.) Specifies a test object for
attributes.
• -trendable
(optional) Specifies a test object for trending. Must be used with -name and -value.
Refer to “Use Scenario for Adding Attributes to a Trend UCDB” in the Verification
Management User’s Manual for information on usage flow and a detailed example.
• -ucdb
Required only when used specifying attributes as global attributes. Specifies global UCDB
object for attributes.
Examples
• Show all test records that are in a UCDB that is loaded into Coverage View mode:
coverage attribute -test *
Note
In this example, the MERGEINSTANCES attribute is set to 1 to define coverpoint
and cross bins for covergroup type-based coverage. By default, the value of
MERGEINSTANCES is 0; which means that no bins are created under covergroup
types. The only way to define bins under TYPE coverage is to set the
MERGEINSTANCES attribute to 1. See SystemVerilog 2009
type_option.merge_instances for more information.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage attribute
• Assign (or overwrite) the value “george” on the “responsible” attribute in the “merge1”
history node:
coverage attribute -history merge1 -name responsible -value george
• Display ALL attributes on the “merge1” history node, within a specified UCDB:
coverage attribute -history merge1 my.ucdb
Related Topics
Verification Management Overview [Questa Verification Management User's Manual]
Verification Management Browser [Questa SIM GUI Reference Manual]
Understanding Stored Test Data in the UCDB [Questa SIM User's Manual]
coverage exclude
coverage goal
coverage analyze
coverage ranktest
coverage report
coverage save
coverage tag
coverage testnames
coverage weight
coverage unlinked
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage clear
coverage clear
Clears specified types of coverage data from the coverage database.
Syntax
coverage clear [-code {b | c | e | f | s | t |}...] [-codeAll] [-cvg] [-assert] [-directive]
[-du <du_name> | -instance <pathname>] [-excluded] [-path <obj>+] [-match <string>]
[-recursive]
Arguments
• -assert
(optional) Clears assertion data only.
• -code {b | c | e | f | s | t |}...
(optional) Clears code coverage data for the specified coverage types: b=branch coverage;
c=condition coverage; e=expression coverage; s=statement coverage; t=toggle; f=Finite
State Machine coverage. You can specify multiple coverage types with a single argument.
• -codeAll
(optional) Specifies that the command applies to all coverage types. Equivalent to -code
bcestf.
• -cvg
(optional) Clears covergroup data only.
• -directive
(optional) Clears cover directive data only.
• -du <du_name>
(optional) Specifies the design unit to clear of specified types of coverage data. To specify
all design units in the current dataset, specify <du_name> as “*”.
• -excluded
(optional) Immediately clears all coverage exclusions.
• -instance <pathname>
(optional) Clears the specified coverage data for the specified instances; you can specify -
instance multiple times.
• -match <string>
(optional) Recursively matches the given pattern against the specified coverage types
through the entire instance tree. If -duname is specified, it matches against the specified
coverage types in the design unit. You can use wildcards. This switch and -recursive are
mutually exclusive.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage clear
• -path <obj>+
(optional) Specifies that the subtrees being cleared are rooted at the specified design node.
You can specify multiple objects. You can use <obj> to specify a dataset other than the
current dataset. (Refer to “Object Name Syntax” for instructions on how to specify a
dataset.) If you do not specify a dataset, the current dataset is used. Use only one dataset
name per command invocation, or an error will result. This switch applies to a sub-
hierarchy.
• -recursive
(optional) Specifies that the command is applied recursively. By default, the query is
restricted to the single object or objects specified in the command. This switch and -match
are mutually exclusive.
Description
When entered at the simulation prompt (simulation mode), performing coverage clear on an
instance affects the code coverage data of the associated design unit, and performing coverage
clear on a design unit affects the associated instances of that design unit.
When issued at the vsim prompt with the vsim -viewcov command (batch or post-processing
modes), coverage clear does not synchronize code coverage data between instances and
associated design units. So, clearing an instance has no effect on code coverage data for
associated design units, and clearing a design unit has no affect on related instances.
Examples
• Clear all coverage data from the current simulation database (UCDB).
coverage clear
Related Topics
Code Coverage [Questa SIM User's Manual]
coverage attribute
coverage exclude
coverage ranktest
coverage report
coverage save
coverage tag
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage clear
coverage analyze
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage configure
coverage configure
This command configures the two-step exclusion setting.
Syntax
coverage configure [-2stepexclusion { on | off }]
Arguments
• -2stepexclusion { on | off }
(optional) The default value of this argument is off.
Description
By default, the GUI refreshes coverage data every time you add an exclusion. To minimize
lagtime associated with the GUI refresh, enable two-step exclusions to postpone the GUI
refresh. With two-step exclusions on, the GUI accumulates subsequent exclusions in the
Pending Exclusions Window, rather than applying them immediately.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage create
coverage create
Creates covergroups, coverpoints, crosses and bins under a specified parent in an existing
UCDB file.
Note
This command allows you to make changes to your hierarchy. Backups are recommended.
Syntax
Create a covergroup, covergroup instance or coverpoint
coverage create (-cvg | -cvginstance | -cvp) <name> -parent <path>
Create a cross
coverage create -cross <name> -parent <path> -item <cvpname1> -item <cvpname2> [-item
<cvpnameN>
Create a covergroup bin
coverage create -cvb <name> -parent <path> [-count <count_val>] [-illegal | -ignore]
Arguments
• -cvb
(Required for bin creation) Specifies creation of a bin of specified unique <name> under the
specified parent scope. Parent must be a coverpoint or cross, and must not be a TYPE item
(for example, under covergroup Type scope) with merge_instances = 0. By default, creates a
regular covergroup bin.
• -cvg
(Required for covergroup creation) Specifies creation of a covergroup. Must specify the
<name> and the parent <path> for the covergroup.
• -cvginstance
(Required for covergroup instance creation) Specifies creation of a covergroup instance.
Must specify a unique <name> and a parent <path>.
• -cvp
(Required for coverpoint creation) Specifies creation of a coverpoint. Must specify a unique
<name> and parent <path>. Parent scope must be covergroup or covergroup instance.
• -cross <name>
(Required for cross creation) Specifies creation of a cross. Must specify a unique <name>
and a parent <path>. Parent scope must be covergroup or covergroup instance and must
have at least two -item arguments specified.
• -ignore
(optional) Used only with -cvb to create an ignore bin.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage create
• -illegal
(optional) Used only with -cvb to create an illegal bin.
• -item <cvpname1> -item <cvpname2> [-item <cvpnameN>
(optional) Creates the specified new instance scope(s) to the context tree, at the specified
<path>. The specified <path> must be absolute, not relative. Each coverage create command
can specify multiple items.
• <name>
(required) Specifies a name for the specified covergroup, coverpoint, cross, or bin that is
unique within the parent scope.
• -parent <path>
(required) Specifies the path to the parent item of the specified covergroup, coverpoint. or
cross. The specified <path> must be absolute.
Description
You can use coverage create only in Coverage View mode (vsim -viewcov...). Once created, the
covergroup items behave like any SystemVerilog covergroup items, and coverage calculation
follows SystemVerilog coverage calculation rules.
Examples
• Create a covergroup with type_option.merge_instances=1, and a goal of 90:
vsim -c -viewcov testplan1.ucdb
coverage create -cvg mycvg -parent /top
coverage attribute -path /top/mycvg -name MERGEINSTANCES -value 1
coverage attribute -path /top/mycvg -name {#GOAL#} -value 90
Note
In this example, the MERGEINSTANCES attribute is set to 1 in order to define
coverpoint and cross bins for covergroup type-based coverage. By default, the value
of MERGEINSTANCES is 0; which means that no bins are created under covergroup
types. The only way to define bins under TYPE coverage is to set the
MERGEINSTANCES attribute to 1. See SystemVerilog 2009
type_option.merge_instances for more information.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage create
Related Topics
Code Coverage [Questa SIM User's Manual]
coverage attribute
coverage exclude
coverage ranktest
coverage report
coverage save
coverage tag
coverage analyze
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage edit
coverage edit
Opens a coverage dataset (.ucdb) to edit the contents. Used only in Coverage View mode (vsim
-viewcov...). Use this command to alter existing UCDBs.
Caution
This command allows you to make changes to your hierarchy. Be aware that some changes
in hierarchy can render your data unusable by the tools. Backups are recommended.
Syntax
Prune objects from the UCDB
coverage edit -keeponly | -delete {-path <path> | -plansection <path> | -instofdu <du_name> | -
test <test_name><coverage_types>]}...
<coverage_types> = ( [-code {b | c | e | f | s | t}...] [-codeAll] [-cvg] [-directive] [-assert] )
Change or move around levels/hierarchies within the UCDB
coverage edit -stripdesign <int> | -installdesign <path> ...
coverage edit -stripplan <int> | -installplan <path> ...
Move instances of a design or trees/subtrees/instances of a testplan
coverage edit -movedesign <source path> <dest path>
coverage edit -moveplan <source path> <dest path>
Rename trees, instances of design units, design units, testplan sections, or tests
coverage edit -rename <new_name> {-path <path> | -instofdu <du_name> | -du <path> | -
plansection <path> | -test <test_name>}
Rename libraries or sub-sections of libraries
coverage edit -rename <new_name> -lib <old_libname> [-path <path> | -instofdu <du_name>]
Edit paths for HDL source code
coverage edit -rename -srcfilestring <target_substring> <replacement_substring>
Edit the count value of a particular bin
coverage edit {-incrcount <count> |-setcount <count>} -path <path>
Arguments
• -assert
(optional) Specifies all assertions to be acted upon.
• -code {b | c | e | f | s | t}...
(optional) Specifies code coverage data to be acted upon for coverage type: b=branch
coverage; c=condition coverage; e=expression coverage; s=statement coverage; t=toggle;
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage edit
f=Finite State Machine coverage. You can specify multiple coverage types in a single
argument.
• -codeAll
(optional) Edits all coverage types. Equivalent to -code bcestf.
• -cvg
(optional) Edits covergroup data only.
• -delete
(optional) Deletes specified UCDB subset or coverage types. Mutually exclusive with
-keeponly. Not valid with -du. Accepts wildcards in the specified paths.
Note
This command does not support deleting a test from a merge file. Any attempt to
delete a test from a merge file using ‘coverage edit -delete -test <test_name>’
generates an error message.
• -directive
(optional) Specifies that the command apply cover directive data only.
• -du <path>
(optional) Edits the specified design unit. Used with the -rename option. Mutually exclusive
with -path, -plan, -instofdu, and -test.
• -incrcount <count>
(required to increment bin counts) Increments the count of the specified bin by the specified
count value. The specified <path> must match with a valid bin (coveritem).
• -installdesign <path>
(optional) Creates the specified new instance scope(s) to the context tree, at the specified
<path>. The <path> must be absolute, not relative. You can use this argument multiple
times in a coverage edit command.
• -installplan <path>
(optional) Creates the specified new testplan scope(s) to the testplan tree, at the specified
<path>. The <path> must be absolute, not relative. You can use this argument multiple
times in a coverage edit command.
• -instofdu <du_name>
(optional) Edits all instances of specified design unit.
• -keeponly
(optional) Keeps only given UCDB subset or coverage types. Mutually exclusive with
-delete. Not valid with -du. Accepts wildcards in the specified paths.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage edit
• -lib <old_libname>
(optional) Valid only for use with the -rename argument. Specifies a particular library
instance name to replace with the name specified by -rename.
• -movedesign <source path> <dest path>
(optional) Moves a scope in the context tree from an existing location, specified by
<source path>, to a new parent <dest path>. Accepts wildcards in the specified paths.
• -moveplan <source path> <dest path>
(optional) Moves a scope in the testplan tree from an existing location, specified by
<source path>, to a new parent <dest path>. Accepts wildcards in the specified paths.
• -path <path>
(optional) Edits the specified design or testbench hierarchy. Mutually exclusive with -plan,
-instofdu, and all <coverage types>.
When used with -incrcount or -setcount, <path> must be to a valid bin (coveritem).
• -plansection <path>
(optional) Edits the specified testplan section. Mutually exclusive with -path, -instofdu, and
-test.
• -rename <new_name>
(optional) Renames a single scope of a path to the specified name. <new_name> is not the
full path, but only the scope to rename (accepts wildcards). To identify the hierarchical path
to the target scope to rename, use the -path <path> argument.
• -setcount <count>
(required to set bin count) Sets the count of the specified bin to the specified count <value>,
which must be a positive integer. Must be specified with a <path>, and the path must be to a
valid bin (coveritem).
• -srcfilestring <target_substring> <replacement_substring>
(optional) Used with -rename to replace a specific string in the HDL source code path with
different string. Searches the <target_substring>; the <replacement_substring> replaces the
first matching string found in the path to the VHDL or Verilog source. Does not support
wildcards. You can merge the resulting UCDB with an identical or structurally compatible
UCDB file.
• -stripdesign <int>
(optional) Deletes the specified number of levels (<int>) of topmost design instance scopes
in the context tree. Stripping a design also removes non-instance subscopes of that design. If
specified levels are out of range, a warning is issued. You can specify -stripdesign multiple
times in a coverage edit command.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage edit
• -stripplan <int>
(optional) Deletes the specified number of levels (<int>) of topmost testplan scopes in the
testplan tree. If specified levels are out of range, a warning is issued. You can specify -
stripplan multiple times in a coverage edit command.
• -test <test_name>
Edits a specified test name. Mutually exclusive with -path, -plan, and -instofdu.
Description
The strip and install versions of the command are useful for merging a unit test module and a
system test module.
Examples
Note
Coverage View mode does not support the use of spaces and brackets ([]) in arguments.
Some of the examples below show the use of braces ({}) as escape characters around
arguments that includes those characters, and around null arguments.
• Discard statement coverage from the entire database (the -path / is assumed):
coverage edit -delete -code s
• Discard statement coverage from all instances (including all subtrees) of a DU in the
given database:
coverage edit -delete -code s -instofdu mydu
• Rename only a testplan item /top/Specific Code Coverage (note the use of braces ({})as
escape characters):
coverage edit -plan {/top/Specific Code Coverage} -rename new_name
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage edit
• Change the library name part of all design units to “libA” (note the use of braces ({}) to
identify a null character):
coverage edit –rename –lib {} libA
• Remove the library name part of "work" design units (note the use of braces ({}) to
identify a null character):
coverage edit –rename –lib work {}
• Move testplan scope "b" and its entire subtree so that "b" is now a child of "testplan":
coverage edit -moveplan /testplan/a/b /testplan
• Strip top 2 levels of the UCDB being viewed and replace it with /foo/bar:
coverage edit -stripdesign 2 -installdesign /foo/bar
Related Topics
Coverage View Mode and the UCDB [Questa SIM User's Manual]
Coverage and Verification Management in the UCDB [Questa SIM User's Manual]
Verification Management Browser [Questa SIM GUI Reference Manual]
coverage analyze
coverage attribute
coverage exclude
coverage ranktest
coverage report
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage edit
coverage save
coverage tag
coverage weight
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
coverage exclude
Enables you to exclude items from coverage statistics.
Syntax
Exclude comment-related commands
coverage exclude <exclusion> -comment <str>
Note
This usage is available only in Coverage View mode.
If you do not specify -code, the exclusion applies to assertions and cover directives as well as
code coverage types (equivalent to -code abcdefst.)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
Refer to “Methods for Excluding Objects” and “Excluding Functional Coverage from the GUI
and Reports”in the User’s Manual for details on the different methods for excluding code and
functional coverage, and a description of the advantages of particular methods.
Use the -comment option to add/edit comments for an exclusion (supported for use in Coverage
View mode only).
You can use wildcard characters and shortcuts. See specific arguments for usage information
and the Examples section for example commands.
You cannot clear file based exclusions by scope. For example, an exclusion that was set using
-srcfile cannot be cleared later using -scope.
Arguments
• -allfalse
(optional) Modifies branch exclusion algorithm by applying exclusions to the false path of a
branch when the branch does not have an explicit "else". This argument applies to branch
coverage only and includes the all false branch in case statements. Branch coverage (on by
default) must be turned on for this argument to take effect. The line number(s) specified
with the -linerange argument, if used, must include the line on which the if-branch appears.
For more information about allfalse and if-else branches, refer to “Branch Coverage” and
“Exclude AllFalse Branches in Case Statements” in the User’s Manual.
• -assertpath <assert_list>
(optional) Excludes the assertion with the specified path from coverage. Wildcard usage is
allowed in Coverage View mode only.
• -code {a | b | c | d | e | f | s | t}...
(optional) Excludes coverage objects of the specified type from the specified dataset.
a=assertions; b=branch coverage; c=condition coverage; d=cover directives; e=expression
coverage; f=Finite State Machine coverage; s=statement coverage; t=toggle coverage (either
regular or extended). If -code is not specified, all assertions and cover directives, as well as
all possible coverage types, are excluded. You can specify more than one coverage with
each -code argument. If -item is used, -code f or t is not valid.
• -clear
(optional) Removes exclusions from the coverage metrics. The “coverage exclude”
command adds exclusions whenever -clear is not specified.
• -comment <str>
(optional) Attaches a comment string describing the exclusion to the excluded item. Valid in
post-processing (Coverage View) mode only. The comment appears in the coverage
exclusions reports created by coverage report and vcover report. You can see these
comments by hovering the cursor over the line in the Hits column of the HTML reports and
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
the Source window. A plus sign, '+', is added in the HTML cell to indicate that this cell has
an exclusion comment. Clearing an exclusion clears any associated comment. You can add,
modify and remove comments either from the GUI, or by reapplying the same command
used initially, replacing the <string> with a new comment. Using an empty <string> for the
comment removes the comment.
• -concurrent
(optional) Excludes concurrent assertions/cover directives only.
• -cvgpath <cvg_list>
(optional) Excludes the covergroup with the specified path from coverage. Allows wildcard
usage in Coverage View mode only.
• -dataset <name>
(optional) Specifies dataset in which to apply exclusions. Use only one dataset name per
command invocation, or an error results. If not specified, the current dataset is assumed
("sim" is the default when running interactively). All specified objects, such as scopes,
design units, or variable names, must be present in the named dataset. (Refer to “Object
Name Syntax” for instructions on how to specify a dataset.)
• -dirpath <directive_list>
(optional) Excludes the cover directive with the specified path from coverage. Allows
wildcard usage in Coverage View mode only.
• -du <du_name>
(required only for du-based exclusions) Specifies design unit to exclude. Allows multiple
-du specifications. Mutually exclusive with -scope, which is the default. The <du_name>
must include the path to the design unit to exclude. Supports wildcards. For example, you
can specify all design units in the current dataset with the “*” wildcard – for example,
coverage exclude -du *.
• -fcontains <state_var_name> [<two_state_trans_list>]
(optional; must be used with -du fsm) Excludes FSM multi-state transitions (more than two-
state) from coverage (for the specified Finite State Machine) which contain any of the
transition(s) specified within the <two_state_trans_list>. For example, the command:
“coverage exclude -du fsm1 -fcontains s0>s1” excludes all multi-state transitions in fsm1
which contain state changes from s0>s1.
• -feccondrow <ln> [<rn>] ... [<rn>-<rn>] ...
(optional) Excludes specified row in focused expression coverage (FEC) condition coverage
with a specified line number from the report. Allows multiple rows, or ranges of rows,
separated by spaces. If you do not specify a row number, all rows are excluded. You can use
“-fcr” as a shortcut for this argument.
• -fecexprrow <ln> [<rn>] ... [<rn>-<rn>] ...
(optional) Excludes specified row in focused expression coverage (FEC) expression
coverage with a specified line number from the report. Allows multiple rows, or ranges of
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
rows, separated by spaces. If you do not specify a row number, all rows are excluded. You
may use “-fer” as a shortcut for this argument.
• -finitial <state_var_name> [<state_list>]
(optional; must be used with -du fsm) Excludes Finite State Machine (FSM) state transitions
from coverage (for the specified FSM) which start with a state within the <state_list>. For
example, the command: “coverage exclude -du fsm1 -finitial cst s0” excludes all transitions
in fsm1 with the starting state of s0. Optionally, you can specify a list of states (state_list) to
which the exclusion applies.
• -fsamestate <state_var_name> [<state_list>]
(optional; must be used with -du fsm) Excludes all Finite State Machine (FSM) same state
transitions from coverage (for the specified FSM). For example, the command: “coverage
exclude -du fsm1 -fsamestate cst” excludes all same state transitions in fsm1. Optionally,
you can specify a list of states (s1 s2 s3) to which the exclusion applies.
• -fstate <state_var_name> [<state_name>] ...
(optional) Specifies the Finite State Machine state or states to exclude from coverage for the
specified FSM, specified with <state_var_name>. Allows multiple states, separated by
white space. If you do not specify a state name, all states are excluded. By default, when a
state is excluded, all transitions to and from the state are excluded. This behavior is called
“auto exclusion”. To explicitly control auto exclusion, set the vsim argument
-autoexclusionsdisable to fsm or none. To change the default behavior of the tool, set the
AutoExclusionsDisable variable in the modelsim.ini file. (Refer to AutoExclusionsDisable
in the User’s Manual.)
• -ftrans <state_var_name> [<transition_name>] ...
(optional) Specifies the transition states to exclude for the specified FSM (state_var_name).
<transition_name> is "<state_name>-><state_name>". Multiple transitions, separated by
white space, are allowed. If you do not specify atransition, all transitions are excluded. If
whitespace is present within the transition, you must enclose it in braces ({}).
• -immediate
(optional) Excludes immediate assertions/cover directives only.
• -in
(optional) Excludes the specified toggle nodes of mode IN. This argument is valid only
when -togglenode is specified.
• -inout
(optional) Excludes the specified toggle nodes of mode INOUT. This argument is valid only
when -togglenode is specified.
• -internal
(optional) Excludes the specified toggle nodes of internal (non-port) objects. This argument
is valid only when -togglenode is specified.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
Syntax:
state_value1 -> state_value2
* -> state_value3
state_value1 -> *
• -pcross
Excludes cross coverage bins of the states and transitions listed with the -pstate and -ptrans
argument.
• -reason <str>
(optional) Enables you to specify exclusion reasons. Valid values are the codes given in the
Auto Exclusions section of the User’s manual.
• -recursive
(optional) Used with the -scope argument only. Specifies that exclusions apply recursively
into subscopes. If you omit this argument, exclusions are limited to the current scope.
• -severity note | warning | error | fatal
(optional) Specifies the assertion/cover directive severity level. Specifying -severity selects
only assertions/cover directives with the same or lower severity. If not specified, assertions/
cover directives of all severities are selected.
• -scope <path_list>
(required only for instance-based exclusions) Specifies the scope to exclude. Mutually
exclusive with the -du argument; -scope is the default if neither argument is used. Allows
multiple -scope specifications. Does not allow wildcards. To recursively exclude scopes,
use with -recursive.
• -srcfile <source_file_list>
(required only for file-based exclusions) Specifies source file to exclude. Allows multiple
file specifications, separated by white space.
• -togglenode <node_path_list>
(optional) Specifies the named nodes for toggle exclusion. Allows multiple nodes separated
by spaces. Part-selects are accepted — with node and selects surrounded by braces — using
the following format:
{toggle_node[<int>:<int>]} — matches an integer index within the range
{toggle_node(<int> to <int>)} — matches an integer index within the range
{toggle_node(<int> downto <int>)} — matches an integer index within the range
By default, the specified toggle nodes to exclude are relative to the current scope. If used
with -du, specified toggle nodes to exclude are relative to the design unit.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
• -trans <transition_list>
(optional) Specifies the toggle node transition(s) to exclude from coverage. Allows multiple
transitions separated by spaces. Transition names are not case sensitive and can be any of
the following six: 01 10 0Z 1Z Z0 Z1
• -transitive
(optional) When a coverpoint or cross bin is excluded, all associated cross bins from all
crosses where the coverpoint participates directly or hierarchically (cross of crosses) are
also excluded, if the -transitive argument is used with the -cvgpath <cvg_list> argument. Do
not use -transitive with the -clear argument.
Examples
• Recursively exclude branch coverage from instance /top/dut.
coverage exclude -scope /top/dut -recursive -code b
• Exclude statement, else branch, expression and condition coverage from line 10 to 20 in
file project1.vhd.
coverage exclude -srcfile project1.vhd -linerange 10-20
• Exclude statement, branch, expression, and condition coverage from instance /top/dut in
dataset tt from line 102 through 110 and line 200 through 250 in the source file
project1.vhd.
coverage exclude -scope /top/dut -dataset tt -srcfile
project1.vhd -linerange 102-110 200-250
• Remove statement, branch, expression, condition, and fsm exclusions from the source
file project1.vhd.
coverage exclude -clear -srcfile project1.vhd
Assuming that leading "if" is on line 100 of file (file f.v), enter this command:
coverage exclude -srcfile f.v -linerange 100 -allfalse
• Exclude transitions S1->S2 and S2->S0 for FSM state in instance /top/dut/fsm1.
coverage exclude -scope /top/dut/fsm1 -ftrans state S1->S2 S2->S0
• Exclude state S1 for FSM state in the design unit “fsm”. If auto exclusions are on, all
transitions to and from S1 are also excluded.
coverage exclude -du fsm -fstate state S1
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
or
coverage exclude -src <file_name> -cvgpath *
or
coverage exclude -src <file_name> -cvgpath <cvg_type1> <cvg_type2>
• Exclude from coverage all design units that begin with the prefix “assert_”:
coverage exclude -du assert_*
• Remove user and pragma exclusions for all toggle coverage. This is equivalent to 'toggle
enable -all'.
coverage exclude -du * -code t -clear -pragma
• Exclude transitions 0->1 and 0->Z in toggle nodes mybit and myreg.
coverage exclude -togglenode mybit myreg -trans 01 0z
• There is no file name and line number associated with FSM and toggle coverage.
coverage exclude -srcfile project1.vhd -linerange 10-20 -code ft
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude
• Exclude all transitions to the state SLP in the power domain PD_SYS2 in instance /top/
pd_alu.
coverage exclude -scope /top/pd_alu -ptrans PD_SYS2 * -> SLP
• Clear all exclusions to the state SLP in the power domain PD_SYS2 in instance /top/
pd_alu.
coverage exclude -scope /top/pd_alu -ptrans PD_SYS2 * -> SLP -clear
• Exclude all cross coverage bins of the state SLEEP in the power domain PD_SYS1 in
instance /top/pd_alu. This will not exclude the state and transition coverage.
coverage exclude -scope /top/pd_alu -pstate PD_SYS1 SLEEP -pcross
Related Topics
Code Coverage [Questa SIM User's Manual]
Coverage Exclusions [Questa SIM User's Manual]
Coverage and Verification Management in the UCDB [Questa SIM User's Manual]
Verification Management Browser Window [Questa SIM GUI Reference Manual]
coverage analyze
coverage report
coverage save
“Toggle Coverage [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage goal
coverage goal
Sets or displays the values for goals that affect bins, coverage items and specific scopes in the
design hierarchy.
Syntax
Setting goals for individual coverage items (bins)
coverage goal -bins -path <path> <goal_number>
Setting goals for scopes, either in the design or testplan hierarchy
coverage goal {-du <du_name> | -path <path> | -plansection <section_name>} <goal_number>
Setting goals for database-wide summary by type
coverage goal
[-code {[b] [c] [e] [f] [s] [t]}] [-codeAll] [-fstate] [-ftrans] [-cvg] [-cvp] [-directive] [-assert]
[-active] [-attempted] [-disabled] [-fail] [-pass] [-vpass] [-bydu] [-byinstance] [-feccond
<cond>] [-fecexpr <expr>] [-type] <goal_number>
To display a currently set goal for any of the above, specify the command without
<goal_number>.
Description
The coverage goal command sets or displays the values for three separate kinds of goals, only
one of which affects the total coverage calculation:
• Bin goal (for example, at_least) — sets the goal for a specific bin or coverage item
within the coverage database (UCDB), which may change the total coverage calculation
for that bin or item and any coverage calculation in which that bin or item participates.
• Scope goal — sets the goal for specific scopes in the design hierarchy. It has no effect on
coverage numbers. Instead, it affects the numbers that appear in the “% of Goal”
columns in various coverage windows.
• Summary goal — sets the value of UCDB-wide goals for different coverage types. Has
no effect on coverage numbers. There are two kinds of summaries: summary by design
unit and summary by instance.
To display goals, enter a coverage goal command without an <integer_weight>.
For more information regarding the gathering of coverage statistics, refer to “Calculation of
Total Coverage” in the User’s Manual.
Arguments
• -assert
(optional) Sets goal for all assertion coverage sub-types.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage goal
• -bins
(optional) Used only with -path. Allows you to specify the “at_least” value for functional
coverage bins (covergroup and cover directive). This switch is optional, unless a -path
specification uses a wildcard. If it does, -bins is required to ensure that bins are matched.
Otherwise, it matches functional coverage scopes only.
• -bydu
(optional) Modifier used to set a per-du goal (code coverage only).
• -byinstance
(optional) Modifier used to set a per-instance goal (code coverage and covergroup).
• -code {[b] [c] [e] [f] [s] [t]}
(optional) Sets goal for specified code coverage types: b=branch coverage; c=condition
coverage; e=expression coverage; s=statement coverage; t=toggle; f=Finite State Machine
coverage. You must specify at least one coverage type with each -code argument, and you
can specify more than one type.
• -codeAll
(optional) Sets or displays the goal for all code coverage types. Equivalent to -code bcestf.
• -cvg
(optional) Sets goal for covergroup coverage type, summarizing by both type and instance.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage goal
• -cvp
(optional) Sets goal for coverpoints and crosses, per-instance.
• -directive
(optional) Sets goal for cover directive coverage type only.
• -du <du_name>
(optional) Sets goal for a given design unit. Mutually exclusive with -path and -plansection.
Cannot be combined with any other arguments besides -precision or <float percentage>.
• -feccond <cond>]
(optional) Sets goal for the specified condition in focused expression coverage (FEC).
• -fecexpr <expr>
(optional) Sets goal for the specified expression in focused expression coverage (FEC).
• -fstate
(optional) Sets goal for FSM state coverage only.
• -ftrans
(optional) Sets goal for FSM transition coverage only.
• <goal_number>
(required in order to set goals; displays goals if left unspecified)
For bin goals, <goal_number> is an integer.
For scope or summary by type goals, <number> is a positive floating percentage
between 0 and 100, depending on the granularity specified by -precision.
• -path <path>
(optional) Sets the goal for a given coverage/design object. Mutually exclusive with
-plansection and -du. You can use <path> to specify a dataset other than the current dataset.
If no dataset is specified, the current dataset is used. Use only one dataset name per
command invocation, or you will get an error. Cannot be combined with any other
arguments besides -bins, -precision, or <number>.
• -plansection <section_name>
(optional) Sets the goal for a specified testplan item. Mutually exclusive with -path and -du.
Cannot be combined with any other arguments besides -precision or <number>.
• -precision <int>
(optional) Precision for goal percentage. Default is 1 decimal place.
• -type
(optional) Sets goal for covergroup type coverage. The -type argument summarizes by type
only, whereas the -cvg argument summarizes both by type and by instance.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage goal
Related Topics
Code Coverage [Questa SIM User's Manual]
Coverage and Verification Management in the UCDB [Questa SIM User's Manual]
Verification Management Overview [Questa Verification Management User's Manual]
coverage analyze
coverage attribute
coverage exclude
coverage ranktest
coverage report
coverage save
coverage tag
coverage weight
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage loadtestassoc
coverage loadtestassoc
Loads test associated data in preparation for using any test association procedures.
Syntax
coverage loadtestassoc
Arguments
None
Description
Coverage test association data is not loaded by default when a test associated merged UCDB
file is loaded in the GUI in Coverage View mode, unless the number of tests in the UCDB are
less than 100. When the UCDB contains more than 100 tests, the test-associated data must be
loaded explicitly using the coverage loadtestassoc command before using any of the test
association features (coverage analysis).
Examples
• Open the dataset file test.ucdb, load the test associated data, rank the tests in the UCDB,
and determine which tests contribute the most coverage:
vsim -c -viewcov test.ucdb
coverage loadtestassoc
coverage ranktest
coverage analyze -coverage most
Related Topics
Coverage View Mode and the UCDB [Questa SIM User's Manual]
Coverage and Verification Management in the UCDB [Questa SIM User's Manual]
Verification Management Browser [Questa SIM GUI Reference Manual]
coverage analyze
coverage attribute
coverage ranktest
coverage tag
coverage weight
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage open
coverage open
Opens UCDB datasets for viewing in the GUI in Coverage View mode.
Syntax
coverage open <filename> [<logicalname>]
Arguments
• <filename>
(required) Specifies the <filename>.ucdb to open in Coverage View mode. You must enter
at least one UCDB.
• <logicalname>
(optional) Specifies the logical name for the UCDB dataset. This is a prefix that identifies
the dataset in the current session. By default the dataset prefix is the name of the specified
UCDB file.
Description
This command is equivalent to the command vsim -viewcov. You can close open datasets with
dataset close.
Examples
• Open the dataset file last.ucdb and assigns it the logical name test.
coverage open last.ucdb test
Related Topics
Coverage View Mode and the UCDB [Questa SIM User's Manual]
Coverage and Verification Management in the UCDB [Questa SIM User's Manual]
Verification Management Browser [Questa SIM GUI Reference Manual]
coverage analyze
coverage attribute
coverage exclude
coverage ranktest
coverage report
coverage save
coverage tag
coverage weight
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage ranktest
coverage ranktest
Ranks coverage data contained in the current Coverage View dataset loaded with vsim -
viewcov, according to each individual test’s contribution to cumulative coverage.
Syntax
coverage ranktest [<rankest_options>]
{<ucdb_or_coverstore_testN1> <ucdb_or_coverstore_testN2> ...}
<ranktest_options> =
[-algorithm {greedy | quick}
[-assertion] [-assertfailure] [-code {b | c | e | f | s | t}...] [-codeAll] [-cvg] [-directive]
[-nocompulsoryordering | -compulsorysorting | -compulsoryranking]
[-error <msg_number>[,<msg_number>,…]]
[-fewest | -cputime | -simtime]
[-goal [<coverage_type>] <percentage>]
[-inputs <file_list>]
[-j <number_of_parallel_processes>]
[-log <filename>]
[-maxcpu <real_num_in_seconds>] [-maxtests <int>]
[-metric {aggregate | total}]
[-note <msg_number>[,<msg_number>,…]]
[-path <path> | -du <du_name> | -plansection <path>] [-precision <int_num>]
[-quiet | -concise | -verbose]
[-rankfile <filename>]
[-suppress <msg_number>[,<msg_number>,…]]
[-warning <msg_number>[,<msg_number>,…]]
[-weight <coverage_type> <integer>]
Description
For any ranking operation performed on a merged result — the dataset must be from a merged
UCDB, and must have been created with the vcover merge -testassociated argument.
The output of this command consists of what is written to stdout, as well as two lists of tests
(contributing tests in ranktest.contrib, and non-contributing tests in ranktest.noncontrib). The
tests written to stdout or to a file you specify (with -log) are listed in the order shown in
Table 2-4:
Table 2-4. Order and Type of Ranked Tests
Contributing, Mandatory tests, tests which need Sorted
compulsory to be run regardless of achieved by total
coverage covera
ge %
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage ranktest
Arguments
• -algorithm {greedy | quick}
Specifies the algorithm to use to produce the ranked list of tests: greedy is the default
algorithm. It produces the shortest list of tests contributing to coverage, arranged in order
from highest to least incremental contribution. The quick algorithm provides an estimated
ordering of tests, which may not be the shortest list, and may not have the tests in an order
that perfectly determines a particular test’s significance.
• -assertion
(optional) Specifies ranktest for assertion data. This argument is not compatible with -metric
total: if both are explicitly set, ranking halts and an error is issued.
Traditionally, assertions are a measure of correctness and not a measure of coverage. When
viewed as a coverage item, their definitions are as follows:
o Percent coverage assertion passes (-assertion): Of all assertions what percent were
evaluated to completion and had at least one non-vacuous pass.
o Percent coverage assertion failures (-assertfailure): Of all assertions what percent
were evaluated to completion and had at least one failure. This is THE ONLY
NEGATIVE COVERAGE VALUE in the sense that 0% coverage is desirable and
100% coverage is very undesirable. As such, it is highly recommended that -
assertfailure be used only in a mutually exclusive fashion with the other coverage
values.
Any given assertion can have both passes and failures. Any given assertion can also
possibly never be evaluated to completion. This means that the sum of assertion passes and
assertion failures will often not be 100%.
• -assertfailure
(optional) Specifies ranktest for failed assertion data only. Refer to "-assertion" for more
information. This argument is not compatible with -metric total: if both are explicitly set,
ranking halts and an error is issued.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage ranktest
• -code {b | c | e | f | s | t}...
(optional) Specifies ranktest for corresponding code coverage type only: branch, condition,
expression, FSM, statement, toggle. You can specify more than one coverage type with each
-code argument (example: “-code bcest”). This argument is not compatible with -metric
total: if both are explicitly set, ranking halts and an error is issued.
• -codeAll
(optional) Specifies ranktest for all coverage types. Equivalent to -code bcestf. This
argument is not compatible with -metric total: if both are explicitly set, ranking halts and an
error is issued.
• -nocompulsoryordering | -compulsorysorting | -compulsoryranking
(optional) Specifies how the command ranks compulsory tests, when present.
-nocompulsoryordering — (default) Compulsory tests are listed in a random order, with
no ranking with respect to each other. Compulsory tests do not display in the detailed
ranktest listing. In the GUI, the accumulated coverage data and incremental coverage
data for compulsory tests displays as a minus sign (-). This option has the best
performance of the three options.
-compulsorysorting — Ranks compulsory tests in the order of descending 'total
coverage' with respect to each other. Displays compulsory tests in the detailed
ranktest listing in this order. In the GUI, the accumulated coverage data and
incremental coverage data for compulsory tests is calculated and displayed. This
option has performance second to the -nocompulsoryodering option.
-compulsoryranking — Ranks compulsory tests fully with respect to each other.
Displays compulsory tests in the detailed ranktest listing in this order. In the GUI, the
accumulated coverage data and incremental coverage data for compulsory tests is
calculated and displayed. This option can have the worst performance of the three
options.
• -concise
(optional) Specifies to create the output with minimum additional I/O. This is the default
output. Mutually exclusive with -quiet and -verbose.
• -cputime
(optional) Specifies that the order of tests being selected for ranking is by the largest
coverage gain per unit of CPU time. Mutually exclusive with the -fewest and -simtime
arguments.
• -cvg
(optional) Specifies ranktest for covergroup data only. This argument is not compatible with
-metric total: if both are explicitly set, ranking halts and an error is issued.
• -directive
(optional) Specifies ranktest for directive data only. This argument is not compatible with
-metric total: if both are explicitly set, ranking halts and an error is issued.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage ranktest
• -du <du_name>
(optional) Restricts the ranking to a specified design unit. This argument applies to a
particular module type, by name, in all UCDB files. This option is mutually exclusive with
-path and -plansection.
Where <du_name> is [<library name>.]<primary>[(<secondary>)], and secondary name is
required only for VHDL.
<library name>. — (optional) Specifies the library name; if none is specified, then work
assumes. Must be followed by a period ( . ).
<primary> — The name of the design unit.
<secondary> — (optional) The secondary name of the design unit, required for VHDL.
• -error <msg_number>[,<msg_number>,…]
(optional) Changes the severity level of the specified message(s) to "error." Does not
function with internal messages (those without numbers).
<msg_number> — A number identifying a specific message. Use a comma-separated
list to specify multiple message numbers.
Edit the variable in the modelsim.ini file to set a permanent default. Refer to “Message
Severity Level” in the User’s Manual for more information.
• -fewest
(optional) Specifies that the tests be selected for ranking by: the largest coverage gain with
the fewest number of tests. Mutually exclusive with the -cputime and -simtime arguments.
Default.
• -inputs <file_list>
(optional) Specifies a file containing ranktest arguments. The file can contain a list of
UCDB files to be ranked.
• -j <number_of_parallel_processes>
(optional) Sets the maximum number of parallel processes used during the ranktest
operation.
• -goal [<coverage_type>] <percentage>]
(optional) Specifies that the tests be ranked to achieve this coverage goal. This argument is
not compatible with -metric total: if both are explicitly set, ranking halts and an error is
issued.
<coverage_type> — Specifies to apply the goal only to the specified type of coverage;
otherwise, the goal is applied to all types of coverage.
Valid <coverage_type> values:
-assertfailure
-cvg
-directive,
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage ranktest
-code {b | c | e | f | s | t}...
-codeAll.
<percentage> — An integer value; the default is 100.
You can specify the -goal argument multiple times, as shown in the following example:
coverage ranktest -goal -assertion 90 -goal -code bcest 95
• -log <filename>
(optional) Specifies the file for outputting ranked results. Output includes full path to tests.
<filename> is a user specified string.
• -maxcpu <real_num_in_seconds>
(optional) Monitors the accumulated CPU time of the ranked tests. Specifies the maximum
CPU time to allow. If the specified number of seconds is exceeded, the ranking process
stops.
<real_num_in_seconds> — Any integer greater than -1.0 where the default is -1.0 (no
limit).
• -maxtests <int>
(optional) Specifies threshold for the maximum number of tests to rank. When this threshold
is exceeded, the ranking operation terminates. <int> is any positive integer.
• -metric {aggregate | total}
(optional) Indicates the kind of metric used for ranking. Arguments:
total — (Default, unless any of the following arguments are used: -totals, -goal, -weight,
-assertion, -assertfailures, -directive, -codeAll, or -code)
total — (Default, unless any of the following arguments are used: -totals, -goal, -weight,
-assertion, -assertfailures, -cvg, -directive, -codeAll, or -code)
Ranking metric used produces values consistent with the totals for (verification)
testplan sections obtained with coverage analyze.
aggregate — Ranking metric used produces aggregate values based on each individual
coverage type: values are not likely to be consistent with totals produced with
coverage analyze.
Each coverage type can be selected or not. Each coverage type can be given an
individual weight and goal. These individual numbers are then combined and
normalized to yield an aggregate metric that is unrelated to the number given by the
total coverage.
When the -metric aggregate argument is used, the resulting metric number will not
“match” any other total coverage number produced by other verification tools (for
example, coverage analyze).
This is important because when you use any of the arguments (-totals, -goal, -weight,
-assertion, -assertfailures, -cvg, -directive, -codeAll, or -code) with ranktest
command, the aggregate metric is the default.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage ranktest
Refer to “Merged Results vs Rank Report Coverage Why They Can Differ” in the User’s
Manual for further details.
• -note <msg_number>[,<msg_number>,…]
(optional) Changes the severity level of the specified message(s) to "note." Does not
function with internal messages (those without numbers).
<msg_number> — A number identifying a specific message. Specify multiple message
numbers as a comma separated list.
Edit the variable in the modelsim.ini file to set a permanent default. Refer to “Message
Severity Level” in the User’s Manual for more information
• -path <path>
Restricts ranking to design paths (non-testplan) matching the specified <path>. Optional.
You can use this argument to rank on specific coverage items, or sub-trees. Mutually
exclusive with -du and -plansection.
<path> — Specifies either an absolute or relative path to the design files. On Windows
systems the path separator is a forward slash (/).
• -plansection <path>
Restricts ranking to the specified testplan node. Optional. Mutually exclusive with -du and
-path.
<path> — Specifies either an absolute or relative path to the testplan. On Windows
systems the path separator is a forward slash (/).
• -precision <int_num>
(optional) Specifies the decimal point precision for output. <int_num> is an integer value.
The contents of the rank file are NOT affected by this argument. <int_num> is an integer
value.
<int_num> — Any positive integer where the default is 2.
• -quiet
(optional) Creates the ranktest output without any additional I/O. Default creates ranktest
with minimal I/O (-concise). Mutually exclusive with -concise and -verbose.
• -rankfile <filename>
(optional) Specifies the name of the ranktest file being created. Default is ranktest.rank. Can
be specified with the vcover stats command to redisplay the results of this ranking. You can
use this file to repopulate the Browser with ranktest information.
<filename> — A user specified string, which can include a path.
• -simtime
(optional) Specifies that tests being selected for ranking are ordered by the largest coverage
gain per unit of simulation time. Mutually exclusive to the -cputime and -fewest arguments.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage ranktest
• -suppress <msg_number>[,<msg_number>,…]
(optional) Prevents the specified message(s) from displaying. The <msg_number> is the
number preceding the message you wish to suppress. You cannot suppress Fatal or Internal
messages (those without numbers).
<msg_number> — A number identifying a specific message. Specify multiple message
numbers as a comma separated list.
Edit the variable in the modelsim.ini file to set a permanent default. Refer to “Message
Severity Level” for more information.
• <ucdb_or_coverstore_testN1> <ucdb_or_coverstore_testN2> ...
(required unless the -inputs file is used) Specifies the name of two or more non-merged
UCDB file(s) or Coverstores to rank, where <ucdb_or_coverstore_test> is:
<ucdbfile>|<coverstore>[:<testname>].
• -verbose
(optional) Specifies the output created with full I/O. Mutually exclusive with -quiet and
-concise. Default is -concise.
• -warning <msg_number>[,<msg_number>,…]
(optional) Changes the severity level of the specified message(s) to "warning." Does not
function with internal messages (those without numbers).
<msg_number> — A number identifying a specific message. Specify multiple message
numbers as a comma separated list.
Edit the variable in the modelsim.ini file to set a permanent default. Refer to “Message
Severity Level” for more information.
• -weight <coverage_type> <integer>
(optional) Used when selecting next ranking candidate. This argument is not compatible
with -metric total: if both are explicitly set, ranking halts and an error is issued.
<coverage_type> — Specifies that the goal applies only to the specified type of
coverage; otherwise, the goal applies to all types of coverage.
Valid values for <coverage_type> are:
-assertion
-assertfailure
-cvg
-directive
-code {b | c | e | f | s | t}...
-codeAll.
<integer> — Any non-negative integer.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage ranktest
You can specify the -weight argument multiple times, as shown in this example:
coverage ranktest -weight -assertion 10 -weight -code bcest 5
Related Topics
Code Coverage [Questa SIM User's Manual]
Coverage and Verification Management in the UCDB [Questa SIM User's Manual]
Verification Management Browser [Questa SIM GUI Reference Manual]
coverage analyze
coverage goal
coverage tag
coverage unlinked
coverage weight
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
coverage report
Produces textual or HTML output of coverage statistics or exclusions.
Syntax
coverage report <mutual_arguments> [ <text_arguments> | <html_arguments>]
Mutual Arguments
[-annotate] [-assert]
[-binrhs]
[-code {[b] [c] [e] [f] [s] [t] [x]}...] [-codeAll] [-concurrent | -immediate] [-cvg]
[-details] [-directive] [-du=<du_name>]
[-excluded [-adaptive] [-pragma] [-user] [-nocomment]]
[-failed] [-filter <string>]
[-help] [-hidecvginsts] [-hidecvginstspi0]
[-instance=<path>[.]]
[-lang sva | psl | vhdl] [-library <libname>]
[-multibitverbose]
[-nocompactcrossbins] [-noconcurrent] [-nocvgbin] [-noignorebins] [-noimmediate]
[-nomissing] [-notimestamps] [-nozeroweights]
[-output <file_path>]
[-pa] [-pacombined] [-package <pkgname>] [-plansection=<testplan_section_path>[.]]
[-precision <int>]
[-samples [[-le | -ge] <int> | <int>-<int>]] [-severity info | note | warning | error | failure |
fatal] [-showenabledcodecov] [-showexcluded] [-summary]
[-testattr] [-testdetails] [-testhitdata[=<int>]]] [-testhitdataAll]
[-usecnpm] [-uselimit]
[-verbose]
[-zeros]
Text Arguments
[-2state]
[-above <percent> | -below <percent>] [-all] [-append]
[-comment | -nocomment] [-config] [-covered] [-coverenhanced] [-cvp
<coverpoint_cross_path>]
[-dumptables]
[-flat [-primarykey <type | path | value> [-secondarykey <type | path | value>]]
[-memory]
[-noexcludedhits]
[-option]
[-portmode (input | output | inout | internal)]
[-recursive]
[-showambiguity] [-select (input | output | inout | ports | internal)] [-
srcfile=<filename>[+<filename>]]
[-testextract <test_name_or_pattern>]
[-unattemptedimmed]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
HTML Arguments
-html [-threshH <%>] [-threshL <%>]
Description
You can choose from a number of report output options using the arguments listed below. You
can access the coverage report functionality from the GUI by right-clicking in the Structure or
Files windows and selecting Tools > Code Coverage > Report.
To produce reports offline (for example, without a simulation loaded), use the vcover report
command.
Arguments
• -2state
(optional) Shows 2-state toggle coverage from 3-state toggle coverage data.
• -above <percent> | -below <percent>
(optional) Specifies that only objects with coverage values above or below a given
percentage should be included in the output. <percent> is the coverage of coverpoints and
crosses, not covergroups.
• -all
(optional, requires -details) When reporting toggles, creates a report that lists both toggled
and untoggled signals. Reports counts of all enumeration values. Not a valid option when
reporting on a functional coverage database.
• -annotate
Generates the annotated source. The default is to suppress source information for coverage
reports. This argument is required in order to access source code related data inside the
generated report.
• -append
(optional) Appends the current coverage statistics to the named output file
(-file <filename>).
• -assert
(optional) Adds assertion coverage data to the report.
• -binrhs
(optional, requires -details and that functional coverage is enabled) Specifies that for
covergroups, the report includes a column displaying the RHS for covergroup bins. The
RHS is a sampled value that causes the bin to increment.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
10.Yc). Major releases (such as 10.X, 10.Y, 10.Z), enable all coverage enhancements
present in previous letter release streams by default, and -coverenhanced is no longer
necessary to enable these enhancements. Bug fixes important to the correctness of coverage
numbers are always enabled by default, with no need for -coverenhanced. Since the exact
nature of -coverenhanced varies from release to release, the details of the enhancements it
enables are present in the product release notes rather than in the Command Reference. To
view these details, search the release notes using the string "coverenhanced".
• -cvg
(optional) Adds covergroup coverage data to the report.
• -cvp <coverpoint_cross_path>
(optional) Adds specified coverpoint or cross data to the report.
• -details
(optional) Includes details associated with each coverage item in the output (FEC). By
default, details are not provided. You cannot use this argument with -recursive.
• -directive
(optional) Reports only cover directive coverage data.
• -du=<du_name>
(optional) Reports coverage statistics for the specified design unit. If there are
parameterized instances, all are considered to match the specified design unit. Allows
multiple -du specifications per coverage report command.
Write <du_name> in the format <library name>.<primary>(<secondary>), where:
<library_name>. — (optional) Specifies the library name; if none is specified, defaults
to work. Must be followed by a period ( . ).
<primary> — The name of the design unit.
<secondary> — (optional) The secondary name of the design unit, required for VHDL.
• -dumptables
(optional) Forces printing of condition and expression truth tables, even though fully
covered.
• -excluded [-adaptive] [-pragma] [-user] [-nocomment]
(optional) Includes details on the exclusions in the specified coverage database input file.
By default, this option includes both user exclusions and source code pragma exclusions,
unless you specify -user or -pragma. The output is structured in DO file command format.
-adaptive — When used with the -excluded argument, generates an adaptive exclusion
DO file.
-pragma — When used with the -excluded argument, writes out only lines currently
being excluded by pragmas.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
-user — When used with the -excluded argument, writes out files and lines currently
being excluded by the coverage exclude command.
-nocomment — Removes comments from the output, which appear, by default, in the
exclusion report created with -excluded. You can also use the GUI to add, modify,
and remove comments.
• -failed
(optional) Reports only failed assertions/cover directives.
• -filter <string>
(optional) Specifies that the command affects only those objects with names that match the
specified string. Must be specified with the -assert or -directive argument.
<string> — Specifies the character(s) to match in the search. Permits wildcards.
• -flat [-primarykey <type | path | value> [-secondarykey <type | path | value>]]
(optional) Presents coverage items in a text report in a flat view, sorted first by the values
specified with -primarykey, and second by those specified by -secondarykey. Only
assertions, cover directives, covergroups, toggles and FSMs appear in the flat view of the
report. By default, type is the primary sort, and value is secondary.
-primarykey <type | path | value> — (optional) Specifies the first value for sorting.
type — (default) Sorts by type of coverage data, assertions, coverdirectives,
covergroups, toggles, and FSMs.
path — Sorts by the hierarchical path.
value — Sorts by the value of the coverage items presented in the report.
-secondarykey <type | path | value> — (optional) Specifies the second value for sorting.
type — Sorts by type of coverage data, assertions, coverdirectives, covergroups,
toggles, and FSMs.
path — Sorts by the hierarchical path.
value — (default) Sorts by the value of the coverage items presented in the report.
• -help
Returns command line syntax information.
• -hidecvginsts
(optional) Removes all covergroup instances from the report.
• -hidecvginstspi0
(optional) Removes only the covergroup instances which have per_instance set to 0 from the
report.
• -html
(optional) Generates an HTML coverage report on coverage data from a given UCDB file.
The default output filename is index.html in the default directory, covhtmlreport.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
• -instance=<path>[.]
(optional) Writes out the source file summary coverage data for the selected instance(s).
Allows multiple -instance <path> specifications. This coverage is the combined “local”
coverage of the instance(s).
<path> — Specifies either an absolute or relative path to the instance(s). On Windows
systems the path separator is a forward slash (/).
[.] — Reports on the instance specified with -instance and every included instance
recursively.
• -lang sva | psl | vhdl
(optional) Specifies assertions of a specific language (SVA, PSL, or VHDL). You can use
this option multiple times to specify multiple languages. If you do not specify -lang, all three
languages are selected.
• -library <libname>
(optional) Use when you have packages of the same name in different libraries.
• -memory
(optional) Reports a coarse-grain analysis of capacity data for the following SystemVerilog
constructs:
o Classes
o Queues, dynamic arrays, and associative arrays (QDAS)
o Assertion and cover directives
o Covergroups
o Solver (calls to randomize())
When combined with -cvg and -details, this command reports the detailed memory usage of
covergroup. These include the current persistent memory, current transient memory, peak
transient memory, and peak time of the following:
o Per covergroup type
o Per coverpoint and cross in the type
o Per covergroup instance (if applicable)
o Per coverpoint and cross in the instance (if applicable).
• -multibitverbose
(optional) Used with -code=e and -details to display hit counts of each bin for every operand
and output in multibit expressions. For more information, see Multibit Expression
Coverage.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
• -nocompactcrossbins
(optional, requires -details and that functional coverage is enabled) Disables auto-generated
cross bin factorization (compact view), which is enabled by default. When you specify this
argument all cross bins are displayed separately without any compaction.
• -noconcurrent
(optional) Disables selection of concurrent assertions. Mutually exclusive with -
noimmediate.
• -nocvgbin
(optional) Removes covergroup bins from the report output, for the purposes of limiting
report’s size.
• -noexcludedhits
(optional) Disables display of “E-hit” notifications. By default, if any excluded items are hit
during simulation an “E-hit” notification is displayed in the text report. If “E-hit” is present,
it overrides the display of “E” for an exclusion or “EA”, “ECOP”, and so forth, for various
autoexclusions. The -noexcludedhits option makes all “E” and “EA” type notifications
uniformly visible, along with exclusion reasons (if available).
• -noignorebins
(optional) Removes covergroup ignore bins from the report output.
• -noimmediate
(optional) Disables selection of immediate assertions. Mutually exclusive with -
noconcurrent.
• -nomissing
(optional) Removes the Misses column from the report output.
• -notimestamps
(optional) Prevents timestamp information from appearing in the report.
• -nozeroweights
(optional) Prevents any items with zero weights from appearing in the report, including all
zero-weighted coverage items and sections. Has no effect on coverage numbers.
• -option
(optional) Includes all covergroup option and type_option values in the report. Unless your
covergroup has the "option.per_instance" set to true, only the type_option is included by
default. Only applicable to covergroup reports created with the -details argument.
• -output <file_path>
(optional) Specifies a file path and name for the report.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
• -pa
Generates a report on coverage that is applied for a Power Aware simulation. You can use
this argument with the -assert, -details, -html, -verbose, and -xml arguments. Refer to
“Generating Coverage Reports Using Power Aware Simulation” in the Power Aware
Simulation User’s Manual for more detailed information on using these arguments for a
coverage report.
• -pacombined
Generates a combined coverage report for a non-Power Aware and a Power Aware
simulation. You can use this argument with the -assert, -details, -html, -verbose, and -xml
arguments. Refer to “Generating Coverage Reports Using Non-Power Aware Simulation”
in the Power Aware Simulation User’s Manual for more information.
• -package <pkgname>
(optional) Prints a report on the specified VHDL package body. Needs to be of the form
<lib>.<pkg>. This argument is equivalent to -du.
• -plansection=<testplan_section_path>[.]
(optional) Generates a testplan report for the testplan section specified. Allows multiple
-plansection <testplan_section_path> specifications.
<testplan_section_path> — Specifies an absolute path to the plan section. On Windows
systems the path separator is a forward slash.
[.] — Reports on the testplan section specified with –plansection, and every included
section recursively.
• -portmode (input | output | inout | internal)
(optional) Prints a report including toggles for only the specified port types.
• -precision <int>
(optional) Sets the decimal precision for printing functional coverage information. Valid
values are from 0 to 6 and default value is 1 (one).
• -recursive
(optional) Displays the total recursive coverage by instance rather than individual local
coverage for all instances.
• -samples [[-le | -ge] <int> | <int>-<int>]
(optional) Filters the sample count for covergroup types. You can optionally calculate the
sample count with SVCovergroupsSampleInfo, set in the modelsim.ini file. Refer to
SVCovergroupSampleInfo in the User’s Manual. This argument filters to include
covergroups whose sample count matches the criteria given in the argument. It is a filter for
covergroup types only, not instances. If covergroups are found without a sample count, a
warning is issued. An argument can be one of the following four mutually exclusive
options:
[int] — sample count is equal to [int]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
generate the report. Also, the word “hit” appears in place of the count number. UCDB files
store only the aggregated coverage counts from all tests, and test-specific numbers can not
be reproduced.
• -testhitdata[=<int>]
(optional, requires -details; requires -html for HTML reports) Enables generation of an
HTML table, or an additional Hits column in a text report, containing test-bins-hit
information for the first 10 tests that hit a bin. When an integer is specified with [=<int>],
the HTML table or the text column will include the number of tests that hit a bin as specified
by the integer. The table includes bin numbers, which are hyperlinked in the HTML report
to the relevant test data.
Note
Test hit data for a merged UCDB appears only if the UCDB is merged with vcover
merge -testassociated.
• -testhitdataAll
(optional) Enables generation of an HTML table, or an additional Hits column in a text
report, containing test-bins-hit information for all tests that hit a bin.
• -threshH <%>
(optional) Specifies % of coverage at which colored cells change from yellow to green.
• -threshL <%>
(optional) Specifies % of coverage at which colored cells change from red to yellow.
• -unattemptedimmed
(optional) Causes any unexecuted immediate assertions to be considered in the coverage
calculations for Total Coverage that are displayed in the coverage report. By default, any
unexecuted immediate assertions are not included in the report.
• -usecnpm
(optional, requires -details and that functional coverage is enabled) Specifies to use the
value of SVCrossNumPrintMissingDefault in the report. (Refer to
SVCrossNumPrintMissingDefault in the User’s Manual.) By default, all cross bins are
displayed in the report.
• -uselimit
(optional) Displays the maximum covergroup bin counts according to the limit specified by
SV, either in the source code where covergroup is declared, or by the default value of SV.
By default, the report displays actual bin counts.
• -verbose
(optional) Prints a report listing all the integer values and their counts an integer toggle
encounters during the run. The list includes the number of active assertion threads (Active
Count) and number of active root threads (Peak Active Count) that have occurred up to the
current time. You cannot specify this argument with -recursive.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report
• -xml
(optional) Outputs report in XML format. A report created with -xml does not contain
source file lines. This implicitly sets the -details argument. Refer to “Coverage Reports” in
the User’s Manual for more information.
• -zeros
(optional) Writes out a file-based summary of lines, including file names and line numbers,
that have not been executed (zero hits), annotates the source code, and supports the -instance
option.
For covergroups, this argument applies to coverpoint and cross bins only.
For a detailed report that includes line numbers, use: coverage report -zeros -details.
Examples
• Write a coverage report with all coverage types except toggles:
coverage report -code bcefs
• Write code coverage details to myreport.txt. The -details argument reports coverage
statistics for all the coverage types in the design.
coverage report -details -out myreport.txt
• Write code coverage details of one specific instance to the Transcript window.
coverage report -details -instance=/top/p
• Write toggle data from the test clyde40ns including both toggled and untoggled signals.
coverage report -details -testextract clyde40ns -code t -all
• Write a summary of coverage by instance for coverage less than or equal to 90%.
coverage report -below 90 -output myreport.txt
Related Topics
Code Coverage [Questa SIM User's Manual]
Generating HTML Coverage Reports [Questa SIM User's Manual]
coverage save
coverage analyze
coverage attribute
coverage ranktest
coverage tag
coverage goal
coverage weight
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage save
coverage save
Saves the coverage results of the specified type from a simulation to the unified coverage
database (UCDB). If no type is specified, saves all types into the database.
Syntax
In Live Simulation mode:
coverage save [-instance <path>] [-code {b | c | e | f | s | t}...] [-codeAll]
[-du <du_name>] [-empty <my_test_ucdb>] [-testname <test_name>] [-noadaptive] [-
nocoveragesaveparams] [-norecursive] [-onexit] [-seed] [-ovmtestname] [-uvmtestname] [-
seed] [-coveredfcov] [-cvg] [-pa] [-assert] [-directive] [-help] <file_name>
In Coverage View (post-processing) mode:
coverage save [-instance <path>] [-code {b | c | e | f | s | t}...] [-codeAll] [-empty
<my_test_ucdb>] [-testname <test_name>] [-norecursive] [-onexit] [-coveredfcov] [-cvg] [-
pa] [-assert] [-directive] [-help] <file_name>
In “No Design” mode:
coverage save -empty <my_test_ucdb> [-help]
Arguments
• -assert
(optional) Save only assertion coverage data.
• -code {b | c | e | f | s | t}...
(optional) Save only the designated coverage type: b=branch coverage; c=condition
coverage; e=expression coverage; f=Finite State Machine coverage; s=statement coverage;
t=toggle. You can specify more than one coverage type with a single -code argument
(example: “-code bces”).
• -codeAll
(optional) Specifies that the command applies to all coverage types. Equivalent to -code
bcestf or no specification of type at all.
• -coveredfcov
(optional) Save only non-zero covergroup bins and covered cover directives into the UCDB.
Supported only during live simulations, not in Coverage View mode.
• -cvg
(optional) Save only covergroup coverage data.
• -directive
(optional) Save only cover directives coverage data.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage save
• -du <du_name>
(optional) Saves coverage statistics for the specified design unit. Supported only during live
simulation, not in Coverage View mode.
<du_name> is <library name>.<primary>(<secondary>), where the <library name> is
optional and can be a simple leaf physical library name (without any hierarchy) or a full
hierarchical physical library, and the <secondary> name is required only for VHDL. If there
are parameterized instances, all are considered to match the specified design unit.
• -empty <my_test_ucdb>
(optional) Specifies that only test data to be saved into the UCDB. As a standalone function,
you enter "coverage save -empty <my_ucdb_name>" at a Questa SIM TCL prompt, which
produces a UCDB, with a default test record and a testname matching the specified name of
the UCDB file. You can then load his file into viewcov mode and add other attributes to the
test record or modify the default attributes, and then re-save the file.
• -help
(optional) Lists the description and syntax for the compare save command in the Transcript
window.
• -instance <path>
(optional) Saves coverage data for only a specified instance and any of its children,
recursively. Use the -norecursive argument to exclude data from instance children. <path> is
a path to the instance. You can specify more than one instance during live simulation, but
you can specify only one instance in Coverage View mode. You can also us e <path> to
specify a dataset other than the current dataset. (Refer to “Object Name Syntax” for
instructions on how to specify a dataset.) If you do not specify a dataset, the current dataset
is used. You can use only one dataset name per command invocation, or an error results.
• -noadaptive
(optional) Eliminates storage of adaptive exclusion related information.
• -nocoveragesaveparams
Disables storage of elaborated parameter overrides to each instance in the UCDB. (Enabled
with vopt -coveragesaveparams.) You can also set this functionality with the
CoverageSaveParam modelsim.ini variable.
• -norecursive
(optional) Saves coverage data while excluding data from children of the specified instance
or design unit.
• -onexit
(optional) Causes Questa SIM to save coverage data automatically when the simulator exits.
• -ovmtestname
(optional) With this argument, when an OVM testname has passed to the vsim command
("vsim +OVM_TESTNAME=<myovm>"), the coverage save command uses the OVM test
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage save
name as the UCDB test name, instead of the default testname (<file_name>). Only
supported during live simulation, not in Coverage View mode. Not compatible with
-testname. If you specify both -ovmtestname and -uvmtestname, the UVM testname is used.
For information on setting the testname within OVM/UVM, refer to “Saving Coverage with
UVM/OVM Test Name” in the Questa SIM User’s Manual.
• -pa
Saves Power Aware-specific coverage data only. If you do not specify the -pa argument to
the coverage save command, the command generates Power Aware and non-Power Aware
coverage data. See “Power Aware Coverage” in the Power Aware Simulation User’s
Manual.
• -prune <inst_path>
(optional) Ignores hierarchies specified by <inst_path>. Can appear multiple times in a
coverage save command.
• -seed
(optional) When used in conjunction with a simulation run with vsim -sv_seed, this switch
causes “_<seed_value>” to be appended to the saved testname. Only supported during live
simulation, not in Coverage View mode. If no seed value has been set, zero (0) is applied.
Not compatible with -testname.
• -testname <test_name>
(optional) Saves coverage data with a specified test name (<test_name>), instead of the
default test name which is derived from the specified output <file_name>. Valid characters
for the <test_name> include only alphanumeric characters and the underscore character (_).
• -uvmtestname
(optional) With this argument, when an UVM testname has passed to the vsim command
("vsim +UVM_TESTNAME=<myovm>"), the coverage save command uses the UVM test
name as the UCDB test name, instead of the default testname (<file_name>). Supported
only during live simulation, not in Coverage View mode. Not compatible with -testname.
For further details on setting the testname within UVM, refer to “Saving Coverage with
UVM/OVM Test Name” in the User’s Manual.
• <file_name>
(required) Specifies the name of the database file to save. The command does not assign a
suffix by default. If you want to save it with a .ucdb suffix, you must specify it in this
argument.
Description
The coverage save command is the preferred method of saving coverage data, but you can also
save code coverage data with the $coverage_save_mti ($coverage_save) system task. (Refer to
“SystemVerilog System Tasks and Functions” in the User’s Manual).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage save
You can use this command and its arguments during live simulation or post-processing. Use
“No Design” mode to save test data into a UCDB that you can subsequently load with the -
empty switch.
Examples
• Save data from the current simulation into myfile1.ucdb:
coverage save myfile1.ucdb
• Save data from the current simulation into myfile1, without a file suffix:
coverage save myfile1
• Save data from current simulation (into somefile.ucdb) when the simulator exits:
coverage save -onexit somefile
• Save data for a specific design unit or instance in the design and all its children:
coverage save -instance ./path/inst1 mycov
• Save UCDB (mycov) which contains ./path/inst1 hierarchy with a testname of mytest:
coverage save -instance ./path/inst1 -testname mytest mycov
Related Topics
Code Coverage [Questa SIM User's Manual]
Coverage and Verification Management in the UCDB [Questa SIM User's Manual]
coverage analyze
coverage attribute
coverage report
coverage tag
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage tag
coverage tag
Creates (or deletes) links (tags) between objects in a coverage database to specific coverage
objects in a testplan. A tag is a simple string associated with the object, and objects sharing the
same tag name are linked together.
Syntax
Create links (tags)
coverage tag <UCDB_portion> -tagname <name> [<filters>]
Remove links
coverage tag <UCDB_portion> -delete -tagname <name> [-tagname <name>]... [<filters>]
Display links
coverage tag [<UCDB_portion>] [<filters>]
<UCDB_portion>
(-plansection <path> | -testrecord <test_name> | -path <path> [<path>...] | -duname
<lib>.<duname>) [-recursive]
<filters>
Tag filter:
[-tagmatch <string>]
Coverage type related filters:
[-assert] [-code {b | c | e | s | f | t }...] [-codeAll] [-cvg] [-directive]
Path filters:
([-select instance] [<pattern_filters>]) | [<bin_filters>]
<pattern_filters> = ([-match <string>] | [-cvgmatch <string>]) [-cvginstmatch <string>] [-
crossmatch <string>] [-crossmatch <string>]
<bin_filters> = -bins [-linerange [ln | ln-ln]...] [-item [bces] [<index> | <index>-<index>]...]
Description
If you use the coverage tag command without the -tagname argument, it displays a list of tags,
providing you with what is essentially a general purpose hierarchy browser.
You can also create links from the a coverage object back to the testplan through a process
called “backlinking”.
Refer to “Backlink Coverage Items to Plan with SV Attributes” in the Verification Management
User’s Manual for details.
This command is available only when you open a UCDB file with vsim -viewcov during post-
simulation processing.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage tag
• The portion of the UCDB to act upon. (Specify only one of the following for each use of
the command):
o the testplan (-plansection)
o the context tree within the specified UCDB (-path)
o the testrecords (-testrecord)
o the design units (-duname)
• The action to be taken:
o display tags
o create tags (-tagname)
o delete tags (-delete with -tagname)
• The objects to include in that action (filters).
Usage notes:
• You can add multiple tags on any object to mark it as a member of different categories.
• Tags can be used for primitive (non-hierarchical) grouping of coverage in the database.
• If you use the -cvgmatch, -cvginstmatch, -cvpmatch, and/or -crossmatch switches
together, the lowest-level object is tagged, but the higher-level matches must be
satisfied, too, before they are tagged. Thus, the matching requirements of the multiple
arguments are effectively ANDed. The order of matching from lowest to highest is:
-cvpmatch, -crossmatch, -cvginstmatch, -cvgmatch. (Refer to the Examples section of
this command.)
Arguments
• -assert
(optional) Restricts the action of the command to assertion data.
• -bins
(optional) By default, bins/covers are not selected for tagging. The -bins switch enables the
selection of bins and/or covers. Use of the -bins argument prevents any scope/test from
being selected. In other words, ONLY bins/covers are selected when you use -bins. In order
to select statement bins, you must also specify -code s.
Paths can contain wildcards, so take care not to select more than you intended. See
Examples for further details.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage tag
• -code {b | c | e | s | f | t }...
(optional) Restricts the action of the command to corresponding code coverage types:
branch, condition, expression, statement, toggle, FSM. You can specify more than one
coverage type with a single -code argument (example: “-code bce”).
• -codeAll
(optional) Restricts the action of the command to all coverage types. Equivalent to -code
bcestf.
• -crossmatch <string>
(optional) Specifies a match of a cover cross name against the specified covergroup instance
or covergroup type. Allows wildcards. See “coverage tag” description for further details.
• -cvg
(optional) Restricts the action of the command to covergroup data.
• -cvgmatch <string>
(optional) Specifies a match of a covergroup type against the specified pattern. This
argument is implicitly recursive. See “coverage tag” description for further details.
• -cvginstmatch <string>
(optional) Specifies a match of a covergroup instance name (<option>.<name> <value>)
against the specified instance. Allows wildcards. See “coverage tag” description for further
details.
• -cvpmatch <string>
(optional) Specifies a match of a coverpoint against the specified covergroup instance or
covergroup type. Allows wildcards. See “coverage tag” description for further details.
• -delete
(optional) Removes the given tags from objects specified with the -tagname argument. If
you wish to delete full or partial hierarchies of items, you must use the -recursive switch.
• -directive
(optional) Restricts the action of the command to cover directive data.
• -duname <lib>.<duname>
(required, unless specifying either -testrecord. -plansection, or used with -path) Appliess the
command to the specified library.design_unit(s). Allows wildcards. Mutually exclusive with
-testrecord, -plansection. If used with -path, the path specified must be relative to that
library and design unit.
• -item [bces] [<index> | <index>-<index>]...
(optional) Must be used in conjunction with -linerange and -bins. Restricts the action of the
command to all bins/covers that fall within the indicated range of lines and item numbers.
<index> is the index number of the coverage item being specified. All ranges are inclusive.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage tag
lists all of the scopes in the context tree along with their tags. It behaves as if -path /*, -path
/*/*, -path /*/*/*, and so on, were specified for as many levels as are applicable. This switch
is mutually exclusive with -match.
Tip
Once a scope is tagged, none of its children or descendants will be, because coverage
numbers always include descendants, so tagging descendants when writing a tag
adds redundant coverage to a testplan.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage tag
• -select instance
(optional) Restricts the command to apply to design instance scopes (VHDL architectures,
interface instances, and so forth).
• -tagmatch <string>
(optional) Searches for an exact match to strings containing the specified tagname. Useful
for determining all scopes (within the portion of the UCDB being acted upon) that share a
particular tagname. Allows use of the “*” wildcard.
• -tagname <name>
(optional) Specifies the name of the tag to which the action is applied. Can be specified
multiple times or not at all. Prints a list of all tags when <name> is not specified. If used for
creation or deletion of tag(s) with -recursive, a coverage type filter is required (such as -cvg,
-assert).
• -testrecord <test_name>
(required, unless specifying either -testrecord. -plansection, or -path) Specifies the name of
the specific test record in the UCDB to be linked. This tag creates a link between an item in
the testplan and the test record (name of individual test run) in the UCDB. Allows
wildcards. Can be used only in conjunction with -tagname and -delete; mutually exclusive
with all other arguments.
Examples
• Display all scopes, recursively, in the entire design:
coverage tag -path / -r
• Display scope in the design that has been tagged with “testplan.1.2.1” tagname:
coverage tag -path / -r -tagmatch testplan.1.2.1
• Display all bins in the design that have “plan” in the tagname:
coverage tag -path / -r -tagmatch *plan* -bins
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage tag
• Tag all toggles whose names start with "d" inside the given design unit:
coverage tag -tagname T1 -code t -duname work.du3 -path d*
• Tag all branches in the given design unit; this implicitly recurses all paths in the design
unit because the filter is given and there is no path with the -duname:
coverage tag -tagname T1 -code b -duname work.duname
• Tag all branches in any test data records that start with the pattern “sample”:
coverage tag -tagname T1 -testrecord sample*
• Tag all covergroups whose type names start with the pattern "xactor":
coverage tag -tagname T1 -cvgmatch xactor*
• Almost the same, but will tag coverpoint, cross, and covergroup instance scopes
matching the pattern:
coverage tag -tagname T1 -cvg -match xactor*
• Tag a coverpoint or cross matching the given pattern inside a covergroup type named
"cvgtype":
coverage tag -tagname T1 -cvgmatch cvgtype -cvpmatch *myvar*
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage tag
• Display all bins having the form 'cover_*' under scope 'foo_scope':
coverage tag -bins -path /top/foo_scope/cover_*
• Display all covers associated with the lines 200 through 500:
coverage tag -bins -recursive -path * -linerange 200-500
Related Topics
Code Coverage [Questa SIM User's Manual]
Verification Management Browser [Questa SIM GUI Reference Manual]
xml2ucdb.ini Configuration File [Questa Verification Management User's Manual]
Links Between the Plan Section and the Coverage Item [Questa Verification Management User's
Manual]
coverage analyze
coverage attribute
coverage exclude
coverage ranktest
coverage goal
coverage report
coverage save
coverage unlinked
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage testnames
coverage testnames
The coverage testnames command displays the testnames in the UCDB file currently loaded
into memory. If a merged file is currently loaded, the command gives you a list of tests in the
merged file.
Syntax
coverage testnames [-tcl]
Arguments
• -tcl
(optional) Print attribute information in a tcl format.
Description
This command is most useful when preparing to use the -testextract argument of coverage
analyze or coverage report, because -testextract requires the test name. By default, the testname
is the name of the UCDB file, though you can set it to whatever you like. Set the test name,
before saving the UCDB file, with the command "coverage attribute -test mytestname".
This command is available only during post-simulation processing, when a UCDB file is
opened with vsim -viewcov.
Related Topics
Code Coverage [Questa SIM User's Manual]
Verification Management Browser [Questa SIM GUI Reference Manual]
coverage attribute
coverage exclude
coverage goal
coverage ranktest
coverage report
coverage save
coverage tag
coverage analyze
coverage weight
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage unlinked
coverage unlinked
Reports on objects that are “unlinked,” for test traceability purposes.
Tip
When applying this command to design paths, it is a best practice to use -select and other
filter arguments to restrict the command to types of objects that must be linked (only
covergroups and cover directives, for example). Otherwise, the command can report as
"unlinked" many irrelevant items.
Syntax
coverage unlinked
{-plansection <path> | -path <path> | -du <duname> }
[-testname <test_name>] [-file <filename>] [-append] [-nosection] [-recursive]
[<coverage_type>] [<filters>]
<coverage type> = [-assert] [-code {b | c | e | f | s | t}...] [-codeAll] [-cvg] [-directive]
<filters> = [-select instance ] [-select name {-eq|-ne|-[n]regexp} {<string>}] [-select weight {-
lt|-gt|-le|-ge|-eq|-ne} <int>] [-anyselected | -allselected] [-hideexcluded] [-nozeroweights]
Description
The coverage unlinked command is used as a diagnostic tool to report on:
Arguments
• -anyselected | -allselected
(optional: Has an effect only with multiple -select options (does not work with -select
instance).) These switches are mutually exclusive; only one may be given on each command
line. Use any select criteria (logical OR) or all select criteria (logical AND) to determine
what the report displays. Default is -allselected.
• -append
(optional) Appends to the output file, if -file option is used.
• -assert
(optional) Specifies that the command applies to assertion data.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage unlinked
• -code {b | c | e | f | s | t}...
(optional) Specifies that the command applies to corresponding code coverage types:
branch, condition, expression, statement, toggle, FSM. More than one code coverage type
can be specified with each -code argument (example: “-code bces”).
• -codeAll
(optional) Specifies that the command applies to all coverage types. Equivalent to -code
bcestf.
• -cvg
(optional) Specifies that the command applies to covergroup data.
• -directive
(optional) Specifies that the command applies to directive data.
• -du <duname>
(optional) Restricts the report to design units matching the given specification, <duname>.
Allows wildcards.
• -file <filename>
(optional) Write to output file.
• -hideexcluded
(optional) Prevents any excluded coverage items from appearing in the report.
• -nozeroweights
(optional) Prevents any items with zero weights from appearing in the report, including all
zero-weighted coverage items and testplan sections. Has no effect on coverage numbers.
• -nosection
(optional) Prevents the display of testplan section numbers in the output.
• -path <path>
(optional) Restricts unlinked results to design (non-testplan) paths matching the specified
path. You can combine this argument with -du to be du-relative. Use <path> to specify a
dataset other than the current dataset. (See “Object Name Syntax” for instructions on how to
specify a dataset.) If you do not specify a dataset, the current dataset is used. You can use
only one dataset name per command invocation, or an error results.
• -plansection <path>
(optional) Restricts the command to the given testplan path. By default, the query checks all
testplan scopes in the database, as well as all linked scopes associate with the testplan
scopes.
• -recursive
(optional) Specifies that the command is applied recursively. The default is to restrict the
query to the single object or objects specified in the command.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage unlinked
• -select instance
(optional) Includes only design instances in the unlinked items report: Verilog module,
program, and interface instances, VHDL architectures, and package instances.
• -select name {-eq|-ne|-[n]regexp} {<string>}
(optional) Displays all unlinked coverage and/or testplan items, as specified with either
-plan, -path or -du arguments. The -select name filter must be used with -eq, -ne, or
-[n]regexp arguments and a string, and <string> can include wildcards.
o -eq is "equal to"
o -ne is "not equal to"
o -regexp is "regular expression match", and -nregexp is "regular expression does not
match"
The -regexp and -nregexp options use Tcl regular expression matching.
• -select weight {-lt|-gt|-le|-ge|-eq|-ne} <int>
Filters the command so that it finds unlinked item(s) whose weight(s) are less than, greater
than, match, and so on, when compared with the specified weight <int>.
• -testname <test_name>
(optional) Finds unlinked tests within a testplan. Allows wildcards. Use this argument to
ensure that a directed test ran within a testplan.
Examples
• Find testplan sections which are unlinked — testplans that do not share a tag with a non-
testplan scope or vice-versa:
coverage unlinked -plansection / -r
• Find everything under an instance tree that is unlinked, does not include design units:
coverage unlinked -path / -r
Related Topics
Code Coverage [Questa SIM User's Manual]
Verification Management Overview [Questa Verification Management User's Manual]
Verification Management Browser [Questa SIM GUI Reference Manual]
coverage analyze
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage unlinked
coverage attribute
coverage exclude
coverage goal
coverage ranktest
coverage report
coverage save
coverage tag
coverage testnames
coverage weight
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage weight
coverage weight
Sets or displays weights for global or individual items in the design.
Syntax
Setting global per-type weights
coverage weight [-bydu] [-bins] [-byinstance] [-type] [-attempted] [-active] [-disabled] [-fail] [-
pass] [-vpass] [-code {b | c | e | f | s | t}...] [-codeAll] [-assert] [-directive] [-feccond
<cond>]] [-fecexpr <expr>] [-fstate] [-ftrans] <integer_weight>
Setting weight for individual items, either in the design or testplan hierarchy
coverage weight {-du <du_name> | -path <path> | -plansection <section_name>}
<integer_weight>
To display currently set weights, specify any coverage weight command without
<integer_weight>.
Description
Use the coverage weight command to do any of the following:
Specifically, the command sets the overall weight for covergroups (by instance, or by design
unit) and weights for individual items (design units, instances, assertions, and/or cover
directives, and so forth).
Use the -plansection, -path, and -du arguments to set the weights for individual coverage items,
covergroups, testplan items, design instances, or design units.
Setting weights for individual items affects coverage the same as option.weight or
type_option.weight.
Total coverage calculations are exposed with the coverage analyze -total command; this
includes total coverage numbers for testplans in the Test Tracking tab in the Verification
Management Browser or Verification Tracker Window. Refer to Verification Management
Browser and Verification Tracker Window in the GUI Reference Manual for more information.
For more information regarding the type coverage statistics gathered, refer to Calculation of
Total Coverage in the User’s Manual.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage weight
Arguments
• -assert
(optional) Sets weight for all assertion coverage sub-types.
• Assertion directive sub-types arguments are:
-attempted
(optional) Sets weight for ‘attempted’ assertion directives, per instance.
-active
(optional) Sets weight for ‘active’ assertion directives, per instance.
-disabled
(optional) Sets weight for ‘disabled’ assertion directive, per instance.
-fail
(optional) Sets weight for assertion directive failures, per instance.
-pass
(optional) Sets weight for assertion directive passes, per instance.
-vpass
(optional) Sets weight for assertion directive vacuous passes, per instance.
Note
Only the use of -fail and -pass have an effect in the simulator, because no other
assertion sub-types contribute to coverage calculations. However, all types are
stored in the database.
• -bins
(optional) Used only with -path. Allows you to specify the “at_least” value for functional
coverage bins (covergroup and cover directive). This switch is optional, unless a -path
specification uses a wildcard, in which case -bins is required to ensure that bins are matched.
Otherwise, it matches functional coverage scopes only.
• -bydu
(optional) Modifier used to set per-du (code coverage only)
• -byinstance
(optional) Modifier used to set a per-instance goal (code coverage and covergroup).
• -code {b | c | e | f | s | t}...
(optional) Sets weight for code coverage data for coverage type: b=branch coverage;
c=condition coverage; e=expression coverage; s=statement coverage; t=toggle; f=Finite
State Machine coverage. You can specify more than one coverage type in a single -code
argument (example: “-code bces”).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage weight
• -codeAll
(optional) Sets weight for all code coverage types. Equivalent to -code bcestf.
• -cvg
(optional) Sets weight for covergroup coverage type, summarized both by instance and by
type.
• -directive
(optional) Sets weight for cover directive coverage type only.
• -du <du_name>
(optional) Sets weight for a given design unit. Mutually exclusive with -path and
-plansection. Cannot be combined with any other arguments besides <integer_weight>.
• -feccond <cond>]
(optional) Sets goal for the specified condition in focused expression coverage (FEC).
• -fecexpr <expr>
(optional) Sets goal for the specified expression in focused expression coverage (FEC).
• -fstate
(optional) Sets weight for FSM state coverage.
• -ftrans
(optional) Sets weight for FSM transition coverage.
• <integer_weight>
(required in order to set weights; if left unspecified, command prints weights) Specifies the
value for the weight: must be a natural integer, greater than or equal to 0.
A weight of 0 turns off the coverage summary for the specified item or covergroup.
• -path <path>
(optional) Sets the weight for a given coverage/design object. Mutually exclusive with -du
and -plansection. Cannot be combined with any other arguments besides <integer_weight>.
You can use <path> to specify a dataset other than the current dataset. If you do not specify
a dataset, the current dataset is used. You can use only one dataset name per command
invocation, or an error results.
• -plansection <section_name>
(optional) Sets the weight for a specified testplan section. Mutually exclusive with -du and
-path. Cannot be combined with any other arguments besides <integer_weight>.
• -type
(optional) Sets weight for covergroup type coverage. The -type argument summarizes by
type only, whereas the -cvg argument summarizes both by type and by instance.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage weight
Related Topics
Code Coverage [Questa SIM User's Manual]
Coverage and Verification Management in the UCDB [Questa SIM User's Manual]
Verification Management Browser [Questa SIM GUI Reference Manual]
coverage analyze
coverage attribute
coverage exclude
coverage goal
coverage ranktest
coverage report
coverage save
coverage tag
coverage testnames
coverage unlinked
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset alias
dataset alias
Maps an alternate name (alias) to an open dataset.
Syntax
dataset alias <dataset_name> [<alias_name>]
Description
A dataset can have any number of unique aliases, but all dataset names and aliases must be still
be unique when more than one dataset is open. Aliases are not saved to the .wlf file, and you
must remap them if you close and re-open the dataset.
Arguments
• <dataset_name>
(required) Specifies a dataset name or currently assigned dataset alias. Must be the first
argument to the dataset alias command. Returns a list of all aliases mapped to the specified
dataset file when specified without <alias_name>.
• <alias_name>
(optional) Specifies string to assign to the dataset as an alias. Allows wildcard characters.
Examples
Assign the alias name “bar” to the dataset named “gold.”
Related Topics
dataset clear
dataset close
dataset config
dataset info
dataset list
dataset open
dataset rename
dataset restart
dataset save
dataset snapshot
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset clear
dataset clear
Removes all event data from the current simulation WLF file, while retaining all currently
logged signals. Subsequent run commands continue to accumulate data in the WLF file.
Note
This command applies only to WLF-based simulation datasets.
Syntax
dataset clear
Description
This command has no effect on coverage (UCDB) datasets.
Running this command with no design loaded returns the error “Dataset not found:sim”. If you
run the command with a design loaded, the “sim:” dataset is cleared, regardless of which dataset
is currently set. Clearing the dataset clears any open Wave window based on the “sim:” dataset.
Arguments
None
Examples
Clear data in the WLF file from time 0ns to 100000ns, then log data into the WLF file from time
100000ns to 200000ns.
add wave *
run 100000ns
dataset clear
run 100000ns
Related Topics
dataset alias
dataset close
dataset config
dataset info
dataset list
dataset open
dataset rename
dataset restart
dataset save
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset clear
dataset snapshot
log
Recording Simulation Results With Datasets [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset close
dataset close
Closes an active dataset.
Note
To open a dataset, use the dataset open command.
Syntax
dataset close {<dataset_name> | -all}
Arguments
• <dataset_name> | -all
(required) Closes active dataset(s).
<dataset_name> — Specifies the name of the dataset or alias 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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset config
dataset config
Configures WLF parameters for an open dataset and all aliases mapped to that dataset.
Note
This command has no effect on coverage datasets (UCDB).
Syntax
dataset config <dataset_name> [-wlfcachesize [<n>]] [-wlfdeleteonquit [0 | 1]] [-wlfopt [0 | 1]]
Arguments
• <dataset_name>
(required) Specifies an open dataset or dataset alias to configure. Must be the first argument
to the dataset config command.
• -wlfcachesize [<n>]
(optional) Sets the size, in megabytes, of the WLF reader cache. Does not affect the WLF
write cache.
<n> — Any non-negative integer, in MB where the default is 256.
If you do not specify a value for <n>, this switch returns the size, in megabytes, of the WLF
reader cache.
• -wlfdeleteonquit [0 | 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.
• -wlfopt [0 | 1]
(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.
Related Topics
dataset alias
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset config
dataset clear
dataset close
dataset info
dataset list
dataset open
dataset rename
dataset restart
dataset save
dataset snapshot
WLF File Parameter Overview [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset current
dataset current
Activates the specified dataset and sets the GUI context to the last selected context of the
specified dataset. All context dependent GUI data is updated and all context dependent CLI
commands start working with respect to the new context.
Syntax
dataset current [<dataset_name>]
Arguments
• <dataset_name>
(optional) Specifies the dataset name or dataset alias to activate. If no dataset name or alias
is specified, the command returns the name of the currently active dataset.
Related Topics
dataset alias
dataset clear
dataset close
dataset info
dataset list
dataset open
dataset rename
dataset restart
dataset save
dataset snapshot
WLF File Parameter Overview [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset info
dataset info
Reports a variety of information about a dataset.
Syntax
dataset info {name | file | exists} <dataset_name>
Arguments
• {name | file | exists}
(required) Identifies what type of information to report.
Allows only one option per command. 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 file associated with the dataset.
exists — Returns "1" if the dataset is currently open, "0" if it is not.
Must be the first argument to the dataset info command.
• <dataset_name>
(optional) Specifies the name of the dataset or alias for which you want information. If you
do not specify a dataset name, Questa SIM uses the dataset of the current environment.
Related Topics
dataset alias
dataset clear
dataset close
dataset config
dataset list
dataset open
dataset rename
dataset restart
dataset save
dataset snapshot
environment
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset list
dataset list
Lists all active datasets.
Syntax
dataset list [-long]
Arguments
• -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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset open
dataset open
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 you specify.
Syntax
dataset open <file_name> [<dataset_name>]
Description
The file can be the existing WLF file for a currently running simulation. To close a dataset, use
the dataset close command.
Arguments
• <file_name>
(required) Specifies the file to open as a view-mode dataset. Must be the first argument to
the dataset open command. Specify vsim.wlf to open the currently running WLF file.
• <dataset_name>
(optional) Specifies a name for the open dataset. This name identifies the dataset in the
current session. By default the dataset prefix is the name of the specified file.
Examples
Open the dataset file last.wlf and assign it the name test.
Related Topics
dataset alias
dataset clear
dataset close
dataset config
dataset info
dataset list
dataset rename
dataset restart
dataset save
dataset snapshot
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset rename
dataset rename
Changes the name of a dataset to the new name you specify.
Syntax
dataset rename <dataset_name> <new_dataset_name>
Arguments
• <dataset_name>
Specifies the existing name of the dataset. Must be the first argument.
• <new_dataset_name>
Specifies the new name for the dataset. Must be the second argument.
Examples
Rename the dataset file "test" to "test2".
Related Topics
dataset alias
dataset clear
dataset close
dataset config
dataset info
dataset list
dataset open
dataset restart
dataset save
dataset snapshot
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset restart
dataset restart
Unloads the specified dataset or currently active dataset and reloads the dataset using the same
dataset name.
Note
The contents of the Wave and other coverage windows are restored for UCDB datasets after
a reload.
Syntax
dataset restart [<file_name>]
Arguments
• <file_name>
(optional) Specifies the file to open as a dataset. If <filename> is not specified, the currently
active dataset restarts.
Related Topics
dataset alias
dataset clear
dataset close
dataset config
dataset info
dataset list
dataset open
dataset rename
dataset save
dataset snapshot
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset save
dataset save
Writes data from the current simulation to a specified file while the simulation is in progress.
Note
This command is equivalent to the coverage save command for coverage datasets.
Syntax
dataset save <dataset_name> <file_name>
Arguments
• <dataset_name>
(required) Specifies the name of the dataset you want to save. Must be the first argument.
• <file_name>
(required) Specifies the name of the file to save. Must be the second argument.
Examples
Save all current log data in the sim dataset to the file gold.wlf.
Related Topics
dataset alias
dataset clear
dataset close
dataset config
dataset info
dataset list
dataset open
dataset rename
dataset restart
dataset snapshot
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset snapshot
dataset snapshot
Saves data from the current WLF file (vsim.wlf by default) at a specified interval. Provides you
with sequential or cumulative "snapshots" of your simulation data.
Note
This command does not apply to coverage datasets (UCDB).
Syntax
dataset snapshot [-dir <directory>] [-disable] [-enable] [-file <file_name>]
[-filemode {overwrite | increment}] [-mode {cumulative | sequential}] [-report] [-reset]
{-size <file_size> | -time <n> [<unit>]}
Arguments
• -dir <directory>
(optional) Specifies a directory into which to save the files. Either absolute or relative paths
can be used. Default is to save to the current working directory.
• -disable
(optional) Turns snapshotting off. Stores all dataset snapshot settings from the current
simulation 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 <file_name>
(optional) Specifies the name of the file to save snapshot data.
<file_name> — A specified file name; the default is vsim_snapshot.wlf. The suffix .wlf
is appended to the specified filename. Some arguments may also append 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 — Creates a new file for each snapshot. Adds an incrementing suffix (1 to n)
to each new file (for example, vsim_snapshot_1.wlf).
• -mode {cumulative | sequential}
(optional) Specifies whether to keep all data from the time signals are first logged.
cumulative — (default)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset snapshot
sequential — Clears the current WLF file every time a snapshot is taken.
• -report
(optional) Lists current snapshot settings in the Transcript window and ignores all other
options.
• -reset
(optional) Resets values back to defaults, then applies the remainder of the arguments on the
command line. See Examples section, below. If specified without any other arguments, -
reset disables dataset snapshot and resets the values.
• -size <file_size>
(required if -time is not specified) Specifies that a snapshot occurs based on WLF file size.
Must be the final argument to the dataset snapshot command.
<file_size> — Size of WLF file in MB.
• -time <n> [<unit>]
(required if -size is not specified) Specifies that a snapshot occurs based on simulation time.
Must be the final argument to the dataset snapshot command.
<n> — Any positive integer.
<unit> — (optional) A suffix specifying a unit of time. The default is to specify the
current simulation resolution by omitting <unit>. If you specify <unit>, you must
enclose <limit> and <unit> within braces ({}). Valid time units are: fs, ps, ns, us, ms,
sec, min, and hr.
Examples
• Create the file vsim_snapshot_<n>.wlf, and write to it every time the current WLF file
reaches a multiple of 10 MB (that is, at 10 MB, 20 MB, 30 MB, and so on.).
dataset snapshot -size 10
• Similar to the previous example, but in this case, clear the current WLF file every time it
reaches 10 MB.
dataset snapshot -size 10 -mode sequential
• Assuming simulator time units are ps, this command saves a file called gold_<n>.wlf
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.wlf with data from 1000000 to
2000000, and gold_3.wlf 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
3500000 ps, a file containing the data from 3000000 to 3500000 ps is saved as vsim.wlf
(default).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dataset snapshot
• Enable snapshotting with time=10000 and default mode (cumulative) and default
filemode (overwrite).
dataset snapshot -reset -time 10000
Related Topics
dataset alias
dataset clear
dataset close
dataset config
dataset info
dataset list
dataset open
dataset rename
dataset restart
dataset save
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
delete
delete
Removes objects from either the List or Wave window.
Syntax
delete list [-window <wname>] <object_name>...
delete wave [-window <wname>] <object_name>...
Arguments
• list
Specifies the target is a list window.
• wave
Specifies the target is a wave window.
• -window <wname>
(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.) Uses the
default window, if none is specified. The default window is determined by the most recent
invocation of the view command and has “ -Default” appended to the name.
• <object_name>...
(required) Specifies the name of an object. Must match an object name used in an add list or
add wave command. Specify multiple object names as a space-separated list. Allows
wildcard characters. Must be the final argument to the delete list and delete wave
commands.
Examples
• Remove the object vec2 from the list2 window.
delete list -window list2 vec2
• Remove all objects beginning with the string /test from the Wave window.
delete wave /test*
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
describe
describe
Displays information about simulation objects and design regions in the Transcript window.
Syntax
describe <name>...
Description
This command displays information about the following types of simulation objects and design
regions:
• You are running C Debug. (C Debug is described in more detail in the User’s Manual.)
• The variables are local to the active call frame for the line in the function in the C source
file where you are stopped.
For specific information related to viewing SystemC objects refer to “SystemC Object and Type
Display” in the User’s Manual.
Arguments
• <name>...
(required) The name of an HDL object, SystemC signal, or C variable for which you want a
description.
Specify multiple object names as a space separated list. Allows wildcard characters. HDL
object names can be relative or full hierarchical names.
Examples
• Print the type of C variable x.
describe x
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
describe
produces:
# File of
# Unconstrained Array of
# VHDL standard type CHARACTER
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
disablebp
disablebp
Turns off breakpoints and when commands.
Note
To turn on breakpoints or when commands again, use the enablebp command.
Syntax
disablebp [<id#> | <label>]
Arguments
• <id#>
(optional) Specifies the ID number of a breakpoint or when statement to disable.
Note that C breakpoint id#s are prefixed with "c.".
• <label>
(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.
Note
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
enablebp
onbreak
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
disable_menu
disable_menu
Disables the specified menu within the specified window, making it inactive (grayed-out).
Syntax
disable_menu <window_name> <menu_path>
Arguments
• <window_name>
(required) The path of the window containing the menu. You must express the path for the
Main window as "". All other window pathnames begin with a period (.) as shown in the
examples below. Must be the first argument.
• <menu_path>
(required) Name of the Tk menu-widget path. Must be the final argument.
Examples
• Disable the file menu of the Main window.
disable_menu "" File
Related Topics
disable_menuitem
enable_menu
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
disable_menuitem
disable_menuitem
Disables a specified menu item within the specified menu path of the specified window. The
menu item becomes inactive (grayed-out).
Syntax
disable_menuitem <window_name> <menu_path> <label>
Arguments
• <window_name>
(required) Tk path of the window containing the menu. Must be the first argument to the
command.
Note that the path for the Main window must be expressed as "". All other window
pathnames begin with a period (.) as shown in the example below.
• <menu_path>
(required) Name of the Tk menu-widget path. The path can include a submenu as shown in
the example below. Must be the second argument.
• <label>
(required) Menu item text. Must be the final argument.
Examples
• Locate the mywindow window, disable the Save Results As... menu item in the save
submenu of the file menu.
disable_menuitem .mywindow file.save "Save Results As..."
Related Topics
disable_menu
enable_menu
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
do
do
Executes the commands contained in a DO file.
Syntax
do <filename> [<parameter_value>...]
Description
A DO file can have any name and extension. Any encountered errors interrupt the DO file script
execution, unless you specify a onerror command, or the OnErrorDefaultAction Tcl variable
with the resume command. You can use the onbreak command to take action with source code
breakpoint cases.
Arguments
• <filename>
(required) Specifies the name of the DO 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 the
first argument to the do command.
If the do command is executed from another DO file, pathnames are relative to the directory
of the calling DO file. This allows groups of DO files to be stored in a separate sub-
directory.
• <parameter_value>...
(optional) Specifies values that are to be passed to the corresponding parameters $1 through
$9 in the DO file. You must separate multiple parameter values 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 file), you must use the argc simulator
state variable in the DO file script. Refer to “Simulator State Variables” and “Making Script
Parameters Optional” in the User’s Manual.
Note
There is no limit on the number of parameters that can be passed to macros, but 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 DO file.
do macros/stimulus 100
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
do
Related Topics
Tcl and DO Files [Questa SIM User's Manual]
General Modes of Operation [Questa SIM User's Manual]
Using a Startup File [Questa SIM User's Manual]
DOPATH [Questa SIM User's Manual]
Saving a Transcript File as a DO File [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
down
down
Searches for object transitions or values in the specified List window.
Syntax
down [-expr <expression>] [-falling] [<n>] [-noglitch] [-rising] [-value <sig_value>] [-window
<wname>]
Description
The down command searches on objects that are currently selected in the window, starting from
the point of the active cursor. The active cursor moves to the found location.
Use this command to move to consecutive transitions, to find the time when an object takes on a
particular value, or the time when an expression of multiple objects evaluates to true. See the up
command for related functionality.
Arguments
• -expr <expression>
(optional) Searches the List window until the expression evaluates to a boolean true
condition.
<expression> — An expression that involves one or more objects, but is limited to
objects that have been logged in the referenced List window. You can specify an
object either by its full path or by the shortcut label displayed in the List window.
See GUI_expression_format for the format of the expression. The expression must be
enclosed in braces.
• -falling
(optional) Searches for a falling edge on the specified object, if that object is a scalar object.
Ignores non-scalar objects.
• <n>
(optional) Specifies to find the nth match. If less than n are found, returns the number found
and a warning message, and the marker is positioned at the last match.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
down
• -noglitch
(optional) Specifies to ignore delta-width glitches.
• -rising
(optional) Searches for a rising edge on the specified object, if that object is a scalar object.
Ignores non-scalar objects.
• -value <sig_value>
(optional) Specifies the value of the object to match.
<sig_value> — A value specified in the same radix as the selected object. Case is
ignored, but otherwise the value must be an exact string match. Don’t-care bits are
not supported.
• -window <wname>
(optional) Specifies a non-default instance of the List window. Uses the default List window
if <wname> is not specified. Use the view command to change the default window.
<wname> — The name of a List window not currently the default.
Examples
• Find the next time at which the selected vector transitions to FF23, ignoring glitches.
down -noglitch -value FF23
The following examples illustrate search expressions that use a variety of object attributes,
paths, array constants, and time variables. Such expressions follow the GUI_expression_format.
• Search down for an expression that evaluates to a boolean 1 when object clk just
changed from low to high and object mystate is enumeration reading and object /top/u3/
addr is equal to the specified 32-bit hex constant.
down -expr {clk'rising && (mystate == reading) && (/top/u3/addr == 32'habcd1234)}
• Search down for an expression that evaluates to a boolean 1 when the upper 8 bits of the
32-bit object /top/u3/addr equals hex ac.
down -expr {(/top/u3/addr and 32'hff000000) == 32’hac000000}
• Search down for an expression that evaluates to a boolean 1 when logfile time is
between 23 and 54 microseconds, clock just changed from low to high, and object mode
is enumeration writing.
down -expr {((NOW > 23 us) && (NOW < 54 us)) && clk'rising && (mode ==
writing)}
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
drivers
drivers
Displays the names and strength of all drivers of the specified object.
Syntax
drivers <object_name> [-source]
Description
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 appears 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.
Arguments
• <object_name>
(required) Specifies the name of the signal or net for which to display drivers. All signal or
net types are valid. Accepts multiple names and wildcards.
• -source
(optional) Returns the source file name and line number for each driver of the specified
signal or net. Returns the value n/a when unable to determine the source location for the
driver.
Examples
drivers /top/dut/pkt_cnt(4)
# Drivers for /top/dut/pkt_cnt(4):
# St0 : Net /top/dut/pkt_cnt[4]
# St0 : Driver /top/dut/pkt_counter/#IMPLICIT-WIRE(cnt_out)#6
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
drivers
In some cases, the output may supply a strength value similar to 630 or 52x, which indicates an
ambiguous Verilog strength.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
dumplog64
dumplog64
Dumps the contents of the specified WLF file to stdout in a readable format.
Note
When you use this command, you cannot open the WLF file for writing in a simulation. You
cannot use this command in a DO file.
Syntax
dumplog64 <filename>
Arguments
• <filename>
(required) The name of the WLF file to read.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
echo
echo
Displays a specified message in the Transcript window.
Syntax
echo [<text_string>]
Arguments
• <text_string>
(required) Specifies the message text to display. If you surround the text string with
quotation marks, blank spaces display as entered. If you omit quotation marks, adjacent
blank spaces are compressed into a single space.
Examples
• If the current time is 1000 ns, this command:
echo “The time is $now ns.”
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
edit
edit
Invokes the editor specified by the EDITOR environment variable. By default, the specified
filename opens in the Source window.
Syntax
edit [<filename>]
Arguments
• <filename>
(optional) Specifies the name of the file to edit. If you omit the <filename> argument, the
editor opens the current source file. If you specify a non-existent filename, the editor opens
a new file. You can use either absolute or relative paths.
Related Topics
notepad
EDITOR [Questa SIM User's Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
enablebp
enablebp
Turns on breakpoints and when commands that were previously disabled.
Syntax
enablebp [<id#> | <label>]
Arguments
• <id#>
(optional) Specifies a breakpoint ID number or when statement to enable.
Note that C breakpoint id numbers have a "c" prefix.
• <label>
(optional) Specifies the label name of a breakpoint or when statement to enable.
If you do not specify 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
disablebp
onbreak
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
enable_menu
enable_menu
Enables a previously disabled menu, changing it from grayed-out to normal and responsive.
Syntax
enable_menu <window_name> <menu_path>
Arguments
• <window_name>
(required) Tk path of the window containing the menu.
Note that the path for the Main window must be expressed as "". All other window
pathnames begin with a period (.), as shown in the example below.
• <menu_path>
(required) Name of the Tk menu-widget path.
Examples
• Enable the previously-disabled File menu of the Main window.
enable_menu "" File
Related Topics
disable_menu
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
enable_menuitem
enable_menuitem
Enables a previously disabled menu item, changing it from grayed-out to normal and
responsive.
Syntax
enable_menuitem <window_name> <menu_path> <label>
Arguments
• <window_name>
(required) Tk path of the window containing the menu. Must be the first argument.
The path for the Main window must be expressed as "". All other window pathnames begin
with a period (.), as shown in the example below.
• <menu_path>
(required) Name of the Tk menu-widget path. The path can include a submenu, as shown in
the example below. Must be the second argument.
• <label>
(required) Menu item text. Must be the final argument.
Examples
Locate the mywindow window and enable the previously-disabled Save Results As... menu
item in the save submenu of the file menu:
Related Topics
disable_menuitem
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
encoding
encoding
Translates between the 16-bit Unicode characters used in Tcl strings and a named encoding,
such as Shift-JIS. Consists of several related commands.
Syntax
encoding convertfrom <encoding_name> <string>
encoding convertto <encoding_name> <string>
encoding names
encoding system <encoding_name>
Description
The encoding commands work with the encoding of your character representations in the GUI:
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
environment
environment
Allows you to display or change the current dataset and region/signal environment.
Note
You can abbreviate this command as “env”, as shown in the Examples section, below.
Syntax
environment [-dataset | -nodataset] [<pathname> | -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.
• <pathname>
(optional) Specifies a new pathname for the region/signal environment.
If omitted the command displays the pathname of the current region/signal environment.
• -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
• Display the pathname of the current region/signal environment.
env
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
environment
Related Topics
Setting your Context by Navigating Source Files [Questa SIM GUI Reference Manual]
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
examine
examine
Examines one or more objects and displays current values (or the values at a specified previous
time) in the Transcript window.
Note
You can abbreviate the examine command as “exa”.
Syntax
examine <name>… [-delta <delta>] [-env <path>] [-event <time>] [-gui] [-handle] {[-in] [-out]
[-inout] | [-ports]} [-internal] [-expr <expression>] [-name] [-<radix_type>] [-radix
[<radix_type>][,<radix_flag>][,...]] [-radixenumnumeric | -radixenumsymbolic] [-showbase
| -noshowbase] [-time <time>] [-value]
Description
The examine command can also compute the value of an expression of one or more objects.
If you are optimizing the design with vopt, some of the objects listed below may not be
available for viewing. Refer to "Preservation of Object Visibility for Debugging" in the User’s
Manual for more information.
If you are using C Debug, examine can display the value of a C variable as well.
• VHDL — signals, shared variables, process variables, constants, generics, and FILE
objects
• Verilog — nets, registers, parameters, and variables
• C — variables
• SystemC — signals, FIFOs, ports, and member variables of modules
When stopped in C code, examine (with no arguments) displays the values of the local variables
and arguments of the current C function. Refer to “SystemC Object and Type Display” in the
User’s Manual for specific information related to viewing SystemC objects.
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 can also be examined within the GUI (actual signals are examined
in the kernel).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
examine
The examine command uses the following rules to locate an HDL object:
• If the name does not include a dataset name, then the current dataset is used.
• If the name does not start with a path separator, then the current context is used.
• 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.
• 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.
• If no objects of the specified name are 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, with the result that some objects that may be visible from a
given context will not be found when using wildcards if they are within a higher
enclosing scope.
• The wildcards '*' and '?' can be used at any level of a name, except in the dataset name
and inside of a slice specification.
• A wildcard character never matches a path separator. For example, /dut/* matches /dut/
siga and /dut/clk, while /dut* does not match either of those.
If you do not specify a radix with the examine command, the default radix and radix flags are
used.
• Set the default radix with the radix command or by editing the DefaultRadix variable in
the modelsim.ini file. Refer to DefaultRadix in the User’s Manual.
• Set the default radix flags value with the radix command or by editing the
DefaultRadixFlags variable in the modelsim.ini file. Refer to DefaultRadixFlags in the
User’s Manual.
• Specifying examine -<radix_type> returns the value of the object in the specified radix
and default radix flags value.
• Specifying examine -radix <radix_type> returns the value of the object in the specified
radix.
• Specifying examine -radix [<radix_type>][, [<radix_flag>] returns the value of the
object in the specified radix and radix flags.
• Specifying examine -radix <radix_flag>[,<radix_flag>] returns the value of the object in
the default radix and specified radix flags.
For example, assume a default of hexadecimal + showbase:
examine d
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
examine
# 16'h0009
examine -binary d
# 16'b0000000000001001
• -delta <delta>
(optional) Specifies a simulation cycle, at the specified time step, from which to fetch the
value. The default is 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.
<delta> — Any non-negative integer.
• -env <path>
(optional) Specifies a path in which to look for an object name.
<path> — The specified path to a object.
• -event <time>
(optional) Specifies a simulation cycle, at the specified event time, from which to fetch the
value. The event <time> 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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
examine
list, add wave, or log command, for the examine command to be able return a value for a
requested event.
• -expr <expression>
(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 is evaluated at the specified time. It is not
necessary to specify <name> when using this argument. See GUI_expression_format for the
format of the expression.
<expression> — Specifies an expression enclosed in braces ({}).
• -gui
Lets you examine one or more objects in the ModelSIM GUI. The GUI evaluates the
examine command when you provide the -gui argument.
• -handle
(optional) Returns the memory address of the specified <name>. 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 does not return any value if you are in -view mode.
• -in
(optional) Specifies that <name> include ports of mode IN.
• -out
(optional) Specifies that <name> include ports of mode OUT.
• -inout
(optional) Specifies that <name> include ports of mode INOUT.
• -internal
(optional) Specifies that <name> include internal (non-port) signals.
• -ports
(optional) Specifies that <name> 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.
The lecho command returns the output of an examine command in "pretty-print" format. For
example,
lecho [examine -name clk prw pstrb]
• -<radix_type>
(optional) Specifies the radix type for the objects that follow in the command. Retains the
current flag value for the objects that follow in the command. Valid entries (or any unique
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)