Configuring property using Field Automation macro

For the following class ::

typedef enum { ZERO , ONE , TWO , THREE , FOUR , FIVE } num_t;

class comp_class extends uvm_component ;

   protected num_t num = ONE;
  //  Other properties 
 `uvm_component_utils_begin(comp_class)
    // Other Field Automation Macros here
    `uvm_field_enum(num_t, num, UVM_ALL_ON)
 `uvm_component_utils_end
      
  // Component Constructor

   virtual function void build_phase(uvm_phase phase);
     super.build_phase(phase);
     .... 
 endfunction

     .... 
endclass

//  Within tb_top 

initial begin
  uvm_config_db#(<arg1>)::set(null , "<arg2>", "<arg3>", FIVE);
  run_test();
end

[Q1] From my tb_top, how do I configure property ‘num’ ?
(a) What would arg1 and arg3 ?
(b) Should arg2 be the instance path of ‘comp_class’

[Q2] The call to super.build_phase(phase) in class ‘comp_class’ is necessary to provide the flexibility to set the properties used with field automation macros , right ?

For efficiency we discourage the use of the field macros and instead use a single configuration object containing all the settings you need. But macros are certainly quick and easy.

<arg1> is num_t and <arg3> is "num".

<arg2> could either be the path to the comp_class or a wildcard "*" if you don’t care about the path.

You can either call super.build_phase() or call apply_config_settings() at any time.

I am curious about at any time
(1) If I were to call uvm_config#(num_t)::set(null,“*”,“num”,FIVE) during run-time phase from a component and I call apply_config_settings() in comp_class’s run-time phase ,
will I still be able to fetch successfully ?
(2) In the run_phase to ensure get() is done after set() , user would need to add an explicit wait_modified() followed by call to apply_config_settings() , right ?

Yes, it is still up to you to make sure set() occurs before get()