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)
Copyright 2007-2011 Mentor Graphics Corporation Copyright 2007-2011 Cadence Design Systems, Inc. Copyright 2010-2011 Synopsys, Inc. Copyright 2013 NVIDIA Corporation All Rights Reserved Worldwide
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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.