| 1 |
16 |
HanySalah |
//
|
| 2 |
|
|
//------------------------------------------------------------------------------
|
| 3 |
|
|
// Copyright 2007-2011 Mentor Graphics Corporation
|
| 4 |
|
|
// Copyright 2007-2010 Cadence Design Systems, Inc.
|
| 5 |
|
|
// Copyright 2010-2013 Synopsys, Inc.
|
| 6 |
|
|
// Copyright 2013 NVIDIA Corporation
|
| 7 |
|
|
// All Rights Reserved Worldwide
|
| 8 |
|
|
//
|
| 9 |
|
|
// Licensed under the Apache License, Version 2.0 (the
|
| 10 |
|
|
// "License"); you may not use this file except in
|
| 11 |
|
|
// compliance with the License. You may obtain a copy of
|
| 12 |
|
|
// the License at
|
| 13 |
|
|
//
|
| 14 |
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
| 15 |
|
|
//
|
| 16 |
|
|
// Unless required by applicable law or agreed to in
|
| 17 |
|
|
// writing, software distributed under the License is
|
| 18 |
|
|
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
| 19 |
|
|
// CONDITIONS OF ANY KIND, either express or implied. See
|
| 20 |
|
|
// the License for the specific language governing
|
| 21 |
|
|
// permissions and limitations under the License.
|
| 22 |
|
|
//------------------------------------------------------------------------------
|
| 23 |
|
|
|
| 24 |
|
|
//This bit marks where filtering should occur to remove uvm stuff from a
|
| 25 |
|
|
//scope
|
| 26 |
|
|
bit uvm_start_uvm_declarations = 1;
|
| 27 |
|
|
|
| 28 |
|
|
//------------------------------------------------------------------------------
|
| 29 |
|
|
//
|
| 30 |
|
|
// Section: Types and Enumerations
|
| 31 |
|
|
//
|
| 32 |
|
|
//------------------------------------------------------------------------------
|
| 33 |
|
|
|
| 34 |
|
|
//------------------------
|
| 35 |
|
|
// Group: Field automation
|
| 36 |
|
|
//------------------------
|
| 37 |
|
|
|
| 38 |
|
|
|
| 39 |
|
|
parameter UVM_STREAMBITS = `UVM_MAX_STREAMBITS;
|
| 40 |
|
|
|
| 41 |
|
|
|
| 42 |
|
|
// Type: uvm_bitstream_t
|
| 43 |
|
|
//
|
| 44 |
|
|
// The bitstream type is used as a argument type for passing integral values
|
| 45 |
|
|
// in such methods as , ,
|
| 46 |
|
|
// , ,
|
| 47 |
|
|
// and .
|
| 48 |
|
|
|
| 49 |
|
|
typedef logic signed [UVM_STREAMBITS-1:0] uvm_bitstream_t;
|
| 50 |
|
|
|
| 51 |
|
|
// Type: uvm_integral_t
|
| 52 |
|
|
//
|
| 53 |
|
|
// The integral type is used as a argument type for passing integral values
|
| 54 |
|
|
// of 64 bits or less in such methods as
|
| 55 |
|
|
// , ,
|
| 56 |
|
|
// and .
|
| 57 |
|
|
//
|
| 58 |
|
|
|
| 59 |
|
|
typedef logic signed [63:0] uvm_integral_t;
|
| 60 |
|
|
|
| 61 |
|
|
|
| 62 |
|
|
|
| 63 |
|
|
// Enum: uvm_radix_enum
|
| 64 |
|
|
//
|
| 65 |
|
|
// Specifies the radix to print or record in.
|
| 66 |
|
|
//
|
| 67 |
|
|
// UVM_BIN - Selects binary (%b) format
|
| 68 |
|
|
// UVM_DEC - Selects decimal (%d) format
|
| 69 |
|
|
// UVM_UNSIGNED - Selects unsigned decimal (%u) format
|
| 70 |
|
|
// UVM_UNFORMAT2 - Selects unformatted 2 value data (%u) format
|
| 71 |
|
|
// UVM_UNFORMAT4 - Selects unformatted 4 value data (%z) format
|
| 72 |
|
|
// UVM_OCT - Selects octal (%o) format
|
| 73 |
|
|
// UVM_HEX - Selects hexadecimal (%h) format
|
| 74 |
|
|
// UVM_STRING - Selects string (%s) format
|
| 75 |
|
|
// UVM_TIME - Selects time (%t) format
|
| 76 |
|
|
// UVM_ENUM - Selects enumeration value (name) format
|
| 77 |
|
|
// UVM_REAL - Selects real (%g) in exponential or decimal format,
|
| 78 |
|
|
// whichever format results in the shorter printed output
|
| 79 |
|
|
// UVM_REAL_DEC - Selects real (%f) in decimal format
|
| 80 |
|
|
// UVM_REAL_EXP - Selects real (%e) in exponential format
|
| 81 |
|
|
|
| 82 |
|
|
typedef enum {
|
| 83 |
|
|
UVM_BIN = 'h1000000,
|
| 84 |
|
|
UVM_DEC = 'h2000000,
|
| 85 |
|
|
UVM_UNSIGNED = 'h3000000,
|
| 86 |
|
|
UVM_UNFORMAT2 = 'h4000000,
|
| 87 |
|
|
UVM_UNFORMAT4 = 'h5000000,
|
| 88 |
|
|
UVM_OCT = 'h6000000,
|
| 89 |
|
|
UVM_HEX = 'h7000000,
|
| 90 |
|
|
UVM_STRING = 'h8000000,
|
| 91 |
|
|
UVM_TIME = 'h9000000,
|
| 92 |
|
|
UVM_ENUM = 'ha000000,
|
| 93 |
|
|
UVM_REAL = 'hb000000,
|
| 94 |
|
|
UVM_REAL_DEC = 'hc000000,
|
| 95 |
|
|
UVM_REAL_EXP = 'hd000000,
|
| 96 |
|
|
UVM_NORADIX = 0
|
| 97 |
|
|
} uvm_radix_enum;
|
| 98 |
|
|
|
| 99 |
|
|
parameter UVM_RADIX = 'hf000000; //4 bits setting the radix
|
| 100 |
|
|
|
| 101 |
|
|
|
| 102 |
|
|
// Function- uvm_radix_to_string
|
| 103 |
|
|
|
| 104 |
|
|
function string uvm_radix_to_string(uvm_radix_enum radix);
|
| 105 |
|
|
case(radix)
|
| 106 |
|
|
UVM_BIN: return "b";
|
| 107 |
|
|
UVM_OCT: return "o";
|
| 108 |
|
|
UVM_DEC: return "d";
|
| 109 |
|
|
UVM_HEX: return "h";
|
| 110 |
|
|
UVM_UNSIGNED: return "u";
|
| 111 |
|
|
UVM_UNFORMAT2: return "u";
|
| 112 |
|
|
UVM_UNFORMAT4: return "z";
|
| 113 |
|
|
UVM_STRING: return "s";
|
| 114 |
|
|
UVM_TIME: return "t";
|
| 115 |
|
|
UVM_ENUM: return "s";
|
| 116 |
|
|
UVM_REAL: return "g";
|
| 117 |
|
|
UVM_REAL_DEC: return "f";
|
| 118 |
|
|
UVM_REAL_EXP: return "e";
|
| 119 |
|
|
default: return "x"; //hex
|
| 120 |
|
|
endcase
|
| 121 |
|
|
endfunction
|
| 122 |
|
|
|
| 123 |
|
|
|
| 124 |
|
|
// Enum: uvm_recursion_policy_enum
|
| 125 |
|
|
//
|
| 126 |
|
|
// Specifies the policy for copying objects.
|
| 127 |
|
|
//
|
| 128 |
|
|
// UVM_DEEP - Objects are deep copied (object must implement method)
|
| 129 |
|
|
// UVM_SHALLOW - Objects are shallow copied using default SV copy.
|
| 130 |
|
|
// UVM_REFERENCE - Only object handles are copied.
|
| 131 |
|
|
|
| 132 |
|
|
typedef enum {
|
| 133 |
|
|
UVM_DEFAULT_POLICY = 0,
|
| 134 |
|
|
UVM_DEEP = 'h400,
|
| 135 |
|
|
UVM_SHALLOW = 'h800,
|
| 136 |
|
|
UVM_REFERENCE = 'h1000
|
| 137 |
|
|
} uvm_recursion_policy_enum;
|
| 138 |
|
|
|
| 139 |
|
|
|
| 140 |
|
|
// Enum: uvm_active_passive_enum
|
| 141 |
|
|
//
|
| 142 |
|
|
// Convenience value to define whether a component, usually an agent,
|
| 143 |
|
|
// is in "active" mode or "passive" mode.
|
| 144 |
|
|
//
|
| 145 |
|
|
// UVM_PASSIVE - "Passive" mode
|
| 146 |
|
|
// UVM_ACTIVE - "Active" mode
|
| 147 |
|
|
typedef enum bit { UVM_PASSIVE=0, UVM_ACTIVE=1 } uvm_active_passive_enum;
|
| 148 |
|
|
|
| 149 |
|
|
|
| 150 |
|
|
// Parameter: `uvm_field_* macro flags
|
| 151 |
|
|
//
|
| 152 |
|
|
// Defines what operations a given field should be involved in.
|
| 153 |
|
|
// Bitwise OR all that apply.
|
| 154 |
|
|
//
|
| 155 |
|
|
// UVM_DEFAULT - All field operations turned on
|
| 156 |
|
|
// UVM_COPY - Field will participate in
|
| 157 |
|
|
// UVM_COMPARE - Field will participate in
|
| 158 |
|
|
// UVM_PRINT - Field will participate in
|
| 159 |
|
|
// UVM_RECORD - Field will participate in
|
| 160 |
|
|
// UVM_PACK - Field will participate in
|
| 161 |
|
|
//
|
| 162 |
|
|
// UVM_NOCOPY - Field will not participate in
|
| 163 |
|
|
// UVM_NOCOMPARE - Field will not participate in
|
| 164 |
|
|
// UVM_NOPRINT - Field will not participate in
|
| 165 |
|
|
// UVM_NORECORD - Field will not participate in
|
| 166 |
|
|
// UVM_NOPACK - Field will not participate in
|
| 167 |
|
|
//
|
| 168 |
|
|
// UVM_DEEP - Object field will be deep copied
|
| 169 |
|
|
// UVM_SHALLOW - Object field will be shallow copied
|
| 170 |
|
|
// UVM_REFERENCE - Object field will copied by reference
|
| 171 |
|
|
//
|
| 172 |
|
|
// UVM_READONLY - Object field will NOT be automatically configured.
|
| 173 |
|
|
|
| 174 |
|
|
|
| 175 |
|
|
parameter UVM_MACRO_NUMFLAGS = 17;
|
| 176 |
|
|
//A=ABSTRACT Y=PHYSICAL
|
| 177 |
|
|
//F=REFERENCE, S=SHALLOW, D=DEEP
|
| 178 |
|
|
//K=PACK, R=RECORD, P=PRINT, M=COMPARE, C=COPY
|
| 179 |
|
|
//--------------------------- AYFSD K R P M C
|
| 180 |
|
|
parameter UVM_DEFAULT = 'b000010101010101;
|
| 181 |
|
|
parameter UVM_ALL_ON = 'b000000101010101;
|
| 182 |
|
|
parameter UVM_FLAGS_ON = 'b000000101010101;
|
| 183 |
|
|
parameter UVM_FLAGS_OFF = 0;
|
| 184 |
|
|
|
| 185 |
|
|
//Values are OR'ed into a 32 bit value
|
| 186 |
|
|
//and externally
|
| 187 |
|
|
parameter UVM_COPY = (1<<0);
|
| 188 |
|
|
parameter UVM_NOCOPY = (1<<1);
|
| 189 |
|
|
parameter UVM_COMPARE = (1<<2);
|
| 190 |
|
|
parameter UVM_NOCOMPARE = (1<<3);
|
| 191 |
|
|
parameter UVM_PRINT = (1<<4);
|
| 192 |
|
|
parameter UVM_NOPRINT = (1<<5);
|
| 193 |
|
|
parameter UVM_RECORD = (1<<6);
|
| 194 |
|
|
parameter UVM_NORECORD = (1<<7);
|
| 195 |
|
|
parameter UVM_PACK = (1<<8);
|
| 196 |
|
|
parameter UVM_NOPACK = (1<<9);
|
| 197 |
|
|
//parameter UVM_DEEP = (1<<10);
|
| 198 |
|
|
//parameter UVM_SHALLOW = (1<<11);
|
| 199 |
|
|
//parameter UVM_REFERENCE = (1<<12);
|
| 200 |
|
|
parameter UVM_PHYSICAL = (1<<13);
|
| 201 |
|
|
parameter UVM_ABSTRACT = (1<<14);
|
| 202 |
|
|
parameter UVM_READONLY = (1<<15);
|
| 203 |
|
|
parameter UVM_NODEFPRINT = (1<<16);
|
| 204 |
|
|
|
| 205 |
|
|
//Extra values that are used for extra methods
|
| 206 |
|
|
parameter UVM_MACRO_EXTRAS = (1<
|
| 207 |
|
|
parameter UVM_FLAGS = UVM_MACRO_EXTRAS+1;
|
| 208 |
|
|
parameter UVM_UNPACK = UVM_MACRO_EXTRAS+2;
|
| 209 |
|
|
parameter UVM_CHECK_FIELDS = UVM_MACRO_EXTRAS+3;
|
| 210 |
|
|
parameter UVM_END_DATA_EXTRA = UVM_MACRO_EXTRAS+4;
|
| 211 |
|
|
|
| 212 |
|
|
|
| 213 |
|
|
//Get and set methods (in uvm_object). Used by the set/get* functions
|
| 214 |
|
|
//to tell the object what operation to perform on the fields.
|
| 215 |
|
|
parameter UVM_START_FUNCS = UVM_END_DATA_EXTRA+1;
|
| 216 |
|
|
parameter UVM_SET = UVM_START_FUNCS+1;
|
| 217 |
|
|
parameter UVM_SETINT = UVM_SET;
|
| 218 |
|
|
parameter UVM_SETOBJ = UVM_START_FUNCS+2;
|
| 219 |
|
|
parameter UVM_SETSTR = UVM_START_FUNCS+3;
|
| 220 |
|
|
parameter UVM_END_FUNCS = UVM_SETSTR;
|
| 221 |
|
|
|
| 222 |
|
|
//Global string variables
|
| 223 |
|
|
string uvm_aa_string_key;
|
| 224 |
|
|
|
| 225 |
|
|
|
| 226 |
|
|
|
| 227 |
|
|
//-----------------
|
| 228 |
|
|
// Group: Reporting
|
| 229 |
|
|
//-----------------
|
| 230 |
|
|
|
| 231 |
|
|
// Enum: uvm_severity
|
| 232 |
|
|
//
|
| 233 |
|
|
// Defines all possible values for report severity.
|
| 234 |
|
|
//
|
| 235 |
|
|
// UVM_INFO - Informative message.
|
| 236 |
|
|
// UVM_WARNING - Indicates a potential problem.
|
| 237 |
|
|
// UVM_ERROR - Indicates a real problem. Simulation continues subject
|
| 238 |
|
|
// to the configured message action.
|
| 239 |
|
|
// UVM_FATAL - Indicates a problem from which simulation cannot
|
| 240 |
|
|
// recover. Simulation exits via $finish after a #0 delay.
|
| 241 |
|
|
|
| 242 |
|
|
typedef enum bit [1:0]
|
| 243 |
|
|
{
|
| 244 |
|
|
UVM_INFO,
|
| 245 |
|
|
UVM_WARNING,
|
| 246 |
|
|
UVM_ERROR,
|
| 247 |
|
|
UVM_FATAL
|
| 248 |
|
|
} uvm_severity;
|
| 249 |
|
|
|
| 250 |
|
|
`ifndef UVM_NO_DEPRECATED
|
| 251 |
|
|
typedef uvm_severity uvm_severity_type;
|
| 252 |
|
|
`endif
|
| 253 |
|
|
|
| 254 |
|
|
// Enum: uvm_action
|
| 255 |
|
|
//
|
| 256 |
|
|
// Defines all possible values for report actions. Each report is configured
|
| 257 |
|
|
// to execute one or more actions, determined by the bitwise OR of any or all
|
| 258 |
|
|
// of the following enumeration constants.
|
| 259 |
|
|
//
|
| 260 |
|
|
// UVM_NO_ACTION - No action is taken
|
| 261 |
|
|
// UVM_DISPLAY - Sends the report to the standard output
|
| 262 |
|
|
// UVM_LOG - Sends the report to the file(s) for this (severity,id) pair
|
| 263 |
|
|
// UVM_COUNT - Counts the number of reports with the COUNT attribute.
|
| 264 |
|
|
// When this value reaches max_quit_count, the simulation terminates
|
| 265 |
|
|
// UVM_EXIT - Terminates the simulation immediately.
|
| 266 |
|
|
// UVM_CALL_HOOK - Callback the report hook methods
|
| 267 |
|
|
// UVM_STOP - Causes ~$stop~ to be executed, putting the simulation into
|
| 268 |
|
|
// interactive mode.
|
| 269 |
|
|
// UVM_RM_RECORD - Sends the report to the recorder
|
| 270 |
|
|
|
| 271 |
|
|
|
| 272 |
|
|
typedef int uvm_action;
|
| 273 |
|
|
|
| 274 |
|
|
typedef enum
|
| 275 |
|
|
{
|
| 276 |
|
|
UVM_NO_ACTION = 'b0000000,
|
| 277 |
|
|
UVM_DISPLAY = 'b0000001,
|
| 278 |
|
|
UVM_LOG = 'b0000010,
|
| 279 |
|
|
UVM_COUNT = 'b0000100,
|
| 280 |
|
|
UVM_EXIT = 'b0001000,
|
| 281 |
|
|
UVM_CALL_HOOK = 'b0010000,
|
| 282 |
|
|
UVM_STOP = 'b0100000,
|
| 283 |
|
|
UVM_RM_RECORD = 'b1000000
|
| 284 |
|
|
} uvm_action_type;
|
| 285 |
|
|
|
| 286 |
|
|
|
| 287 |
|
|
// Enum: uvm_verbosity
|
| 288 |
|
|
//
|
| 289 |
|
|
// Defines standard verbosity levels for reports.
|
| 290 |
|
|
//
|
| 291 |
|
|
// UVM_NONE - Report is always printed. Verbosity level setting cannot
|
| 292 |
|
|
// disable it.
|
| 293 |
|
|
// UVM_LOW - Report is issued if configured verbosity is set to UVM_LOW
|
| 294 |
|
|
// or above.
|
| 295 |
|
|
// UVM_MEDIUM - Report is issued if configured verbosity is set to UVM_MEDIUM
|
| 296 |
|
|
// or above.
|
| 297 |
|
|
// UVM_HIGH - Report is issued if configured verbosity is set to UVM_HIGH
|
| 298 |
|
|
// or above.
|
| 299 |
|
|
// UVM_FULL - Report is issued if configured verbosity is set to UVM_FULL
|
| 300 |
|
|
// or above.
|
| 301 |
|
|
|
| 302 |
|
|
typedef enum
|
| 303 |
|
|
{
|
| 304 |
|
|
UVM_NONE = 0,
|
| 305 |
|
|
UVM_LOW = 100,
|
| 306 |
|
|
UVM_MEDIUM = 200,
|
| 307 |
|
|
UVM_HIGH = 300,
|
| 308 |
|
|
UVM_FULL = 400,
|
| 309 |
|
|
UVM_DEBUG = 500
|
| 310 |
|
|
} uvm_verbosity;
|
| 311 |
|
|
|
| 312 |
|
|
|
| 313 |
|
|
typedef int UVM_FILE;
|
| 314 |
|
|
|
| 315 |
|
|
|
| 316 |
|
|
//-----------------
|
| 317 |
|
|
// Group: Port Type
|
| 318 |
|
|
//-----------------
|
| 319 |
|
|
|
| 320 |
|
|
// Enum: uvm_port_type_e
|
| 321 |
|
|
//
|
| 322 |
|
|
// Specifies the type of port
|
| 323 |
|
|
//
|
| 324 |
|
|
// UVM_PORT - The port requires the interface that is its type
|
| 325 |
|
|
// parameter.
|
| 326 |
|
|
// UVM_EXPORT - The port provides the interface that is its type
|
| 327 |
|
|
// parameter via a connection to some other export or
|
| 328 |
|
|
// implementation.
|
| 329 |
|
|
// UVM_IMPLEMENTATION - The port provides the interface that is its type
|
| 330 |
|
|
// parameter, and it is bound to the component that
|
| 331 |
|
|
// implements the interface.
|
| 332 |
|
|
|
| 333 |
|
|
typedef enum
|
| 334 |
|
|
{
|
| 335 |
|
|
UVM_PORT ,
|
| 336 |
|
|
UVM_EXPORT ,
|
| 337 |
|
|
UVM_IMPLEMENTATION
|
| 338 |
|
|
} uvm_port_type_e;
|
| 339 |
|
|
|
| 340 |
|
|
|
| 341 |
|
|
//-----------------
|
| 342 |
|
|
// Group: Sequences
|
| 343 |
|
|
//-----------------
|
| 344 |
|
|
|
| 345 |
|
|
// Enum: uvm_sequencer_arb_mode
|
| 346 |
|
|
//
|
| 347 |
|
|
// Specifies a sequencer's arbitration mode
|
| 348 |
|
|
//
|
| 349 |
|
|
// UVM_SEQ_ARB_FIFO - Requests are granted in FIFO order (default)
|
| 350 |
|
|
// UVM_SEQ_ARB_WEIGHTED - Requests are granted randomly by weight
|
| 351 |
|
|
// UVM_SEQ_ARB_RANDOM - Requests are granted randomly
|
| 352 |
|
|
// UVM_SEQ_ARB_STRICT_FIFO - Requests at highest priority granted in fifo order
|
| 353 |
|
|
// UVM_SEQ_ARB_STRICT_RANDOM - Requests at highest priority granted in randomly
|
| 354 |
|
|
// UVM_SEQ_ARB_USER - Arbitration is delegated to the user-defined
|
| 355 |
|
|
// function, user_priority_arbitration. That function
|
| 356 |
|
|
// will specify the next sequence to grant.
|
| 357 |
|
|
|
| 358 |
|
|
|
| 359 |
|
|
typedef enum
|
| 360 |
|
|
{
|
| 361 |
|
|
UVM_SEQ_ARB_FIFO,
|
| 362 |
|
|
UVM_SEQ_ARB_WEIGHTED,
|
| 363 |
|
|
UVM_SEQ_ARB_RANDOM,
|
| 364 |
|
|
UVM_SEQ_ARB_STRICT_FIFO,
|
| 365 |
|
|
UVM_SEQ_ARB_STRICT_RANDOM,
|
| 366 |
|
|
UVM_SEQ_ARB_USER
|
| 367 |
|
|
} uvm_sequencer_arb_mode;
|
| 368 |
|
|
|
| 369 |
|
|
|
| 370 |
|
|
typedef uvm_sequencer_arb_mode UVM_SEQ_ARB_TYPE; // backward compat
|
| 371 |
|
|
|
| 372 |
|
|
|
| 373 |
|
|
// Enum: uvm_sequence_state_enum
|
| 374 |
|
|
//
|
| 375 |
|
|
// Defines current sequence state
|
| 376 |
|
|
//
|
| 377 |
|
|
// UVM_CREATED - The sequence has been allocated.
|
| 378 |
|
|
// UVM_PRE_START - The sequence is started and the
|
| 379 |
|
|
// task is
|
| 380 |
|
|
// being executed.
|
| 381 |
|
|
// UVM_PRE_BODY - The sequence is started and the
|
| 382 |
|
|
// task is
|
| 383 |
|
|
// being executed.
|
| 384 |
|
|
// UVM_BODY - The sequence is started and the
|
| 385 |
|
|
// task is
|
| 386 |
|
|
// being executed.
|
| 387 |
|
|
// UVM_ENDED - The sequence has completed the execution of the
|
| 388 |
|
|
// task.
|
| 389 |
|
|
// UVM_POST_BODY - The sequence is started and the
|
| 390 |
|
|
// task is
|
| 391 |
|
|
// being executed.
|
| 392 |
|
|
// UVM_POST_START - The sequence is started and the
|
| 393 |
|
|
// task is
|
| 394 |
|
|
// being executed.
|
| 395 |
|
|
// UVM_STOPPED - The sequence has been forcibly ended by issuing a
|
| 396 |
|
|
// on the sequence.
|
| 397 |
|
|
// UVM_FINISHED - The sequence is completely finished executing.
|
| 398 |
|
|
|
| 399 |
|
|
typedef enum
|
| 400 |
|
|
{
|
| 401 |
|
|
UVM_CREATED = 1,
|
| 402 |
|
|
UVM_PRE_START = 2,
|
| 403 |
|
|
UVM_PRE_BODY = 4,
|
| 404 |
|
|
UVM_BODY = 8,
|
| 405 |
|
|
UVM_POST_BODY = 16,
|
| 406 |
|
|
UVM_POST_START= 32,
|
| 407 |
|
|
UVM_ENDED = 64,
|
| 408 |
|
|
UVM_STOPPED = 128,
|
| 409 |
|
|
UVM_FINISHED = 256
|
| 410 |
|
|
} uvm_sequence_state;
|
| 411 |
|
|
|
| 412 |
|
|
typedef uvm_sequence_state uvm_sequence_state_enum; // backward compat
|
| 413 |
|
|
|
| 414 |
|
|
|
| 415 |
|
|
// Enum: uvm_sequence_lib_mode
|
| 416 |
|
|
//
|
| 417 |
|
|
// Specifies the random selection mode of a sequence library
|
| 418 |
|
|
//
|
| 419 |
|
|
// UVM_SEQ_LIB_RAND - Random sequence selection
|
| 420 |
|
|
// UVM_SEQ_LIB_RANDC - Random cyclic sequence selection
|
| 421 |
|
|
// UVM_SEQ_LIB_ITEM - Emit only items, no sequence execution
|
| 422 |
|
|
// UVM_SEQ_LIB_USER - Apply a user-defined random-selection algorithm
|
| 423 |
|
|
|
| 424 |
|
|
typedef enum
|
| 425 |
|
|
{
|
| 426 |
|
|
UVM_SEQ_LIB_RAND,
|
| 427 |
|
|
UVM_SEQ_LIB_RANDC,
|
| 428 |
|
|
UVM_SEQ_LIB_ITEM,
|
| 429 |
|
|
UVM_SEQ_LIB_USER
|
| 430 |
|
|
} uvm_sequence_lib_mode;
|
| 431 |
|
|
|
| 432 |
|
|
|
| 433 |
|
|
|
| 434 |
|
|
//---------------
|
| 435 |
|
|
// Group: Phasing
|
| 436 |
|
|
//---------------
|
| 437 |
|
|
|
| 438 |
|
|
// Enum: uvm_phase_type
|
| 439 |
|
|
//
|
| 440 |
|
|
// This is an attribute of a object which defines the phase
|
| 441 |
|
|
// type.
|
| 442 |
|
|
//
|
| 443 |
|
|
// UVM_PHASE_IMP - The phase object is used to traverse the component
|
| 444 |
|
|
// hierarchy and call the component phase method as
|
| 445 |
|
|
// well as the ~phase_started~ and ~phase_ended~ callbacks.
|
| 446 |
|
|
// These nodes are created by the phase macros,
|
| 447 |
|
|
// `uvm_builtin_task_phase, `uvm_builtin_topdown_phase,
|
| 448 |
|
|
// and `uvm_builtin_bottomup_phase. These nodes represent
|
| 449 |
|
|
// the phase type, i.e. uvm_run_phase, uvm_main_phase.
|
| 450 |
|
|
//
|
| 451 |
|
|
// UVM_PHASE_NODE - The object represents a simple node instance in
|
| 452 |
|
|
// the graph. These nodes will contain a reference to
|
| 453 |
|
|
// their corresponding IMP object.
|
| 454 |
|
|
//
|
| 455 |
|
|
// UVM_PHASE_SCHEDULE - The object represents a portion of the phasing graph,
|
| 456 |
|
|
// typically consisting of several NODE types, in series,
|
| 457 |
|
|
// parallel, or both.
|
| 458 |
|
|
//
|
| 459 |
|
|
// UVM_PHASE_TERMINAL - This internal object serves as the termination NODE
|
| 460 |
|
|
// for a SCHEDULE phase object.
|
| 461 |
|
|
//
|
| 462 |
|
|
// UVM_PHASE_DOMAIN - This object represents an entire graph segment that
|
| 463 |
|
|
// executes in parallel with the 'run' phase.
|
| 464 |
|
|
// Domains may define any network of NODEs and
|
| 465 |
|
|
// SCHEDULEs. The built-in domain, ~uvm~, consists
|
| 466 |
|
|
// of a single schedule of all the run-time phases,
|
| 467 |
|
|
// starting with ~pre_reset~ and ending with
|
| 468 |
|
|
// ~post_shutdown~.
|
| 469 |
|
|
//
|
| 470 |
|
|
typedef enum { UVM_PHASE_IMP,
|
| 471 |
|
|
UVM_PHASE_NODE,
|
| 472 |
|
|
UVM_PHASE_TERMINAL,
|
| 473 |
|
|
UVM_PHASE_SCHEDULE,
|
| 474 |
|
|
UVM_PHASE_DOMAIN,
|
| 475 |
|
|
UVM_PHASE_GLOBAL
|
| 476 |
|
|
} uvm_phase_type;
|
| 477 |
|
|
|
| 478 |
|
|
|
| 479 |
|
|
// Enum: uvm_phase_state
|
| 480 |
|
|
// ---------------------
|
| 481 |
|
|
//
|
| 482 |
|
|
// The set of possible states of a phase. This is an attribute of a schedule
|
| 483 |
|
|
// node in the graph, not of a phase, to maintain independent per-domain state
|
| 484 |
|
|
//
|
| 485 |
|
|
// UVM_PHASE_UNINITIALIZED - The state is uninitialized. This is the default
|
| 486 |
|
|
// state for phases, and for nodes which have not yet been added to
|
| 487 |
|
|
// a schedule.
|
| 488 |
|
|
//
|
| 489 |
|
|
// UVM_PHASE_DORMANT - The schedule is not currently operating on the phase
|
| 490 |
|
|
// node, however it will be scheduled at some point in the future.
|
| 491 |
|
|
//
|
| 492 |
|
|
// UVM_PHASE_SCHEDULED - At least one immediate predecessor has completed.
|
| 493 |
|
|
// Scheduled phases block until all predecessors complete or
|
| 494 |
|
|
// until a jump is executed.
|
| 495 |
|
|
//
|
| 496 |
|
|
// UVM_PHASE_SYNCING - All predecessors complete, checking that all synced
|
| 497 |
|
|
// phases (e.g. across domains) are at or beyond this point
|
| 498 |
|
|
//
|
| 499 |
|
|
// UVM_PHASE_STARTED - phase ready to execute, running phase_started() callback
|
| 500 |
|
|
//
|
| 501 |
|
|
// UVM_PHASE_EXECUTING - An executing phase is one where the phase callbacks are
|
| 502 |
|
|
// being executed. Its process is tracked by the phaser.
|
| 503 |
|
|
//
|
| 504 |
|
|
// UVM_PHASE_READY_TO_END - no objections remain in this phase or in any
|
| 505 |
|
|
// predecessors of its successors or in any sync'd phases. This
|
| 506 |
|
|
// state indicates an opportunity for any phase that needs extra
|
| 507 |
|
|
// time for a clean exit to raise an objection, thereby causing a
|
| 508 |
|
|
// return to UVM_PHASE_EXECUTING. If no objection is raised, state
|
| 509 |
|
|
// will transition to UVM_PHASE_ENDED after a delta cycle.
|
| 510 |
|
|
// (An example of predecessors of successors: The successor to
|
| 511 |
|
|
// phase 'run' is 'extract', whose predecessors are 'run' and
|
| 512 |
|
|
// 'post_shutdown'. Therefore, 'run' will go to this state when
|
| 513 |
|
|
// both its objections and those of 'post_shutdown' are all dropped.
|
| 514 |
|
|
//
|
| 515 |
|
|
// UVM_PHASE_ENDED - phase completed execution, now running phase_ended() callback
|
| 516 |
|
|
//
|
| 517 |
|
|
// UVM_PHASE_JUMPING - all processes related to phase are being killed and all
|
| 518 |
|
|
// predecessors are forced into the DONE state.
|
| 519 |
|
|
//
|
| 520 |
|
|
// UVM_PHASE_CLEANUP - all processes related to phase are being killed
|
| 521 |
|
|
//
|
| 522 |
|
|
// UVM_PHASE_DONE - A phase is done after it terminated execution. Becoming
|
| 523 |
|
|
// done may enable a waiting successor phase to execute.
|
| 524 |
|
|
//
|
| 525 |
|
|
// The state transitions occur as follows:
|
| 526 |
|
|
//
|
| 527 |
|
|
//| UNINITIALIZED -> DORMANT -> SCHED -> SYNC -> START -> EXEC -> READY -> END -+-> CLEAN -> DONE
|
| 528 |
|
|
//| ^ |
|
| 529 |
|
|
//| | <-- jump_to |
|
| 530 |
|
|
//| +-------------------------------------------- JUMPING< -+
|
| 531 |
|
|
|
| 532 |
|
|
typedef enum { UVM_PHASE_UNINITIALIZED = 0,
|
| 533 |
|
|
UVM_PHASE_DORMANT = 1,
|
| 534 |
|
|
UVM_PHASE_SCHEDULED = 2,
|
| 535 |
|
|
UVM_PHASE_SYNCING = 4,
|
| 536 |
|
|
UVM_PHASE_STARTED = 8,
|
| 537 |
|
|
UVM_PHASE_EXECUTING = 16,
|
| 538 |
|
|
UVM_PHASE_READY_TO_END = 32,
|
| 539 |
|
|
UVM_PHASE_ENDED = 64,
|
| 540 |
|
|
UVM_PHASE_CLEANUP = 128,
|
| 541 |
|
|
UVM_PHASE_DONE = 256,
|
| 542 |
|
|
UVM_PHASE_JUMPING = 512
|
| 543 |
|
|
} uvm_phase_state;
|
| 544 |
|
|
|
| 545 |
|
|
|
| 546 |
|
|
|
| 547 |
|
|
// Enum: uvm_wait_op
|
| 548 |
|
|
//
|
| 549 |
|
|
// Specifies the operand when using methods like .
|
| 550 |
|
|
//
|
| 551 |
|
|
// UVM_EQ - equal
|
| 552 |
|
|
// UVM_NE - not equal
|
| 553 |
|
|
// UVM_LT - less than
|
| 554 |
|
|
// UVM_LTE - less than or equal to
|
| 555 |
|
|
// UVM_GT - greater than
|
| 556 |
|
|
// UVM_GTE - greater than or equal to
|
| 557 |
|
|
//
|
| 558 |
|
|
typedef enum { UVM_LT,
|
| 559 |
|
|
UVM_LTE,
|
| 560 |
|
|
UVM_NE,
|
| 561 |
|
|
UVM_EQ,
|
| 562 |
|
|
UVM_GT,
|
| 563 |
|
|
UVM_GTE
|
| 564 |
|
|
} uvm_wait_op;
|
| 565 |
|
|
|
| 566 |
|
|
|
| 567 |
|
|
//------------------
|
| 568 |
|
|
// Group: Objections
|
| 569 |
|
|
//------------------
|
| 570 |
|
|
|
| 571 |
|
|
// Enum: uvm_objection_event
|
| 572 |
|
|
//
|
| 573 |
|
|
// Enumerated the possible objection events one could wait on. See
|
| 574 |
|
|
// .
|
| 575 |
|
|
//
|
| 576 |
|
|
// UVM_RAISED - an objection was raised
|
| 577 |
|
|
// UVM_DROPPED - an objection was raised
|
| 578 |
|
|
// UVM_ALL_DROPPED - all objections have been dropped
|
| 579 |
|
|
//
|
| 580 |
|
|
typedef enum { UVM_RAISED = 'h01,
|
| 581 |
|
|
UVM_DROPPED = 'h02,
|
| 582 |
|
|
UVM_ALL_DROPPED = 'h04
|
| 583 |
|
|
} uvm_objection_event;
|
| 584 |
|
|
|
| 585 |
|
|
|
| 586 |
|
|
|
| 587 |
|
|
//------------------------------
|
| 588 |
|
|
// Group: Default Policy Classes
|
| 589 |
|
|
//------------------------------
|
| 590 |
|
|
//
|
| 591 |
|
|
// Policy classes copying, comparing, packing, unpacking, and recording
|
| 592 |
|
|
// -based objects.
|
| 593 |
|
|
|
| 594 |
|
|
|
| 595 |
|
|
typedef class uvm_printer;
|
| 596 |
|
|
typedef class uvm_table_printer;
|
| 597 |
|
|
typedef class uvm_tree_printer;
|
| 598 |
|
|
typedef class uvm_line_printer;
|
| 599 |
|
|
typedef class uvm_comparer;
|
| 600 |
|
|
typedef class uvm_packer;
|
| 601 |
|
|
typedef class uvm_tr_database;
|
| 602 |
|
|
typedef class uvm_text_tr_database;
|
| 603 |
|
|
typedef class uvm_recorder;
|
| 604 |
|
|
|
| 605 |
|
|
// Variable: uvm_default_table_printer
|
| 606 |
|
|
//
|
| 607 |
|
|
// The table printer is a global object that can be used with
|
| 608 |
|
|
// to get tabular style printing.
|
| 609 |
|
|
|
| 610 |
|
|
uvm_table_printer uvm_default_table_printer = new();
|
| 611 |
|
|
|
| 612 |
|
|
|
| 613 |
|
|
// Variable: uvm_default_tree_printer
|
| 614 |
|
|
//
|
| 615 |
|
|
// The tree printer is a global object that can be used with
|
| 616 |
|
|
// to get multi-line tree style printing.
|
| 617 |
|
|
|
| 618 |
|
|
uvm_tree_printer uvm_default_tree_printer = new();
|
| 619 |
|
|
|
| 620 |
|
|
|
| 621 |
|
|
// Variable: uvm_default_line_printer
|
| 622 |
|
|
//
|
| 623 |
|
|
// The line printer is a global object that can be used with
|
| 624 |
|
|
// to get single-line style printing.
|
| 625 |
|
|
|
| 626 |
|
|
uvm_line_printer uvm_default_line_printer = new();
|
| 627 |
|
|
|
| 628 |
|
|
|
| 629 |
|
|
// Variable: uvm_default_printer
|
| 630 |
|
|
//
|
| 631 |
|
|
// The default printer policy. Used when calls to
|
| 632 |
|
|
// or do not specify a printer policy.
|
| 633 |
|
|
//
|
| 634 |
|
|
// The default printer may be set to any legal derived type,
|
| 635 |
|
|
// including the global line, tree, and table printers described above.
|
| 636 |
|
|
|
| 637 |
|
|
uvm_printer uvm_default_printer = uvm_default_table_printer;
|
| 638 |
|
|
|
| 639 |
|
|
|
| 640 |
|
|
// Variable: uvm_default_packer
|
| 641 |
|
|
//
|
| 642 |
|
|
// The default packer policy. Used when calls to
|
| 643 |
|
|
// and do not specify a packer policy.
|
| 644 |
|
|
|
| 645 |
|
|
uvm_packer uvm_default_packer = new();
|
| 646 |
|
|
|
| 647 |
|
|
|
| 648 |
|
|
// Variable: uvm_default_comparer
|
| 649 |
|
|
//
|
| 650 |
|
|
//
|
| 651 |
|
|
// The default compare policy. Used when calls to
|
| 652 |
|
|
// do not specify a comparer policy.
|
| 653 |
|
|
|
| 654 |
|
|
uvm_comparer uvm_default_comparer = new(); // uvm_comparer::init();
|
| 655 |
|
|
|
| 656 |
|
|
|
| 657 |
|
|
|