Build_phase order for scoreboard

In reply to dave_59:

Sure, Dave. The scoreboard has an associative array of analysis ports. The array size is determined by the number of agents/monitors installed by the user. Each time an agent gets built it increases the monitor count. So the updated monitor count is only available when all the agents are built.

I tried newing analysis_imps in connect phase but uvm requires uvm components to be built in build_phase only.

The scoreboard code looks like this:

uvm_analysis_imp monitor_imp[*];

task build_phase();

for(int i=0; i< monitor_count; i++)
monitor_imp[i] = new($sformatf(“monitorImp%0d”,i), this);

endtask