Class uvm_reg_fifo
Name |
Type |
Description |
---|---|---|
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. |
Name |
Description |
---|---|
valid_fifo_size |
Constructors
Functions
- virtual function void build ( ) [source]
Builds the abstract FIFO register object. Called by the instantiating block, a uvm_reg_block subtype.
- function void set_compare ( uvm_check_e check ) [source]
Sets the compare policy during a mirror (read) of the DUT FIFO. The DUT read value is checked against its mirror only when both the check argument in the <mirror()> call and the compare policy for the field is <UVM_CHECK>.
- virtual function void set ( uvm_reg_data_t value, string fname, int lineno ) [source]
- virtual function uvm_reg_data_t get ( string fname, int lineno ) [source]
Returns the next value from the abstract FIFO, but does not pop it. Used to get the expected value in a <mirror()> operation.
- virtual function void do_predict ( uvm_reg_item rw, uvm_predict_e kind, uvm_reg_byte_en_t be ) [source]
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.
Tasks
- virtual function update ( uvm_status_e status, uvm_path_e path, uvm_reg_map map, uvm_sequence_base parent, int prior, uvm_object extension, string fname, int lineno ) [source]
Pushes (writes) all values preloaded using set() to the DUT. You must update after set before any blocking statements, else other reads/writes to the DUT FIFO may cause the mirror to become out of sync with the DUT.
- virtual function pre_write ( uvm_reg_item rw ) [source]
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.
- virtual function pre_read ( uvm_reg_item rw ) [source]
Special post-processing for a <write()> or update(). Aborts the operation if the internal FIFO is empty. If in your application the DUT does not behave this way, you must override pre_write as appropriate.
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.