In reply to Have_A_Doubt:
To facilitate reuse, the following requirements should be used:
- Each agent shall have a corresponding configuration object which contains the handle to the required virtual interface.
- Each environment shall have a corresponding environment configuration object which contains the required agent configuration object(s).
- Each environment will use the config_db to retrieve it’s configuration object. The environment will then utilize the config_db to pass the agent’s configuration object to the agent.
- Any upper-level environment configuration object will contain sub-environment configuration objects.
To use this structure:
- The top-level TB instantiates all required interfaces and connects them to the DUT at the appropriate locations (direct port connections, assigns, bind statements, etc).
- The top-level TB adds all interfaces to the config_db, using a unique name for each instance and targeting ‘uvm_test_top’.
- The test will create the top-level environment configuration object, which will recursively create all sub-configuration objects.
- The test will retrieve all interface handles into each agent’s configuration object.
- The test will use the config_db to pass the environment configuration to the environment.
- The environment will retrieve it’s configuration object and in turn pass the sub-environment or agent configuration objects as required.