FIFO Registers¶
- class uvm.reg.uvm_reg_fifo.UVMRegFIFO(name, size, n_bits, has_cover)[source]¶
Bases:
UVMReg
Class: UVMRegFIFO
This special register models a DUT FIFO accessed via write/read, where writes push to the FIFO and reads pop from it.
Backdoor access is not enabled, as it is not yet possible to force complete FIFO state, i.e. the write and read indexes used to access the FIFO data.
- set(value, fname='', lineno=0)[source]¶
Set the desired value for this register
Sets the desired value of the fields in the register to the specified value. Does not actually set the value of the register in the design, only the desired value in its corresponding abstraction class in the RegModel model. Use the
UVMReg.update
method to update the actual register with the mirrored value or theUVMReg.write
method to set the actual register and its mirrored value.Unless this method is used, the desired value is equal to the mirrored value.
Refer <uvm_reg_field::set()> for more details on the effect of setting mirror values on fields with different access policies.
To modify the mirrored field values to a specific value, and thus use the mirrored as a scoreboard for the register values in the DUT, use the
UVMReg.predict
method.- Parameters
value –
fname –
lineno –
- async update(status, path=3, map=None, parent=None, prior=-1, extension=None, fname='', lineno=0)[source]¶
Task: update
Updates the content of the register in the design to match the desired value
This method performs the reverse operation of
UVMReg.mirror
. Write this register if the DUT register is out-of-date with the desired/mirrored value in the abstraction class, as determined by theUVMReg.needs_update
method.The update can be performed using the using the physical interfaces (frontdoor) or
UVMReg.poke
(backdoor) access. If the register is mapped in multiple address maps and physical access is used (front-door), an addressmap
must be specified.- extern virtual task update(output uvm_status_e status,
input uvm_path_e path = UVM_DEFAULT_PATH, input uvm_reg_map map = None, input uvm_sequence_base parent = None, input int prior = -1, input uvm_object extension = None, input string fname = “”, input int lineno = 0)
- Parameters
status –
path –
UVM_DEFAULT_PATH –
_map –
parent –
prior –
extension –
fname –
lineno –
- get(fname='', lineno=0)[source]¶
Function: get
Return the desired value of the fields in the register.
Does not actually read the value of the register in the design, only the desired value in the abstraction class. Unless set to a different value using the
UVMReg.set
, the desired value and the mirrored value are identical.Use the
UVMReg.read
orUVMReg.peek
method to get the actual register value.If the register contains write-only fields, the desired/mirrored value for those fields are the value last written and assumed to reside in the bits implementing these fields. Although a physical read operation would something different for these fields, the returned value is the actual content.
- Parameters
fname –
lineno –
Returns:
- async pre_read(rw)[source]¶
Task: pre_read
Called before register read.
If the specified access
path
or addressmap
are modified, the updated access path or address map will be used to perform the register operation. If thestatus
is modified to anything other thanUVM_IS_OK
, the operation is aborted.The registered callback methods are invoked after the invocation of this method. All register callbacks are executed before the corresponding field callbacks
- Parameters
rw –