uvm_get_to_lock_dap

Provides a ‘Get-To-Lock’ Data Access Policy.

The ‘Get-To-Lock’ Data Access Policy allows for any number of ‘sets’, until the value is retrieved via a ‘get’.  Once ‘get’ has been called, it is illegal to ‘set’ a new value.

The UVM uses this policy to protect the starting phase and automatic objection values in uvm_sequence_base.

Summary
uvm_get_to_lock_dap
Provides a ‘Get-To-Lock’ Data Access Policy.
Class Hierarchy
uvm_set_get_dap_base#(T)
uvm_get_to_lock_dap
Class Declaration
class uvm_get_to_lock_dap#(
    type  T  =  int
) extends uvm_set_get_dap_base#(T)
newConstructor
Set/ Get Interface
setUpdates the value stored within the DAP.
try_setAttempts to update the value stored within the DAP.
getReturns the current value stored within the DAP, and ‘locks’ the DAP.
try_getRetrieves the current value stored within the DAP, and ‘locks’ the DAP.
IntrospectionThe uvm_get_to_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.

new

function new(
    string  name  =  "unnamed-uvm_get_to_lock_dap#(T)"
)

Constructor

set

virtual function void set(
    value
)

Updates the value stored within the DAP.

set will result in an error if the value has already been retrieved via a call to get.

try_set

virtual function bit try_set(
    value
)

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 get having been called.  No errors will be reported if try_set fails.

get

virtual function T get()

Returns the current value stored within the DAP, and ‘locks’ the DAP.

After a ‘get’, the value contained within the DAP cannot be changed.

try_get

virtual function bit try_get(
    output  value
)

Retrieves the current value stored within the DAP, and ‘locks’ the DAP.

try_get will always return 1.

Introspection

The uvm_get_to_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.

class uvm_get_to_lock_dap#(
    type  T  =  int
) extends uvm_set_get_dap_base#(T)
Provides a ‘Get-To-Lock’ Data Access Policy.
function new(
    string  name  =  "unnamed-uvm_get_to_lock_dap#(T)"
)
Constructor
virtual function void set(
    value
)
Updates the value stored within the DAP.
virtual function bit try_set(
    value
)
Attempts to update the value stored within the DAP.
virtual function T get()
Returns the current value stored within the DAP, and ‘locks’ the DAP.
virtual function bit try_get(
    output  value
)
Retrieves the current value stored within the DAP, and ‘locks’ the DAP.
class uvm_sequence_base extends uvm_sequence_item
The uvm_sequence_base class provides the interfaces needed to create streams of sequence items and/or other sequences.