Jump to content

phasing and control of uvm components


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 years later...

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...