How to add new phase in between existing 8 phases

Hi,

I just wanted to insert new phase in between connect and end_of_elaboration using following function in ovm_root.

function void insert_phase ( ovm_phase new_phase, ovm_phase exist_phase )

But couldn’t get where to add this and how.

Please let me know how to do this.

Regards
Peer Mohammed

You need to use the `ovm_phase_func_decl() macros in combination with the insert_phase() call.

Is there a specific reason you want to add a new phase? We are always trying to improve the OVM use model, and the requirement to add phases is not commonly used since the existing phases are well defined.

Thanks, I got it…

Hi Chuck,

I have used `ovm_phase_func_decl() macros in combination with the insert_phase() call. After defining the new phase i did a insert_phase in the constructor of a component. My question is once i do insert_phase for one component will it affect all the components? or should i do a insert_phase in the constructor of all the components.

Regards
Govinda

Hi Govinda,

Please look into the OVM Userguide - Adding User-Defined Phases Section.

Once you register using insert_phase with ovm_top, it will take care of phases automatically. Because ovm_top is the one which will control the phasing mechanism.