Heading2 - fifo operational modes, Heading3 - asynchronous fifo operation, Heading3 - synchronous fifo operation – Achronix Speedster22i User Macro Guide User Manual
Page 154: Fifo operational modes

Memories
BRAM80KFIFO
Speedster22i Macro Cell Library
PAGE 137
FIFO Operational Modes
The FIFO macro supports both single clock synchronous (same clock connected to wrclk and
rdclk inputs without any phase offset between the two clocks) and dual clock asynchronous
(two unrelated clocks or two related clocks) modes of operation. For synchronous operation,
both the wrclk and rdclk inputs must be connected to the same clock net. Phase offsets
between the two clocks in synchronous mode is not allowed. For asynchronous mode, the
user may connect the wrclk and rdclk inputs to two different clocks. The FIFO will treat the
two clocks as if they are unrelated.
Asynchronous FIFO Operation
When the FIFO is configured as an asynchronous FIFO (sync_mode = 1’b0), there are two
modes of operation available. The two modes of the FIFO is controlled by the First Word Fall
Through (fwft) parameter. This parameter controls what is on the output of the FIFO after the
first word has been written to a FIFO that was previously in an empty state. For asynchronous
operation, the user must set the en_out_reg parameter to 1’b1.
Asychronous FIFO Standard Mode (sync_mode = 1’b0, fwft = 1’b0)
After a reset operation, or after the last word has been read from the FIFO, the FIFO will be in
an empty state as indicated by a high level on the empty flag. When the FIFO in set to
standard mode (fwft = 1’b0), the output of the FIFO remains unchanged after the first write to
a FIFO in the empty state. After the first write operation the empty flag will be deasserted
indicating that there is data in the FIFO that may be read. The user must read the FIFO by
setting the rden high at which time the first word written into the FIFO will be available at the
FIFO outputs at the next rising edge of the rdclk input. Each subsequent read operation
updates the FIFO outputs with the next stored data word if it is available (empty flag = false).
Asychronous FIFO First Word Fall Through Mode (sync_mode = 1’b0, fwft = 1’b1)
After a reset operation, or after the last word has been read from the FIFO, the FIFO will be in
an empty state as indicated by a high level on the empty flag. When the FIFO in set to First
Word Fall Through mode (fwft = 1’b1), the output of the FIFO will be updated after the first
write to a FIFO in the empty state. After the first write operation the empty flag will be
deasserted indicating that there is data in the FIFO that may be read. In First Word Fall
Through mode, the first word written into the FIFO is placed on the FIFO outputs before the
first read operation occurs. Each subsequent read operation updates the FIFO outputs with
the next stored data word if it is available (empty flag = 1’b0). Note that when selecting First
Word Fall Through mode, the FIFO must be configured for asynchronous operation
(sync_mode = 1’b0). First Word Fall Through mode is not supported when the FIFO is
configured for synchronous FIFO operation (sync_mode = 1’b1).
Synchronous FIFO Operation
The synchronous FIFO mode supports the standard mode. The First Word Fall Through
mode is not supported when synchronous FIFO operation is selected. The user must not set
the fwft parameter to 1’b1 when synchronous FIFO operation is selected. The user may either
allow the FIFO to pick up the default value of the fwft parameter (1’b0) or set it to 1’b0.
Synchronous FIFO Standard Mode (sync_mode = 1’b1)
The synchronous FIFO standard mode has the advantage that there is no latency in the flag
calculations, so the flags represent the exact state of the FIFO. In sycnchronous mode, the
Reset
Output
“regce”
1
1
reg_srval
Operation
regce_priority
rstreg
outregce
rdclk
dout