Jump to content

Two sequences getting sequencer.lock grant in the same simulation cycle

Recommended Posts


I've run into a rather obscure scenario. I have multiple parallel sequences which push items to the same sequencer. These sequence will call lock and unlock before starting a small number of transactions. Here is what I observe.


sequence A calls lock(this) and is unblocked at time t

sequence C+D call lock at time t+1

sequence A calls unlock(this) once it is finished at time t+2

At time t+3, both sequences C and D appear to be unblocked (lock granted) in the same simulation cycle. Here is a print out...


unblocked port_id:  2, @  5394166 ps

unblocked port_id:  1, @  5394166 ps

After this, at least one of the unblocked sequences (I only stepped through sequence C) have their "wait_for_grant" not complete. Hence, "start_item" is perpetually blocked (while the sequence has the sequencer lock) and the sequencer does not grant any more sequences access to the driver.

Here is some sample code.

forked threads...

parallel sequence_a.start(sqr)

parallel sequence_b.start(sqr)

parallel sequence_c.start(sqr)






[all the typical transaction item code]

start_item(transaction); <--- does not return/unblock. wait_for_grant() not returning.





At this point I am resorting to writing my own semaphore to control access to the agent. However, any deep insight or pointers are highly appreciated. I am using UVM 1.2 and the latest Cadence tools.




I also found this which sounds similar! The closest replication of this issue on the forums: 


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...