My agents currently use the config database to pull their configuration, at the beginning of the build phase. The env performs the sets during its build phase.
I would prefer to assign the configuration directly in the environment. This seems like it would be an easy thing to do, but how does one assign the configuration object of a component BEFORE it has been built?
[edit] In other words, how can an agent get a configuration reference without using the database?
In reply to MayurKubavat:
This is true.
“- You can create agent in env and then assign configurations immediately in env build_phase().”
This won’t work because the building of the agent doesn’t actually begin until the build_phase of the env ends. aka the commands aren’t blocking.
thanks
In reply to bmorris:
I believe you are talking a Little bit theoratically about configurations. What do you really mean when saying configurations?
If you have a configuration object with data to be randomized then you have to use the config_db.
If you mean only simple Parameters a package approach is useful.
In reply to bmorris:
You can only do this by passing the config object as a constructor argument. If you’re using the UVM factory, you’re out of luck, since there you can only have a fixed signature for the create(…) function (i.e. name and parent).