Class uvm_set_before_get_dap
Name |
Default value |
Description |
---|---|---|
T |
int |
Name |
Actual Type |
Description |
---|---|---|
this_type |
Used for self-references |
Constructors
Functions
- virtual function bit try_set ( int value ) [source]
Attempts to update the value stored within the DAP.
try_set will always return a 1.
- virtual function bit try_get ( int value ) [source]
Attempts to retrieve the current value stored within the DAP
If the value has not been 'set', then try_get will return a 0, otherwise it will return a 1, and set value to the current value stored within the DAP.
- virtual function void do_copy ( uvm_object rhs ) [source]
Group
Introspection
The uvm_set_before_get_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 void do_print ( uvm_printer printer ) [source]
Function- do_print
Provides a 'Set Before Get' Data Access Policy.
The 'Set Before Get' Data Access Policy enforces that the value must be written at least once before it is read. This DAP can be used to pass shared information to multiple components during standard configuration, even if that information hasn't yet been determined.
Such DAP objects can be useful for passing a 'placeholder' reference, before the information is actually available. A good example of this would be the virtual sequencer:
In the example above, the environment didn't have a reference to the agent's sequencer yet, because the agent hadn't executed its build_phase . The environment needed to give the virtual sequencer a "Set before get" DAP so that the virtual sequencer (and any sequences one it), could eventually see the agent's sequencer, when the reference was finally available. If the virtual sequencer (or any sequences on it) attempted to 'get' the reference to the agent's sequencer prior to the environment assigning it, an error would have been reported.