I have couple of questions in relation with UVM phases build() and run(). They might be applicable to other verification methodologies as well
a> Why is the build() phase executed in top-down order. Does this mean we need to new all the components in the build() phase and then proceed with execution of build() of other sub-components instantiated in the class?
b> During the run() phase is something like super.run() called? What is the order of execution of run() phase
1 Answers
Yes, the build_phase() of the UVM executed in top-down order because the children don't exist until they are constructed within the build_phase() of the parent component (And the UVM recommends using the factory create() method instead of calling the constructor new() directly). The build_phase() is also executed top-down so that the parent can provide override setting that the children will use when they execute their build_phase()
The run_phase() of each component is executed concurrently with no defined order you can depend on.
You only need to call super.method() if you are extending a class an need the functionality of the base method. There is nothing inside the run_phase() of a uvm_component, so there is no need to call super.run_phase() when extending from it. You may want to call it when extending your classes from your base classes.