Class uvm_pkg::uvm_resource_base
Inheritance Diagram of uvm_resource_base
Name |
Type |
Description |
---|---|---|
access |
||
precedence |
int unsigned |
variable precedence This variable is used to associate a precedence that a resource has with respect to other resources which match the same scope and name. Resources are set to the default_precedence initially, and may be set to a higher or lower precedence as desired. |
default_precedence |
int unsigned |
variable default_precedence The default precedence for an resource that has been created. When two resources have the same precedence, the first resource found has precedence. |
Constructors
- new(string name = "", string s = "*")
Function
new
constructor for uvm_resource_base. The constructor takes two arguments, the name of the resource and a regular expression which represents the set of scopes over which this resource is visible.
- Parameters:
name (string)
s (string)
Functions
- get_type_handle()
Function
get_type_handle
Pure virtual function that returns the type handle of the resource container.
- Return type:
- set_read_only()
Function
set_read_only
Establishes this resource as a read-only resource. An attempt to call <uvm_resource#(T)::write> on the resource will cause an error.
- set_read_write()
Implementation question
Not sure if this function is necessary.
Once a resource is set to read_only no one should be able to change that. If anyone can flip the read_only bit then the resource is not truly read_only.
- is_read_only()
Function
is_read_only
Returns one if this resource has been set to read-only, zero otherwise
- set_scope(string s)
Function
set_scope
Set the value of the regular expression that identifies the set of scopes over which this resource is visible. If the supplied argument is a glob it will be converted to a regular expression before it is stored.
- Parameters:
s (string)
- get_scope()
Function
get_scope
Retrieve the regular expression string that identifies the set of scopes over which this resource is visible.
- match_scope(string s)
Function
match_scope
Using the regular expression facility, determine if this resource is visible in a scope. Return one if it is, zero otherwise.
- Parameters:
s (string)
- set_priority(uvm_resource_types::priority_e pri)
Function
set priority
Change the search priority of the resource based on the value of the priority enum argument.
- Parameters:
- convert2string()
function convert2string
Create a string representation of the resource value. By default we don't know how to do this so we just return a "?". Resource specializations are expected to override this function to produce a proper string representation of the resource value.
- do_print(uvm_printer printer)
Function
do_print
Implementation of do_print which is called by print().
- Parameters:
printer (uvm_printer)
- record_read_access(uvm_object accessor = null)
function
record_read_access
- Parameters:
accessor (uvm_object)
- record_write_access(uvm_object accessor = null)
function
record_write_access
- Parameters:
accessor (uvm_object)
- print_accessors()
Function
print_accessors
Dump the access records for this resource
- init_access_record(uvm_resource_types::access_t access_record)
Function
init_access_record
Initialize a new access record
- Parameters:
access_record (uvm_resource_types::access_t)
Tasks
- wait_modified()
Task
wait_modified
This task blocks until the resource has been modified -- that is, a <uvm_resource#(T)::write> operation has been performed. When a <uvm_resource#(T)::write> is performed the modified bit is set which releases the block. Wait_modified() then clears the modified bit so it can be called repeatedly.
Class
uvm_resource_base
Non-parameterized base class for resources. Supports interfaces for scope matching, and virtual functions for printing the resource and for printing the accessor list