[source]

Class uvm_simple_lock_dap

uvm_pkg::uvm_simple_lock_dap <T> + __m_uvm_field_automation(): void + convert2string(): string + create(): uvm_object + do_copy(): void + do_pack(): void + do_print(): void + do_unpack(): void + get(): T + get_object_type(): uvm_object_wrapper + get_type(): type_id + is_locked(): bit + lock(): void + set(): void + try_get(): bit + try_set(): bit + unlock(): void

Inheritance Diagram of 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.

Parameters

Name

Default value

Description

T

int

Typedefs

Name

Actual Type

Description

this_type

uvm_simple_lock_dap#(T)

Used for self-references

Constructors

function new ( string name ) [source]

Constructor

Functions

virtual function void set ( int value ) [source]

Updates the value stored within the DAP.

set will result in an error if the DAP has been locked.

virtual function bit try_set ( int value ) [source]

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.

virtual function T get ( ) [source]

Returns the current value stored within the DAP

virtual function bit try_get ( int value ) [source]

Retrieves the current value stored within the DAP

try_get will always return 1.

function void lock ( ) [source]

Locks the data value

The data value cannot be updated via set or try_set while locked.

function void unlock ( ) [source]

Unlocks the data value

function bit is_locked ( ) [source]

Returns the state of the lock.

Returns

1

The value is locked

0

The value is unlocked

virtual function void do_copy ( uvm_object rhs ) [source]

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.

virtual function void do_pack ( uvm_packer packer ) [source]

virtual function void do_unpack ( uvm_packer packer ) [source]

virtual function string convert2string ( ) [source]

Function- convert2string

virtual function void do_print ( uvm_printer printer ) [source]

Function- do_print