Class uvm_pkg::uvm_simple_lock_dap
Name |
Default value |
Description |
---|---|---|
T |
int |
Name |
Actual Type |
Description |
---|---|---|
this_type |
Used for self-references |
Constructors
- new(string name = "unnamed-uvm_simple_lock_dap#(T)")
Function
new
Constructor
- Parameters:
name (string)
Functions
- set(int value)
Function
set
Updates the value stored within the DAP.
set will result in an error if the DAP has been locked.
- Parameters:
value (int)
- try_set(int value)
Function
try_set
Attempts to update the value stored within the DAP.
try_set will return a 1 if the value was successfully updated, or a 0 if the value can not be updated due to the DAP being locked. No errors will be reported if try_set fails.
- Parameters:
value (int)
- get()
Function
get
Returns the current value stored within the DAP
- try_get(int value)
Function
try_get
Retrieves the current value stored within the DAP
try_get will always return 1.
- Parameters:
value (int)
- lock()
- unlock()
Function
unlock
Unlocks the data value
- is_locked()
Function
is_locked
Returns the state of the lock.
Returns
-
1
-
The value is locked
-
0
-
The value is unlocked
-
- do_copy(uvm_object rhs)
Group
Introspection
The uvm_simple_lock_dap cannot support the standard UVM instrumentation methods ( copy , clone , pack and unpack ), due to the fact that they would potentially violate the access policy.
A call to any of these methods will result in an error.
- Parameters:
rhs (uvm_object)
- do_pack(uvm_packer packer)
- Parameters:
packer (uvm_packer)
- do_unpack(uvm_packer packer)
- Parameters:
packer (uvm_packer)
- convert2string()
Function- convert2string
- do_print(uvm_printer printer)
Function- do_print
- Parameters:
printer (uvm_printer)
Class
uvm_simple_lock_dap
Provides a 'Simple Lock' Data Access Policy.
The 'Simple Lock' Data Access Policy allows for any number of 'sets', so long as the value is not 'locked'. The value can be retrieved using 'get' at any time.
The UVM uses this policy to protect the file name value in the uvm_text_tr_database.