Sequencer

If my seq_item, sequence and sequencer class are same for both master and slave agent ,then can i use single seq_item, sequence and sequencer class for both of them? or is it good way to use virtual sequencer in this kind of case?

In reply to A_123:

Yes. It is very common to create an agent that can act as both a master or slave depending on how it is configured.

In reply to cgales:

Hi cgales,

Actually my both agents drive and monitor differently. so i have to keep them separate. but all transaction classes like seq_item , sequence , sequencer are same for both master and slave. so, it is possible use single transaction classes in environment and call it from agent?

In reply to A_123:

Typically a sequence_item is specific to one agent. There is no reason that you can’t code your driver/monitor to act differently based upon a configuration setting. You will often see this in an agent used for a family of protocols, such as Ethernet.

If you have the same sequence_item across several different agents, you run the risk of namespace collision and potentially using the wrong sequence_item.

In reply to chr_sue:

Here is the link.

(naming conventions are not that much good)

In reply to cgales:

My both agents have same variables to randomize. that’s why i’m thinking to make single seq_item , sequence and sequencer class. but my both agents drives data differently. is it possible to take single seq_item , sequence and sequencer class in environment having two different handles for both agents and call it from agents? or i must have to make separate seq_item , sequence , sequencer class for both agent and put it in virtual sequencer?

here is the link : i2s_27/9 - EDA Playground

In reply to A_123:

I understood you r code as follows:
You have 1 master agent and 1 slave agent.
Each agent has a sequencer/driver pair.
The sequencers produces seq_items of the same time. They are parameterized for the same seq_item.
But the drivers differ. Correct?

You can use the seq_item for both sequencers/sequences.
The sequencer is the same. But you might need different sequences for the master and the slave.
This approach is fine.

In reply to chr_sue:

Yes, you are getting it correct
Thank you very much @chr_sue

I’m using one sequence and one sequencer having two different handles for master and slave, is this ok?

In reply to A_123:

Yes that’s OK.

In reply to chr_sue:

Thank you very much @chr_sue.