Class uvm_config_db
uvm_config_db#(int)::set(this, "*", "A");
The parameter value "int" identifies the configuration type as an int property.
The set and get methods provide the same API and semantics as the set/get_config_* functions in uvm_component.
Name |
Default value |
Description |
---|---|---|
T |
int |
Functions
- static function bit get ( uvm_component cntxt, string inst_name, string field_name, int value ) [source]
Get the value for field_name in inst_name , using component cntxt as the starting search point. inst_name is an explicit instance name relative to cntxt and may be an empty string if the cntxt is the instance that the configuration object applies to. field_name is the specific field in the scope that is being searched for.
The basic get_config_* methods from uvm_component are mapped to this function as:
get_config_int(...) => uvm_config_db#(uvm_bitstream_t)::get(cntxt,...) get_config_string(...) => uvm_config_db#(string)::get(cntxt,...) get_config_object(...) => uvm_config_db#(uvm_object)::get(cntxt,...)
- static function void set ( uvm_component cntxt, string inst_name, string field_name, int value ) [source]
Create a new or update an existing configuration setting for field_name in inst_name from cntxt . The setting is made at cntxt , with the full scope of the set being { cntxt ,".", inst_name }. If cntxt is null then inst_name provides the complete scope information of the setting. field_name is the target field. Both inst_name and field_name may be glob style or regular expression style expressions.
If a setting is made at build time, the cntxt hierarchy is used to determine the setting's precedence in the database. Settings from hierarchically higher levels have higher precedence. Settings from the same level of hierarchy have a last setting wins semantic. A precedence setting of uvm_resource_base::default_precedence is used for uvm_top, and each hierarchical level below the top is decremented by 1.
After build time, all settings use the default precedence and thus have a last wins semantic. So, if at run time, a low level component makes a runtime setting of some field, that setting will have precedence over a setting from the test level that was made earlier in the simulation.
The basic set_config_* methods from uvm_component are mapped to this function as:
set_config_int(...) => uvm_config_db#(uvm_bitstream_t)::set(cntxt,...) set_config_string(...) => uvm_config_db#(string)::set(cntxt,...) set_config_object(...) => uvm_config_db#(uvm_object)::set(cntxt,...)
- static function bit exists ( uvm_component cntxt, string inst_name, string field_name, bit spell_chk ) [source]
Check if a value for field_name is available in inst_name , using component cntxt as the starting search point. inst_name is an explicit instance name relative to cntxt and may be an empty string if the cntxt is the instance that the configuration object applies to. field_name is the specific field in the scope that is being searched for. The spell_chk arg can be set to 1 to turn spell checking on if it is expected that the field should exist in the database. The function returns 1 if a config parameter exists and 0 if it doesn't exist.
Tasks
- static function wait_modified ( uvm_component cntxt, string inst_name, string field_name ) [source]
Wait for a configuration setting to be set for field_name in cntxt and inst_name . The task blocks until a new configuration setting is applied that effects the specified field.
All of the functions in uvm_config_db#(T) are static, so they must be called using the :: operator. For example: