In reply to Leo Lian:
In reply to cgales:
I believe it is necessary sometimes.
When I want to disable checking in the scoreboard, for an example, I need the control in the sequence, so I need a env handle in the sequence.
I find a boring approach that link the handle of env in test_base in connect_phase to the handle in a sequencer. Then declare p_sequencer in the sequence. The sequence will have access to all components.
The config approach, as far as I am concerned, cannot or is difficult to turn the components dynamically.
Disable scoreboard is sometimes necessary. However, the sequence behavior which is used to generate traffic to DUT doesn’t relate anything to scoreboard checker. According to your idea, disabling the scoreboard affects the stimulus of the test, that’s not correct for any circumstances.
Can you explain more, what is “the control” you that are using in sequence?
One more thing, in case you want a sequence uses a configuration/object of env, using config_db to set/get the object to/from sequencer (m_sequencer) is the good solution, not boring at all.