Config Objects in sequences

In reply to JDoe:

How about assigning it after you create it (in the test, or wherever you create it)?


m_seq = my_sequence::type_id::create("m_seq");
m_seq.m_env_cfg = env_cfg;

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.