# uvm_component

The library implements the following public API beyond what is documented in 1800.2.

Summary

uvm_component
The library implements the following public API beyond what is documented in 1800.2.
Methods |
apply_config_settings | The apply_config_settings method diverges from the 1800.2 standard definition, using apply_config_settings_mode to determine how the resource pool shall be queried.
print_config | Print_config prints all configuration information for this component, as set by previous calls to <uvm_config_db::set()> and exports to the resources pool.
get_print_config_matches | static function bit get_print_config_matches()
set_print_config_matches | static function void set_print_config_matches(bit val)
begin_tr | Implementation of uvm_component::begin_tr as described in IEEE 1800.2-2020.
Types |
config_mode_t | Value type for storing config_mode_e values
config_mode_e | Enumeration for controlling component config settings.
Variables |
CONFIG_DEFAULT | Default configuration mode used by apply_config_settings_mode.
Methods |
apply_config_settings_mode | Controls the configuration mode for uvm_component::apply_config_settings.
set_recording_enabled |

### Methods

### apply_config_settings

The apply_config_settings method diverges from the 1800.2 standard definition, using apply_config_settings_mode to determine how the resource pool shall be queried.

### print_config

> function void print_config(
> | bit | recurse | = | 0,
> | bit | audit | = | 0
> )

Print_config prints all configuration information for this component, as set by previous calls to <uvm_config_db::set()> and exports to the resources pool. The settings are printed in the order of their precedence.

If recurse is set, then configuration information for all children and below are printed as well.

if audit is set then the audit trail for each resource is printed along with the resource name and value

@uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2

### get_print_config_matches

> static function bit get_print_config_matches()

static function bit get_print_config_matches()

Returns the value of the internal static variable print_config_matches which is the value of the verbose argument for apply_config_settings() if it is called in build_phase(). The variable has a default value of 0 which may be overwritten by set_print_config_matches()

@uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2

### set_print_config_matches

> static function void set_print_config_matches(
> | bit | val
> )

static function void set_print_config_matches(bit val)

Sets the value of the internal static variable print_config_matches to val

(see get_print_config_matches)

@uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2

### begin_tr

Implementation of uvm_component::begin_tr as described in IEEE 1800.2-2020.

>     function int begin_tr( uvm_transaction tr,
>                            string stream_name="main",
>                            string label="",
>                            string desc="",
>                            time begin_time=0,
>                            int parent_handle=0 );

As an added feature, this implementation will attempt to get a non-0 parent_handle from the parent sequence of the transaction tr if the parent_handle argument is 0 and the transaction can be cast to a uvm_sequence_item.

### Types

### config_mode_t

Value type for storing config_mode_e values

>     typedef bit [1:0] config_mode_t;

@uvm-contrib

### config_mode_e

Enumeration for controlling component config settings.

CONFIG_STRICT | Strictly adhere to the LRM
CONFIG_HIGHEST_PRECEDENCE | Only apply resources with highest precedence for each field name / type handle pair
CONFIG_CHECK_NAMES | Only apply settings for fields names responding to UVM_CHECK_FIELDS op

@uvm-contrib

### Variables

### CONFIG_DEFAULT

> localparam config_mode_t CONFIG_DEFAULT = `UVM_COMPONENT_CONFIG_MODE_DEFAULT

Default configuration mode used by apply_config_settings_mode.

@uvm-contrib

### Methods

### apply_config_settings_mode

> virtual function config_mode_t apply_config_settings_mode()

Controls the configuration mode for uvm_component::apply_config_settings.

Extensions may override this method to return a different config settings mode.

@uvm-contrib

### set_recording_enabled

>     function void set_recording_enabled(bit enabled)

In addition to the functionality described in IEEE 1800.2, this library implements a call to set_recording_enabled in build_phase when a config_db access of the form uvm_config_db #(uvm_bitstream_t)::get(this, “”, “recording_detail”, x) or uvm_config_db #(int)::get(this, “”, “recording_detail”, x) returns a non-zero value for x

> virtual function config_mode_t apply_config_settings_mode()

Controls the configuration mode for uvm_component::apply_config_settings.

> function void print_config(
> | bit | recurse | = | 0,
> | bit | audit | = | 0
> )

Print_config prints all configuration information for this component, as set by previous calls to uvm_config_db::set() and exports to the resources pool.

> static function bit get_print_config_matches()

static function bit get_print_config_matches()

> static function void set_print_config_matches(
> | bit | val
> )

static function void set_print_config_matches(bit val)

> localparam config_mode_t CONFIG_DEFAULT = `UVM_COMPONENT_CONFIG_MODE_DEFAULT

Default configuration mode used by apply_config_settings_mode.
The apply_config_settings method diverges from the 1800.2 standard definition, using apply_config_settings_mode to determine how the resource pool shall be queried.