Heading2 - status flags, Heading3 - empty flag, Heading3 - almost empty flag – Achronix Speedster22i User Macro Guide User Manual

Page 151: Heading3 - full flag, Heading3 - almost full flag, Heading3 - write error flag, Status flags

Advertising
background image

Memories

BRAM80KFIFO

Speedster22i Macro Cell Library

Achronix Semiconductor Proprietary

PAGE 134

Status Flags

Empty Flag

The Empty (empty) flag is asserted after the FIFO is reset or when all of the data has been read 
from the FIFO.  The Empty flag is synchronous to the rdclk clock domain.  Further attempts to 
read  the  FIFO  when  the  Empty  flag  is  asserted  will  depend  upon  the  en_rd_when_empty 
parameter.  If the en_rd_when_empty parameter is set to 1’b0, attempts to read the FIFO when 
the  Empty  flag  is  asserted  will  be  blocked,  the  Read  Error  (read_err)  flag  will  be  set  in  the 
following  rdclk  clock  cycle,  and  the  Read  Pointer  will  remain  unchanged.  If  the 
en_rd_when_empty parameter is set to 1’b1, attempts to read the FIFO when the Empty flag is 
asserted  will  result  in  a  valid  read  operation  from  the  FIFO  with  the  Read  Pointer 
incrementing  by  one  word  value.    The  user  should  disregard  the  Read  Error  flag  when  the 
en_rd_when_empty  parameter  is  set  to  1’b1.    The  use  may  keep  track  of  the  Read  Pointer 
value by monitoring the rdcount output pins.

Almost Empty Flag

The  Almost  Empty  (almost_empty)  flag  is  asserted  when  there  are  aempty_offset  or  fewer 
words remaining in the FIFO (See 

Table 6‐34:  Condition to Assert almost_empty Flag based 

on afull_offset Parameter Assignment

).  The almost_empty flag may be used to determine 

the number of blind reads from the FIFO that can be perfromed without monitoring the empty 
flag.  For example, if the aempty_offset parameter is set to 17’h0004 and the almost_empty flag 
is deasseted, the user is guaranteed that there are at least five words in the FIFO. The user may 
read all  five words without monitoring the  empty flag  and be  guaranteed that  these  words 
will be read from the FIFO and the read_err flag will not be asserted. The Almost Empty flag 
is synchronous with the rdclk clock input.

Full Flag

The Full (full) flag is asserted when all of the available locations of the FIFO have been written. 
It is synchronous to the wrclk clock domain.  Further attempts to write the FIFO when the Full 
flag is  asserted  will  depend  upon  the en_wr_when_full  parameter.   If  the en_wr_when_full 
parameter  is  set  to  1’b0,  attempts  to  write  the  FIFO  when  the  Full  flag  is  asserted  will  be 
blocked, the Write Error (write_err) flag will be set in the following wrclk clock cycle, and the 
Write  Pointer  will  remain  unchanged.  If  the  en_wr_when_full  parameter  is  set  to  1’b1, 
attempts to write the FIFO when the Full flag is asserted will result in a valid write operation 
to  the  FIFO  with  the  Write  Pointer  incrementing  by  one  word  value.    The  user  should 
disregard the Write Error flag when the en_wr_when_full parameter is set to 1’b1.  The use 
may keep track of the Write Pointer value by monitoring the wrcount output pins.

Almost Full Flag

The  Almost  Full  (almost_full)  flag  is  asserted  when  there  are  afull_offset  or  fewer  available 
locations remaining in the FIFO.  The almost_full flag may be used to determine the number 
of blind writes to the FIFO that can be made without monitoring the full flag.  For example, if 
the afull_offset parameter is set to 17’h00004 and the almost_full flag is deasserted, the user is 
guaranteed that there are at least five empty locations in the FIFO. The user may write all five 
words without monitoring the full flag and be guaranteed that these words will be written to 
the FIFO and the write_err flag will not be asserted. The Almost Full flag is synchronous with 
the wrclk clock input.

Write Error Flag

The Write Error (write_err) flag is asserted in the following wrclk clock cycle when the user 
tries  to  write  the  FIFO  while  the  Full  Flag  is  high  and  the  Enable  Write  When  Full 
(en_wr_when_full)  parameter  is  set  to  1’b0.    The  Write  Error  flag  is  undefined  when  the 
Enable Write When Full parameter is set to 1’b1.

Advertising