//// Specify a phase to transition to when phase is complete.functionvoiduvm_phase::set_jump_phase(uvm_phasephase);uvm_phased;if((m_state<UVM_PHASE_STARTED)||(m_state>UVM_PHASE_ENDED))begin`uvm_error("JMPPHIDL",{"Attempting to jump from phase \"",get_name(),"\" which is not currently active (current state is ",m_state.name(),"). The jump will not happen until the phase becomes ","active."})end// A jump can be either forward or backwards in the phase graph.// If the specified phase (name) is found in the set of predecessors
//// Specify a phase to transition to when phase is complete.functionvoiduvm_phase::set_jump_phase(uvm_phasephase);uvm_phased;bitactive;uvm_phase_statestate;state=get_state();active=(state>=UVM_PHASE_STARTED)&&(state<=UVM_PHASE_ENDED);if(!active)beginif(phase==null)begin// Clear out jump informationm_jump_phase=null;m_jump_fwd=0;m_jump_bkwd=0;m_premature_end=0;return;endelsebegin`uvm_error("JMPPHIDL",{"Attempting to jump from phase \"",
endfunction// is_jumping_forwardfunctionbituvm_phase::is_jumping_forward();returnm_jump_fwd;endfunction:is_jumping_forward// is_jumping_backwardfunctionbituvm_phase::is_jumping_backward();returnm_jump_bkwd;endfunction:is_jumping_backward// end_prematurely// ----//// Set a flag to cause the phase to end prematurely. functionvoiduvm_phase::end_prematurely();m_premature_end=1;endfunction// is_ending_permaturelyfunctionbituvm_phase::is_ending_prematurely();returnm_premature_end;endfunction:is_ending_prematurely// jump// ----//// Note that this function does not directly alter flow of control.// That is, the new phase is not initiated in this function.// Rather, flags are set which execute_phase() uses to determine// that a jump has been requested and performs the jump.functionvoiduvm_phase::jump(uvm_phasephase);set_jump_phase(phase);end_prematurely();