Virtual Sequence thread synchronization

I have a virtual sequence which arbitrates across multiple sequences to generate transactions to the driver. My driver is a pipelined driver and hence it consumes transaction at a later point and gives a response back to sequence to generate the next transaction. The pipelined driver could potentially drive N transactions on the same clock when it gets to driving the transaction (across N interfaces). How can I synchronize the sequence thread and driver thread so that I can pull more transactions on the same clock cycle? Is there a way to have a queue-depth of more than 1 based on the individual sequence that is part of the virtual sequence? Is there any other way to solving this problem? Am I missing something?

I’m not exactly clear on what you are asking, but I am confused by your comment that your driver has N interfaces. It is expected that your driver has only one interface, so to handle multiple interfaces, you would have multiple drivers.

The driver can pull as many transactions from the sequencer as it needs at any time. If your sequence needs multiple sequence_items, it cat call get() multiple times and store the outstanding transactions in an internal queue.

Let me try to rephrase what I want to say. The driver has N interfaces which shares the same transaction. Or rather, the same transaction can be broken up and driven across the N interfaces at the clock-edge. On the same clock edge, if I have 2 transactions from 2 different flows, it is possible to use part of the interface to drive one transaction and use the other part to drive another transaction. But, if I do have 2 transactions from the same flow in the same clock, I can make use of the interface to drive 2 transactions at the same time. Each flow has it’s own sequence since I want to independent control for the flow.

I could have an internal queue. But, I don’t want that queue to build up (want to limit it to a maximum 2 or 3 transactions to reduce foot print). Also, I don’t want to block the sequencer on a flow when other flows are inflight (peeking to find out which sequence has an outstanding request wouldn’t work here).

Not sure if I did a good job at explaining or not. Please let me know if it makes sense.