| 1 |
16 |
HanySalah |
//
|
| 2 |
|
|
//----------------------------------------------------------------------
|
| 3 |
|
|
// Copyright 2007-2011 Mentor Graphics Corporation
|
| 4 |
|
|
// Copyright 2007-2010 Cadence Design Systems, Inc.
|
| 5 |
|
|
// Copyright 2010 Synopsys, Inc.
|
| 6 |
|
|
// All Rights Reserved Worldwide
|
| 7 |
|
|
//
|
| 8 |
|
|
// Licensed under the Apache License, Version 2.0 (the
|
| 9 |
|
|
// "License"); you may not use this file except in
|
| 10 |
|
|
// compliance with the License. You may obtain a copy of
|
| 11 |
|
|
// the License at
|
| 12 |
|
|
//
|
| 13 |
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
| 14 |
|
|
//
|
| 15 |
|
|
// Unless required by applicable law or agreed to in
|
| 16 |
|
|
// writing, software distributed under the License is
|
| 17 |
|
|
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
| 18 |
|
|
// CONDITIONS OF ANY KIND, either express or implied. See
|
| 19 |
|
|
// the License for the specific language governing
|
| 20 |
|
|
// permissions and limitations under the License.
|
| 21 |
|
|
//----------------------------------------------------------------------
|
| 22 |
|
|
|
| 23 |
|
|
// Title: UVM Run-Time Phases
|
| 24 |
|
|
//
|
| 25 |
|
|
// The run-time schedule is the pre-defined phase schedule
|
| 26 |
|
|
// which runs concurrently to the global run phase.
|
| 27 |
|
|
// By default, all s using the run-time schedule
|
| 28 |
|
|
// are synchronized with respect to the pre-defined phases in the schedule.
|
| 29 |
|
|
// It is possible for components to belong to different domains
|
| 30 |
|
|
// in which case their schedules can be unsynchronized.
|
| 31 |
|
|
//
|
| 32 |
|
|
// The names of the UVM phases (which will be returned by get_name() for a
|
| 33 |
|
|
// phase instance) match the class names specified below with the "uvm_"
|
| 34 |
|
|
// and "_phase" removed. For example, the main phase corresponds to the
|
| 35 |
|
|
// uvm_main_phase class below and has the name "main", which means that
|
| 36 |
|
|
// the following can be used to call foo() at the start of main phase:
|
| 37 |
|
|
//
|
| 38 |
|
|
// | function void phase_started(uvm_phase phase) ;
|
| 39 |
|
|
// | if (phase.get_name()=="main") foo() ;
|
| 40 |
|
|
// | endfunction
|
| 41 |
|
|
//
|
| 42 |
|
|
// The run-time phases are executed in the sequence they are specified below.
|
| 43 |
|
|
//
|
| 44 |
|
|
//
|
| 45 |
|
|
|
| 46 |
|
|
// Class: uvm_pre_reset_phase
|
| 47 |
|
|
//
|
| 48 |
|
|
// Before reset is asserted.
|
| 49 |
|
|
//
|
| 50 |
|
|
// that calls the
|
| 51 |
|
|
// method. This phase starts at the
|
| 52 |
|
|
// same time as the unless a user defined phase is inserted
|
| 53 |
|
|
// in front of this phase.
|
| 54 |
|
|
//
|
| 55 |
|
|
// Upon Entry:
|
| 56 |
|
|
// - Indicates that power has been applied but not necessarily valid or stable.
|
| 57 |
|
|
// - There should not have been any active clock edges
|
| 58 |
|
|
// before entry into this phase.
|
| 59 |
|
|
//
|
| 60 |
|
|
// Typical Uses:
|
| 61 |
|
|
// - Wait for power good.
|
| 62 |
|
|
// - Components connected to virtual interfaces should initialize
|
| 63 |
|
|
// their output to X's or Z's.
|
| 64 |
|
|
// - Initialize the clock signals to a valid value
|
| 65 |
|
|
// - Assign reset signals to X (power-on reset).
|
| 66 |
|
|
// - Wait for reset signal to be asserted
|
| 67 |
|
|
// if not driven by the verification environment.
|
| 68 |
|
|
//
|
| 69 |
|
|
// Exit Criteria:
|
| 70 |
|
|
// - Reset signal, if driven by the verification environment,
|
| 71 |
|
|
// is ready to be asserted.
|
| 72 |
|
|
// - Reset signal, if not driven by the verification environment, is asserted.
|
| 73 |
|
|
//
|
| 74 |
|
|
class uvm_pre_reset_phase extends uvm_task_phase;
|
| 75 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 76 |
|
|
comp.pre_reset_phase(phase);
|
| 77 |
|
|
endtask
|
| 78 |
|
|
local static uvm_pre_reset_phase m_inst;
|
| 79 |
|
|
static const string type_name = "uvm_pre_reset_phase";
|
| 80 |
|
|
|
| 81 |
|
|
// Function: get
|
| 82 |
|
|
// Returns the singleton phase handle
|
| 83 |
|
|
static function uvm_pre_reset_phase get();
|
| 84 |
|
|
if(m_inst == null)
|
| 85 |
|
|
m_inst = new;
|
| 86 |
|
|
return m_inst;
|
| 87 |
|
|
endfunction
|
| 88 |
|
|
protected function new(string name="pre_reset");
|
| 89 |
|
|
super.new(name);
|
| 90 |
|
|
endfunction
|
| 91 |
|
|
virtual function string get_type_name();
|
| 92 |
|
|
return type_name;
|
| 93 |
|
|
endfunction
|
| 94 |
|
|
endclass
|
| 95 |
|
|
|
| 96 |
|
|
//
|
| 97 |
|
|
// Class: uvm_reset_phase
|
| 98 |
|
|
//
|
| 99 |
|
|
// Reset is asserted.
|
| 100 |
|
|
//
|
| 101 |
|
|
// that calls the
|
| 102 |
|
|
// method.
|
| 103 |
|
|
//
|
| 104 |
|
|
// Upon Entry:
|
| 105 |
|
|
// - Indicates that the hardware reset signal is ready to be asserted.
|
| 106 |
|
|
//
|
| 107 |
|
|
// Typical Uses:
|
| 108 |
|
|
// - Assert reset signals.
|
| 109 |
|
|
// - Components connected to virtual interfaces should drive their output
|
| 110 |
|
|
// to their specified reset or idle value.
|
| 111 |
|
|
// - Components and environments should initialize their state variables.
|
| 112 |
|
|
// - Clock generators start generating active edges.
|
| 113 |
|
|
// - De-assert the reset signal(s) just before exit.
|
| 114 |
|
|
// - Wait for the reset signal(s) to be de-asserted.
|
| 115 |
|
|
//
|
| 116 |
|
|
// Exit Criteria:
|
| 117 |
|
|
// - Reset signal has just been de-asserted.
|
| 118 |
|
|
// - Main or base clock is working and stable.
|
| 119 |
|
|
// - At least one active clock edge has occurred.
|
| 120 |
|
|
// - Output signals and state variables have been initialized.
|
| 121 |
|
|
//
|
| 122 |
|
|
class uvm_reset_phase extends uvm_task_phase;
|
| 123 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 124 |
|
|
comp.reset_phase(phase);
|
| 125 |
|
|
endtask
|
| 126 |
|
|
local static uvm_reset_phase m_inst;
|
| 127 |
|
|
static const string type_name = "uvm_reset_phase";
|
| 128 |
|
|
|
| 129 |
|
|
// Function: get
|
| 130 |
|
|
// Returns the singleton phase handle
|
| 131 |
|
|
static function uvm_reset_phase get();
|
| 132 |
|
|
if(m_inst == null)
|
| 133 |
|
|
m_inst = new;
|
| 134 |
|
|
return m_inst;
|
| 135 |
|
|
endfunction
|
| 136 |
|
|
protected function new(string name="reset");
|
| 137 |
|
|
super.new(name);
|
| 138 |
|
|
endfunction
|
| 139 |
|
|
virtual function string get_type_name();
|
| 140 |
|
|
return type_name;
|
| 141 |
|
|
endfunction
|
| 142 |
|
|
endclass
|
| 143 |
|
|
|
| 144 |
|
|
// Class: uvm_post_reset_phase
|
| 145 |
|
|
//
|
| 146 |
|
|
// After reset is de-asserted.
|
| 147 |
|
|
//
|
| 148 |
|
|
// that calls the
|
| 149 |
|
|
// method.
|
| 150 |
|
|
//
|
| 151 |
|
|
// Upon Entry:
|
| 152 |
|
|
// - Indicates that the DUT reset signal has been de-asserted.
|
| 153 |
|
|
//
|
| 154 |
|
|
// Typical Uses:
|
| 155 |
|
|
// - Components should start behavior appropriate for reset being inactive.
|
| 156 |
|
|
// For example, components may start to transmit idle transactions
|
| 157 |
|
|
// or interface training and rate negotiation.
|
| 158 |
|
|
// This behavior typically continues beyond the end of this phase.
|
| 159 |
|
|
//
|
| 160 |
|
|
// Exit Criteria:
|
| 161 |
|
|
// - The testbench and the DUT are in a known, active state.
|
| 162 |
|
|
//
|
| 163 |
|
|
class uvm_post_reset_phase extends uvm_task_phase;
|
| 164 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 165 |
|
|
comp.post_reset_phase(phase);
|
| 166 |
|
|
endtask
|
| 167 |
|
|
local static uvm_post_reset_phase m_inst;
|
| 168 |
|
|
static const string type_name = "uvm_post_reset_phase";
|
| 169 |
|
|
|
| 170 |
|
|
// Function: get
|
| 171 |
|
|
// Returns the singleton phase handle
|
| 172 |
|
|
static function uvm_post_reset_phase get();
|
| 173 |
|
|
if(m_inst == null)
|
| 174 |
|
|
m_inst = new;
|
| 175 |
|
|
return m_inst;
|
| 176 |
|
|
endfunction
|
| 177 |
|
|
protected function new(string name="post_reset");
|
| 178 |
|
|
super.new(name);
|
| 179 |
|
|
endfunction
|
| 180 |
|
|
virtual function string get_type_name();
|
| 181 |
|
|
return type_name;
|
| 182 |
|
|
endfunction
|
| 183 |
|
|
endclass
|
| 184 |
|
|
|
| 185 |
|
|
|
| 186 |
|
|
// Class: uvm_pre_configure_phase
|
| 187 |
|
|
//
|
| 188 |
|
|
// Before the DUT is configured by the SW.
|
| 189 |
|
|
//
|
| 190 |
|
|
// that calls the
|
| 191 |
|
|
// method.
|
| 192 |
|
|
//
|
| 193 |
|
|
// Upon Entry:
|
| 194 |
|
|
// - Indicates that the DUT has been completed reset
|
| 195 |
|
|
// and is ready to be configured.
|
| 196 |
|
|
//
|
| 197 |
|
|
// Typical Uses:
|
| 198 |
|
|
// - Procedurally modify the DUT configuration information as described
|
| 199 |
|
|
// in the environment (and that will be eventually uploaded into the DUT).
|
| 200 |
|
|
// - Wait for components required for DUT configuration to complete
|
| 201 |
|
|
// training and rate negotiation.
|
| 202 |
|
|
//
|
| 203 |
|
|
// Exit Criteria:
|
| 204 |
|
|
// - DUT configuration information is defined.
|
| 205 |
|
|
//
|
| 206 |
|
|
class uvm_pre_configure_phase extends uvm_task_phase;
|
| 207 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 208 |
|
|
comp.pre_configure_phase(phase);
|
| 209 |
|
|
endtask
|
| 210 |
|
|
local static uvm_pre_configure_phase m_inst;
|
| 211 |
|
|
static const string type_name = "uvm_pre_configure_phase";
|
| 212 |
|
|
|
| 213 |
|
|
// Function: get
|
| 214 |
|
|
// Returns the singleton phase handle
|
| 215 |
|
|
static function uvm_pre_configure_phase get();
|
| 216 |
|
|
if(m_inst == null)
|
| 217 |
|
|
m_inst = new;
|
| 218 |
|
|
return m_inst;
|
| 219 |
|
|
endfunction
|
| 220 |
|
|
protected function new(string name="pre_configure");
|
| 221 |
|
|
super.new(name);
|
| 222 |
|
|
endfunction
|
| 223 |
|
|
virtual function string get_type_name();
|
| 224 |
|
|
return type_name;
|
| 225 |
|
|
endfunction
|
| 226 |
|
|
endclass
|
| 227 |
|
|
|
| 228 |
|
|
|
| 229 |
|
|
// Class: uvm_configure_phase
|
| 230 |
|
|
//
|
| 231 |
|
|
// The SW configures the DUT.
|
| 232 |
|
|
//
|
| 233 |
|
|
// that calls the
|
| 234 |
|
|
// method.
|
| 235 |
|
|
//
|
| 236 |
|
|
// Upon Entry:
|
| 237 |
|
|
// - Indicates that the DUT is ready to be configured.
|
| 238 |
|
|
//
|
| 239 |
|
|
// Typical Uses:
|
| 240 |
|
|
// - Components required for DUT configuration execute transactions normally.
|
| 241 |
|
|
// - Set signals and program the DUT and memories
|
| 242 |
|
|
// (e.g. read/write operations and sequences)
|
| 243 |
|
|
// to match the desired configuration for the test and environment.
|
| 244 |
|
|
//
|
| 245 |
|
|
// Exit Criteria:
|
| 246 |
|
|
// - The DUT has been configured and is ready to operate normally.
|
| 247 |
|
|
//
|
| 248 |
|
|
class uvm_configure_phase extends uvm_task_phase;
|
| 249 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 250 |
|
|
comp.configure_phase(phase);
|
| 251 |
|
|
endtask
|
| 252 |
|
|
local static uvm_configure_phase m_inst;
|
| 253 |
|
|
static const string type_name = "uvm_configure_phase";
|
| 254 |
|
|
|
| 255 |
|
|
// Function: get
|
| 256 |
|
|
// Returns the singleton phase handle
|
| 257 |
|
|
static function uvm_configure_phase get();
|
| 258 |
|
|
if(m_inst == null)
|
| 259 |
|
|
m_inst = new;
|
| 260 |
|
|
return m_inst;
|
| 261 |
|
|
endfunction
|
| 262 |
|
|
protected function new(string name="configure");
|
| 263 |
|
|
super.new(name);
|
| 264 |
|
|
endfunction
|
| 265 |
|
|
virtual function string get_type_name();
|
| 266 |
|
|
return type_name;
|
| 267 |
|
|
endfunction
|
| 268 |
|
|
endclass
|
| 269 |
|
|
|
| 270 |
|
|
// Class: uvm_post_configure_phase
|
| 271 |
|
|
//
|
| 272 |
|
|
// After the SW has configured the DUT.
|
| 273 |
|
|
//
|
| 274 |
|
|
// that calls the
|
| 275 |
|
|
// method.
|
| 276 |
|
|
//
|
| 277 |
|
|
// Upon Entry:
|
| 278 |
|
|
// - Indicates that the configuration information has been fully uploaded.
|
| 279 |
|
|
//
|
| 280 |
|
|
// Typical Uses:
|
| 281 |
|
|
// - Wait for configuration information to fully propagate and take effect.
|
| 282 |
|
|
// - Wait for components to complete training and rate negotiation.
|
| 283 |
|
|
// - Enable the DUT.
|
| 284 |
|
|
// - Sample DUT configuration coverage.
|
| 285 |
|
|
//
|
| 286 |
|
|
// Exit Criteria:
|
| 287 |
|
|
// - The DUT has been fully configured and enabled
|
| 288 |
|
|
// and is ready to start operating normally.
|
| 289 |
|
|
//
|
| 290 |
|
|
class uvm_post_configure_phase extends uvm_task_phase;
|
| 291 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 292 |
|
|
comp.post_configure_phase(phase);
|
| 293 |
|
|
endtask
|
| 294 |
|
|
local static uvm_post_configure_phase m_inst;
|
| 295 |
|
|
static const string type_name = "uvm_post_configure_phase";
|
| 296 |
|
|
|
| 297 |
|
|
// Function: get
|
| 298 |
|
|
// Returns the singleton phase handle
|
| 299 |
|
|
static function uvm_post_configure_phase get();
|
| 300 |
|
|
if(m_inst == null)
|
| 301 |
|
|
m_inst = new;
|
| 302 |
|
|
return m_inst;
|
| 303 |
|
|
endfunction
|
| 304 |
|
|
protected function new(string name="post_configure");
|
| 305 |
|
|
super.new(name);
|
| 306 |
|
|
endfunction
|
| 307 |
|
|
virtual function string get_type_name();
|
| 308 |
|
|
return type_name;
|
| 309 |
|
|
endfunction
|
| 310 |
|
|
endclass
|
| 311 |
|
|
|
| 312 |
|
|
// Class: uvm_pre_main_phase
|
| 313 |
|
|
//
|
| 314 |
|
|
// Before the primary test stimulus starts.
|
| 315 |
|
|
//
|
| 316 |
|
|
// that calls the
|
| 317 |
|
|
// method.
|
| 318 |
|
|
//
|
| 319 |
|
|
// Upon Entry:
|
| 320 |
|
|
// - Indicates that the DUT has been fully configured.
|
| 321 |
|
|
//
|
| 322 |
|
|
// Typical Uses:
|
| 323 |
|
|
// - Wait for components to complete training and rate negotiation.
|
| 324 |
|
|
//
|
| 325 |
|
|
// Exit Criteria:
|
| 326 |
|
|
// - All components have completed training and rate negotiation.
|
| 327 |
|
|
// - All components are ready to generate and/or observe normal stimulus.
|
| 328 |
|
|
//
|
| 329 |
|
|
class uvm_pre_main_phase extends uvm_task_phase;
|
| 330 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 331 |
|
|
comp.pre_main_phase(phase);
|
| 332 |
|
|
endtask
|
| 333 |
|
|
local static uvm_pre_main_phase m_inst;
|
| 334 |
|
|
static const string type_name = "uvm_pre_main_phase";
|
| 335 |
|
|
|
| 336 |
|
|
// Function: get
|
| 337 |
|
|
// Returns the singleton phase handle
|
| 338 |
|
|
static function uvm_pre_main_phase get();
|
| 339 |
|
|
if(m_inst == null)
|
| 340 |
|
|
m_inst = new;
|
| 341 |
|
|
return m_inst;
|
| 342 |
|
|
endfunction
|
| 343 |
|
|
protected function new(string name="pre_main");
|
| 344 |
|
|
super.new(name);
|
| 345 |
|
|
endfunction
|
| 346 |
|
|
virtual function string get_type_name();
|
| 347 |
|
|
return type_name;
|
| 348 |
|
|
endfunction
|
| 349 |
|
|
endclass
|
| 350 |
|
|
|
| 351 |
|
|
|
| 352 |
|
|
// Class: uvm_main_phase
|
| 353 |
|
|
//
|
| 354 |
|
|
// Primary test stimulus.
|
| 355 |
|
|
//
|
| 356 |
|
|
// that calls the
|
| 357 |
|
|
// method.
|
| 358 |
|
|
//
|
| 359 |
|
|
// Upon Entry:
|
| 360 |
|
|
// - The stimulus associated with the test objectives is ready to be applied.
|
| 361 |
|
|
//
|
| 362 |
|
|
// Typical Uses:
|
| 363 |
|
|
// - Components execute transactions normally.
|
| 364 |
|
|
// - Data stimulus sequences are started.
|
| 365 |
|
|
// - Wait for a time-out or certain amount of time,
|
| 366 |
|
|
// or completion of stimulus sequences.
|
| 367 |
|
|
//
|
| 368 |
|
|
// Exit Criteria:
|
| 369 |
|
|
// - Enough stimulus has been applied to meet the primary
|
| 370 |
|
|
// stimulus objective of the test.
|
| 371 |
|
|
//
|
| 372 |
|
|
class uvm_main_phase extends uvm_task_phase;
|
| 373 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 374 |
|
|
comp.main_phase(phase);
|
| 375 |
|
|
endtask
|
| 376 |
|
|
local static uvm_main_phase m_inst;
|
| 377 |
|
|
static const string type_name = "uvm_main_phase";
|
| 378 |
|
|
|
| 379 |
|
|
// Function: get
|
| 380 |
|
|
// Returns the singleton phase handle
|
| 381 |
|
|
static function uvm_main_phase get();
|
| 382 |
|
|
if(m_inst == null)
|
| 383 |
|
|
m_inst = new;
|
| 384 |
|
|
return m_inst;
|
| 385 |
|
|
endfunction
|
| 386 |
|
|
protected function new(string name="main");
|
| 387 |
|
|
super.new(name);
|
| 388 |
|
|
endfunction
|
| 389 |
|
|
virtual function string get_type_name();
|
| 390 |
|
|
return type_name;
|
| 391 |
|
|
endfunction
|
| 392 |
|
|
endclass
|
| 393 |
|
|
|
| 394 |
|
|
|
| 395 |
|
|
// Class: uvm_post_main_phase
|
| 396 |
|
|
//
|
| 397 |
|
|
// After enough of the primary test stimulus.
|
| 398 |
|
|
//
|
| 399 |
|
|
// that calls the
|
| 400 |
|
|
// method.
|
| 401 |
|
|
//
|
| 402 |
|
|
// Upon Entry:
|
| 403 |
|
|
// - The primary stimulus objective of the test has been met.
|
| 404 |
|
|
//
|
| 405 |
|
|
// Typical Uses:
|
| 406 |
|
|
// - Included for symmetry.
|
| 407 |
|
|
//
|
| 408 |
|
|
// Exit Criteria:
|
| 409 |
|
|
// - None.
|
| 410 |
|
|
//
|
| 411 |
|
|
class uvm_post_main_phase extends uvm_task_phase;
|
| 412 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 413 |
|
|
comp.post_main_phase(phase);
|
| 414 |
|
|
endtask
|
| 415 |
|
|
local static uvm_post_main_phase m_inst;
|
| 416 |
|
|
static const string type_name = "uvm_post_main_phase";
|
| 417 |
|
|
|
| 418 |
|
|
// Function: get
|
| 419 |
|
|
// Returns the singleton phase handle
|
| 420 |
|
|
static function uvm_post_main_phase get();
|
| 421 |
|
|
if(m_inst == null)
|
| 422 |
|
|
m_inst = new;
|
| 423 |
|
|
return m_inst;
|
| 424 |
|
|
endfunction
|
| 425 |
|
|
protected function new(string name="post_main");
|
| 426 |
|
|
super.new(name);
|
| 427 |
|
|
endfunction
|
| 428 |
|
|
virtual function string get_type_name();
|
| 429 |
|
|
return type_name;
|
| 430 |
|
|
endfunction
|
| 431 |
|
|
endclass
|
| 432 |
|
|
|
| 433 |
|
|
|
| 434 |
|
|
// Class: uvm_pre_shutdown_phase
|
| 435 |
|
|
//
|
| 436 |
|
|
// Before things settle down.
|
| 437 |
|
|
//
|
| 438 |
|
|
// that calls the
|
| 439 |
|
|
// method.
|
| 440 |
|
|
//
|
| 441 |
|
|
// Upon Entry:
|
| 442 |
|
|
// - None.
|
| 443 |
|
|
//
|
| 444 |
|
|
// Typical Uses:
|
| 445 |
|
|
// - Included for symmetry.
|
| 446 |
|
|
//
|
| 447 |
|
|
// Exit Criteria:
|
| 448 |
|
|
// - None.
|
| 449 |
|
|
//
|
| 450 |
|
|
class uvm_pre_shutdown_phase extends uvm_task_phase;
|
| 451 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 452 |
|
|
comp.pre_shutdown_phase(phase);
|
| 453 |
|
|
endtask
|
| 454 |
|
|
local static uvm_pre_shutdown_phase m_inst;
|
| 455 |
|
|
static const string type_name = "uvm_pre_shutdown_phase";
|
| 456 |
|
|
|
| 457 |
|
|
// Function: get
|
| 458 |
|
|
// Returns the singleton phase handle
|
| 459 |
|
|
static function uvm_pre_shutdown_phase get();
|
| 460 |
|
|
if(m_inst == null)
|
| 461 |
|
|
m_inst = new;
|
| 462 |
|
|
return m_inst;
|
| 463 |
|
|
endfunction
|
| 464 |
|
|
protected function new(string name="pre_shutdown");
|
| 465 |
|
|
super.new(name);
|
| 466 |
|
|
endfunction
|
| 467 |
|
|
virtual function string get_type_name();
|
| 468 |
|
|
return type_name;
|
| 469 |
|
|
endfunction
|
| 470 |
|
|
endclass
|
| 471 |
|
|
|
| 472 |
|
|
|
| 473 |
|
|
// Class: uvm_shutdown_phase
|
| 474 |
|
|
//
|
| 475 |
|
|
// Letting things settle down.
|
| 476 |
|
|
//
|
| 477 |
|
|
// that calls the
|
| 478 |
|
|
// method.
|
| 479 |
|
|
//
|
| 480 |
|
|
// Upon Entry:
|
| 481 |
|
|
// - None.
|
| 482 |
|
|
//
|
| 483 |
|
|
// Typical Uses:
|
| 484 |
|
|
// - Wait for all data to be drained out of the DUT.
|
| 485 |
|
|
// - Extract data still buffered in the DUT,
|
| 486 |
|
|
// usually through read/write operations or sequences.
|
| 487 |
|
|
//
|
| 488 |
|
|
// Exit Criteria:
|
| 489 |
|
|
// - All data has been drained or extracted from the DUT.
|
| 490 |
|
|
// - All interfaces are idle.
|
| 491 |
|
|
//
|
| 492 |
|
|
class uvm_shutdown_phase extends uvm_task_phase;
|
| 493 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 494 |
|
|
comp.shutdown_phase(phase);
|
| 495 |
|
|
endtask
|
| 496 |
|
|
local static uvm_shutdown_phase m_inst;
|
| 497 |
|
|
static const string type_name = "uvm_shutdown_phase";
|
| 498 |
|
|
|
| 499 |
|
|
// Function: get
|
| 500 |
|
|
// Returns the singleton phase handle
|
| 501 |
|
|
static function uvm_shutdown_phase get();
|
| 502 |
|
|
if(m_inst == null)
|
| 503 |
|
|
m_inst = new;
|
| 504 |
|
|
return m_inst;
|
| 505 |
|
|
endfunction
|
| 506 |
|
|
protected function new(string name="shutdown");
|
| 507 |
|
|
super.new(name);
|
| 508 |
|
|
endfunction
|
| 509 |
|
|
virtual function string get_type_name();
|
| 510 |
|
|
return type_name;
|
| 511 |
|
|
endfunction
|
| 512 |
|
|
endclass
|
| 513 |
|
|
|
| 514 |
|
|
|
| 515 |
|
|
// Class: uvm_post_shutdown_phase
|
| 516 |
|
|
//
|
| 517 |
|
|
// After things have settled down.
|
| 518 |
|
|
//
|
| 519 |
|
|
// that calls the
|
| 520 |
|
|
// method. The end of this phase is
|
| 521 |
|
|
// synchronized to the end of the phase unless a user defined
|
| 522 |
|
|
// phase is added after this phase.
|
| 523 |
|
|
//
|
| 524 |
|
|
// Upon Entry:
|
| 525 |
|
|
// - No more "data" stimulus is applied to the DUT.
|
| 526 |
|
|
//
|
| 527 |
|
|
// Typical Uses:
|
| 528 |
|
|
// - Perform final checks that require run-time access to the DUT
|
| 529 |
|
|
// (e.g. read accounting registers or dump the content of memories).
|
| 530 |
|
|
//
|
| 531 |
|
|
// Exit Criteria:
|
| 532 |
|
|
// - All run-time checks have been satisfied.
|
| 533 |
|
|
// - The phase is ready to end.
|
| 534 |
|
|
//
|
| 535 |
|
|
class uvm_post_shutdown_phase extends uvm_task_phase;
|
| 536 |
|
|
virtual task exec_task(uvm_component comp, uvm_phase phase);
|
| 537 |
|
|
comp.post_shutdown_phase(phase);
|
| 538 |
|
|
endtask
|
| 539 |
|
|
local static uvm_post_shutdown_phase m_inst;
|
| 540 |
|
|
static const string type_name = "uvm_post_shutdown_phase";
|
| 541 |
|
|
|
| 542 |
|
|
// Function: get
|
| 543 |
|
|
// Returns the singleton phase handle
|
| 544 |
|
|
static function uvm_post_shutdown_phase get();
|
| 545 |
|
|
if(m_inst == null)
|
| 546 |
|
|
m_inst = new;
|
| 547 |
|
|
return m_inst;
|
| 548 |
|
|
endfunction
|
| 549 |
|
|
protected function new(string name="post_shutdown");
|
| 550 |
|
|
super.new(name);
|
| 551 |
|
|
endfunction
|
| 552 |
|
|
virtual function string get_type_name();
|
| 553 |
|
|
return type_name;
|
| 554 |
|
|
endfunction
|
| 555 |
|
|
endclass
|