Jump to content
wszhong631

the parent-child relationship of add method of uvm_phase

Recommended Posts

hi,

 

  In   uvm_phase file  of uvm1.2,  I understand that  before_phase.m_successors.delete(after_phase)  which is  the  978th line code of  add method should be   'before_phase.m_predecessors.delete(after_phase) ' , that is right ?

 965   // IN BETWEEN 'BEFORE' and 'AFTER' PHASES
 966   else if (before_phase != null && after_phase != null) begin
 967     if (!after_phase.is_before(before_phase)) begin
 968       `uvm_fatal("PH_ADD_PHASE",{"Phase '",before_phase.get_name(),
 969                  "' is not before phase '",after_phase.get_name(),"'"})
 970     end
 971     // before and after? add 1 pred and 1 succ
 972     begin_node.m_predecessors[after_phase] = 1;
 973     end_node.m_successors[before_phase] = 1;
 974     after_phase.m_successors[begin_node] = 1;
 975     before_phase.m_predecessors[end_node] = 1;
 976     if (after_phase.m_successors.exists(before_phase)) begin
 977       after_phase.m_successors.delete(before_phase);
 978       before_phase.m_successors.delete(after_phase);
 979     end
 980   end // if (before_phase != null && after_phase != null)  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×