CONFIGURING SLAVES THROUGH TOP

I want to write a UVM TB TOP for Multi Master Multi Slave. Here in which the masters can work in 3 different frequencies. Slave is my DUT. So i want to make a configuration in TOP such that using parameters we can select how many masters we require and there respective working frequency (2 or more masters can work on same frequency).
How can we achieve this ??
How the instance of the different interface can be modeled in TOP file based on number of masters created ??

You can use config_db to pass on the required configuration to create agents based on the parameters that you need and use it before creating components.

In reply to Ashith:
I don’t believe the config_db is a good choice, because it requires always recopile of the TB code.
I’m not a friend of macros, but in this case macros might be a good choice.