100% found this document useful (1 vote)
2K views1,198 pages

Questa Sim Ref

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views1,198 pages

Questa Sim Ref

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1198

Questa® SIM Command Reference

Manual
Questa® ADMS

Software Version 2021.1


Unpublished work. © Siemens 2021

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.

Support Center: support.sw.siemens.com


Send Feedback on Documentation: support.sw.siemens.com/doc_feedback_form
Table of Contents

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

Questa® SIM Command Reference Manual, v2021.1 3


Table of Contents

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

4 Questa® SIM Command Reference Manual, v2021.1


Table of Contents

classinfo implements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184


classinfo instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
classinfo interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
classinfo isa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
classinfo report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
classinfo stats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
classinfo trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
classinfo types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
compare add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
compare annotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
compare clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
compare configure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
compare continue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
compare delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
compare end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
compare info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
compare list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
compare options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
compare reload. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
compare reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
compare run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
compare savediffs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
compare saverules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
compare see . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
compare start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
compare stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
compare update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
configure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
coverage analyze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
coverage attribute. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
coverage clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
coverage configure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
coverage create. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
coverage edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
coverage exclude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
coverage goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
coverage loadtestassoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
coverage open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
coverage ranktest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
coverage report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
coverage save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
coverage tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
coverage testnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
coverage unlinked . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
coverage weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
dataset alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
dataset clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
dataset close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331

Questa® SIM Command Reference Manual, v2021.1 5


Table of Contents

dataset config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332


dataset current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
dataset info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
dataset list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
dataset open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
dataset rename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
dataset restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
dataset save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
dataset snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
describe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
disablebp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
disable_menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
disable_menuitem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
down. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
dumplog64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
echo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
enablebp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
enable_menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
enable_menuitem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
encoding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
examine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
fcover configure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
find connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
find drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
find infiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
find insource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
formatTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
fsm list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
fsm properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
fsm view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
gc configure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
gc run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
gdb dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
getactivecursortime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
getactivemarkertime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
jobspy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
lecho. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415

6 Questa® SIM Command Reference Manual, v2021.1


Table of Contents

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

Questa® SIM Command Reference Manual, v2021.1 7


Table of Contents

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

8 Questa® SIM Command Reference Manual, v2021.1


Table of Contents

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

Questa® SIM Command Reference Manual, v2021.1 9


Table of Contents

vcd dumpports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735


vcd dumpportsall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738
vcd dumpportsflush . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739
vcd dumpportslimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740
vcd dumpportsoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742
vcd dumpportson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
vcd file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744
vcd files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746
vcd flush. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749
vcd limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751
vcd off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753
vcd on. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754
vcd2wlf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756
vcom. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758
vcover attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785
vcover diff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790
vcover dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795
vcover history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
vcover merge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802
vcover parallelmerge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812
vcover ranktest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817
vcover remove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
vcover report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830
vcover stats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847
vcover testnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852
vdel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856
vdir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858
vencrypt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
verror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
vgencomp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869
vhencrypt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871
view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875
virtual count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879
virtual define . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880
virtual delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881
virtual describe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882
virtual expand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883
virtual function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884
virtual hide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888
virtual log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889
virtual nohide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891
virtual nolog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892
virtual region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 894
virtual save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895
virtual show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896
virtual signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897
virtual type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902
vlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904
vlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907

10 Questa® SIM Command Reference Manual, v2021.1


Table of Contents

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

Questa® SIM Command Reference Manual, v2021.1 11


Table of Contents

12 Questa® SIM Command Reference Manual, v2021.1


List of Figures

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

Questa® SIM Command Reference Manual, v2021.1 13


List of Figures

14 Questa® SIM Command Reference Manual, v2021.1


List of Tables

Table 1-1. Conventions for Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17


Table 1-2. Examples of Object Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 1-3. Wildcard Characters in HDL Object Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Table 1-4. WildcardFilter Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Table 1-5. WildcardFilter Argument Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Table 1-6. Keyboard Shortcuts for Command History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 1-7. VHDL Number Conventions: Style 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Table 1-8. VHDL Number Conventions: Style 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Table 1-9. Verilog Number Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 1-10. Constants Supported for GUI Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Table 1-11. Array Constants Supported for GUI Expressions . . . . . . . . . . . . . . . . . . . . . . . 42
Table 1-12. Variables Supported for GUI Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Table 1-13. Array Variables Supported for GUI Expressions . . . . . . . . . . . . . . . . . . . . . . . 43
Table 1-14. Operators Supported for GUI Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Table 1-15. Precedence of GUI Expression Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Table 1-16. Casting Conversions Supported for GUI Expressions . . . . . . . . . . . . . . . . . . . 46
Table 1-17. VHDL Logic Values Used in GUI Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Table 1-18. Verilog Logic Values Used in GUI Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Table 2-1. Supported Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Table 2-2. Message Viewer Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Table 2-3. Comparing Reference Objects to Test Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Table 2-4. Order and Type of Ranked Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Table 2-5. Radix flag Arguments to the Examine Command . . . . . . . . . . . . . . . . . . . . . . . . 369
Table 3-1. Supported Commands N-Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
Table 3-2. Supported Options — Dynamic Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
Table 3-3. profile summary Header Rules for Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
Table 3-4. Default File Extensions and Associated Types and Languages . . . . . . . . . . . . . 541
Table 3-5. runStatus Command States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
Table 3-6. runStatus -full Command Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
Table 3-7. Field Arguments for Window Searches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
Table 3-8. Output Fields for tcheck_status Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
Table 3-9. Alias for Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
Table 3-10. Warning Message Categories for vcom -nowarn . . . . . . . . . . . . . . . . . . . . . . . 776
Table 3-11. Order and Type of Ranked Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817
Table 3-12. Design Unit Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859
Table 3-13. Warning Message Categories for vlog -nowarn . . . . . . . . . . . . . . . . . . . . . . . . 932
Table 3-14. Warning Message Categories for vopt -nowarn . . . . . . . . . . . . . . . . . . . . . . . . 992
Table 3-15. Wave Window Commands for Cursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1126
Table 3-16. Wave Window Commands for Expanded Time Display . . . . . . . . . . . . . . . . . 1127
Table 3-17. Wave Window Commands for Controlling Display . . . . . . . . . . . . . . . . . . . . . 1128

Questa® SIM Command Reference Manual, v2021.1 15


List of Tables

Table 3-18. Wave Window Commands for Zooming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1129


Table 3-19. when_condition_expression Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1152

16 Questa® SIM Command Reference Manual, v2021.1


Chapter 1
Syntax and Conventions

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

Table 1-1. Conventions for Command Syntax


Syntax notation Description
< > angled brackets surrounding a syntax item indicate a
user-defined argument; do not enter the brackets in
commands
[ ] square brackets generally indicate an optional item; if
the brackets surround several words, all must be entered
as a group; the brackets are not entered1
{ } braces indicate that the enclosed expression contains one
or more spaces yet should be treated as a single
argument, or that the expression contains square brackets
for an index; for either situation, the braces are entered

Questa® SIM Command Reference Manual, v2021.1 17

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

Table 1-1. Conventions for Command Syntax (cont.)


Syntax notation Description
… an ellipsis indicates items that may appear more than
once; the ellipsis itself does not appear in commands
| the vertical bar indicates a choice between items on
either side of it; do not include the bar in the command
monospaced type monospaced type is used in command examples
# comments included with commands are preceded by the
number sign (#), which you can use to add comments to
DO files (macros)
1. One exception to this rule is when you are using Verilog syntax to designate an array
slice. For example: add wave {vector1[4:0]}. The square brackets in this case denote an
index. The braces prevent the Tcl interpreter from treating the text within the square
brackets as a Tcl command.

Note
Command examples do not show either the prompt at the beginning of a line nor the
<Enter> keystroke at the end of a line.

File and Directory Pathnames


Several Questa SIM commands have arguments that specify file or directory locations
(pathnames). For example, the -y argument to the vlog command specifies the Verilog source
library directory to search for undefined modules.
Spaces in file pathnames must be escaped or the entire path must be enclosed in quotation
marks. For example:

vlog top.v -y C:/Documents\ and\ Settings/projects/dut

or

vlog top.v -y "C:/Documents and Settings/projects/dut"

18 Questa® SIM Command Reference Manual, v2021.1

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

Design Object Names


Design objects are organized hierarchically, where various objects creates a new level in the
hierarchy.
• VHDL — component instantiation statement, block statement, and package
• Verilog — module instantiation, named fork, named begin, task and function
• SystemVerilog — class, package, program, and interface
• SystemC — module instantiation
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

Object Name Syntax


To specify object names in Questa SIM, you use the following syntax:
[<dataset_name><datasetSeparator>][<pathSeparator>][<hierarchicalPath>]
<objectName>[<elementSelection>]

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

Questa® SIM Command Reference Manual, v2021.1 19

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.

Tcl Syntax and Specification of Array Bits and


Slices
Because Questa SIM is based on the Tcl scripting language, you must surround objects and
signals with braces ( {} ) when specifying array bits or slices with parentheses ( () ), spaces, or
square brackets ( [] ).
For example:

toggle add {data[3:0]}


toggle add {data(3 to 0)}
force {bus1[1]} 1

20 Questa® SIM Command Reference Manual, v2021.1

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:

set aluinputs [find -in alu/*]

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:

add wave {/s/abc/data_in[10:1]}

You must also use the escape characters if using VHDL syntax with spaces:

add wave {/s/abc/data_in(10 downto 1)}

Refer to Tcl Command Syntax in the User’s Manual for more information.

SystemC Class, Structure, and Union Member


Specification
You can specify members of SystemC structures and classes using HDL record syntax.
The syntax for specifying members of a base class using Questa SIM is different than C++. In
C++, it is not necessary to specify the base class:

<instance>.<base_member>

However, in Questa SIM you must include the name of the base class according to the
following:

<instance>.<base>.<base_member>

Example 1-1. Base- and Descendant-Class Specification

The following example shows a base class and a descendant class:

class dog
{
private:
int value;
};

Questa® SIM Command Reference Manual, v2021.1 21

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

class beagle : public dog


{
private:
int value;
dog d;
};

You have an sc_signal<> of type beagle somewhere in your code:

sc_signal<beagle> spot;

Legal names for viewing this signal are:

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

To examine the member value of member d, you would type:

exa spot.d.value

To examine the member value, you would type:

exa spot.value

SystemVerilog Scope Resolution Operator


SystemVerilog offers the scope resolution operator, double colon ( :: ), for accessing classes
within a package and static data within a class. The example below shows various methods of
using this operator as well as alternatives using standard hierarchical references.

22 Questa® SIM Command Reference Manual, v2021.1

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

Example 1-2. SystemVerilog Scope Resolution Operator Example

package myPackage;
class packet;
static int a[0:1] = {1, 2};
int b[0:1];
int c;

function new;
b[0] = 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

Return the contents of the instance-specific array b.

examine /top/my.b(0)

Return the contents of the first element of the instance-specific array b.

When referring to the contents of a package or class, you cannot use the standard path
separators, a period ( . ) or a forward slash ( / ).

Questa® SIM Command Reference Manual, v2021.1 23

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.

24 Questa® SIM Command Reference Manual, v2021.1

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

When you issue the command:

examine n

the transcript returns:

However, when you issue the command:

stack up;examine n

the transcript returns:

Table 1-2 contains examples of various ways of specifying object names.


Table 1-2. Examples of Object Names
Object Name Description
clk specifies the object clk in the current context
/top/clk specifies the object clk in the top-level design unit.
/top/block1/u2/clk specifies the object clk , two levels down from the top-
level design unit
block1/u2/clk specifies the object clk, two levels down from the current
context
array_sig[4] specifies an index of an array object

Questa® SIM Command Reference Manual, v2021.1 25

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

Table 1-2. Examples of Object Names (cont.)


Object Name Description
{array_sig(1 to 10)} specifies a slice of an array object in VHDLor SystemC;
see Tcl Syntax and Specification of Array Bits and Slices
for more information
{mysignal[31:0]} specifies a slice of an array object in Verilogor SystemC;
see Tcl Syntax and Specification of Array Bits and Slices
for more information
record_sig.field specifies a field of a record, a C++ class or structure
member, or a C++ base class
“/u_top/ specifies an object where the Verilog hierarchy contains
u_sym_wrapper/\ escape characters by using quotations.
sym_row[0]”

Environment Variables and Pathnames


You can substitute environment variables for pathnames in any argument that requires a
pathname.
For example:

vlog -v $lib_path/und1

Assuming you have defined $lib_path on your system, vlog will locate the source library file
und1 and search it for undefined modules. Refer to Environment Variables in the User’s Manual
for more information.

Name Case Sensitivity


Name case sensitivity is different for VHDL and Verilog. VHDL names are not case-sensitive
except for extended identifiers in VHDL 1076-1993 or later. In contrast, all Verilog names are
case-sensitive.
Names in Questa SIM commands are case-sensitive when matched against case-sensitive
identifiers; otherwise, they are not case-sensitive.

SystemC names are case-sensitive.

Extended Identifiers
The following are supported formats for extended identifiers for any command that takes an
identifier.

26 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 27

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

28 Questa® SIM Command Reference Manual, v2021.1

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

WildcardSizeThreshold andWildcardSizeThresholdVerbose in the User’s Manual for


more information.
You can alter these exclusions with the WildcardFilter preference variable. Refer to the section
“Using the WildcardFilter Preference Variable” for more information.

Table 1-3 identifies these supported wildcard characters.


Table 1-3. Wildcard Characters in HDL Object Names
Character Syntax Description
* matches any sequence of characters
? matches any single character
[] matches any one of the enclosed
characters; a hyphen can be used to
specify a range (for example, a-z, A-Z, 0-
9); can be used only with the find
command

Note
A wildcard character does not match a path separator. For example, /dut/* will match /dut/
siga and /dut/clk. However, /dut* will not match either of those.

Using the WildcardFilter Preference Variable


The WildcardFilter preference variable controls which object types are excluded when
performing wildcard matches with simulator commands. The WildcardFilter preference
variable is a Tcl List and can be modified using Tcl commands.
The default object types are defined with the WildcardFilter modelsim.ini variable and load at
each invocation of the simulator. (Refer to WildcardFilter in the User’s Manual for more
information.) You can add both individual (Table 1-4) and group objects (Table 1-5) to the
current variable list, and you can remove individual objects from the current list.

Determining the Current WildcardFilter Variable Settings


Enter one of the following commands:

set WildcardFilter

or

echo $WildcardFilter

which returns the list of currently set variables.

Questa® SIM Command Reference Manual, v2021.1 29

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

Changing the WildcardFilter Settings from the Command Line


Refer to the list of WildcardFilter arguments in Table 1-4 and Table 1-5 to determine what you
want to include in the wildcard matches.

• To define a new list of values enter the following command:


set WildcardFilter “<arg1 arg2 ...>”

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:

set WildcardFilter default

Changing the WildcardFilter settings from the GUI


1. Choose Tools > Wildcard Filter from the main menu.
2. Select the individual Filters you want to exclude from wildcard searches (Table 1-4
describes each option), or select Composite Filters to activate related filters (Table 1-5
describes each composite option).
3. Click OK.
Refer to the Tcl man pages (Help > Tcl Man Pages) for more information about the lsearch and
set commands.

Changing the default WildcardFilter settings


1. Open the modelsim.ini file for editing (refer to Making Changes to the modelsim.ini File
in the User’s Manual).
2. Select the individual Filters you want to exclude from wildcard searches (Table 1-4
describes each option), or select Composite Filters to activate related filters (Table 1-5
describes each composite option).
3. Edit the WildcardFilter variable
4. Save the modelsim.ini file to your working directory.
WildcardFilter Argument Descriptions
Table 1-4 provides a list of the WildcardFilter arguments.

30 Questa® SIM Command Reference Manual, v2021.1

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

Table 1-4. WildcardFilter Arguments


Argument Description
Alias VHDL Alias
Assertion Concurrent SystemVerilog or PSL assertion
CellInternal Signals in cells, where a cell is defined as 1) a module within a
‘celldefine 2) a Verilog module found with a library search (using
either vlog -v or vlog -y) and compiled with vlog +libcell or 3) a
module containing a specify block
Class Verilog class declaration
ClassReference SystemVerilog class reference
Compare Waveform comparison signal
Constant VHDL constant
Cover SystemVerilog or PSL cover statements
Covergroup SystemVerilog or PSL covergroup
Coverpoint Verilog coverpoint
Cross Verilog cross
Endpoint SystemVerilog assertion objects created for sequences on which
the method “ended/triggered” is used.
PSL assertion objects created for sequences for which the built in
function “ended()” is used.
Generic VHDL generic
ImmediateAssert VHDL immediate assertions
Integer VHDL integer
Memory Verilog memories
NamedEvent Verilog named event
Net Verilog net
Parameter Verilog parameter
Real Verilog real registers
Reg Verilog register
ScVariable SystemC variable
Signal VHDL signal
SpecParam Verilog specparam
Time Verilog time registers

Questa® SIM Command Reference Manual, v2021.1 31

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

Table 1-4. WildcardFilter Arguments (cont.)


Argument Description
Transaction Transaction stream and stream arrays
Variable VHDL shared variables in packages and design units.
VHDLFile VHDL files
VirtualExpr Virtual expression
VirtualSignal Virtual signal
Table 1-5 provides a list of the group aliases of WildcardFilter arguments. You can set a group
value with the set command. The expanded list of values is returned.
Table 1-5. WildcardFilter Argument Groups
Group Argument Specific arguments included
AllVHDL Architecture, Block, Generate, Package, Foreign, Process,
Signal, Variable, Constant, Generic, Alias, Subprogram,
VHDLFile
AllVerilogVars Parameter, Reg, Integer, Time, Real, SpecParam, Memory,
NamedEvent, ClassReference
AllVerilog Net, Parameter, Reg, Integer, Time, Real, SpecParam,
Memory, NamedEvent, Class, Cross, Covergroup,
Coverpoint, ClassReference
VirtualSignals VirtualSignal, VirtualExpr
SystemC ScVariable
AllHDLSignals Signal, Variable, Constant, Generic, Alias, Net, Parameter,
Reg, Integer, Time, Real, SpecParam, Memory,
NamedEvent, VirtualSignal, VirtualExpr, ClassReference
AllVariables Variable, Constant, Generic, Alias, Parameter, Reg, Integer,
Time, Real, SpecParam, Memory, NamedEvent,
ClassReference
AllHDLSignalsVars Signal, Variable, Constant, Generic, Alias, Net, Parameter,
Reg, Integer, Time, Real, SpecParam, Memory,
NamedEvent, VirtualSignal, VirtualExpr, ClassReference
AllSignals Signal, Net, Parameter, Reg, Integer, Time, Real,
SpecParam, Memory, NamedEvent, VirtualSignal,
VirtualExpr, Endpoint, ClassReference
AllSignalsVars Signal, Variable, Constant, Generic, Alias, Net, Parameter,
Reg, Integer, Time, Real, SpecParam, Memory,
NamedEvent, VirtualSignal, VirtualExpr, Endpoint,
ScVariable, ClassReference
AllConstants Constant, Generic, Parameter, SpecParam

32 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Simulator Variables

Table 1-5. WildcardFilter Argument Groups (cont.)


Group Argument Specific arguments included
Default Variable, Constant, Generic, Parameter, SpecParam,
Memory, Assertion, Cover, Endpoint, ScVariable,
CellInternal, ImmediateAssert VHDLFile

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.

Simulation Time Units


You can specify the time unit for delays in all simulator commands that have time arguments.
For example:

force clk 1 50 ns, 1 100 ns -repeat 1 us


run 2 ms

Note that 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.

Questa® SIM Command Reference Manual, v2021.1 33

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.

The syntax of -optionset is:

<command> -optionset <optionset_name>

Example 1-3. Defining and Calling Optionsets

Given the modelsim.ini file contents:

[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):

vlog -optionset VLOGUVM top.sv


vsim -optionset debugall mytop

which would expand to:

vlog -vopt +incdir+/home/usern/libs/uvm-1.1b/src


vsim -classdebug -assertdebug -uvmcontrol=all -msgmode both

34 Questa® SIM Command Reference Manual, v2021.1

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.

• Single Quotes (‘ ’) — Allows you to group arbitrary characters so that no character


substitution occurs within the quotes, such as environment variable expansion or
escaped characters.
+acc=rn+'\mymodule'

//does not treat the '\' as an escape character

• Quotation marks (“ ”) — Allows you to group arbitrary characters so that Tcl-style


backslash substitution and environment variable expansion is performed.
+acc=rn+"\\mymodule\\$VAR"

// escapes the path separators (\) and substitues

// your value of '$VAR'

• 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

// the leading '\' is considered an escape character

Questa® SIM Command Reference Manual, v2021.1 35

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Command Shortcuts

o Environment variable expansion — Any unquoted environment variable, such as


$envname, will be expanded. You can also use curly braces ( { } ) in your
environment variable, such as ${envname}.
+acc=rn\\$MODULE

// the leading '\' is considered an escape character and the

// variable $MODULE is expanded

• 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

36 Questa® SIM Command Reference Manual, v2021.1

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

Command History Shortcuts


You can review simulator command history or rerun previous commands by using keyboard
shortcuts at the Questa SIM/VSIM prompt.
Table 1-6 contains a list of these shortcuts.
Table 1-6. Keyboard Shortcuts for Command History
Shortcut Description
!! repeats the last command
!n repeats command number n; n is the VSIM prompt
number (for example, for this prompt: VSIM 12>, n
=12)
!<string> shows a list of executed commands that start with
<string>; Use the up and down arrows to choose from
the list
!abc repeats the most recent command starting with "abc"
^xyz^ab^ replaces "xyz" in the last command with "ab"
up arrow and down scrolls through the command history
arrow keys
Ctrl-N (UNIX only) scroll to the next command
Ctrl-P (UNIX only scroll to the previous command
click prompt left-click a previous Questa SIM or VSIM prompt in the
transcript to copy the command typed at that prompt to
the active cursor
his or history shows the last few commands (up to 50 are kept)

Questa® SIM Command Reference Manual, v2021.1 37

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 Numbering Conventions


There are two types of VHDL number styles:

VHDL Style 1
[ - ] [ radix # ] value [ # ]

Table 1-7. VHDL Number Conventions: Style 1


Element Description
- indicates a negative number; optional
radix can be any base in the range 2 through 16 (2, 8, 10, or 16); by default,
numbers are assumed to be decimal; optional
value specifies the numeric value, expressed in the specified radix; required
# is a delimiter between the radix and the value; the first # sign is required if
a radix is used, the second is always optional

A 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"

Table 1-8. VHDL Number Conventions: Style 2


Element Description
base specifies the base; binary: B, octal: O, hex: X; required

38 Questa® SIM Command Reference Manual, v2021.1

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

Table 1-8. VHDL Number Conventions: Style 2 (cont.)


Element Description
"value" specifies digits in the appropriate base with optional underscore
separators; default is decimal; required
For example:

B"11111110"
X"FFca23"

Searching for VHDL Arrays in the Wave and List Windows


Searching for signal values in the Wave or List window may not work correctly for VHDL
arrays if the target value is in decimal notation. You may get an error that the value is of
incompatible type. Since VHDL does not have a radix indicator for decimal, the target value
may get misinterpreted as a scalar value. Prefixing the value with the Verilog notation 'd should
eliminate the problem, even if the signal is VHDL.

Verilog Numbering Conventions


Verilog numbers are expressed in the style:
[ - ] [ size ] [ base ] value

Table 1-9. Verilog Number Conventions


Element Description
- indicates a negative number; optional
size the number of bits in the number; optional
base specifies the base; binary: ‘b or ‘B, octal: ‘o or ‘O, decimal: ‘d or ‘D, hex: ‘h
or ‘H; optional
value specifies digits in the appropriate base with optional underscore separators;
default is decimal; required

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

Questa® SIM Command Reference Manual, v2021.1 39

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:

compare add examine


compare clock searchlog
compare configure virtual function
configure virtual signal
down, left, right, up.

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

40 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax

UNSIGNED by the expression evaluator; to cause it to be treated as SIGNED, use casting as


described below. Numeric operations supported on arrays are performed by the expression
evaluator via Questa SIM’s built-in numeric_standard (and similar) package routines. The
expression evaluator selects the appropriate numeric routine based on SIGNED or UNSIGNED
properties of the array arguments and the result.

The enumeration types supported are any VHDL enumerated type. Enumeration literals may be
used in the expression as long as some variable of that enumeration type is referenced in the
expression. This is useful for sub-expressions of the form:

(/memory/state == reading)

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.

Macro syntax is:

$<name>

Substitutes the string value of the Tcl global variable <name>.

Constants
Table 1-10. Constants Supported for GUI Expressions
Type Values
boolean value true false TRUE FALSE
integer [0-9]+

Questa® SIM Command Reference Manual, v2021.1 41

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax

Table 1-10. Constants Supported for GUI Expressions (cont.)


Type Values
real number <int>|([<int>].<int>[exp]) where the optional [exp] is: (e|E)[+|-][0-
9]+
time integer or real optionally followed by time unit
enumeration VHDL user-defined enumeration literal
single bit constants expressed as any of the following:
0 1 x X z Z U H L W ’U’ ’X’ ’0’ ’1’ ’Z’ ’W’ ’L’ ’H’ ’-’ 1’b0 1’b1

Array Constants, Expressed in Any of the Following Formats


Table 1-11. Array Constants Supported for GUI Expressions
Type Values
VHDL # notation <int>#<alphanum>[#]
Example: 16#abc123#
VHDL bitstring "(U|X|0|1|Z|W|L|H|-)*"
Example: "11010X11"
Verilog notation [-][<int>]’(b|B|o|O|d|D|h|H) <alphanum>
(where <alphanum> includes 0-9, a-f, A-F, and ’-’)
Example: 12’hc91 (This is the preferred notation because it removes the
ambiguity about the number of bits.)
Based notation 0x…, 0X…, 0o…, 0O…, 0b…, OB…
Questa SIM automatically zero fills unspecified upper bits.

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)

42 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax

Table 1-12. Variables Supported for GUI Expressions (cont.)


Variable Type
NOW Returns the value of time at the current location in the WLF file as the
WLF file is being scanned (not the most recent simulation time).

Array variables
Table 1-13. Array Variables Supported for GUI 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

Questa® SIM Command Reference Manual, v2021.1 43

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax

Table 1-14. Operators Supported for GUI Expressions (cont.)


Operator Description Kind
- arithmetic subtract arithmetic
& concat arithmetic
<name>'delayed(<time>) delayed signal (<time>) attributes
<name>'falling Falling edge attributes
<name>'rising Rising edge attributes
<name>'event Value change attributes
<name>'hasX Value has an X attributes
and, AND bitwise and bitwise logical
nand, NAND bitwise nand bitwise logical
nor, NOR bitwise nor bitwise logical
or, OR bitwise or bitwise logical
xnor, XNOR bitwise xnor bitwise logical
xor, XOR bitwise xor bitwise logical
rol, ROL rotate left bitwise logical
ror, ROR rotate right bitwise logical
sla, SLA shift left arithmetic bitwise logical
sll, SLL shift left logical bitwise logical
sra, SRA shift right arithmetic bitwise logical
srl, SRL shift right logical bitwise logical
not, NOT, ~ unary bitwise inversion bitwise logical
&& boolean and boolean
! boolean not boolean
|| boolean or boolean
== equal boolean
=== exact equal1 boolean
!== exact not equal boolean
> greater than boolean
>= greater than or equal boolean
< less than boolean

44 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Syntax and Conventions
Expression Syntax

Table 1-14. Operators Supported for GUI Expressions (cont.)


Operator Description Kind
<= less than or equal boolean
!=, /= not equal boolean
&<vector_expr> AND reduction reduction
|<vector_expr> OR reduction reduction
^<vector_expr> XOR reduction reduction
1. This operator is allowed to be compatible with other simulators.

Table 1-15. Precedence of GUI Expression Operators


Operator Kind
delayed(), 'falling, 'rising, 'event, 'hasX attributes
&, |, ^ unary
!, not, NOT, ~ boolean
/, mod, MOD, *, rem, REM arithmetic
nand, NAND, nor, NOR bitwise logical
and, AND bitwise logical
xor, XOR, xnor, XNOR bitwise logical
or, OR bitwise logical
+, - arithmetic
& concat
rol, ROL, ror, ROR, sla, SLA, sll, SLL, sra, SRA, srl, SRL bitwise logical
>, >=, <, <= boolean
==, ===, !==, !=, /= boolean
&& boolean
|| boolean

Note
Arithmetic operators use the std_logic_arith package.

Questa® SIM Command Reference Manual, v2021.1 45

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

Examples of Expression Syntax


/top/bus & $bit_mask

This expression takes the bitwise AND function of signal /top/bus and the array constant
contained in the global Tcl variable bit_mask.

clk’event && (/top/xyz == 16’hffae)

This expression evaluates to a boolean true when signal clk changes and signal /top/xyz is equal
to hex ffae; otherwise is false.

clk’rising && (mystate == reading) && (/top/u3/addr == 32’habcd1234)

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.

(/top/u3/addr and 32’hff000000) == 32’hac000000

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)

This expression returns /top/signalA delayed by 10 ns.

/top/signalA'delayed(10 ns) && /top/signalB

46 Questa® SIM Command Reference Manual, v2021.1

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.

virtual function { (#-10 /top/signalA) && /top/signalB}


mySignalB_AND_DelayedSignalA

This evaluates /top/signalA at 10 simulation time steps before the current time, and takes the
logical AND of the result with the current value of /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.

searchlog -expr {dbus'hasX} {0 ns} dbus

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.

Signal and Subelement Naming Conventions


Questa SIM supports naming conventions for VHDL and Verilog signal pathnames, VHDL
array indexing, Verilog bit selection, VHDL subrange specification, and Verilog part selection.
All supported naming conventions for VHDL and Verilog are valid for SystemC designs.

Examples in Verilog and VHDL syntax:

top.chip.vlogsig
/top/chip/vhdlsig
vlogsig[3]
vhdlsig(9)
vlogsig[5:2]
vhdlsig(5 downto 2)

Grouping and Precedence


Operator precedence generally follows that of the C language, but liberal use of parentheses is
recommended.

Concatenation of Signals or Subelements


Elements in the concatenation that are arrays are expanded so that each element in the array
becomes a top-level element of the concatenation. But for elements in the concatenation that are
records, the entire record becomes one top-level element in the result.

Questa® SIM Command Reference Manual, v2021.1 47

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.

Concatenation Syntax for VHDL


<signalOrSliceName1> & <signalOrSliceName2> & ...

Concatenation Syntax for Verilog


&{<signalOrSliceName1>, <signalOrSliceName2>, ... }
&{<count>{<signalOrSliceName1>}, <signalOrSliceName2>, ... }

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_range 31:0)<concatenationExpr> # Verilog syntax


(concat_range (31:0))<concatenationExpr> # Also Verilog syntax
(concat_range (31 downto 0))<concatenationExpr> # VHDL syntax

The concat_range directive completely specifies the index range.

(concat_ascending) <concatenationExpr>

The concat_ascending directive specifies that the index start at zero and increment upwards.

(concat_flatten) <concatenationExpr>

The concat_flatten directive flattens the signal structure hierarchy.

(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

48 Questa® SIM Command Reference Manual, v2021.1

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>

The concat_sort_wild_ascending directive gathers signals by name in ascending order (the


default is descending).

(concat_reverse) <concatenationExpr>

The concat_reverse directive reverses the bits of the concatenated signals.

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.)

(concat_range 13:4)&{ "mybusbasename*" }

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.

(concat_reverse)(bus1 & bus2)

Specifies that the bits of bus1 and bus2 be reversed in the output virtual signal.

Record Field Members


Arbitrarily-nested arrays and records are supported, but operators will only operate on one field
at a time. That is, the expression {a == b} where a and b are records with multiple fields, is not
supported.

Questa® SIM Command Reference Manual, v2021.1 49

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 would have to be expressed as:

{(a.f1 == b.f1) && (a.f2 == b.f2) ...}

Examples:

vhdlsig.field1
vhdlsig.field1.subfield1
vhdlsig.(5).field3
vhdlsig.field4(3 downto 0)

Searching for Binary Signal Values in the GUI


When you use the GUI to search for signal values displayed in 4-state binary radix, you should
be aware of how Questa SIM maps between binary radix and std_logic. The issue arises because
there is no “un-initialized” value in binary, while there is in std_logic. So, Questa SIM relies on
mapping tables to determine whether a match occurs between the displayed binary signal value
and the underlying std_logic value.
This matching algorithm applies only to searching using the GUI. It does not apply to VHDL or
Verilog test benches.

For comparing VHDL std_logic/std_ulogic objects, 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.

50 Questa® SIM Command Reference Manual, v2021.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

Table 1-18. Verilog Logic Values Used in GUI Search


Search Matches as follows:
Entry
0 1 Z X
0 1 0 0 2
1 0 1 0 2
Z 0 0 1 2
X 2 2 2 1

This table also applies to SystemC types: sc_bit, sc_bv, sc_logic, sc_int, sc_uint, sc_bigint,
sc_biguint.

Questa® SIM Command Reference Manual, v2021.1 51

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

52 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 53

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
add message This command is used within a DO file or script Y Y
and specifies a user defined runtime message that
is sent to the transcript and .wlffiles. Messages are
displayed in the Message Viewer window in the
GUI. Refer to “Message Viewer Window for
information.
add schematic This command adds the specified process, signal, N N
net, or register to the Incremental or Full view of
the Schematic window. Wildcards are allowed.
add testbrowser This command adds .ucdb file(s) to the test N N
management browser.
add watch This command adds signals and variables to the N N
Watch window in the Main window.
add wave This command adds the following objects to the Y Y
Wave window:
add_cmdhelp This command adds the specified command name, N Y
description, and command arguments to the
command-line help. You can then access the
information using the help command.
add_menu This command adds a menu to the menu bar of the N N
specified window, using the specified menu name.
Use the add_menuitem, add_separator,
add_menucb, and add_submenu commands to
complete the menu.
add_menucb This command creates a checkbox within the N N
specified menu of the specified window. A
checkbox is a small box with a label. Clicking on
the box will toggle the state, from on to off or the
reverse.
add_menuitem This command creates a menu item within the N N
specified menu of the specified window. May be
used within a submenu.
add_separator This command adds a separator as the next item in N N
the specified menu path in the specified window.
add_submenu This command creates a cascading submenu within N N
the specified menu path of the specified window.
May be used within a submenu.

54 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
alias This command displays or creates user-defined Y Y
aliases. Any arguments passed on invocation of the
alias will be passed through to the specified
commands.
archive load The archive load command allows you to load an N N
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.
archive write The archive write command allows you to create a N N
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. With this archived file,
you can perform post-simulation debugging in
different location from that which the original
simulation was run.
assertion action This command allows you to set the assertion Y Y
action for concurrent assertion starts, failures,
passes, and antecedent matches. The actions can
be: continue, break, exit, or a tcl subroutine call.
assertion active This command instructs the simulator to report on Y Y
any active assertion directives at the end of
simulation (EOS). Active assertion directives will
be 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 will
report both the usual "active at end of simulation"
note along with a PSL strong error message.
assertion count This command returns the sum of the assertion Y Y
failure counts for the specified set of assertion
directive instances. Returns a "No matches"
warning if the given path does not contain any
assertions.
assertion enable This command enables and disables assertions and Y Y
cover directives.
assertion fail This command configures simulator behavior in Y Y
response to a SystemVerilog or PSL assertion
failure.

Questa® SIM Command Reference Manual, v2021.1 55

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
assertion pass This command configures simulator behavior in Y Y
response to a SystemVerilog or PSL assertion pass.
assertion profile This command generates a fine grained profile of Y Y
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.
assertion report This command generates a status report for each Y Y
SystemVerilog or PSL assertion matching the path
specification.
atv log This command enables or disables assertion thread Y Y
viewing (ATV) for the specified assertion.
Multiple assertions may be specified by their
pathnames.
batch_mode This command returns “1” if Questa SIM is Y Y
operating in batch mode, otherwise it returns “0.”
It is typically used as a condition in an if statement.
bd This command deletes a breakpoint. You can Y Y
delete multiple breakpoints by specifying separate
information groupings on the same command line.
bookmark add wave This command creates a named reference to a N N
specific zoom range and scroll position in the
specified Wave window. Bookmarks are saved in
the wave format file and are restored when the
format file is read.
bookmark delete wave This command deletes bookmarks from the N N
specified Wave window.
bookmark goto wave This command zooms and scrolls a Wave window N N
using the specified bookmark.
bookmark list wave This command displays a list of available N N
bookmarks in the Transcript window.
bp This command sets either a file-line breakpoint or Y Y
returns a list of currently set breakpoints. It allows
enum names, as well as literal values, to be used in
condition expressions.
call This command calls the following types of Y Y
functions/tasks.

56 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
cd This command changes the Questa SIM local Y Y
directory to the specified directory.
cdbg This command provides command-line equivalents N Y
of the menu options that are available for C Debug.
change This command modifies the value of a: VHDL Y Y
constant, generic, or variable;Verilog register or
variable; or C variable if running C Debug.
change_menu_cmd This command changes the command to be N N
executed for a specified menu item label, in the
specified menu, in the specified window.
check contention add This command enables contention checking for the Y Y
specified nodes.
check contention config This command allows you to write checking Y Y
messages to a file. By default, any messages
display on your screen.
check contention off This command disables contention checking for Y Y
the specified nodes.
check float add This command enables float checking for the Y Y
specified nodes.
check float config This command allows you to write checking Y Y
messages to a file (messages display on your
screen by default). You may also configure the
float time limit.
check float off This command disables float checking for the Y Y
specified nodes.
check stable off This command disables stability checking. Y Y
check stable on This command enables stability checking on the Y Y
entire design.
checkpoint This command saves the state of your simulation, Y Y
including:
classinfo ancestry This command returns class inheritance hierarchy Y Y
for a named class type.
classinfo descriptive This command returns the descriptive class name Y Y
for the specified authoritative class name.
classinfo find This command reports on the current state of a Y Y
specified class instance, whether it exists, has not
yet been created, or has been destroyed.

Questa® SIM Command Reference Manual, v2021.1 57

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
classinfo implements This command displays a list of which classes Y Y
implement SystemVerilog interface classes. The
type of the class argument affect the contents of
this list.
classinfo instances This command reports the list of existing class Y Y
instances of a specific class type. You can use this
to determine what class instances to log or
examine. It can also help in debugging problems
where class instances are not being cleaned up as
they should be resulting in excessive memory
usage.
classinfo interfaces This command lists the interface class types that Y Y
match or do not match a specified pattern. Finds all
interface classes that match a regular expression
and determines the full path of interface class
types.
classinfo isa This command returns to the transcript a list of all Y Y
classes extended from the specified class type.
classinfo report This command prints detailed reports on class Y Y
instance usage. The command displays columns
for class type names and their current, peak and
total class instance counts. The columns may be
arranged, sorted, or eliminated using the command
arguments.
classinfo stats This command prints statistics about the total Y Y
number of class types and total, peak, and current
class instance counts during the simulation.
classinfo trace This command displays the active references to the Y Y
specified class instance. This is very 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 may lead to uncovering bugs in
managing these class references which often lead
to large memory savings.
classinfo types This command lists the class types that match or do Y Y
not match a specified pattern. Finds all classes that
match a regular expression and determines the full
path of class types.

58 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
compare add This command creates an object that is a N Y
comparison between signals in a reference design
against 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. Constant
signals such as parameters and generics are
ignored.
compare annotate This command either flags a comparison N Y
difference as "ignore" or adds a text string
annotation to the difference. The text string
appears when the difference is viewed in info
popups or in the output of a compare info
command.
compare clock This command defines a clock that can then be N Y
used for clocked-mode comparisons. In
clocked-mode comparisons, signals are sampled
and compared only at or just after an edge on some
signal.
compare configure This command modifies options for compare N Y
signals and regions. The modified options are
applied to all objects in the specified compare path.
compare continue This command is used to continue with N Y
comparison difference computations that were
suspended using the compare stop button or
Control-C. If the comparison was not suspended,
compare continue has no effect.
compare delete This command deletes a comparison object from N Y
the currently open comparison.
compare end This command closes the active comparison N Y
without saving any information.
compare info This command lists the results of the comparison N Y
in the Main window transcript. To save the
information to a file, use the -write argument.
compare list Displays in the Transcript window a list of all the N Y
compare add commands currently in effect.
compare options This command sets defaults for various waveform N Y
comparison commands. Those defaults are used
when other compare commands are invoked during
the current session. To set defaults permanently,
edit the appropriate PrefCompare() Tcl variable.

Questa® SIM Command Reference Manual, v2021.1 59

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
compare reload This command reloads comparison differences to N Y
allow their viewing without recomputation. Prior
to invoking compare reload, you must open the
relevant datasets with the same names that were
used during the original comparison.
compare reset This command clears the current compare N Y
differences, allowing another compare run
command to be executed. Does not modify any of
the compare options or any of the signals selected
for comparison. This allows you to re-run the
comparison with different options or with a
modified signal list.
compare run This command runs the difference computation on N Y
the signals selected via a compare add command.
Reports in the Transcript window the total number
of errors found.
compare savediffs This command saves the comparison results to a N Y
file for later reloading. To be able to reload the file,
you must also save the comparison setup using the
compare saverules command.
compare saverules This command saves the comparison setup N Y
information (or "rules") to a file that can be re-
executed later. The command saves compare
options, clock definitions, and region and signal
selections.
compare see This command displays the specified comparison N Y
difference in the Wave window using whatever
horizontal and vertical scrolling are necessary. The
signal containing the specified difference will be
highlighted, and the active cursor will be
positioned at the starting time of the difference.
compare start This command begins a new dataset comparison. N Y
The datasets that you will be comparing must
already be open.
compare stop This command is used internally by the compare N Y
stop button to suspend comparison computations in
progress. If a compare run execution has returned
to the VSIM prompt, compare stop has no effect.
Under Unix, entering a Control-C character in the
window that invoked Questa SIM has the same
effect as compare stop.

60 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
compare update This command is primarily used internally to N Y
update the comparison differences when
comparing a live simulation against a .wlf file. The
compare update command is called automatically
at the completion of each simulation run if the
compare options -track is in effect.
configure The configure command invokes the List or Wave N Y
widget configure command for the current default
List or Wave window.
context This command provides several operations on a Y Y
context's name. The option you specify determines
the operation.
coverage analyze This command is used to display test information N Y
based on a merged UCDB, created by a vcover
merge operation. Some arguments for this
command require that the merge to create the data
was performed with the test-associated merge, by
running vcover merge -testassociated. By default,
merges are performed without this information.
coverage attribute The coverage attribute command is used to display Y Y
or set attributes in the currently loaded database on
the following types of attributes:
coverage clear The coverage clear command clears specified Y Y
types of coverage data from the coverage database.
coverage create The coverage create command creates N Y
covergroups, coverpoints, crosses and bins under a
specified parent in an existing UCDB file. It can be
used only in Coverage View mode (vsim -
viewcov...) as a method of adding these functional
coverage items to existing UCDBs. Once created,
the covergroup items behave like any
SystemVerilog covergroup items, and coverage
calculation follows SystemVerilog coverage
calculation rules.
coverage edit The coverage edit command opens a coverage N Y
dataset (.ucdb) to edit the contents. Used only in
Coverage View mode (vsim -viewcov...). Use this
command to alter existing UCDBs.
coverage exclude The coverage exclude command allows you to Y Y
exclude the following from coverage statistics:

Questa® SIM Command Reference Manual, v2021.1 61

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
coverage goal The coverage goal command sets or displays the N Y
values for three separate kinds of goals, only one
of which affects the total coverage calculation:
coverage loadtestassoc Coverage test association data is not loaded by Y Y
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).
coverage open The coverage open command opens UCDB N Y
datasets for viewing in the GUI in Coverage View
mode. Datasets can be closed once open using
dataset close.
coverage ranktest The coverage ranktest command ranks coverage N Y
data contained in the current Coverage View
dataset (whether loaded with vsim -viewcov or in
batch), according to each individual test’s
contribution to cumulative coverage. 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.
coverage report The coverage report command produces textual Y Y
output of coverage statistics or exclusions. By
default, the command prints results to the
Transcript window, and returns an empty string.
You can use the -file argument to save the output
to a file.
coverage save The coverage save command is used to save the Y Y
coverage results of the specified type from a
simulation to the unified coverage database
(UCDB). If no type is specified, then all types are
saved into the database.
coverage tag The coverage tag command can be used to create N Y
(or delete) "links" between different objects in a
coverage database to specific coverage objects in a
testplan. A tag is a simple string associated with
the object, thus objects sharing the same tag name
are linked together.

62 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
coverage testnames The coverage testnames command displays the N Y
testnames in the UCDB file currently loaded into
memory. If a merged file, it gives you a list of tests
in the merged file.
coverage unlinked The coverage unlinked command is used as a N Y
diagnostic tool to report on a number of items.
coverage weight The coverage weight command is used to: N Y
dataset alias This command maps an alternate name (alias) to an N Y
open dataset. A dataset can have any number of
aliases, but all dataset names and aliases must be
unique even when more than one dataset is open.
Aliases are not saved to the .wlf file and must be
remapped if the dataset is closed and then re-
opened.
dataset clear All event data is removed from the current N Y
simulation WLF file, while retaining all currently
logged signals. Subsequent run commands will
continue to accumulate data in the WLF file.
dataset close This command closes an active dataset. To open a N Y
dataset, use the dataset open command.
dataset config This command configures WLF parameters for an N Y
open dataset and all aliases mapped to that dataset.
dataset current This command activates the specified dataset and N Y
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.
dataset info This command reports a variety of information N Y
about a dataset. Arguments to this command are
order dependent. Please read through the argument
descriptions for more information.
dataset list This command lists all active datasets. N Y
dataset open This command opens a WLF file (either the N Y
currently running vsim.wlf or a saved WLF file)
and/or UCDB file (representing coverage data) and
assigns it the logical name that you specify.

Questa® SIM Command Reference Manual, v2021.1 63

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
dataset rename This command changes the name of a dataset to the N Y
new name you specify. Arguments to this
command are order dependent. Follow the order
specified in the Syntax section.
dataset restart This command unloads the specified dataset or N Y
currently active dataset and reloads the dataset
using the same dataset name. The contents of
Wave and other coverage windows are restored for
UCDB datasets after a reload.
dataset save This command writes data from the current N Y
simulation to the specified file. This lets you save
simulation data while the simulation is still in
progress.
dataset snapshot This command saves data from the current WLF N Y
file (vsim.wlf by default) at a specified interval. It
provides you with sequential or cumulative
"snapshots" of your simulation data.
delete This command removes objects from either the N Y
List or Wave window. Arguments to this command
are order dependent.
describe This command displays information about Y Y
simulation objects and design regions in the
Transcript window.
disablebp This command turns off breakpoints and when Y Y
commands. To turn on breakpoints or when
commands again, use the enablebp command.
disable_menu This command disables the specified menu within N N
the specified window.
disable_menuitem This command disables a specified menu item N N
within the specified menu path of the specified
window.
do This command executes the commands contained Y Y
in a DO file.
down This command searches for object transitions or N Y
values in the specified List window.
drivers This command displays the names and strength of Y Y
all drivers of the specified object.

64 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
dumplog64 This command dumps the contents of the specified
WLF file in a readable format to stdout. The WLF
file cannot be opened for writing in a simulation
when you use this command. This command
cannot be used in a DO file.
echo This command displays a specified message in the Y Y
Transcript window.
edit This command invokes the editor specified by the N N
EDITOR environment variable. By default, the
specified filename will open in the Source
window.
enablebp This command turns on breakpoints and when Y Y
commands that were previously disabled.
enable_menu This command enables a previously disabled N N
menu. The menu will be changed from grayed-out
to normal and will become responsive. Returns
nothing. Arguments to this command are order
dependent. Follow the order specified in the
Syntax section.
enable_menuitem This command enables a previously disabled menu N N
item.
encoding This command translates between the 16-bit Y Y
Unicode characters used in Tcl strings and a named
encoding, such as Shift-JIS.
environment This command has two forms, environment and Y Y
env. It allows you to display or change the current
dataset and region/signal environment.
examine This command has two forms, examine and exa. It Y Y
examines one or more objects and displays current
values (or the values at a specified previous time)
in the Transcript window.
exit This command exits the simulator and the Y Y
ModelSim application.
fcover configure This command enables, disables, and sets coverage Y Y
targets for SystemVerilog and PSL cover
directives.

Questa® SIM Command Reference Manual, v2021.1 65

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
find This command locates objects by type and name. N Y
Arguments to the command are grouped by object
type. The “find nets”, “find signals”, and “find
instances” commands are supported in -batch
mode.
find connections This command returns the set of nets that are N Y
electrically equivalent to a specified net. It is only
available during a live simulation.
find drivers This command traces backward in time to find the N Y
active driver(s), processes, or first elements of the
specified signal or signal event. Processes may be
combinatorial or sequential assignments. The
command can trace through multiple clock cycles
and multiple clock domains. Traces are executed
either during simulation or post-simulation.
find infiles This command searches for a string in the specified Y Y
file(s) and prints the results to the Transcript
window. The results are individually hotlinked and
will open the file and display the location of the
string.
find insource This command searches for a string in the source Y Y
files for the current design and prints the results to
the Transcript window. The results are hotlinked
individually and will open the file and display the
location of the string. When you execute this
command in command-line mode from outside of
the GUI, the results are sent to stdout with no
hotlinks.
force This command allows you to apply stimulus Y Y
interactively to VHDL signals, Verilog nets and
registers.
formatTime This command provides global format control for Y Y
all time values displayed in the GUI. When
specified without arguments, this command returns
the current state of the three arguments.
fsm list This command returns information about N N
recognized finite state machines, including the
number of states and transitions. The output
matches that of the FSM List window.

66 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
fsm properties This command returns information about the N N
specified finite state machine. This information
matches that found in the FSM Properties dialog
box.
fsm view This command displays the specified finite state N N
machine in the FSM List window.
gc configure This command specifies when the System Verilog N Y
garbage collector will run. The garbage collector
may be configured to run after a memory threshold
has been reached, after each simulation run
command completes, and/or after each simulation
step command. The default settings are optimized
to balance performance and memory usage for
either regular simulation or class debugging (vsim
-classdebug). Returns the current settings when
specified without arguments.
gc run This command runs the SystemVerilog garbage N Y
collector.
gdb dir This command sets the source directory search N Y
path for the C debugger and starts the C debugger
if it is not already running.
getactivecursortime This command gets the time of the active cursor in N N
the Wave window and returns the time value.
getactivemarkertime This command gets the time of the active marker in N N
the List window. Returns the time value. If -delta is
specified, returns time and delta.
help This command displays in the Transcript window a N Y
brief description and syntax for the specified
command.
history This command lists the commands you have Y Y
executed during the current session. History is a
Tcl command. For more information, consult the
Tcl Man Pages (Help > Tcl Man Pages).
jobspy This command controls JobSpy, a tool for N Y
monitoring and controlling batch simulations and
simulation farms. This command provides
additional information with the -help switch.
layout This command allows you to perform a number of N N
editing operations on custom GUI layouts, such as
loading, saving, maximizing, and deleting.

Questa® SIM Command Reference Manual, v2021.1 67

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
lecho This command takes one or more Tcl lists as Y Y
arguments and pretty-prints them to the Transcript
window.
left This command searches left (previous) for signal N N
transitions or values in the specified Wave
window.
log This command creates a wave log format (WLF) Y Y
file containing simulation data for all HDL objects
whose names match the provided specifications.
Objects that are displayed using the add list and
add wave commands are automatically recorded in
the WLF file. By default the file is named vsim.wlf
and stored in the current working directory. You
can change the default name using the vsim -wlf
option of the vsim command or by setting the
WLFFilename variable in the modelsim.ini file.
lshift This command takes a Tcl list as an argument and Y Y
shifts it in-place, one place to the left, eliminating
the left-most element.
lsublist This command returns a sublist of the specified Tcl Y Y
list that matches the specified Tcl glob
pattern.Arguments to this command are order
dependent. Follow the order specified in the
Syntax section.
mem compare This command compares a selected memory to a Y Y
reference memory or file. Must have the "diff"
utility installed and visible in your search path in
order to run this command. Arguments to this
command are order dependent. Please read through
the argument descriptions for more information.
mem display This command prints to the Transcript window the Y Y
memory contents of the specified instance. If the
given instance path contains only a single array
signal or variable, the signal or variable name need
not be specified.
mem list This command displays a flattened list of all Y Y
memory instances in the current or specified
context after a design has been elaborated.

68 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)

Table 2-1. Supported Commands (cont.)


Command name Action -batch -c
mem load This command updates the simulation memory Y Y
contents of a specified instance. You can upload
contents either from a memory data file, a memory
pattern, or both. If both are specified, the pattern is
applied only to memory locations not contained in
the file.
mem save This command saves the contents of a memory Y Y
instance to a file in any of the supported formats:
Verilog binary, Verilog hex, and MTI memory
pattern data.
mem search This command finds and prints to the screen the Y Y
first occurring match of a specified memory
pattern in the specified memory instance.
Shorthand instance names are accepted.
Optionally, you can instruct the command to print
all occurrences. The search pattern can be one
word or a sequence of words.

Questa® SIM Command Reference Manual, v2021.1 69

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]

70 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 71

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]

72 Questa® SIM Command Reference Manual, v2021.1

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).

Questa® SIM Command Reference Manual, v2021.1 73

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

in case you ever want to remove the button.

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

74 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 75

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 /*

• Add all objects in the region to the dataflow window.


add dataflow *

Related Topics
Automatically Tracing All Paths Between Two Nets [Questa SIM User's Manual]
Dataflow Window [Questa SIM GUI Reference Manual]

76 Questa® SIM Command Reference Manual, v2021.1

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:

• VHDL signals and variables


• Verilog nets and registers
• User-defined buses
• SystemC primitive channels (signals)
If you do not specify a port mode, such as -in or -out, this command displays all objects in the
selected region with names matching the object name specification.

Refer to Wildcard Characters for wildcard usage as it pertains to the add commands.

Arguments
• <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

• <object_name> {sig ...}


(required, if <object> is not specified) Creates a user-defined bus with the specified object
name containing the specified signals (sig) concatenated within the user-defined bus. When
you use this argument, you must specify it as the first argument to the add list command.
You must enclose the full argument set in braces ({ }).

Questa® SIM Command Reference Manual, v2021.1 77

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.

78 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 79

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 /*

• List all objects in the region.


add list *

• List all input ports in the region.


add list -in *

• Display a List window containing three columns headed a, sig, and array_sig(9 to 23).
add list a -label sig /top/lower/sig {array_sig(9 to 23)}

80 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add list

• List clk, a, b, c, and d only when clk changes.


add list clk -notrigger a b c d

• Lists clk, a, b, c, and d every 100 ns.


config list -strobeperiod {100 ns} -strobestart {0 ns} -usestrobe 1
add list -notrigger clk a b c d

• 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

Questa® SIM Command Reference Manual, v2021.1 81

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.

82 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add memory

num — Any positive integer


• <object_name> ...
(required) Specifies the hierarchical path of the memory to be displayed. Must be specified
as the final argument to the add memory command. Multiple memories are specified as a
space separated list.
Wildcard characters are allowed.
Note
The WildcardFilter Tcl preference variable identifies types to ignore when matching
objects with wildcard patterns.)

Related Topics
Memory List Window [Questa SIM GUI Reference Manual]

Questa® SIM Command Reference Manual, v2021.1 83

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.

84 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 85

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.

86 Questa® SIM Command Reference Manual, v2021.1

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 /*

• Add all objects in the region to the schematic window.


add schematic *

• 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]

Questa® SIM Command Reference Manual, v2021.1 87

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]

88 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 89

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:

• VHDL signals and variables


• Verilog nets and registers
• SystemVerilog class objects
• SystemC primitive channels (signals)
• Dividers and user-defined buses.
If no port mode is specified, this command displays all objects in the selected region with names
matching the object name specification.

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.

90 Questa® SIM Command Reference Manual, v2021.1

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"

rgb value — for example:


-color #357f77

• -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

Questa® SIM Command Reference Manual, v2021.1 91

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.

92 Questa® SIM Command Reference Manual, v2021.1

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

adds the clock signal, labeled as "c".


This alternative name is not valid in a force or examine command; however, it can be used
in a search command with the wave option.
• -max <real_num>
(optional) Specifies the maximum Y-axis data value to display for an analog waveform.
Used in conjunction with the -min switch; the value you specify for -max must be greater
than the value you specify for -min.
<real_num> — Any integer that is greater than the value specified for -min.
• -min <real_num>
(optional) Specifies the minimum Y-axis data value to display for an analog waveform.
Used in conjunction with the -max switch; the value you specify for -min must be less than
the value you specify for -max.
<real_num> — Any integer that is less than the value specified for -max.
For example, if you know the Y-axis data for a waveform varies between 0.0 and 5.0, you
could add the waveform with the following command:
add wave -analog -min 0 -max 5 -height 100 my_signal

Questa® SIM Command Reference Manual, v2021.1 93

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.

94 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 95

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

• {<object_name> {sig1 sig2 ...}}


(required unless specifying <object_name>) Creates a user-defined bus with the specified
object name, containing the specified signals (sig1 and so forth) concatenated within the
user-defined bus. Must be the final argument to the add wave command.
sig — A space-separated list, enclosed in braces ({ }), of the signals 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.
Note
You can also select Wave > Combine Signals > (when the Wave window is
selected) to create a user-defined bus.

Examples
• Display an object named out2. The object is specified as being a logic object presented
in gold.
add wave -logic -color gold out2

96 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add wave

• Display a user-defined, hex formatted bus named address.


add wave -hex {address {a_7 a_6 a_5 a_4 a_3 a_2 a_1 a_0}}

• Add all wave objects in the region.


add wave *

• Add all wave input ports in the region.


add wave -in *

• 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- "

• Add an unnamed divider.


add wave -divider
add wave -divider ""
add wave -divider {}

• 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]

Questa® SIM Command Reference Manual, v2021.1 97

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:

VSIM> help date

Returns:

Displays date and time.


Usage: date

• Add the change date command.


add_cmdhelp {change date} {Modify date or time.} {-time|-date <arg>}

Entering:

VSIM> help change date

98 Questa® SIM Command Reference Manual, v2021.1

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:

Modify data or time


Usage: change date -time|-date <arg>

• Deletes the change date command from the command-line help.


add_cmdhelp {change date} {} {}

Questa® SIM Command Reference Manual, v2021.1 99

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.

100 Questa® SIM Command Reference Manual, v2021.1

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

This example is available in the DO file found at <install_dir>/examples/gui/addmenu/


addmenu.do

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]

Questa® SIM Command Reference Manual, v2021.1 101

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".

102 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
add_menucb

<onval> — A value specific to the global Tcl variable specified in -variable.


• -offvalue <offval>
(optional) Specifies the value of the global Tcl variable when the box is "off".
<offval> — A value specific to the global Tcl variable specified in -variable.
• -variable <var>
(optional) Specifies the global Tcl variable to be reflected and changed.
<var> — A global Tcl variable.
Examples
add_menucb $wname mine.vars "Feature One" \
-variable myglobalvar($wname:one) -onvalue 1 -offvalue 0 -indicatoron 1

This command is also used in the add_menu example.

Related Topics
add_menu
add_separator
add_submenu
change_menu_cmd

Questa® SIM Command Reference Manual, v2021.1 103

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.

104 Questa® SIM Command Reference Manual, v2021.1

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

This command is also used in the add_menu example.

Related Topics
add_menu
add_menucb
add_separator
add_submenu
change_menu_cmd

Questa® SIM Command Reference Manual, v2021.1 105

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

This command is also used in the add_menu example.

Related Topics
add_menu
add_menuitem
add_submenu
change_menu_cmd

106 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 107

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

108 Questa® SIM Command Reference Manual, v2021.1

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"

Questa® SIM Command Reference Manual, v2021.1 109

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

110 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 111

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.)

112 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 113

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]

114 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 115

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]

116 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 117

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]

118 Questa® SIM Command Reference Manual, v2021.1

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.)

Questa® SIM Command Reference Manual, v2021.1 119

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion enable

• -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 argument, all languages are
specified by default.
• -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. Specifying -severity selects only assertions
with the same or higher severity. If not specified, selects assertions of all severities.
• <path> [<path> ...]
(required) A space-separated list of paths, that specifies the assertions to be affected. Must
be the final argument to the assertion enable command. Multiple paths and wildcards are
allowed. The path specifies assertions or a design region containing multiple assertions.
Description
The assertion enable command introduces two levels of command function. If you use the
-force argument, this command takes precedence over any use of assertion enable where -force
is not used or over any use of the $asserton/$assertoff/$assertkill SystemVerilog system tasks.
Using the -force argument makes assertion enable a first-level command.

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/*

an invocation of the $asserton/$assertoff/$assertkill system task can disable the assertion


named assert1 in the following locations: /tb/assert* and /tb/cntrl/.
If the following command is used:
assertion enable -on -force -r assert1 /

120 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion enable

an invocation of the $asserton/$assertoff/$assertkill system task cannot disable the


assert1 assertion, from the path /.
If the following command is used:
assertion enable -off -r assert1

it has no affect on the assert1 assertion because -force is in effect.


If the following command is used:
assertion enable -release -r assert1

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

the assert1 assertion is disabled with the -force option.


If the following system task is used:
$asserton();

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

the assert1 assertion is enabled due to the use of $asserton().


If the following command is used:
assertion enable -off -force assert1

the assert1 assertion is disabled


If the following command is used:
assertion enable -release assert1

assert1 is enabled due to previous $asserton. The effect of -force is released.


Related Topics
assertion action
assertion active
assertion count
assertion fail
assertion pass
assertion profile

Questa® SIM Command Reference Manual, v2021.1 121

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]

122 Questa® SIM Command Reference Manual, v2021.1

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).

Questa® SIM Command Reference Manual, v2021.1 123

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion fail

off — Disable transcript logging.


You can change the default by setting the AssertionFailLog variable in the modelsim.ini file.
(Refer to AssertionFailLog in the User’s Manual.)
SystemVerilog assertion messages coming from action blocks are controlled by severity
system tasks ($fatal, $error, $warning and $info). You can choose to ignore these system
tasks from the GUI or by setting several variables in the modelsim.ini file; refer to
IgnoreSVAError, IgnoreSVAFatal, IgnoreSVAInfo, and IgnoreSVAWarning in the Users’
Manual.
• -lvlog
(optional) Local variable values corresponding to failed assertion threads print to the
Transcript when you run vsim -assertdebug. You can change the default (on) by setting the
AssertionFailLocalVarLog variable in the modelsim.ini file. (Refer to
AssertionFailLocalVarLog in the User’s Manual.)
• -print_msg
(optional) Prints a default message whenever an assertion fails, regardless of what is
specified in the action block, and even when no action block is specified. For VHDL
assertions, the severity will match that of the specific assertion.
• -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.
• <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 fail command.
Examples
• Disable logging for assertions a.b.c.assert__0 and a.b.c.assert__1. The -log argument
applies to all paths that follow it on the command line.
assertion fail -log off a.b.c.assert__0 a.b.c.assert__1

• Disable logging for assertion a.b.c.assert__0 but enables it for a.b.c.assert__1.


assertion fail -log off a.b.c.assert__0 -log on a.b.c.assert__1

• 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

124 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 125

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

126 Questa® SIM Command Reference Manual, v2021.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]

Questa® SIM Command Reference Manual, v2021.1 127

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

128 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion profile

Reaching the threshold produces the following transcript message:


# ** Note: Assertion thread threshold reached. Thread count = 110,
Memory = 4.8KB
# Time: 215 ns Scope: test.assert01 File: ./src/profile01.sv
Line: 9
# ** Note: Assertion thread threshold reached. Thread count = 110,
Memory = 4.8KB
# Time: 215 ns Scope: test.cover01 File: ./src/profile01.sv Line:
10
# ** Note: Assertion thread threshold reached. Thread count = 110,
Memory = 4.8KB
# Time: 215 ns Scope: test.seq File: ./src/profile01.sv Line: 3

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]

Questa® SIM Command Reference Manual, v2021.1 129

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.

130 Questa® SIM Command Reference Manual, v2021.1

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;

b1:assert property (@(posedge clk) a|=>b);


b2:assert property (@(posedge clk) a|=>b);
c1:assert property (@(posedge clk) a|=>b);
c2:assert property (@(posedge clk) a|=>b);

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 *

Questa® SIM Command Reference Manual, v2021.1 131

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion report

This produces the following 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.

assertion report * -filter b1

This produces the following report:

#------------------------------------------------------------
#Name File (Line) Failure Pass
Count Count
#------------------------------------------------------------
#/test/b1 src/miscreport01.sv(9) 0 0
#

You can also use wildcards with the -filter argument.

assertion report * -filter c*

This produces the following report:

#------------------------------------------------------------
#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]

132 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
assertion report

Assertions Window [Questa SIM GUI Reference Manual]


Cover Directives Window [Questa SIM GUI Reference Manual]

Questa® SIM Command Reference Manual, v2021.1 133

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

134 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 135

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]

136 Questa® SIM Command Reference Manual, v2021.1

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# 5.


bd 5

• Delete the breakpoint with the label top_bp


bd top_bp

• Delete the breakpoint with id# 6 and the breakpoint at line 234 in the source file named
alu.vhd.
bd 6 alu.vhd 234

• Delete the C breakpoint with id# c.4.

Questa® SIM Command Reference Manual, v2021.1 137

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

138 Questa® SIM Command Reference Manual, v2021.1

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

bookmark add wave


Creates a named reference to a specific zoom range and scroll position in the specified Wave
window. Bookmarks are saved in the wave format file and are restored when the format file is
read.
Note
You can also interactively add a bookmark through the GUI by selecting the
Wave > Bookmarks > Bookmarks menu item.

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.

Questa® SIM Command Reference Manual, v2021.1 139

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

140 Questa® SIM Command Reference Manual, v2021.1

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

bookmark delete wave


This command deletes bookmarks from the specified Wave window.
Note
You can also interactively delete a bookmark through the GUI by selecting the
Wave > Bookmarks > Bookmarks menu item.

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

• Delete all bookmarks from the Wave window named "wave1".


bookmark delete wave -all -window wave1

Related Topics
bookmark add wave
bookmark goto wave
bookmark list wave

Questa® SIM Command Reference Manual, v2021.1 141

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

bookmark goto wave


Zooms and scrolls a Wave window using the specified bookmark.
Note
You can also interactively navigate between bookmarks through the GUI by selecting the
Wave > Bookmarks > Bookmarks menu item.

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

142 Questa® SIM Command Reference Manual, v2021.1

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

bookmark list wave


Displays a list of available bookmarks in the Transcript window.
Syntax
bookmark list wave [-window <window_name>]
Arguments
• -window <window_name>
(optional) Specifies the Wave window to which the bookmark applies. You can use
bookmarks only in the window in which they were originally created.
Related Topics
bookmark add wave
bookmark delete wave
bookmark goto wave

Questa® SIM Command Reference Manual, v2021.1 143

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.

144 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 145

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 ( {} ).

The condition expression can use the following operators:


Operati Operator
on Syntax
equals ==, =
not !=, /=
equal
AND &&, AND
OR ||, OR

146 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bp

The operands can be object names, signame’event, or constants. Subexpressions in


parentheses are permitted. The command is executed when the expression is evaluated as
TRUE or 1. The formal BNF syntax for an expression is:
condition ::= Name | { expression }
expression ::= expression AND relation
| expression OR relation
| relation
relation ::= Name = Literal
| Name /= Literal
| Name ' EVENT
| ( expression )
Literal ::= '<char>' | "<bitstring>" | <bitstring>

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>"

where class_type_name is the actual class name, not a variable.


• -id <id_number> | -label "<label>"
(optional) Attempts to assign an id number or label to the breakpoint. The command returns
an error if the id number you specify is already assigned.
-id <id_number> — Any positive integer that is not already assigned.
-label "<label>" — Associates a name or label with the specified breakpoint. Adds a
level of identification to the breakpoint. The label may contain special characters.
Quotation marks (" ") or braces ({ }) are required only if <label> contains spaces or
special characters.
Note
Id numbers for breakpoints are assigned from the same pool as those used for the
when command. So even if you have not specified a given id number for a
breakpoint, that number may still be used for a when command.

• -inst <region> [-inst <region> ...]


(optional) Sets an HDL or SystemC breakpoint so it applies only to the specified instance.

Questa® SIM Command Reference Manual, v2021.1 147

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bp

To apply multiple instance-path conditions on a single breakpoint, specify -inst <region>


multiple times. By default, this overrides the previous breakpoint condition (you can use the
-appendinst argument to append conditions instead).
<region> — The full path to the instance specified.
Note
You can also specify this instance by choosing Tools > Breakpoints from the main
menu and using the Modify Breakpoints dialog box.

• -query <filename> [{<start_line_number> <end_line_number>} | <line_number>]


(optional) Returns information about the breakpoint(s) and the list of executable lines in the
specified file. When specified without an argument, the command returns the list of all
breakpoints and its status. Returns nothing if the line number(s) specified in the argument
are not executable.
<filename> — The name of the file you want to query for breakpoint(s).
<start_line_number> <end_line_number> — Specifies a range of line numbers. The
command returns a list of any executable lines within the range.
<line_number> — The line number you want to query for a breakpoint.
When <line_number> is an argument, then the command returns six fields of
information.
For example, the command:
bp -query top.vhd 70

Returns:
# 1 1 top.vhd 70 2 1

• {1 | 0} — Indicates whether a breakpoint exists at the location.


0 — Breakpoint does not exit.
1 — Breakpoint exists.
• 1 — always reports a 1.
• <file_name>
• <line_number>
• <id_number>
• {1 | 0} — Indicates whether the breakpoint is enabled.
0 — Breakpoint is not enabled.
1 — Breakpoint is enabled.

148 Questa® SIM Command Reference Manual, v2021.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 in the source file alu.vhd at line 147.


bp alu.vhd 147

• Set a breakpoint at line 153 of the source file of the current context:
bp 153

• Execute the macro.do DO file when the breakpoint is hit.


bp alu.vhd 147 {do macro.do}

• Set a breakpoint on line 22 of test.vhd. When the breakpoint is hit, the values of
variables 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 with the label top_bp.


bp top.vhd 14 -label top_bp

• Set a breakpoint for line 15 of a.vhd, but only for the instance a2.
bp a.vhd 15 -inst "/top/a2"

• Set multiple breakpoints in the source file test.vhd at line 14. The second instance will
overwrite the conditions of the first.
bp test.vhd 14 -inst /test/inst1 -inst /test/inst2

• Set multiple breakpoints at line 14. The second instance will append its conditions to the
first.
bp test.vhd 14 -inst /test/inst1 -inst /test/inst2 -appendinst

Questa® SIM Command Reference Manual, v2021.1 149

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
bp

• Set a breakpoint for a specific variable of a particular class type.


set x [examine -handle my_class_var]
bp top.sv 15 -cond {this == $x}

• Set a breakpoint on the first executable line of the function /uvm_pkg::set_config_int.


bp in /uvm_pkg::set_config_int

• List the line number and enabled/disabled status (1 = enabled, 0 = disabled) of all
breakpoints in testadd.vhd.
bp -query testadd.vhd

• List all executable lines in testadd.vhd between lines 2 and 59.


bp -query testadd.vhd 2 59

• List details about the breakpoint on line 48.


bp -query testadd.vhd 48

• Set a C breakpoint at the entry to C function and_gate_init.


bp -c and_gate_init

• Set a C breakpoint at line 46 in the file and_gate.c.


bp -c and_gate.c:46

• Set a C breakpoint at line 44 in the current C or SystemC file.


bp -c 44

• Set a C breakpoint at hexadecimal address 0xff130504.


bp -c *0xff130504

• Set a C breakpoint for instances sctop.a.b and sctop.a.d.


bp -c -inst {sctop.a.b sctop.a.d}

• 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]

150 Questa® SIM Command Reference Manual, v2021.1

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:

• <pathToFunction> <classInstancePath> —SystemVerilog static functions and class


functions
• -usertf -builtin <systfName> — PLI and VPI system tasks and system functions
(restricts the search for the task/function name to either the user-added PLI/VPI routines
or to the built-in routines):

call [-env <hierEnvPath>] [{<pathToFunction> [<classInstancePath>]}] [{-usertf | -builtin


<systfName>}] [<arg1> [<arg2>] …[<argN>]]
Arguments
• -env <hierEnvPath>
(optional) Hierarchical environment path to use as the starting scope for the object name
lookups. If present, must appear before actual function name.
• <pathToFunction>
(required when calling a System Verilog static or class function) The name of a function,
which you can specify by:
o The path to the function declaration, through the structural hierarchy, or declaration
hierarchy. You must specify hierarchical paths must as a full path to a function, or a
function that exists relative to the current context (as shown in the Structure window,
or returned by the environment command).
o A class instance hierarchical path.
o A class instance id string.
• <classInstancePath>
(optional) Must be specified if the function path is a declaration path and the function is a
non-static class function. Do not specify the class instance path name if the given function
path is a class instance variable reference or a class instance name in the format
@<class_type>@nnn, because the class instance information can be extracted from the
pathname itself.

Questa® SIM Command Reference Manual, v2021.1 151

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

152 Questa® SIM Command Reference Manual, v2021.1

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 class instance id string to specify the function:


call @[email protected]_full_name

• 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

Calling a System Task


• Call $display with literal values:
call \$display {"%0s"} {"Hello from TCL!"}

Returns:
# Hello from TCL!

call –builtin display {"%0d"} 'd2999

Returns:
# 2999

call –usertf display {"%0d"} 'd3999

Questa® SIM Command Reference Manual, v2021.1 153

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).

• Call $display with literal values:


call \$display {"top2.i=%0d top2.r=%0b"} top2/i top2/r

Returns:
# top2.i=5 top2.r=110

Calling a System Function


In the following examples $pow is a user defined function that raises the 1st argument to the
power of the 2nd (for example, $pow(a, b) => ab)

• Call $pow with literal values:


call \$pow 2 1

Returns:
# 2

call \$pow 3 2

Returns:
# 9

call \$pow [call \$pow 2 1] [call \$pow 3 2]

Returns:
# 512

• Call $pow with variable values:


call –env /top/u1 display r1

Returns:
# 7

call –env /top/u2 display r2

Returns:
# 2

call pow /top/u1/r1 /top/u2/r2

Returns:
# 49

154 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 155

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

4. Exit the simulation.


5. Open the capstats database.
capstats -open 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

156 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 157

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.

158 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
cdbg

Equivalent to selecting Tools > C Debug > Auto find bp.


• debug_on
Enables the C Debugger.
Equivalent to selecting Tools > C Debug > Start C Debug.
• enable_auto_step {on | off}
Specifies auto-step mode enable/disable.
on — Enables auto-step mode.
off — Disables auto-step mode.
Equivalent to selecting Tools > C Debug > Enable auto step.
• init_mode_complete
Instructs C Debug to continue loading the design without stopping at function calls.
Equivalent to selecting Tools > C Debug > Complete load. Not supported on Windows
platforms.
• init_mode_setup
Enables initialization mode.
Equivalent to selecting Tools > C Debug > Init mode. Not supported on Windows
platforms.
• interrupt
Reactivates the C debugger when stopped in HDL code.
Equivalent to selecting Tools > C Debug > C Interrupt or clicking the 'C Interrupt' toolbar
button.
• keep_user_init_bps {on | off}
Specifies whether breakpoints set during initialization mode are retained after the design
finishes loading.
on — Enables retention of breakpoints after design finishes loading.
off — Disables retention of breakpoints after design loading is finished.
Equivalent to toggling the 'Keep user init bps' button in the C Debug setup dialog.
• quit
Closes the C Debugger.
Equivalent to selecting Tools > C Debug > Quit C Debug.
• refresh_source_window
Re-opens a C source file if you close the Source window inadvertently while stopped in the
C debugger.
Equivalent to selecting Tools > C Debug > Refresh.

Questa® SIM Command Reference Manual, v2021.1 159

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]

160 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 161

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

• Set the value of x (type double) to 1.5.


change x 1.5

• Set the value of structure member a1.c1 (type int) to 0.


change a1.c1 0

• Set val_b (type char *) to point to the string my_string.


change val_b my_string

162 Questa® SIM Command Reference Manual, v2021.1

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”}

Questa® SIM Command Reference Manual, v2021.1 163

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

164 Questa® SIM Command Reference Manual, v2021.1

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

check contention add


Enables contention checking on the specified nodes. Allowed nodes are Verilog nets and VHDL
signals of types std_logic and std_logic_vector. Ignores any other node types, and nodes that do
not have multiple drivers.
Syntax
check contention add {[-in] [-out] [-inout] | [-ports]} [-internal] [-r] <node_name>...
Description
Bus contention checking detects bus fights on nodes that have multiple drivers. A bus fight
occurs when two or more drivers drive a node with the same strength, and that strength is the
strongest of all drivers currently driving the node. The following table provides some examples
for two drivers driving a std_logic signal:
driver 1 driver 2 fight
Z Z no
0 0 yes
1 Z no
0 1 yes
L 1 no
L H yes

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.

Questa® SIM Command Reference Manual, v2021.1 165

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

166 Questa® SIM Command Reference Manual, v2021.1

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

check contention config


Allows you to write checking messages to a file. By default, any messages display on your
screen. Also allows you to configure the contention time limit.
Syntax
check contention config [-file <filename>] [-time <limit>[<unit>]]
Arguments
• -file <filename>
(optional) Writes contention messages to the specified file instead of displaying them on the
screen.
<filename> — The name of a file where contention messages are saved.
• -time <limit>[<unit>]
(optional) Specifies a limit to the time that a node can be in contention. If a node’s
contention time meets or exceeds the limit, contention is detected.
<limit> — Any non-negative integer where the default is 0.
<unit> — (optional) A suffix specifying a unit of time. If you specify <unit>, you must
enclose <limit> 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>.
Related Topics
check contention add
check contention off

Questa® SIM Command Reference Manual, v2021.1 167

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

check contention off


Disables contention checking for the specified nodes.
Syntax
check contention off [-all] {[-in] [-out] [-inout] | [-ports]} [-internal] [-r] <node_name> ...
Arguments
• -all
(optional) Disables contention checking for all nodes that have checking enabled.
• -in
(optional) Disables checking on nodes of mode IN.
• -out
(optional) Disables checking on nodes of mode OUT.
• -inout
(optional) Disables checking on nodes of mode INOUT.
• -ports
(optional) Disables checking on nodes of modes IN, OUT, or INOUT.
• -internal
(optional) Disables checking on internal (non-port) objects.
• -r
(optional) Disables contention checking recursively into subregions. If omitted, contention
check disabling is limited to the current region.
• <node_name> ...
(required) Specifies the named node(s). Must be the final argument to the check contention
off command.
Related Topics
check contention add
check contention config

168 Questa® SIM Command Reference Manual, v2021.1

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

check float add


Enables float checking for the specified nodes.
Syntax
check float add {[-in] [-out] [-inout] | [-ports]} [-internal] [-r] <node_name>...
Description
Bus float checking detects nodes that are in a high impedance state for a time period that meets
or exceeds a user-defined limit. Detection of a float violation results in an error message
identifying the node. A message is also issued when the float violation ends. You can use the
bus float checking commands on VHDL and Verilog designs.

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

Questa® SIM Command Reference Manual, v2021.1 169

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

check float off

170 Questa® SIM Command Reference Manual, v2021.1

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

check float config


Enables you to write checking messages to a file (messages display on your screen by default).
Also enables you to configure the float time limit.
Syntax
check float config [-file <filename>] [-time <time><unit>]
Arguments
• -file <filename>
(optional) Writes float messages to a file. If you select this option, messages do not display
on the screen.
<filename — Specifies the name of the file to save float messages to.
• -time <time><unit>
(optional) Specifies the length of time that a node can be floating. Detects an error if a node
meets or exceeds the float time limit. Configure this time limit prior to invoking any check
float add commands.
<time> — Any non-negative integer where the default is 0.
<unit> — (optional) A suffix specifying the time unit. 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 ({}).
Related Topics
check float add
check float off

Questa® SIM Command Reference Manual, v2021.1 171

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

check float off


Disables float checking for the specified nodes.
Syntax
check float off [-all] {[-in] [-out] [-inout] | [-ports]} [-internal] [-r] <node_name> ...
Arguments
• -all
(optional) Disables float checking for all nodes that have checking enabled.
• -in
(optional) Disables checking on nodes of mode IN.
• -out
(optional) Disables checking on nodes of mode OUT.
• -inout
(optional) Disables checking on nodes of mode INOUT.
• -ports
(optional) Disables checking on nodes of modes IN, OUT, or INOUT.
• -internal
(optional) Disables checking on internal (non-port) objects.
• -r
(optional) Disables float checking recursively into subregions. If omitted, disables float
checking in only the current region.
• <node_name> ...
(required) Disables checking for the named node(s). Must be the final argument to the check
float off command.
Related Topics
check float add
check float config

172 Questa® SIM Command Reference Manual, v2021.1

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

check stable off


Disables stability checking. Clock cycle numbers and boundaries are still tracked, and you can
later re-enable stability checking with check stable on.
Syntax
check stable off
Arguments
None
Related Topics
check stable on

Questa® SIM Command Reference Manual, v2021.1 173

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

174 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 175

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.

Compression of a checkpoint file is controlled by the CheckpointCompressMode variable in the


modelsim.ini file. (Refer to CheckpointCompressMode in the User’s Manual.)

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.

176 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 177

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]

178 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 179

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

180 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 181

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

• Find the class instance @mem_item@200


VSIM> classinfo find @mem_item@200

Returns:
# @mem_item@200 not yet created

Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo ancestry
classinfo descriptive
classinfo instances

182 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 183

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

• Use interface class M as argument:


vsim> classinfo implements M

184 Questa® SIM Command Reference Manual, v2021.1

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

• Use class A as argument:


vsim> classinfo implements A

Output list:
# /test8/A implements /test8/M

• Use class B as argument to access extended classes defined in test8:


vsim> classinfo implements B

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

Questa® SIM Command Reference Manual, v2021.1 185

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

186 Questa® SIM Command Reference Manual, v2021.1

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 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

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

vsim> classinfo instances -verbose A

Returns:
# @A@1 /test8/A

vsim> classinfo instances M

Returns:
# @A@1
# @B@1

vsim> classinfo instances A

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

Questa® SIM Command Reference Manual, v2021.1 187

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

188 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 189

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

190 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 191

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

192 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
classinfo report

n— Sort by the Class Name column


t — Sort by the Total column
p — Sort by the Peak column
c — Sort by the Current column
• -tcl
(optional) Returns a tcl list instead of formatted output.
• -z
(optional) Remove all items from the report that have a total instance count of zero.
Examples
• Create a report of all class instances in descending order in the Total column. Print the
Class Names, Total, Peak, and Current columns. List only the first six lines of the report.
vsim> classinfo report -s dt -c ntpc -m 6

Returns:
# Class Name Total Peak Current
# uvm_pool__11 318 315 315
# uvm_event 286 55 52
# uvm_callback_iter__1 273 3 2
# uvm_queue__3 197 13 10
# uvm_object_string_pool__1 175 60 58
# mem_item 140 25 23

Related Topics
ClassDebug [Questa SIM User's Manual]
classinfo ancestry
classinfo descriptive
classinfo find
classinfo instances
classinfo isa
classinfo stats
classinfo trace
classinfo types

Questa® SIM Command Reference Manual, v2021.1 193

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

194 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 195

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

196 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 197

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*

198 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 199

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.

The names of the added comparison objects take the form:

<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

200 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 201

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.

202 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare add

<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>. 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 ({}).
Figure 2-1. Graphical representation of tolLead and tolTrail - 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.

Questa® SIM Command Reference Manual, v2021.1 203

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 port signals of instance .test_ringbuf.ring_inst in both datasets, to be compared


and sampled on strobe myclock10.
compare add -port -clock myclock10 gold:.test_ringbuf.ring_inst

• 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

204 Questa® SIM Command Reference Manual, v2021.1

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

• Specify to asynchronously compare signal gold:/asynch/abc/s1 to signal sim:/flat/


sigabc, using a leading tolerance of 3 ns and a trailing tolerance of 5 ns.
compare add -tolLead {3 ns} -tolTrail {5 ns} gold:/asynch/abc/s1 sim:/flat/sigabc

• Cause signals test:.counter2.cnt_dd to be rebuilt into bus test:.counter2.cnt[…] and


compared against gold:.counter1.count.
compare add -rebuild gold:.counter1.count test:.counter2.cnt

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

Questa® SIM Command Reference Manual, v2021.1 205

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."

o Diff 40— an echo of the specified comparison difference.


o The current setting of -ignore or -noignore.
o -text “<text string saved to the specified difference>” If no text has been saved to the
difference, an empty set of quotation marks (““) is returned.
Examples
• Flag difference numbers 1, 2, and 10 as "ignore."
compare annotate -ignore 1 2 10

206 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare annotate

• Annotate difference number 12 with the message "THIS IS A CRITICAL PROBLEM."


compare annotate -text "THIS IS A CRITICAL PROBLEM" 12

Related Topics
compare add
compare info
Waveform Compare [Questa SIM User's Manual]

Questa® SIM Command Reference Manual, v2021.1 207

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.

208 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 209

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.

210 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare configure

<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 <time> and <unit> within curly braces ({}).Valid time units are: fs, ps, ns, us,
ms, sec, min, and hr.
• -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=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]

Questa® SIM Command Reference Manual, v2021.1 211

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]

212 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 213

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]

214 Questa® SIM Command Reference Manual, v2021.1

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

• List only an error summary in the Main window transcript.


compare info -summary

• Write errors 20 through 50 to the file myerrorfile.

Questa® SIM Command Reference Manual, v2021.1 215

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 -write myerrorfile 20 50

Related Topics
compare add
compare annotate
Waveform Compare [Questa SIM User's Manual]

216 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 217

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).

218 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 219

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).

220 Questa® SIM Command Reference Manual, v2021.1

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}

Related Tcl variable is PrefCompare(defaultVHDLMatches).


• -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}

Related Tcl variable is PrefCompare(defaultVLOGMatches).


• -wavepane <n>
(optional) Specifies the pane of the Wave window in which to place compare 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) Specifies the name of the Wave window in which compare differences will be
viewed. Related Tcl variable is PrefCompare(defaultWaveWindow).
<wname> — The name of the window to which to add compare differences.
Description
If you do not enter any arguments, compare options returns the current setting for all options. If
an option is given that requires a value, and if that value is not given, compare options returns
the current value of that option. You can permanently change the default settings in Preferences
dialog box (Tools > Edit Preferences), on the By Name tab, under the Compare group of items.

Refer to “Setting GUI Preferences” for details.

Examples
• Return the current value of all options.
compare options

• Set the maxtotal option to 2000 differences.


compare options -maxtotal 2000

Questa® SIM Command Reference Manual, v2021.1 221

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare options

• Return the current value of the maxtotal option.


compare options -maxtotal

• Set the option to ignore Verilog net strengths.


compare options -ignoreVlogStrengths

• Verilog X will now match X, Z, or 0.


compare options -vlogxmatches {0=0:1=1:Z=Z:X=XZ0}

• VHDL std_logic X will now match 'U', 'X', 'W', or 'D'.


compare options -vhdlmatches {X=UXWD}

• Set the leading tolerance for asynchronous comparisons to 300 picoseconds.


compare options -tolLead {300 ps}

• Set the trailing tolerance for asynchronous comparisons to 250 picoseconds.


compare options -tolTrail {250 ps}

Related Topics
compare add
compare clock
Waveform Compare [Questa SIM User's Manual]

222 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 223

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]

224 Questa® SIM Command Reference Manual, v2021.1

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

• Compute differences from 5.3 nanoseconds to 57 milliseconds.


compare run {5.3 ns} {57 ms}

Related Topics
compare add
compare end
compare start
Waveform Compare [Questa SIM User's Manual]

Questa® SIM Command Reference Manual, v2021.1 225

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]

226 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 227

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.

228 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare see

<name> — The name of the window to which to add objects.


Examples
• Show the earliest difference (in time) in the default Wave window.
compare see -first

• 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]

Questa® SIM Command Reference Manual, v2021.1 229

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.

230 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
compare start

<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> is specified,
you must enclose <delay> and <unit> within curly braces ({}). Valid time units are:
fs, ps, ns, us, ms, sec, min, and hr.
• <reference_dataset>
(required) The dataset to use as the comparison reference. Must be the final argument to the
compare start command, unless you also specify the <test_dataset> argument.
• <test_dataset>
(optional) The dataset to test against the reference. If not specified, Questa SIM uses the
current simulation. The reference and test datasets can be the same.
Examples
• Begin a waveform comparison between a dataset named "gold" and the current
simulation. Assumes the gold dataset is already open.
compare start gold

• 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]

Questa® SIM Command Reference Manual, v2021.1 231

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]

232 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 233

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.

234 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
configure

wave — Specifies the Wave widget.


• -window <wname>
(optional) Specifies the name of the List or Wave window to target for the configure
command. (The view command allows you to create more than one List or Wave window).
If you do not specify a window, the default window is used; the default window is
determined by the most recent invocation of the view command and has “- Default”
appended to the name.
• <option> <value>
-bg <color> — (optional) Specifies the window background color.
-fg <color> — (optional) Specifies the window foreground color.
-selectbackground <color> — (optional) Specifies the window background color when
selected.
-selectforeground <color> — (optional) Specifies the window foreground color when
selected.
-font <font> — (optional) Specifies the font used in the widget.
-height <pixels> — (optional) Specifies the height in pixels of each row. .
Arguments, List window only
• -delta [all | collapse | events | none]
(optional) Specifies how information displays in the delta column. To use -delta,
-usesignaltriggers must be set to 1 (on).
all — Displays a new line for each time step on which objects change.
collapse — Displays the final value for each time step.
events — Displays an "event" column rather than a "delta" column and sorts List
window data by event.
none — Turns off the display of the delta column.
• -gateduration [<duration_open>]
(optional) Extends gating beyond the back edge (the last list row in which the expression
evaluates to true). The length of time gating remains open beyond when -gateexpr (below)
becomes false, expressed in x number of timescale units. The default value for normal
synchronous gating is zero. If -gateduration is set to a non-zero value, a simulation value is
displayed after the gate expression becomes false (if you do not want the values displayed,
set -gateduration to zero).
<duration_open> — Any non-negative integer where the default is 0 (values are not
displayed).
• -gateexpr [<expression>]
(optional) Specifies the expression for trigger gating. (Use the -usegating argument to
enable trigger gating.) The expression is evaluated when the List window would normally
have displayed a row of data.

Questa® SIM Command Reference Manual, v2021.1 235

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
configure

<expression> — An expression. Refer to the GUI_expression_format for information on


expression syntax.
• -usegating [off | on]
(optional) Enables triggers to be gated on or off by an overriding expression. (Use the
-gatexpr argument to specify the expression.) Refer to “Using Gating Expressions to
Control Triggering” in the GUI Reference Manual for additional information on using
gating with triggers.
off — (default) Triggers are gated off (a value of 0).
on — Triggers are gated on (a value of 1).
• -strobeperiod [<period>[<unit>]]
(optional) Specifies the period of the list strobe.
<period> — 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.
• -strobestart [<start_time>[<unit>]]
(optional) Specifies the start time of the list strobe.
<start_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
enclose <delay> and <unit> within curly braces ({}). Valid time units are: fs, ps, ns,
us, ms, sec, min, and hr.
• -usesignaltriggers [0 | 1]
(optional) Specifies whether or not to use signals as triggers.
0 — Signals are not used as triggers
1 — Signals are used as triggers
• -usestrobe [0 | 1]
(optional) Specifies whether or not to use a strobe as a trigger.
0 — Strobe is not used to trigger.
1 — Strobe is used to trigger.
Arguments, Wave window only
• -childrowmargin [<pixels>]
(optional) Specifies the distance in pixels between child signals. Related Tcl variable is
PrefWave(childRowMargin).
<pixels> — Any non-negative integer. The default is 2.

236 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 237

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.

238 Questa® SIM Command Reference Manual, v2021.1

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 period of the list strobe and turns it on.


config list -strobeperiod {50 ns} -strobestart 0 -usestrobe 1

• Set the wave vector color to blue.


config wave -vectorcolor blue

• 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]

Questa® SIM Command Reference Manual, v2021.1 239

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>

240 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 241

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.

242 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
context

<name> — (required) Name of a context object or region.


• tail <name>
Returns all of the characters in <name> after the last path separator. If <name> contains no
separators then returns <name>. Discards any trailing path separator.
<name> — (required) Name of a context object or region.
• type <name>
Returns a string giving the acc type of <name>.
<name> — (required) Name of a context object or region.
• visibility <name>
Returns the “acc” visibility settings for the named instance.
<name> — (required) Name of a context object or region.

Questa® SIM Command Reference Manual, v2021.1 243

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.)

244 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 245

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.

246 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 247

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

248 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 249

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”.

Alias nodes have a '+' sign appended to the node name.

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%
#

250 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze

• List tests that hit a specific coverage point:


coverage analyze -path /top/dut/u1/cvg_inst/cp1 -coverage nonzero

• List tests that hit a specific coverage bin:


coverage analyze -path /top/dut/u1/cvg_inst/cp1/bin1 -coverage nonzero

• List tests that did not hit a specific coverage bin:


coverage analyze -path /top/dut/u1/cvg_inst/cp3/bin2 -coverage zero

• Generate a hierarchical report of all design units:


coverage analyze -du *-totals -r

• Generate a hierarchical report of all testplan scopes, including linked scopes:


vsim> coverage analyze -plansection / -totals -r
Total Coverage Report
Sec# Testplan Section / Coverage Link Coverage Goal Weight
------------------------------------------------------------------------
- /testplan 56.18% 100.00% 1
1 Top 56.18% 100.00% 1
1.1 Bits 85.24% 100.00% 1
/top/child1/cvg_bits_vs_clock 83.33% 100.00% 2
/top/child1/cvg_bits_vs_bits 89.06% 100.00% 1
1.2 Arithmetic 27.11% 100.00% 1
/top/child2/cvg_arith 27.11% 100.00% 1

• Various examples of testplan queries:


• Look for any test that has zero coverage for the named testplan.
vsim> coverage analyze -plansection /test1.0/test1.1 -coverage zero
test0
test4

• 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%

• Filter by cover directives only:


vsim> coverage analyze -plansection /test1.0/test1.3 -coverage most -total -dir test27:
90%

Questa® SIM Command Reference Manual, v2021.1 251

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage analyze

• Ask the question based on a particular covergroup:


vsim> coverage analyze -path /top/i/cvg1 -coverage most -total test23: 85%

• Display anything not completely covered in a testplan:


coverage analyze -plansection / -r -select cover -lt 100

• Display coverage holes with weight greater than 1:


coverage analyze -plansection / -r -select cover -eq 0 -weight -gt 1

• 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.*"

• Various examples of using the -select name option:


coverage analyze -r -select name -eq {/top/mach/state_out}
coverage analyze -r -select name -eq {/top/mach/state_out} -prunechildren
coverage analyze -r -select name -eq /top/*/state — [Here, * means "match any
number of any characters"]
coverage analyze -r -select name -ne {/top/fib_val}
coverage analyze -r -select name -regexp prop
coverage analyze -r -select name -regexp branch
coverage analyze -r -select name -nregexp mach
coverage analyze -r -select name -nregexp mach -prunechildren
coverage analyze -r -select name -regexp /top/tog*.e/sbts

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]

252 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 253

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).

254 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage attribute

To apply filters (-select instance, -assert, -code, and so forth.):

• Match paths first, with recursion (if specified).


• Specify paths to be “thrown out” (those not matching the filter).
You can also use this command to create global user attributesand enable them to capture trend
data using the -trendable argument.

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.

Questa® SIM Command Reference Manual, v2021.1 255

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.

256 Questa® SIM Command Reference Manual, v2021.1

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 *

• Add a trendable attribute to a “snapshot” UCDB:


vsim –c –viewcov snapshot1.ucdb
coverage attribute –ucdb -name Tests -value 87 -trendable
coverage attribute –ucdb -name Fails -value 47 -trendable
coverage attribute –ucdb -name Passes -value 40 -trendable
coverage save snapshot1.ucdb

• Create a new covergroup, in an existing testplan, with type_option.merge_instances=1:


vsim -c -viewcov testplan.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 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.

• Display ALL attributes on the “top/mytest” history node:


coverage attribute -history top/mytest

Questa® SIM Command Reference Manual, v2021.1 257

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

258 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 259

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

• Clear data for all covergroups and covergroup directives.


coverage clear -cvg -directive

• Clear coverage data from all /top/a.


coverage clear -path /top/a/*

Related Topics
Code Coverage [Questa SIM User's Manual]
coverage attribute
coverage exclude
coverage ranktest
coverage report
coverage save
coverage tag

260 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 261

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.

262 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 263

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.

• Create a coverpoint with some bins:


vsim -c -viewcov testplan1.ucdb
coverage create -cvp p1 -parent /top/mycvg
coverage create -cvb b1 -parent /top/mycvg/p1 -count 7
coverage create -cvb b2 -parent /top/mycvg/p1
coverage create -cvb ii1 -parent /top/mycvg/p1 -ignore

264 Questa® SIM Command Reference Manual, v2021.1

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 -cvb il1 -parent /top/mycvg/p1 -illegal -count 5

• Create another coverpoint with some bins


vsim -c -viewcov testplan1.ucdb
coverage create -cvp p2 -parent /top/mycvg
coverage create -cvb {b[0]} -parent /top/mycvg/p2
coverage create -cvb {b[1]} -parent /top/mycvg/p2
coverage create -cvb i1 -parent /top/mycvg/p2 -ignore
coverage create -cvb l1 -parent /top/mycvg/p2 -illegal

• Update some bin counts:


vsim -c -viewcov testplan1.ucdb
coverage edit -setcount 3 -path {/top/mycvg/p2/b[0]}
coverage edit -incrcount 4 -path {/top/mycvg/p2/b[0]}
coverage edit -incrcount 9 -path {/top/mycvg/p2/b[1]}
coverage edit -incrcount 2 -path /top/mycvg/p2/i1

Related Topics
Code Coverage [Questa SIM User's Manual]
coverage attribute
coverage exclude
coverage ranktest
coverage report
coverage save
coverage tag
coverage analyze

Questa® SIM Command Reference Manual, v2021.1 265

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;

266 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 267

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.

268 Questa® SIM Command Reference Manual, v2021.1

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.

• Keep only all instances of the given design unit:


coverage edit -keeponly -instofdu myentity(myarch)

• 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

• Keep only coverage from a specified testplan section:


coverage edit -keeponly -plansection /myplan/1.2

• Keep only coverage from a specified design unit:


coverage edit -keeponly -instofdu /top/a

• 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

• Rename design unit work.statemach:


coverage edit -du work.statemach -rename new_name

• Rename test sink_b to sink_b2:


coverage edit -test sink_b -rename sink_b2

Questa® SIM Command Reference Manual, v2021.1 269

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 "work" design units to “libA”:


coverage edit –rename –lib work libA

• 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 {}

• Change the library name part of "work.v*" design units to “libA”:


coverage edit -rename -du *.v* -lib work libA

• Move testplan scope "b" and its entire subtree so that "b" is now a child of "testplan":
coverage edit -moveplan /testplan/a/b /testplan

• Move a group of toggles:


coverage edit -movedesign /top/fib_val /top/mach

• Move one toggle of many:


coverage edit -movedesign /top/st2[0] /top/mach

• Move a many statements:


coverage edit -movedesign /top/machinv/branch* /top

• Move one expression to a newly created path of dummy instance scopes:


coverage edit -installdesign /tic/tac/toe
coverage edit -movedesign /top/fib/expr#72# /tic/tac/toe

• 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

270 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 271

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.

File-based, line-based, or wholesale exclusions


coverage exclude {-srcfile <source_file_list> [-pragma] | -du <du_name> [-srcfile
<source_file_list>] [-pragma] | -scope <path_list> [-srcfile <source_file_list> | -recursive]}
[-linerange [<ln>] ... [<ln>-<ln>] ...] [-item {<bces>} [[<int> | <int-int>] ...]] [-allfalse]
[-dataset <name>] [-code {a | b | c | d | e | f | s | t}...] [-clear] [-reason <str>]
Exclude expression or condition rows
coverage exclude {-srcfile <source_file_list> [-pragma] | -du <du_name> [-srcfile
<source_file_list>] [-pragma] | -scope <path_list> [-srcfile <source_file_list>]} [-item
{<bces>} [[<int> | <int-int>] ...]] [-feccondrow <ln> [<rn>] ... [<rn>-<rn>] ...] [-fecexprrow
<ln> [<rn>] ... [<rn>-<rn>] ...] [-dataset <name>] [-clear]
Exclude functional coverage
coverage exclude {-assertpath <assert_list> | -dirpath <directive_list>}
[-du <du_name> | -srcfile <source_file_list>] [-clear] [-comment <str>]
Note
Allows wildcard characters when running the command in Coverage View mode.

Exclude assertions and/or cover directives by line range


coverage exclude { -srcfile <source_file_list> | -du <du_name> [-srcfile <source_file_list> |
-scope <path_list> [-srcfile <source_file_list> | -recursive]} [-linerange [<ln>] ... [<ln>-
<ln>] ...] [-comment <str>] [-code {a | b | c | d | e | f | s | t}...] [-immediate] [-concurrent] [-
dataset <name>] [-clear] [-lang sv | psl | vhdl] [-severity note | warning | error | fatal]
Note
Immediate and concurrent assertions/cover directives are specified with the -immediate and
-concurrent options, respectively. If you do not specify either -immediate nor -concurrent,
both types are excluded.

If you do not specify -code, the exclusion applies to assertions and cover directives as well as
code coverage types (equivalent to -code abcdefst.)

272 Questa® SIM Command Reference Manual, v2021.1

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 FSM states or state transitions


coverage exclude (-du <du_name> {<fsm_args> | -pragma | -scope <path_list>} | [-dataset
<name>]) [-clear]
<fsm_args> = -fstate <state_var_name> [<state_name>] ... } -ftrans <state_var_name>
[<transition_name>] ... | -fsamestate <state_var_name> [<state_list>]} -fcontains
<state_var_name> [<two_state_trans_list>]} -finitial <state_var_name> [<state_list>]}
[-dataset <name>] [-clear]
Exclude toggle coverage
coverage exclude -togglenode <node_path_list> [-du <du_name> | -scope <path_list>
[-recursive]] [-dataset <name>] [-in] [-out] [-inout] [-internal] [-ports] [-clear] [-pragma]
[-trans <transition_list>]
Exclude power states and transitions (Power Aware simulation)
coverage exclude -scope <path_list> {-pstate <state_var_name> [<state_list>]} |
{-ptrans <state_var_name> [<transition_list>]} [-pcross] [-clear] [-comment <str>]
[-reason <str>]
Description
The coverage exclude command enables you to exclude the following from coverage statistics:

• specific code coverage items (statement, branch, expression or condition)


• specific code coverage types
• all code in specified source file(s)
• lines within a source file
• specific items on a line within a source file
• rows within a condition or expression truth table
• code inside specific design units or instances
• transitions or states within a Finite State Machine
• toggle nodes
• individual transitions of a toggle node
• assertions
• cover directives
• functional coverage (covergroups)
• power states and transitions
You can issue this command and its arguments (except -comment) during simulation, or in
Coverage View (post-process) mode.

Questa® SIM Command Reference Manual, v2021.1 273

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).

Use the -clear switch to remove Coverage exclusions.

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

274 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 275

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.

276 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude

• -item {<bces>} [[<int> | <int-int>] ...]


(optional) Excludes specified coverage item(s) on a line of source code from database. The
-item argument can be applied only to coverage exclude command entries for the line
number specified with -linerange. <bces> is required and specifies one or more of the
coverage types to exclude: branch, condition, expression, and/or statement. Items are
numbered from left to right within a line, regardless of hierarchy, from 1 upward. Only one
-item argument is allowed with each coverage exclude command. You cannot use this
argument with the -code tf argument.
• -lang sv | psl | vhdl
(optional) Specifies assertions/cover directives of a specific language (SV, PSL, or VHDL).
You can specify multiple languages by using this option multiple times. If you do not
specify -lang, all three languages are selected.
• -linerange [<ln>] ... [<ln>-<ln>] ...
(optional) Specifies the line number(s) and/or range of line numbers to exclude from code
coverage in the design source file -srcfile <source_file>. Allows multiple lines and line
ranges, separated by whitespace.
o Select multi-line statements, branches, conditions or expressions by specifying the
last line number of that item.
o If -linerange is not specified, all objects on all lines of the specified design unit,
scope, or source file are excluded (a “wholesale exclusion”.)
o -srcfile is required for -linerange, unless you use -du or -scope, and use only one
source file to implement the du or scope.
o If -srcfile is used with -du/-scope, and -linerange is in effect, it is possible for
-linerange to specify lines other than lines used to implement the -du or -scope. Such
lines are ignored.
• -out
(optional) Excludes the specified toggle nodes of mode OUT. This argument is valid only
when you specify -togglenode.
• -ports
(optional) Excludes the specified toggle nodes of mode IN, OUT, or INOUT. This argument
is valid only when you specify -togglenode.
• -pragma
(optional) Adds or clears pragma and user exclusions. Operates with file-based exclusions
(-du and/or -srcfile) for all coverage types, including toggle exclusions (-togglenode). For
instance based exclusions (-pragma used with -scope) it operates with all coverage types
except FSM coverage. If the -pragma argument is specified, both user and pragma
exclusions are applied. If the option is not specified, only user exclusions are applied.

Questa® SIM Command Reference Manual, v2021.1 277

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude

• -pstate <state_var_name> [<state_list>]


Excludes the states listed in <state_list> of the object <state_var_name> from the coverage
metrics. Use the argument with the -scope <path_list> argument. See “Excluding Objects
From Power Aware Coverage”.
Note
It also excludes all transitions to and from the specified state.

<state_var_name> — Name of any of the following objects:


• Power domain
• Supply port
• Power state table
• Supply set
• Power switch
• Power switch control and ack port
• Isolation enable signal
• Retention save or restore signal
<state_list> — Space-separated list of states of the object <state_var_name> that are to
be excluded from the coverage metrics.
• -ptrans <state_var_name> [<transition_list>]
Excludes the transitions listed in <transition_list> of the object <state_var_name> from
the coverage metrics. Use the argument with the -scope <path_list> argument. See
“Excluding Objects From Power Aware Coverage”.
<state_var_name> — Name of any of the following objects:
• Power domain
• Supply port
• Power state table
• Supply set
• Power switch
• Power switch control and ack port
• Isolation enable signal
• Retention save or restore signal
<transition_list> — Space-separated list of transitions of the object <state_var_name>
that are to be excluded from the coverage metrics. Wildcard character (*) is allowed.

278 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 279

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

• Exclude the all false (00) branch of the following case:


else if
(A | B)

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

• Exclude all cover groups in a module in Coverage View mode:


coverage exclude -du <module_name> -cvgpath *

280 Questa® SIM Command Reference Manual, v2021.1

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 *

• Exclude all cover groups in a module in live simulation mode:


coverage exclude -du <module_name> -cvgpath <cvg_type1> <cvg_type2>

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 all toggle coverage (equivalent to 'toggle disable -all')


coverage exclude -du * -code t -pragma

• Exclude toggle nodes a, b, and c in instance /top/dut.


coverage exclude -togglenode a b c -scope /top/dut

• Recursively exclude all input toggle nodes in instance /top/dut.


coverage exclude -togglenode * -scope /top/dut -in -recursive

• Exclude bits of a bus from toggle nodes in instance /top/dut/bus_int.


coverage exclude -togglenode {MyBus(3 downto 2)} -scope /top/dut/bus_int

• Exclude transitions 0->1 and 0->Z in toggle nodes mybit and myreg.
coverage exclude -togglenode mybit myreg -trans 01 0z

• Exclude covergroup at /top/tb/pci_cg:


coverage exclude -cvgpath /top/tb/pci_cg
What NOT to do: Illegal Examples
• -allfalse has no effect because branch coverage is not specified.
coverage exclude -srcfile project1.vhd -code s -allfalse

• There is no file name and line number associated with FSM and toggle coverage.
coverage exclude -srcfile project1.vhd -linerange 10-20 -code ft

• -recursive does not work with -srcfile or -linerange


coverage exclude -scope /top/dut -srcfile project1.vhd -linerange 10-20 -recursive

• '-du *' does not work with -srcfile or -linerange


coverage exclude -du * -srcfile project1.vhd -linerange 10-20

Questa® SIM Command Reference Manual, v2021.1 281

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage exclude

• -pragma does not work with -scope for FSM coverage


coverage exclude -scope /top/dut -srcfile project1.vhd -line 10-20 -pragma
Power Aware cross coverage exclusion
• Exclude a state SLEEP in the power domain PD_SYS1 in instance /top/pd_alu.
coverage exclude -scope /top/pd_alu -pstate PD_SYS1 SLEEP

• 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]

282 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 283

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage goal

• Set goal for assertion directive sub-types; arguments are:


-active
(optional) Sets goal for ‘active’ assertion directive, per instance.
-attempted
(optional) Sets goal for ‘attempted’ assertion directives, per instance.
-disabled
(optional) Sets goal for ‘disabled’ assertion directives, per instance.
-fail
(optional) Sets goal for assertion directive ‘failure’, per instance.
-pass
(optional) Sets goal for assertion directive ‘pass’, per instance.
-vpass
(optional) Sets goal 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. 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.

284 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 285

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

286 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 287

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

288 Questa® SIM Command Reference Manual, v2021.1

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 %

Questa® SIM Command Reference Manual, v2021.1 289

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage ranktest

Table 2-4. Order and Type of Ranked Tests (cont.)


Contributing, Tests providing coverage not Sorted
noncompulsory provided by any previous test. by total
covera
ge %
Non-contributing Redundant tests, providing no Not
incremental coverage. sorted
To rank on a specific coverage item, design unit, or testplan section within the hierarchy of your
design, use -path, -du or -plansection.

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.

290 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 291

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,

292 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 293

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.

294 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 295

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

296 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 297

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.

By default, the command returns results from the current scope.

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.

298 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report

• -code {[b] [c] [e] [f] [s] [t] [x]}...


(optional) Specifies which code coverage statistics to include in the report. If -code is
specified, the specification of one or more coverage types is required. By default, the report
includes statistics for all categories you enable at compile time. You can specify more than
one coverage type with the -code argument.
Not a valid option when reporting on functional coverage data.
If you specify this argument multiple times, only the last one is kept.
The coverage types allowed are as follows:
b — Include branch statistics.
c — Include condition statistics.
e — Include expression statistics.
f — Include finite state machine statistics.
s — Include statement statistics.
t — Include toggle statistics.
x — Include extended toggle statistics
To report extended toggle coverage, ensure that you have compiled (vlog/vcom) with the
-code x argument, then use coverage report with -code t.
• -codeAll
(optional) Specifies the command apply to all coverage types. Equivalent to -code bcestfx.
• -comment | -nocomment
(optional) Specifies whether comments should be displayed in the output report. By default,
comments appear in the report.
• -concurrent | -immediate
(optional) Selects only concurrent assertions when the -concurrent switch is used. Selects
only immediate assertions when the -immediate switch is used. These are mutually
exclusive options. If you do not specify either switch, both concurrent and immediate
assertions are selected.
• -config
(optional) Specifies to include the current configuration of each cover directive in the report.
• -covered
(optional) Displays covered bins only. This argument applies only to covergroups in
coverage reports and the GUI. If any covergroup item survives the covergroup filters
applied, its ancestors display in the report and the GUI.
• -coverenhanced
(optional) Enables non-critical functionality that might change the appearance or content of
coverage metrics. This argument has an effect only in letter releases (such as 10.Xa, 10.Xb,

Questa® SIM Command Reference Manual, v2021.1 299

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.

300 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 301

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.

302 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 303

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]

304 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage report

-le [int] — sample count is less than or equal to number


-ge [int] — sample count is greater than or equal to number
[int]-[int] — (no white space allowed) sample count is in the range lower-upper. There
is only 1 -sample option allowed per invocation.
• -select (input | output | inout | ports | internal)
(optional) Prints a report for only the specified port types.
• -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.
• -showambiguity
(optional) When used, coverage report displays both minimum and maximum counts for
any conflicting toggle data in a UCDB that results from a combined merge (vcover merge
command performed with -combine).
• -showenabledcodecov
Displays all code coverage information that was enabled in compilation even if they have no
data.
• -showexcluded
(optional) When used, the coverage report displays the excluded functional and code
coverage items. You can not specify this argument with -flat.
• -summary
Creates an overall textual summary for instances or files per the requested mode. Adding the
optional -html argument creates an HTML version of the same report.
• -srcfile=<filename>[+<filename>]
(optional) Reports the coverage data for the specified source files. By default, all source
information is included. You can use wildcards (*).
• -testattr
(optional) Displays test attributes in the report.
• -testdetails
(optional) In addition to the test summary page, this argument generates a page of
information for each test that was run. By default, these pages are excluded.
• -testextract <test_name_or_pattern>
(optional) Displays test specific results in the report. Used to combine results from multiple
tests. The <test_name_or_pattern> is the test or pattern to extract. You can apply multiple -
testextract arguments in same command. This argument is compatible with reports
generated in plain text and XML formats only; HTML reports are not supported. When you
use this argument, a header line appears at the top of the report listing test name(s) used to

Questa® SIM Command Reference Manual, v2021.1 305

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.

306 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 307

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.

308 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 309

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).

310 Questa® SIM Command Reference Manual, v2021.1

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.

The report displays code coverage data from generate blocks.

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

• Save only test data to mytest.ucdb:


coverage save -empty mytest

• Save Power Aware-specific coverage data only.


coverage save -pa <name>.ucdb

• Save Power Aware and non-Power Aware coverage data.


coverage save <name>.ucdb

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

Questa® SIM Command Reference Manual, v2021.1 311

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.

312 Questa® SIM Command Reference Manual, v2021.1

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 coverage tag command defines the following:

• 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.

Questa® SIM Command Reference Manual, v2021.1 313

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.

314 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
coverage tag

• -linerange [ln | ln-ln]...


(optional) Restricts the action of the command to all items that fall within the indicated
range of lines without respect to item numbers. All ranges are inclusive.
• -match <string>
(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. Allows wildcards. This switch is mutually exclusive with the following
other coverage tag arguments: -recursive, coverage type filters (-assert, -codeAll, -cvg, and
so forth.), -cvgmatch, -cvpmatch, and -cvginstmatch.
• -path <path> [<path>...]
(required, unless specifying either -testrecord or -plansection, or used with -duname)
Specifies a path to which the tag applies in the UCDB. You can specify more than one path.
Allows wildcards. Mutually exclusive with -plansection and -testrecord. If used with -
duname, the path specified must be relative to that design unit.
This argument is useful when path is specified in the Link column of a verification plan. For
more information, refer to “xml2ucdb.ini Configuration File” in the Verification
Management User’s Manual. You can also use <path> to specify a dataset other than the
current dataset. (See “Object Name Syntax” for instructions on how to specify a dataset.) If
no dataset is specified, the current dataset is used. You can use only one dataset name per
command invocation, or an error results.
• -plansection <path>
(required, unless specifying either -testrecord. -duname, or -path) Specifies a testplan path
to which the tag is applied. Mutually exclusive with -path, -duname and -testrecord. Allows
wildcards.
• -recursive
(optional) Recursively selects objects under the given scope. Must be used with only one of
the following per command invocation: -plansection <path> | -testrecord <test_name> | -
path <path> [<path>...] | -duname <lib>.<duname>.
The following command:
coverage tag -path / -recursive

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.

Questa® SIM Command Reference Manual, v2021.1 315

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

Returns information such as the following:


# /coverpkg/statecover [covergroup]: "2.2"
# /coverpkg/statecover/cvpi [coverpoint] (no tags)
# /coverpkg/statecover/cvpstate [coverpoint] (no tags)
# /coverpkg/statecover/i_x_state [cross] (no tags)

• Display all bins, recursively, in the entire design:


coverage tag -path / -r -bins

• Display all testplan scopes, recursively, in the entire design:


coverage tag -plan / -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

• Display all testplan scopes that have “plan” in the tagname:


coverage tag -plan / -r -tagmatch *plan*

316 Questa® SIM Command Reference Manual, v2021.1

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 a given covergroup "/a/b/cvg0" and a given instance "/a/d":


coverage tag -tagname T1 -path /a/b/cvg0 /a/d

• Tag all covergroups in the instance /a/b:


coverage tag -tagname T1 -cvg -path /a/b/*

• Tag all covergroups in the subtree rooted at /a/b:


coverage tag -tagname T1 -recursive -cvg -path /a/b

• 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 objects matching the pattern in all design units


coverage tag -tagname T1 -match a* -du *

• 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 named "cvp1" that belongs to coverage instance "cvginst1" in


covergroup "cvg1"; note this will not tag coverpoints named "cvp1" that happen to exist
in other contexts. Accepts wildcard patterns, tagging any coverpoint-coverinstance-
covergroup combination that matches:
coverage tag -tagname T1 -cvgmatch cvg1 -cvginstmatch cvginst1 -cvpmatch cvp1

• Tag a coverpoint or cross matching the given pattern inside a covergroup type named
"cvgtype":
coverage tag -tagname T1 -cvgmatch cvgtype -cvpmatch *myvar*

• Display all of the bins in a specified design tree:


coverage tag -bins -path / -recursive

• Display all of the scopes under 'foo_scope':


coverage tag -path /top/foo_scope/*

Questa® SIM Command Reference Manual, v2021.1 317

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 the bin 'cover_1' under scope 'foo_scope':


coverage tag -bins -path /top/foo_scope/cover_1

• Display all bins having the form 'cover_*' under scope 'foo_scope':
coverage tag -bins -path /top/foo_scope/cover_*

• Display all of the bins under 'foo_scope':


coverage tag -bins -path /top/foo_scope/*

• 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

318 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 319

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:

• testplan items with no coverage associated.


• directed tests within a testplan with no coverage associated.
• design coverage that has not been associated with an item in a testplan.
This command is available only during post-simulation processing, when a UCDB file is
opened with vsim -viewcov.

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.

320 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 321

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 any unlinked covergroup or cover directive:


coverage unlinked -path / -cvg -dir -r

• Find design units that are unlinked:


coverage unlinked -du *

• 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

322 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 323

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:

• Set or display global per-type weights


• Set or display scope weights
Setting either the per-type or scope weights has an effect on total coverage calculations.

Enter a coverage weight command without an <integer_weight> to display weights.

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.

324 Questa® SIM Command Reference Manual, v2021.1

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”).

Questa® SIM Command Reference Manual, v2021.1 325

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.

326 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 327

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.”

dataset alias gold bar

Related Topics
dataset clear
dataset close
dataset config
dataset info
dataset list
dataset open
dataset rename
dataset restart
dataset save
dataset snapshot

328 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 329

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]

330 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 331

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.

dataset config gold -wlfcachesize 512

Related Topics
dataset alias

332 Questa® SIM Command Reference Manual, v2021.1

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]

Questa® SIM Command Reference Manual, v2021.1 333

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]

334 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 335

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

336 Questa® SIM Command Reference Manual, v2021.1

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.

dataset open last.wlf test

Related Topics
dataset alias
dataset clear
dataset close
dataset config
dataset info
dataset list
dataset rename
dataset restart
dataset save
dataset snapshot

Questa® SIM Command Reference Manual, v2021.1 337

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".

dataset rename test test2

Related Topics
dataset alias
dataset clear
dataset close
dataset config
dataset info
dataset list
dataset open
dataset restart
dataset save
dataset snapshot

338 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 339

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.

dataset save sim gold.wlf

Related Topics
dataset alias
dataset clear
dataset close
dataset config
dataset info
dataset list
dataset open
dataset rename
dataset restart
dataset snapshot

340 Questa® SIM Command Reference Manual, v2021.1

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)

Questa® SIM Command Reference Manual, v2021.1 341

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).

342 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 343

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*

344 Questa® SIM Command Reference Manual, v2021.1

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:

• VHDL — signals, variables, constants, and FILE objects.


• Verilog — nets and registers
• C — variables
• SystemC — signals, ports, FIFOs, and member variables of modules
• Design region
VHDL signals, Verilog nets and registers, and SystemC signals and ports can be specified as
hierarchical names.

C variables can be described if both of the following are true:

• 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

• Print the type of what p points to.


describe *p

Questa® SIM Command Reference Manual, v2021.1 345

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
describe

• Print the types of the three specified signals.


describe clk prw prdy

• Return information about /textio/INPUT.


describe /textio/INPUT

produces:
# File of
# Unconstrained Array of
# VHDL standard type CHARACTER

346 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 347

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

• Disable the file menu of the mywindow window.


disable_menu .mywindow File

Related Topics
disable_menuitem
enable_menu

348 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 349

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

Where the DO file testfile contains the line


bp $1 $2

place a breakpoint in the source file named design.vhd at line 127.

350 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)
do

do testfile design.vhd 127

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]

Questa® SIM Command Reference Manual, v2021.1 351

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.

There are three steps to using down:

1. Click the desired object.


2. Click the desired starting location.
3. Issue the down command. (The seetime command can initially position the cursor from
the command line, if desired.)
Returns: <number_found> <new_time> <new_delta>

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.

352 Questa® SIM Command Reference Manual, v2021.1

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

• Go to the next transition on the selected object.


down

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)}

Questa® SIM Command Reference Manual, v2021.1 353

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.

Figure 2-3. drivers Command Results in Transcript

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

354 Questa® SIM Command Reference Manual, v2021.1

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.

Questa® SIM Command Reference Manual, v2021.1 355

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.

356 Questa® SIM Command Reference Manual, v2021.1

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.”

returns the message:


The time is 1000 ns.

• If the quotes are omitted:


echo The time is $now ns.

all adjacent blank spaces are compressed into one space.


The time is $now ns.”

• echo can also use command substitution, such as:


echo The hex value of counter is [examine -hex counter].

If the current value of counter is 21 (15 hex), this command returns:


The hex value of counter is 15.

Questa® SIM Command Reference Manual, v2021.1 357

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]

358 Questa® SIM Command Reference Manual, v2021.1

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

Questa® SIM Command Reference Manual, v2021.1 359

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

• Enable the previously-disabled File menu of the mywindow window.


enable_menu .mywindow File

Related Topics
disable_menu

360 Questa® SIM Command Reference Manual, v2021.1

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:

enable_menuitem .mywindow file.save "Save Results As..."

Related Topics
disable_menuitem

Questa® SIM Command Reference Manual, v2021.1 361

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:

• encoding convertfrom — Converts a string from the named encoding to Unicode.


• encoding convertto — Converts a string to the named encoding from Unicode.
• encoding names — Returns a list of all valid encoding names (takes no arguments).
• encoding system — Changes the current system encoding to a named encoding. If you
omit a new encoding the command returns the current system encoding. The system
encoding is used whenever Tcl passes strings to system calls.
Arguments
• string
Specifies a string to be converted.
• encoding_name
The name of the encoding to use.

362 Questa® SIM Command Reference Manual, v2021.1

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

• Change to another dataset but retain the currently selected context.


env test:

• Change all unlocked windows to the context "test:/top/foo".


env test:/top/foo

• Move down two levels in the design hierarchy.


env blk1/u2

• Move to the top level of the design hierarchy.


env /

Questa® SIM Command Reference Manual, v2021.1 363

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]

364 Questa® SIM Command Reference Manual, v2021.1

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.

You can examine the following objects:

• 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).

Questa® SIM Command Reference Manual, v2021.1 365

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

366 Questa® SIM Command Reference Manual, v2021.1

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

examine -radix binary d


# 0000000000001001

examine -radix binary,showbase d


# 16'b0000000000001001

examine -radix hex,enumsymbolic nxt_state


# send5

examine -radix hex,enumnumeric nxt_state


# 0000000d

Refer to Design Object Names for more information on specifying names.


Arguments
• <name>…
(required except when specifying -expr.) Specifies the name of any HDL or SystemC object.
Allows all object types except those of the type file. Accepts multiple names and wildcards.
Spaces, square brackets, and extended identifiers require braces; see examples below for
more details. To examine a VHDL variable, you can add a process label to the name. For
example, (make certain to use two underscore characters):
exa line__36/i

• -delta <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

Questa® SIM Command Reference Manual, v2021.1 367

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

368 Questa® SIM Command Reference Manual, v2021.1

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Commands (A - M)