How to get get config object handle in a sequence?

Hi Madhu,

Sequences can get a config object by querying the database, but they need to know the path to the agent or environment, which could be obtained based on the sequencer on which the sequence is started.

However, since agents need to have a sequencer, I make all my agent-sequencers contain a copy of, or handle to, the agent’s config object (which may be used for sequencer options, etc.).

For environments, I’m in the camp that likes to have a virtual sequencer on which to run env-level virtual sequences. These virtual sequencers contain handles to any sub-sequencers (making it easier to run sequences on them) so I usually put a copy of, or handle to, the environment config object in there too.

Doing these two things means that all sequences can get the config object from the sequencer on which they’re running using the p_sequencer field (assuming you’ve used the `uvm_declare_p_sequencer macro).

James