Class uvm_resource
Name |
Default value |
Description |
---|---|---|
T |
int |
Name |
Type |
Description |
---|---|---|
my_type |
singleton handle that represents the type of this resource |
Name |
Actual Type |
Description |
---|---|---|
this_type |
Constructors
Functions
- virtual function uvm_resource_base get_type_handle ( ) [source]
Returns the static type handle of this resource in a polymorphic fashion. The return type of get_type_handle() is uvm_resource_base. This function is not static and therefore can only be used by instances of a parameterized resource.
- function void set_override ( uvm_resource_types::override_t override ) [source]
Put a resource into the global resource pool as an override. This means it gets put at the head of the list and is searched before other existing resources that occupy the same position in the name map or the type map. The default is to override both the name and type maps. However, using the override argument you can specify that either the name map or type map is overridden.
- static function this_type get_by_name ( string scope, string name, bit rpterr ) [source]
looks up a resource by name in the name map. The first resource with the specified name, whose type is the current type, and is visible in the specified scope is returned, if one exists. The rpterr flag indicates whether or not an error should be reported if the search fails. If rpterr is set to one then a failure message is issued, including suggested spelling alternatives, based on resource names that exist in the database, gathered by the spell checker.
- static function this_type get_by_type ( string scope, uvm_resource_base type_handle ) [source]
looks up a resource by type_handle in the type map. The first resource with the specified type_handle that is visible in the specified scope is returned, if one exists. If there is no resource matching the specifications, null is returned.
- function T read ( uvm_object accessor ) [source]
Return the object stored in the resource container. If an accessor object is supplied then also update the accessor record for this resource.
- function void write ( int t, uvm_object accessor ) [source]
Modify the object stored in this resource container. If the resource is read-only then issue an error message and return without modifying the object in the container. If the resource is not read-only and an accessor object has been supplied then also update the accessor record. Lastly, replace the object value in the container with the value supplied as the argument, t , and release any processes blocked on uvm_resource_base::wait_modified. If the value to be written is the same as the value already present in the resource then the write is not done. That also means that the accessor record is not updated and the modified bit is not set.
- virtual function void set_priority ( uvm_resource_types::priority_e pri ) [source]
Function
set priority
Change the search priority of the resource based on the value of the priority enum argument, pri .
- static function this_type get_highest_precedence ( uvm_resource_types::rsrc_q_t q ) [source]
In a queue of resources, locate the first one with the highest precedence whose type is T. This function is static so that it can be called from anywhere.
Class
uvm_resource #(T)
Parameterized resource. Provides essential access methods to read from and write to the resource database.