nosnhojn Posted January 12, 2012 Report Posted January 12, 2012 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 Quote
nosnhojn Posted January 12, 2012 Author Report Posted January 12, 2012 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? Quote
nosnhojn Posted January 13, 2012 Author Report Posted January 13, 2012 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 Quote
janick Posted January 16, 2012 Report Posted January 16, 2012 Check the example in the UVM_HOME/examples/integrated/codec directory. It uses phase jumping to verify hardware reset. Quote
wpiman Posted June 11, 2014 Report Posted June 11, 2014 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. Quote
wpiman Posted June 11, 2014 Report Posted June 11, 2014 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. Quote
Recommended Posts
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.