2 UVM sequences running in parallel, Based on the response in one sequence can we alter the 2nd sequence?

If we have 2 UVM sequences running in parallel, Based on the response in one sequence can we alter the 2nd sequence?

Need some more details about the scenario you are thinking about, but in general this should be possible as long as:

  1. The first sequence makes the response known (through a config_db entry)
  2. The second sequence periodically checks the config_db to see if there are any pending messages for it. If it finds a message then it can change its behavior appropriately.
    There are a few assumptions in my answer above.
    1 First sequence is shorter than the second.
  1. If they are running on different VIPs the first sequence starts on the first VIP before the second sequence starts on its VIP.

Logie Ramachandran
Accelver Systems Inc

In reply to logie:

It was just a hypothetical question which popped up as I was reading through some thing else on UVM. It felt like a valid scenario so wanted to check it out. Thanks for the insights. That answers my question.

In reply to hsam:

If we have 2 UVM sequences running in parallel, Based on the response in one sequence can we alter the 2nd sequence?

It is possible. But you have to take care that the sequence which delivers the responses starts first. It should start with an higher priority. And the length of the sequences plays an essential role.
In summary I believ it is not a good approach.

I agree with both Logie and Christoph that this is possible. It’s just software, after all.
However, I must disagree with Logie’s suggestion of using the config_db. While it is possible to use the config_db at runtime, it will cause a performance hit, not to mention the added complexity of having to access the config_db through the sequencer, not the sequence.
Christoph is correct in that synchronization between the two sequences will be critical. The thing to remember is that, when a given sequence randomizes its sequence_item, it will use the current state of the system. For example, if sequence1 executes one (or more) transaction(s) and stores the most recent result somewhere, perhaps in an object that is shared between the two sequences, then when sequence2 is ready to randomize its sequence_item, it can use that shared value in its constraint set.
Of course, if you do this, then neither sequence will be reusable on its own because they will both be depending on the other.

In reply to tfitz:

Thank you everyone for your detailed insights on this question. It’s clear now :)

In reply to hsam:

Just some thoughts
Actually in general this is the sole purpose of Virtual sequence - it controls, arbitrates the sequences. And of course one sequence can have affect on the 2nd sequence.

For example assume 1st sequence is system init and 2nd sequence is system write.
So if there as error during system init than no need to write in the system.

We can make this in virtual sequence assuming that system init and system read are implemented by different agents.
If single agent is doing this, than we can make this is top level sequence.

In reply to haykp:

Sounds quite complicated to control the DUT and running the operation from different agents.
Again it is dangerous what you are trying to do and it requires a high effort to avoid wrong functionality.