Config_db::set from Same Level of Hierarchy

Hi all ,
I am trying so set “is_active” variable ( of class uvm_agent ) from 2 Components at Same level of Hierarchy


`include "uvm_pkg.sv"
`include "uvm_macros.svh" 

import uvm_pkg::*;

`define COMP_NEW function new ( string name , uvm_component parent ) ; \
                  super.new(name,parent);\
                 endfunction

 class agent extends uvm_agent ;

 `uvm_component_utils( agent ) 
 `COMP_NEW

function void build_phase ( uvm_phase phase ) ;
 int active;
  
  `uvm_info(get_name(),"In build_phase",UVM_NONE)
   
  if( get_config_int("is_active", active) ) 
   begin	 
	 
    `uvm_info(get_name()," get_config_int is Successful !! ",UVM_NONE)
     is_active = uvm_active_passive_enum'(active);
     
   end

endfunction


 endclass


 class test extends uvm_component ;

 `uvm_component_utils( test ) 
 `COMP_NEW

  agent ag ;

  function void build_phase ( uvm_phase phase ) ;
    `uvm_info(get_name(),"In build_phase",UVM_NONE)
    uvm_config_db#(int)::set(this,"*","is_active",101) ; // Value of 101 set from Test i.e Active ( Since LSB is 1 )  !! 
	 ag = new("ag",this) ; 
  endfunction

  function void end_of_elaboration_phase ( uvm_phase phase ) ;
     uvm_top.print_topology();
  endfunction
 
 
 endclass

 class my_class extends uvm_component ;

 `uvm_component_utils( my_class ) 
 `COMP_NEW

 function void build_phase ( uvm_phase phase ) ;
    `uvm_info(get_name(),"In build_phase",UVM_NONE)
	uvm_config_db#(int)::set(uvm_top,"*","is_active",100) ; // Value of 100 set i.e Passive ( Since LSB is 0 )  !! !! 
  endfunction

 endclass
 

my_class class_h ;

 initial begin
   
   class_h = new("class_h",null);
   run_test("test") ;

 end


Since “class_h” and uvm_test_top i.e test are AT SAME LEVEL OF HIERARCHY , I expected get_config_int to be successful with is_active set to UVM_ACTIVE.

But I notice that in Output get() isn’t successful
Any thoughts ?

Thanks in advance

In reply to MICRO_91:

See Usage of set_config_* methods on global scope | Verification Academy

In reply to dave_59:

Since the type-parameter is different the get() doesn’t succeed .

Thanks , Dave