In reply to tfitz:
Thanks for clarifying.
- In fact, the parent component adds its children to associate-array by name, and the created order can be predictable:
class F extends uvm_component;
B b_m;
G g_m;
virtual function void build_phase(uvm_phase phase);
g_m = G::type_id::create("g_m", this);
b_m = B::type_id::create("b_m", this);
endfunction
endclass
Associate children array of F component always will be (even we created g_m before b_m):
uvm_component m_children[string] = {
"b_m": b_m,
"g_m": g_m
}
Everytime F component gets next child to process the build_phase, B component is always the first one according to the array above. After all children of B component complete, G will be processed.
- I wanted to clarify the idea: “All components at the same level must be built before going to the next level”. Actually, this idea is not correct, right? In my example, A, D and I component are same level (A, D are children of B; I is child of G), but I component will never be processed at the same time as A and D.