Using uvm_config_db in sequence

Hi,

I am curious to know how uvm_config_db works to send item from component class to object class. Since component and object class have no visibility to each others hierarchy, how does set-get method work across the classes?

I tried set() method in env class and get() method in sequence. I was able to use get() method only when I used get_sequencer(). get() method failed when I used null.


//sequence class: body task
//worked
uvm_config_db #( int )::get( get_sequencer() , "" , "valid" , valid );

//failed
uvm_config_db #( int )::get( null , "" , "valid" , valid );


In reply to UVM_SV_101:

The sequence does not belong to the topology of a UVM environment. It has no position in the hierarchy. This wahy your 2nd statement is failing. null as the first argument is indicating the 2nd argument is a full hierarchical path. But this does not exist for the sequence.
The sequence is allocated to a sequencer and a sequencer belongs to the UVM topology. This is why the first statement is working.