How to handle mid test reset in UVM?

Hi All,

I am converting VMM TB to UVM. In VMM test sequences reset is implemented by calling built in reset_xactor function
for vmm_xactor class as:


force top.reset_n=0;
top_en.sub_env.driver.reset_xactor();
then after some delay
force top.reset_n=1;
top_en.sub_env.driver.start_xactor();

I have implemented a fork … join_any in run_phase to check for reset and restart the loop automatically.
But in some tests I am getting the error like “get_next_item called twice without item_done” as asked in UVM mid test reset sequencer invalid state | Verification Academy.

Is there a way to stop and start sequences also from test sequence?

Thanks in advance…

Regards,

Chandan