UVM Phase Jumping

In reply to Anamika Sharma:

First of all, even if you were to use main_phase and shutdown_phase, the recommendation would still be only to implement run_phase in your drivers. The reset/config/main/shutdown phases are only intended to be used for stimulus control, if at all.
I’m guessing that in your last post, you meant “main_phase” where you wrote “run_phase” since I’m sure you know that main_phase()-shutdown_phase() run in parallel with run_phase(). Therefore shutdown_phase() cannot execute after run_phase().
Assuming that’s the case, using run_phase, your drivers would look something like this:

task driver2::run_phase(uvm_phase phase);
  `uvm_info("Driver2","display message",UVM_INFO)
  shutdown_driver2();
endtask

task driver1::run_phase(uvm_phase phase);
  repeat(2) @posedge(vif.clk);
  shutdown_driver1();
endtask

The real question you need to answer for yourself is what behavior you need to “shutdown” each driver. In reality, even if you were to use main_phase and shutdown_phase, as I said earlier, your driver would still just implement run_phase, so your drivers would really just be in a get_next_item()/item_done loop interacting with the sequences. “Shutdown” is usually just to allow the bus traffic to “drain” - allowing the drivers to complete the last transactions to get the bus back to a quiescent state. Since building any kind of communication between the drivers would lessen their reusability, you’re better off controlling them via sequences. The transactions you send could include tags like “do_bus_transaction” or “do_shutdown”.