Jump to content

different between run_phase and other 12 runtime phase


Recommended Posts

Hi, all

 

     i confused about the different between run_phase and other 12 runtime phase at bellow two case:

 

First Case:

 

task monitor::run_phase(uvm_phase pahse);

super.run_phase(phase);

#50;

`uvm_info("RUN_PHASE", "Monitor Run_phase Starting", UVM_NONE)

endtask

 

task driver::main_phase(uvm_phase pahse);

super.main_phase(phase);

phase.raise_objection(this);

#100;

`uvm_info("MAIN_PHASE", "Driver Main_phase Starting", UVM_NONE)

phase.drop_objection(this);

endtask

 

In the case, raise objection in driver‘s main_phase task, does not raise objection in the monitor's run_phase task

the run_phase and main_phase work as expected!

 

 

Second Case:

 

task monitor::run_phase(uvm_phase pahse);

super.run_phase(phase);

phase.raise_objection(this);

#100;

`uvm_info("RUN_PHASE", "Monitor Run_phase Starting", UVM_NONE)

phase.drop_objection(this);

endtask

 

 

task driver::main_phase(uvm_phase pahse);

super.main_phase(phase);

#50;

`uvm_info("MAIN_PHASE", "Driver Main_phase Starting", UVM_NONE)

endtask

 

In the case, raise objection in the monitor's run_phase task, does not raise objection in the driver’s main_phase task

The run_phase work expected, but the main_phase task in driver does not output any information, in other words, it seems like the main_phase task is not scheduled!

 

Who know the reason?

 

BR

 

QIN

Link to comment
Share on other sites

hi,

 

there are a few things playing here

 

1. run_phase is parallel to all other runtime phases ((pre|post)_)?(reset|configure|main|shutdown)_phase

2. a phase is terminated when all predecessors of the next phase are completed

3. completed mean "they do NOT object phase progression"

 

for your example it means that main_phase is started but since you dont raise an objection its terminated instantly. then post_main_phase is started and so on. since only the run_phase objects progression all runtime phases end in zero time (apart from the last one which needs to wait till the parallel phase run_phase completes). that post_shutdown_phase and run_phase terminate and the joint successor phase extract_phase is started.

 

have a look at +UVM_PHASE_TRACE

 

/uwe

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...