budisantoso Posted July 17, 2012 Report Share Posted July 17, 2012 Hi, I run into problem when dealing with UVM phasing. I have 2 components that i want to synchronize: test and driver. In each component, i implement task::main_phase. In the main_phase implementation at test, i put raise and drop objection to make sure that the test will finish properly. task main_phase(uvm_phase phase); phase.raise_objection(this); sequence.start(sequencer); phase.drop_objection(this); endtask In the main_phase implementation at driver, i do not put raise and drop objection since it is free running component (forever loop). task main_phase(uvm_phase phase); send_frame(xactn); endtask However, when i run the test, the simulation will stop prematurely where the send_frame function has not finished yet. It seems that the drop_objection at the test is being done before the send_frame finish. From what I understand, the main_phase is exercised bottom up where main_phase at the driver will be executed first before main_phase at the test. Anyone can help me on this? How can i debug such a phasing problem? Thank You, Budi Quote Link to comment Share on other sites More sharing options...
yeewang Posted July 18, 2012 Report Share Posted July 18, 2012 Debug UVM Phases +UVM_PHASE_TRACE Quote Link to comment Share on other sites More sharing options...
mastrick Posted July 18, 2012 Report Share Posted July 18, 2012 There is no defined ordering of the execution of main_phase between components. They could be called in any order, and they will be terminated when there are no outstanding objections to the phase. You may be able to make your existing code work by having the driver affect when the sequence completes. If the driver does not call item_done() until it has finished send_frame(), then the sequence could not finish (and the objection could not drop) until send_frame() ends. In fact, it would be more standard to start your driver in the run_phase(), conditioned by reset, so that it is just waiting for the sequence to come alive in the main phase. If you do your driver this way, it will not be terminated by the end of main_phase at all, but you will still need to extend a phase after main so that the end of simulation does not occur in 0 time. 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.