I have an IP with multiple agents, each of these agents have their own config objects. Currently I have a handle to the environment in my base sequence which gives me access to the agent config objects. I know this is not the BKM since this does not scale.
How can I get a access to the different config objects without having an instance of the environment in my sequence?
Your environment should have a config object which contains handles to all of the config objects for each agent. You can pass the environment’s config object to the sequence.
That would work, I have a follow up question. How do I get the handle to this new config object, use the get() method from the config db?
I am trying to avoid my sequences from being tied to a sequencer and would like to avoid getting the cfg object from the p_sequencer. So what I need to do is create a top level virtual sequencer for my IP environment which has handles to all the other sequencers. Is my understanding correct? Is there any resource that I can refer to, regarding this?
One concern with this though is that the sequence needs to know about and is coupled to the env_cfg which may not be ideal, especially if the sequence is reusable across different environments and agents. I would likely decouple things a bit and keep the sequence so it only gets info assigned into it that it needs relevant to the configuration. For example, I might constrain some rand fields and randomize() the seq based on env_config values in the location where the sequence is created and started.
Thanks Jeremy, this is exactly what I was looking for.
Regarding your previous comment, I can create the sequence and assign its config object, but my sequences are going to be reused at the SoC so I’m not sure how it would scale.
For vertical reuse, you should be reusing the same environment(s) and environment config object(s) as well as the sequences. This makes reuse easy as you assign the config objects the same way in both tests or virtual sequences.