Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uvm-1.2/src/base/uvm_phase.svh
- Line 1297: task uvm_phase::execute_phase();
- uvm_task_phase task_phase;
- uvm_root top;
- uvm_phase_state_change state_chg;
- uvm_coreservice_t cs;
- cs = uvm_coreservice_t::get();
- top = cs.get_root();
- ...........
- // TIMEOUT
- begin
- if (this.get_name() == "run") begin
- if (top.phase_timeout == 0)
- wait(top.phase_timeout != 0);
- if (m_phase_trace)
- `UVM_PH_TRACE("PH/TRC/TO_WAIT", $sformatf("STARTING PHASE TIMEOUT WATCHDOG (timeout == %t)", top.phase_timeout), this, UVM_HIGH)
- `uvm_delay(top.phase_timeout)
- if ($time == `UVM_DEFAULT_TIMEOUT) begin
- if (m_phase_trace)
- `UVM_PH_TRACE("PH/TRC/TIMEOUT", "PHASE TIMEOUT WATCHDOG EXPIRED", this, UVM_LOW)
- foreach (m_executing_phases[p]) begin
- if ((p.phase_done != null) && (p.phase_done.get_objection_total() > 0)) begin
- if (m_phase_trace)
- `UVM_PH_TRACE("PH/TRC/TIMEOUT/OBJCTN",
- $sformatf("Phase '%s' has outstanding objections:\n%s", p.get_full_name(), p.phase_done.convert2string()),
- this,
- UVM_LOW)
- end
- end
- `uvm_fatal("PH_TIMEOUT",
- $sformatf("Default timeout of %0t hit, indicating a probable testbench issue",
- `UVM_DEFAULT_TIMEOUT))
- end
- else begin
- if (m_phase_trace)
- `UVM_PH_TRACE("PH/TRC/TIMEOUT", "PHASE TIMEOUT WATCHDOG EXPIRED", this, UVM_LOW)
- foreach (m_executing_phases[p]) begin
- if ((p.phase_done != null) && (p.phase_done.get_objection_total() > 0)) begin
- if (m_phase_trace)
- `UVM_PH_TRACE("PH/TRC/TIMEOUT/OBJCTN",
- $sformatf("Phase '%s' has outstanding objections:\n%s", p.get_full_name(), p.phase_done.convert2string()),
- this,
- UVM_LOW)
- end
- end
- `uvm_fatal("PH_TIMEOUT",
- $sformatf("Explicit timeout of %0t hit, indicating a probable testbench issue",
- top.phase_timeout))
- end
- if (m_phase_trace)
- `UVM_PH_TRACE("PH/TRC/EXE/3","PHASE EXIT TIMEOUT",this,UVM_DEBUG)
- end // if (this.get_name() == "run")
- else begin
- wait (0); // never unblock for non-run phase
- end
- end // if (m_phase_trace)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement