Jump to content

Recommended Posts

Posted

Rookie uvm question on phasing...

I want to start a uvm_component, then stop it, reset it's state,

restart it, stop it again and reset it again. How would I do that?

In old school vmm-speak, that'd be like:

my_vmm_xactor = new(...);

repeat (2) begin

my_vmm_xactor.start_xactor();

#(a_little_while);

my_vmm_xactor.stop_xactor();

my_vmm_xactor.reset_xactor();

end

thanks,

neil

Posted

After a little more digging, I'm guessing that what I'm trying to do is cycle through the runtime reset/config/main/shutdown phases (ie. at the post_shutdown_phase I want to reset to the pre_reset_phase). That make sense? Is that doable?

Posted

For anyone following along, it's phase jumping that I'm after. Here's an example of a test that will go through the runtime phases twice instead of once.

neil

---

class test extends uvm_test;

`uvm_component_utils(test)

bit jump=1;

function new(string name = "", uvm_component parent = null);

super.new(name, parent);

endfunction

task post_shutdown_phase(uvm_phase phase);

if (jump) begin

uvm_phase jph = uvm_pre_reset_phase::get();

phase.jump(jph);

end

jump = 0;

endtask

endclass

  • 2 years later...
Posted

For anyone following along, it's phase jumping that I'm after. Here's an example of a test that will go through the runtime phases twice instead of once.

neil

---

class test extends uvm_test;

`uvm_component_utils(test)

bit jump=1;

function new(string name = "", uvm_component parent = null);

super.new(name, parent);

endfunction

task post_shutdown_phase(uvm_phase phase);

if (jump) begin

uvm_phase jph = uvm_pre_reset_phase::get();

phase.jump(jph);

end

jump = 0;

endtask

endclass

Thanks.  I was looking to do this.  I see some odd behavior from my testbench I am having a hard time explaining-- but overall it seems to be working.

Posted

If anyone is following this thread-- I am using UVM 1.1A.  I tried jumping from post_shutdown back to configure.  That was all fine.  This issue there was the run_phase ends when post_shutdown ends.

 

I now jump from the shutdown phase and everything seems to operate as expected.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...