In reply to verif_learner:
//class uvm_config_db ....
static function void set(
uvm_component cntxt,
string inst_name,
string field_name,
T value
)
Here is my two cents:
- uvm_config_db::set function is to create a new or an update of an existing configuration setting for field_name in inst_name from cntxt. The full scope of set is the concatenation of cntxt and inst_name {cntxt,”.”,~inst_name~}. If cntxt is null then inst_name provides the complete scope information of the setting.
- I would think this in an opposite way - the user of uvm_config_db::set() should know exactly what hierarchy and field name to configure. The lower layer component expects field_name to be configured. If configuration fails, it can report error or fatal message. The upper layer component should provide matched scope and field_name setting to satisfy it.
- When reuse from unit level to system level, may or may not need to take care of scope change {cntxt,”.”,~inst_name~} of uvm_config_db::set().