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.
uvm_reg_fifo | |||||
This special register models a DUT FIFO accessed via write/read, where writes push to the FIFO and reads pop from it. | |||||
Class Hierarchy | |||||
| |||||
Class Declaration | |||||
| |||||
fifo | The abstract representation of the FIFO. | ||||
Initialization | |||||
Introspection | |||||
size | The number of entries currently in the FIFO. | ||||
capacity | The maximum number of entries, or depth, of the FIFO. | ||||
Access | |||||
write | Pushes the given value to the DUT FIFO. | ||||
read | Reads the next value out of the DUT FIFO. | ||||
mirror | Reads the next value out of the DUT FIFO. | ||||
do_predict | Updates the abstract (mirror) FIFO based on write() and read() operations. | ||||
Special Overrides | |||||
pre_write | Special pre-processing for a write() or update(). | ||||
pre_read | Special post-processing for a write() or update(). |
rand uvm_reg_data_t fifo[$]
The abstract representation of the FIFO. Constrained to be no larger than the size parameter. It is public to enable subtypes to add constraints on it and randomize.
Pushes the given value to the DUT FIFO. If auto-prediction is enabled, the written value is also pushed to the abstract FIFO before the call returns. If auto-prediction is not enabled (via <uvm_reg_map::set_auto_predict>), the value is pushed to abstract FIFO only when the write operation is observed on the target bus. This mode requires using the uvm_reg_predictor class. If the write is via an update() operation, the abstract FIFO already contains the written value and is thus not affected by either prediction mode.
Reads the next value out of the DUT FIFO. If auto-prediction is enabled, the frontmost value in abstract FIFO is popped.
Reads the next value out of the DUT FIFO. If auto-prediction is enabled, the frontmost value in abstract FIFO is popped. If the check argument is set and comparison is enabled with <set_compare()>.
virtual function void do_predict( uvm_reg_item rw, uvm_predict_e kind = UVM_PREDICT_DIRECT, uvm_reg_byte_en_t be = -1 )
Updates the abstract (mirror) FIFO based on write() and read() operations. When auto-prediction is on, this method is called before each read, write, peek, or poke operation returns. When auto-prediction is off, this method is called by a uvm_reg_predictor upon receipt and conversion of an observed bus operation to this register.
If a write prediction, the observed write value is pushed to the abstract FIFO as long as it is not full and the operation did not originate from an update(). If a read prediction, the observed read value is compared with the frontmost value in the abstract FIFO if <set_compare()> enabled comparison and the FIFO is not empty.
virtual task pre_write( uvm_reg_item rw )
Special pre-processing for a write() or update(). Called as a result of a write() or update(). It is an error to attempt a write to a full FIFO or a write while an update is still pending. An update is pending after one or more calls to set(). If in your application the DUT allows writes to a full FIFO, you must override pre_write as appropriate.
The uvm_void class is the base class for all UVM classes.
virtual class uvm_void
The uvm_object class is the base class for all UVM data and hierarchical classes.
virtual class uvm_object extends uvm_void
This is an implementation of uvm_reg as described in 1800.2 with the addition of API described below.
class uvm_reg extends uvm_object
This special register models a DUT FIFO accessed via write/read, where writes push to the FIFO and reads pop from it.
class uvm_reg_fifo extends uvm_reg
The abstract representation of the FIFO.
rand uvm_reg_data_t fifo[$]
The number of entries currently in the FIFO.
function int unsigned size()
The maximum number of entries, or depth, of the FIFO.
function int unsigned capacity()
Updates the abstract (mirror) FIFO based on write() and read() operations.
virtual function void do_predict( uvm_reg_item rw, uvm_predict_e kind = UVM_PREDICT_DIRECT, uvm_reg_byte_en_t be = -1 )
Special pre-processing for a write() or update().
virtual task pre_write( uvm_reg_item rw )
Batch update of register.
virtual task update( output uvm_status_e status, input uvm_door_e path = UVM_DEFAULT_DOOR, input uvm_sequence_base parent = null, input int prior = -1, input uvm_object extension = null, input string fname = "", input int lineno = 0 )
Special post-processing for a write() or update().
virtual task pre_read( uvm_reg_item rw )
Updates the register model mirror based on observed bus transactions
class uvm_reg_predictor #( type BUSTYPE = int ) extends uvm_component
Create a new or update an existing configuration setting for field_name in inst_name from cntxt.
static function void set( uvm_component cntxt, string inst_name, string field_name, T value )