Jump to content
Sign in to follow this  

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: 


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this