Jump to content
Sign in to follow this  
asic_bg

End of test in UVM-1.2

Recommended Posts

How are you doing end of test with UVM1.2 ?  

Setting up drain time (as shown below) used to work find till UVM1.1d as uvm run phase will get it's phase_done assigned to uvm_test_done, but that logic seems to be removed from uvm_phase.svh in uvm-1.2.

http://blog.verificationgentleman.com/2016/03/an-overview-of-uvm-end-of-test-mechanisms.html

class test_drain_time extends test;
  virtual function void end_of_elaboration_phase(uvm_phase phase);
    uvm_phase run_phase = uvm_run_phase::get();
    run_phase.phase_done.set_drain_time(this, 16 * 2);
  endfunction

  // ...
endclass

Even using another approach mentioned in the same blog about using objection doesn't work anymore as phase_done for run_phase is not allocated and I see following error when it tries to raise/drop objections.

uvm_test_top.m_env.m_scoreboard' attempted to drop an objection on 'run', however 'run' is not a task-based phase node!  (This is a UVM_PHASE_IMP, you have to query the schedule to find the UVM_PHASE_NODE)

  virtual function void write_north(amiq_apb_pkg::amiq_apb_mon_item item);
    uvm_phase run_phase;

    super.write_north(item);
    if (num_seen_north_items % 2 == 1)
      return;

    run_phase = uvm_run_phase::get();
    run_phase.raise_objection(this);
  endfunction

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×