Calling of build phase?

In reply to tfitz:

The build_phase() method for each component is called top-down by the UVM “root”.
What actually happens is that run_test() causes the uvm_test object to be created, then it’s build_phase() is called. The test’s build_phase causes the uvm_env to be created, which adds it to the list. Once uvm_test.build_phase() returns, the UVM looks for any additional components, so it now sees the uvm_env. It calls the env’s build_phase(), which creates agents, etc. This continues until all created components’ build_phase() methods get called, then the UVM continues and calls connect_phase() for all components (bottom-up).

Hi tfitz,
Does the execution order of .build_phase() depend on the order the components were created?

// Parent component
function build_phase();
a = new();
b = new();
end build_phase();

UVM will execute a.build_phase() first, and then execute b.build_phase()