Multiple UVC's/agents

In reply to tfitz:

In reply to leela:
If the DUT has 8 separate interfaces, then using an array of interfaces and an array of agents is the right way to organize things. You would only need the generate loop to connect each interface instance to the corresponding interface on the DUT. In the testbench, a regular for-loop can be employed to use the config_db to pass each virtual interface instance down to the corresponding agent.

Hi Tom
I have a similar issue. I have 9 interfaces and 9 agents.
I have used a generate loop
genvar i;
generate
for(i=0;i<= `NUM_INST i++) begin: req_inst
arb_req_if req_if();
initial begin
uvm_config_db#(virtual arb_req_if)::set(uvm_root::get(),*,$sformatf(req_if_%0d,i),req_if);
end
end
endgenerate

In the env I have created the agents as arb_req_agent_0. My question is how to pass the virtual interface instance to each agent using the for loop. Can you please give me an example with a snippet of code.
In my top module instaed of the * can I have uvm_test_top.env.arb_req_agent_%0d. If so what is the syntax?
Thanks