Config_db - parameters for set/get method

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:

  1. 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.
  2. 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.
  3. 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().