Grab/ungrab

I was looking at the Stimulus/Interrupts | Verification Academy example, but I don’t understand how the ISR class gets the m_sequencer handle. In my implementation, it shows up as null and I don’t see how it could be anything different. In my virtual sequence class, I call isr_sequence_h.start(m_sequencer), but inside the ISR class it is null. Can somebody please explain where the m_sequencer handle inside the ISR class comes from?

In reply to RaulAguilarPA:

In the Cookbook example, the isr sequence is started from int_test_sequence with the call ‘ISR.start(m_sequencer)’. The int_test_sequence() is type_compatible with the sequence requirements of the ISR sequence, so this works and m_sequencer in the ISR sequence is the same sequencer that int_test_sequence() is running on.

If you are calling an ISR sequence from a virtual sequence, you will need to pass in the handle for an appropriate sequencer for your ISR sequence. This is because the virtual sequences don’t produce any sequence items and are typically run on a null sequencer.

In reply to cgales:

Thank you very much for the explanation. It all makes sense now. I was indeed calling the ISR from a virtual sequence and I didn’t realize my case was different than the cookbook example and I needed to pass the handle. Thanks again for your help.