Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. uvm-1.2/src/base/uvm_phase.svh
  2. Line 1297: task uvm_phase::execute_phase();
  3. uvm_task_phase task_phase;
  4. uvm_root top;
  5. uvm_phase_state_change state_chg;
  6. uvm_coreservice_t cs;
  7.  
  8. cs = uvm_coreservice_t::get();
  9. top = cs.get_root();
  10. ...........
  11. // TIMEOUT
  12. begin
  13. if (this.get_name() == "run") begin
  14. if (top.phase_timeout == 0)
  15. wait(top.phase_timeout != 0);
  16. if (m_phase_trace)
  17. `UVM_PH_TRACE("PH/TRC/TO_WAIT", $sformatf("STARTING PHASE TIMEOUT WATCHDOG (timeout == %t)", top.phase_timeout), this, UVM_HIGH)
  18. `uvm_delay(top.phase_timeout)
  19. if ($time == `UVM_DEFAULT_TIMEOUT) begin
  20. if (m_phase_trace)
  21. `UVM_PH_TRACE("PH/TRC/TIMEOUT", "PHASE TIMEOUT WATCHDOG EXPIRED", this, UVM_LOW)
  22. foreach (m_executing_phases[p]) begin
  23. if ((p.phase_done != null) && (p.phase_done.get_objection_total() > 0)) begin
  24. if (m_phase_trace)
  25. `UVM_PH_TRACE("PH/TRC/TIMEOUT/OBJCTN",
  26. $sformatf("Phase '%s' has outstanding objections:\n%s", p.get_full_name(), p.phase_done.convert2string()),
  27. this,
  28. UVM_LOW)
  29. end
  30. end
  31.  
  32. `uvm_fatal("PH_TIMEOUT",
  33. $sformatf("Default timeout of %0t hit, indicating a probable testbench issue",
  34. `UVM_DEFAULT_TIMEOUT))
  35. end
  36. else begin
  37. if (m_phase_trace)
  38. `UVM_PH_TRACE("PH/TRC/TIMEOUT", "PHASE TIMEOUT WATCHDOG EXPIRED", this, UVM_LOW)
  39. foreach (m_executing_phases[p]) begin
  40. if ((p.phase_done != null) && (p.phase_done.get_objection_total() > 0)) begin
  41. if (m_phase_trace)
  42. `UVM_PH_TRACE("PH/TRC/TIMEOUT/OBJCTN",
  43. $sformatf("Phase '%s' has outstanding objections:\n%s", p.get_full_name(), p.phase_done.convert2string()),
  44. this,
  45. UVM_LOW)
  46. end
  47. end
  48.  
  49. `uvm_fatal("PH_TIMEOUT",
  50. $sformatf("Explicit timeout of %0t hit, indicating a probable testbench issue",
  51. top.phase_timeout))
  52. end
  53. if (m_phase_trace)
  54. `UVM_PH_TRACE("PH/TRC/EXE/3","PHASE EXIT TIMEOUT",this,UVM_DEBUG)
  55. end // if (this.get_name() == "run")
  56. else begin
  57. wait (0); // never unblock for non-run phase
  58. end
  59. end // if (m_phase_trace)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement