UVM Based FIFO Verification
UVM Based FIFO Verification
In digital systems, FIFO buffers are essential for temporary data storage and are
often implemented in hardware as part of memory structures or as standalone
modules. In software, FIFOs can be used in algorithms or operating system-level
tasks, such as inter-process communication.
3. Audio/Video Streaming: FIFO buffers smooth out the streaming of audio and
video signals by temporarily holding the data before processing, preventing
interruptions due to uneven data transmission.
6. Control Systems: In embedded systems, FIFOs help manage sensor data and
ensure that control loops receive and process input in the correct order.
II. FIFO Interface
Port Direction Function
wr_en Write Enable: If the FIFO is not full, asserting this signal causes data (on
data_in) to be written into the FIFO
rd_en Read Enable: If the FIFO is not empty, asserting this signal causes data
(on data_out) to be read from the FIFO
data_in Write Data: The input data bus used when writing the FIFO.
data_out output Read Data: The sequential output data bus used when reading from the
FIFO.
full Full Flag: When asserted, this combinational output signal indicates that
the FIFO is full. Write requests are ignored when the FIFO is full, initiating
a write when the FIFO is full is not destructive to the contents of the
FIFO.
almostfull Almost Full: When asserted, this combinational output signal indicates
that only one more write can be performed before the FIFO is full.
empty Empty Flag: When asserted, this combinational output signal indicates
that the FIFO is empty. Read requests are ignored when the FIFO is
empty, initiating a read while empty is not destructive to the FIFO.
almostempty Almost Empty: When asserted, this output combinational signal
indicates that only one more read can be performed before the FIFO
goes to empty.
overflow Overflow: This sequential output signal indicates that a write request
(wr_en) was rejected because the FIFO is full. Overflowing the FIFO is
not destructive to the contents of the FIFO.
underflow Underflow: This sequential output signal Indicates that the read request
(rd_en) was rejected because the FIFO is empty. Under
wr_ack Write Acknowledge: This sequential output signal indicates that a write
request (wr_en) has succeeded.
Ports table
FIFO IF
III. Verification Plan
1.
Original design
Modified design
2.
Original design
Modified design
3.
Original design
Modified design
4.
Original design
Modified design
5.
Original design
Modified design
2. FIFO_interface
3. Modified design
4. FIFO_config
5. FIFO_test
6. FIFO_sequences
➢ Reset sequence
➢ Empty sequence
7. FIFO_seq_item
8. FIFO_env
9. FIFO_agent
10. FIFO_sequencer
11. FIFO_driver
12. FIFO_monitor
13. FIFO_scoreboard
14. FIFO_coverage
15. Assertions
VII. Questa snippets
1. Report of the results
➢ Full sequence
➢ Empty sequence
3. Coverage snippets
➢ Assertions passed
➢ Cover directives
➢ Covergroups
➢ If signals toggle
➢ Branch coverage
➢ Statement coverage
➢ Statement coverage
➢ Toggle coverage
2. Assertions coverage
➢ Assertions passed
➢ Cover directives
3. Functional coverage
XI. Assertions table
Feature Assertion
Whenever count is equal to zero, FIFO is if(f_if.rst_n && (DUT.count== 0)) begin
empty empty_flag_assert: assert
final(f_if.empty && !f_if.almostempty
&& !f_if.full && !f_if.almostfull);
Whenever count is equal to 1, FIFO is almost if(f_if.rst_n && (DUT.count== 1)) begin
empty almostempty_flag_assert: assert
final(f_if.almostempty && !f_if.empty
&& !f_if.full && !f_if.almostfull);
Whenever FIFO is not full and wr_en is high, @(posedge f_if.clk) disable
wr_ack is high iff(!f_if.rst_n) (f_if.wr_en && DUT.count<
f_if.FIFO_DEPTH) |=> f_if.wr_ack;
Whenever FIFO is full and wr_en is high, @(posedge f_if.clk) disable
wr_ack is zero iff(!f_if.rst_n) (f_if.wr_en && f_if.full) |=>
!f_if.wr_ack;
Whenever rd_en is high and FIFO is not empty, @(posedge f_if.clk) disable iff
Read pointer increases (!f_if.rst_n) (f_if.rd_en && (DUT.count !=
0)) |=> (DUT.rd_ptr ==
($past(DUT.rd_ptr) + 1) %
f_if.FIFO_DEPTH);
Whenever wr_en is high and FIFO is not full, @(posedge f_if.clk) disable iff
Write pointer increases (!f_if.rst_n) (f_if.wr_en && (DUT.count <
f_if.FIFO_DEPTH)) |=> (DUT.wr_ptr ==
($past(DUT.wr_ptr) + 1) %
f_if.FIFO_DEPTH);