Multiple agent with multiple interface

It is recommended that the agent’s configuration object should contain the virtual interface handle for that agent. This precludes you from having to determine the where the agent exists in the hierarchy and allows your environment to pass the agent configuration object to the correct agent.

The flow will be:

  • The HDL module will instantiate interfaces and connect appropriately
  • The interfaces will be passed to the top level test via the uvm_config_db with unique names.
  • The test will create the environment config object, which will in turn contain the agent configuration object for each agent.
  • The test will get the interface for each agent from the uvm_config_db and store it in each agent’s configuration object.
  • The environment will pass the agent’s configuration object to the agent using the uvm_config_db
  • The agent will get it’s unique configuration object and get it’s virtual interface handle from the configuration object.