In reply to uvm_va_1:
In order to avoid a deadlock situation, I recently added stop sequences to a block which is instantiated in the main sequence, it took care of the deadlock situation but it causes UVM FATAL error, what other way can I add this stop sequences to my code?
Hi, I think the issue arise when driver tries to call the item_done() after we called the stop_sequences() method. So it will give the fatal which you mentioned. I think, driver should handle reset such a way that when reset occur, it stops driving and call item_done(if had fetched with get_next_tem) and then wait for reset to lift-up before fetching new transaction. But here i believe it’s not getting handled in driver.
One way to call the stop_sequence is after wait_for_item_done() inside sequence to make sure nothing put into sequencer and driver also must be ideal. Inside sequence, we can have a variable set after it seen txn finished and we can get it’s value in another component and call stop_sequence method only when reset is asserted. if no reset asserted, set that variable to 0 so when it again gets updated from sequence after finish, we can have an idea.
if we don’t have that deep access then from where we are starting sequence, we can get the current state of uvm_sequence which we can take for decision making. if it’s UVM_FINISH, we can then call stop_sequence() method.