What are the guidelines on using uvm_config_db::get() calls inside a uvm_object

In reply to Venkatesh Maddibande Sheshadrivasan:

It’s not recommended to get the configuration inside uvm_object constructor because to get the configuration inside the sequence we call the get method as shown below

uvm_config_db#(int)::get(null, get_full_name(),"int", var)

As in components, in objects to get the configuration we should not provide empty quotes as a second argument because objects don’t have a hierarchy. Instead, we use get_full_name as the second argument that returns the path of the sequencer on which the sequence is started.

If the get method is called in the constructor, get full_name() can not return the path & get fails as the sequence is not yet started.

Once the sequence is started then the get method should be called, so the get method should be called from the task body before the sequence item is randomized as the task body is called by start.