UVM Resource Database | |
Intro | The uvm_resource_db class provides a convenience interface for the resources facility. |
The uvm_resource_db class provides a convenience interface for the resources facility. In many cases basic operations such as creating and setting a resource or getting a resource could take multiple lines of code using the interfaces in uvm_resource_base or uvm_resource#(T). The convenience layer in uvm_resource_db reduces many of those operations to a single line of code.
If the run-time +UVM_RESOURCE_DB_TRACE command line option is specified, all resource DB accesses (read and write) are displayed.
Implementation of uvm_resource_db, as defined in section C.3.2.1 of 1800.2-2020.
class uvm_resource_db#(type T=uvm_object)
uvm_resource_db | ||||||||
Implementation of uvm_resource_db, as defined in section C.3.2.1 of 1800.2-2020. | ||||||||
Class Declaration | ||||||||
| ||||||||
Methods | ||||||||
get_by_type | Get a resource by type. | |||||||
get_by_name | Imports a resource by name. | |||||||
set_default | add a new item into the resources database. | |||||||
dump | Dump all the resources in the resource pool. |
static function rsrc_t get_by_type( string scope )
Get a resource by type. The type is specified in the db class parameter so the only argument to this function is the scope.
static function rsrc_t get_by_name( string scope, string name, bit rpterr = 1 )
Imports a resource by name. The first argument is the current scope of the resource to be retrieved and the second argument is the name. The rpterr flag indicates whether or not to generate a warning if no matching resource is found.
static function rsrc_t set_default( string scope, string name )
add a new item into the resources database. The item will not be written to so it will have its default value. The resource is created using name and scope as the lookup parameters.
static function void dump()
Dump all the resources in the resource pool. This is useful for debugging purposes. This function does not use the parameter T, so it will dump the same thing -- the entire database -- no matter the value of the parameter.
Implementation of uvm_resource_db, as defined in section C.3.2.1 of 1800.2-2020.
class uvm_resource_db #( type T = uvm_object )
Implementation of uvm_resource#(T) as defined in section C.2.5.1 of 1800.2-2020.
class uvm_resource #( type T = int ) extends uvm_resource_base
Get a resource by type.
static function rsrc_t get_by_type( string scope )
Imports a resource by name.
static function rsrc_t get_by_name( string scope, string name, bit rpterr = 1 )
add a new item into the resources database.
static function rsrc_t set_default( string scope, string name )
Dump all the resources in the resource pool.
static function void dump()