Hi,
I’m facing the same issue. The test hangs when the
m_sequencer.grab
statement is executed.
Need a solution for this so that we make use of register sequences for handling interrupt scenarios.
Can someone post a solution for the same.
In reply to siraj:
How does your agent look like? Do you have a sequencer/driver there?
You have to execute the grab/lock in the body task of your sequence.
The test is hanging when the “grab” command is used to grab the sequencer in the body task of the sequence.
It should work if you pass “this” to the read() task’s parent arg like,
regmodel.status_reg.read(.status(status),.value(value), .parent(this));
The problem is you have already grabbed the sequencer from ISR sequence and then you are trying to run another sequence(ie, reg.read()) on the same sequencer, this is not right. When you pass “this” handle ,ISR will become the parent sequence. I haven’t tried this , but I am sure it should work.
There are a few Things wrong:
(1) m_sequencer = regmodel.default_map.get_sequencer(); get_sequencer returns uvm_sequencer and not your sequencer. You have to perform a type cast.
(2) the grab Command is always executed on a sequence and not on a sequencer.
m_sequencer.grab(this); is wrong.
Thanks for the replay .
FYI, nothing wrong , It is working fine now with the steps i mentioned above…
(1)
No need to cast to local type , because I am not accessing any elements from my sequencer.
regmodel.default_map.get_sequencer().grab() is also fine.
(2)
grab/lock is defined in sequencer_base and sequence_base. so you can call them from both places.