tudor.timi Posted March 20, 2014 Report Share Posted March 20, 2014 Hi, I remember back in the day in OVM it was possible to say uvm_test_done.set_drain_time(...). With UVM, when compiling with +UVM_NO_DEPRECATED, it's not possible to do this. Phases have their own drain times now. The cool thing about the OVM approach was that I could set the drain time from the end_of_elaboration phase somewhere in my base test and be done with it. I dug around a bit in UVM and found that all phases have singletons. I tried to get a handle to the run phase singleton during the end_of_elaboration phase and set the drain time on that. It didn't work. All phase methods get a "phase" argument passed to them. I would have expected that this parameter contains already a handle to the phase singleton. I made a small example on EDA Playground (http://www.edaplayground.com/x/2PL) where I get the run phase singleton and print it and also print the argument. They are different objects. Does anyone know what the phase argument getting passed to phase methods is and why it's not the singleton? Thanks, Tudor getvictor 1 Quote Link to comment Share on other sites More sharing options...
kirloy Posted March 24, 2014 Report Share Posted March 24, 2014 There is always a pair of phases in UVM with the same name. One act as implementation, 2nd as a node in uvm phase schedule graph You can obtain both see below I've modify part of yours example: function void end_of_elaboration_phase(uvm_phase phase); // get handle to run phase uvm_phase tmp; uvm_run_phase m_run_phase = uvm_run_phase::get(); $display("From handle in end_of_elaboration"); m_run_phase.print(); tmp = phase.find_by_name("run",0); $display("get phase node in end_of_elaboration"); tmp.print(); endfunction task run_phase(uvm_phase phase); // get handle to run phase uvm_phase _phase; uvm_run_phase m_run_phase = uvm_run_phase::get(); $display("From handle in run"); m_run_phase.print(); $display("From param in run"); phase.print(); $cast(m_run_phase , phase.get_imp); $display("get imp from param is equal to uvm_run_phase::get"); m_run_phase.print(); endtask Quote Link to comment Share on other sites More sharing options...
tudor.timi Posted March 24, 2014 Author Report Share Posted March 24, 2014 So just to make it more clear to me, calling uvm_run_phase::get() will return the implementation node and the handle getting passed to run_phase() or the result of phase.find_by_name("run",0) is the node used for scheduling, right? Quote Link to comment Share on other sites More sharing options...
kirloy Posted March 25, 2014 Report Share Posted March 25, 2014 yes Quote Link to comment Share on other sites More sharing options...
tudor.timi Posted March 25, 2014 Author Report Share Posted March 25, 2014 Thanks a lot, kirloy! Quote Link to comment Share on other sites More sharing options...
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.