Multiplexing data into multiple existing agents

We are trying to verify a DUT with 4 parallel interfaces which are used to transmit user data. The user data is multiplexed into the 4 parallel interfaces.

We already have an agent that would drive the non-parallel interface and we would like to reuse it. Is there any good ways to achieve this? I was thinking of instantiating multiple existing agents and somehow distribute user data among each sequence. However I haven’t found a good mechanism to do this. Thanks.

hmm , I think you should be able to do this.

  1. instantiate 4 agents.
  2. have a virtual sequencer, which has pointers to sequencers in each of the agents.
  3. Create a virtual sequence, which creates the user data, selects the lane it wants to drive it on ( de-mux ) and thus starts the sequence on the selected agents sequencer to drive the data.

In reply to sohan_b:

oh and the virtual sequence runs on the virtual sequencer btw.

In reply to sohan_b:

In reply to sohan_b:
oh and the virtual sequence runs on the virtual sequencer btw.

but only, if you use one. There is no need for a virtual sequencer.

In reply to xying:

We are trying to verify a DUT with 4 parallel interfaces which are used to transmit user data. The user data is multiplexed into the 4 parallel interfaces.
We already have an agent that would drive the non-parallel interface and we would like to reuse it. Is there any good ways to achieve this? I was thinking of instantiating multiple existing agents and somehow distribute user data among each sequence. However I haven’t found a good mechanism to do this. Thanks.

I’m recommending for agents of the same type (class) and 4 different virtual interfaces, because you want to transmit different data on each interface.
The develop sequences for your agents sequencer and run them in parallel (fork/join) from a virtual sequence. Then you have completely different data in each agent and on your virtual interfaces.
The virtual sequence can be started from a virtual sequencer, but there is no need for this. In any case the sequence objects from the virtual sequence will be started on the sequencers of your agents. You can do this from the virtual sequence.

In reply to chr_sue:

Thanks for the suggestion. If I understand correctly, a top level virtual sequence would generate user_data and demultiplex that data into 4 virtual interfaces. And the 4 re-use sequences would access their respective virtual interface (which is declared in their respective sequencer) to grab the demultiplexed data?

I was looking at virtual interface earlier but there are people saying that a sequence shouldn’t have access to virtual interface. Any reason for concerns?

In reply to xying:

A sequencer should never have access to a virtual interface. Each agent has a sequencer/driver pair. And the driver provides the connection to the virtual interface. The sequencer is executung a sequence, generating data on the transaction level. Each sequencer has its own sequence and works independently.

In reply to chr_sue:

hmm, but the point is to make the TB extensible. If its started on null, he will have to have pointers to all the sequencers in the virtual sequence itself, which is a bad design.

“The develop sequences for your agents sequencer and run them in parallel (fork/join) from a virtual sequence. Then you have completely different data in each agent and on your virtual interfaces” - driving random data blindly may not help, he should implement the behavior of the connecting agents correctly and the vseq should be used to model that.

In reply to chr_sue:

Each of the 4 sequences cannot be independent of each other since they have to grab a specific chunk of user data depending on what was driven on other 3 sequences. It’s of course easy to generate the complete user data in each of the 4 sequences and then decide which part to grab based on agent ID, but this wouldn’t be efficient since we would effectively waste 3/4 of data in each agent.

Isn’t there any way to pass information dynamically into existing sequence from the environment?

In reply to xying:

The information (or configuration) can be passed from envir to sequence via config_db. You have sequencer, them you can:

  • Set configuration object to sequencer from enviroinment
  • Get configuration object from sequences of that sequecer (using m_sequencer handler)

If your sequences depend on each other, then using virtual sequence (like everybody suggested) is necessary. User data can be generated in virtual sequence, and send specific part to sequence respectively.

Do your interfaces have the same behahvior? If yes, you can consider to use ID for each inteface and agent for reuseable.