Document Number: 38-06001 Rev. *K Page 13 of 22
Architecture
The CY7C421 FIFO consist of an array of 512 words of 9 bits
each (implemented by an array of dual-port RAM cells), a read
pointer, a write pointer, control signals (W, R, XI, XO, FL, RT,
MR), and Full, Half Full, and Empty flags.
Dual-Port RAM
The dual-port RAM architecture refers to the basic memory cell
used in the RAM. The cell itself enables the read and write
operations to be independent of each other, which is necessary
to achieve truly asynchronous operation of the inputs and
outputs. A second benefit is that the time required to increment
the read and write pointers is much less than the time required
for data propagation through the memory, which is the case if
memory is implemented using the conventional register array
architecture.
Resetting the FIFO
Upon power up, the FIFO must be reset with a Master Reset
(MR) cycle. This causes the FIFO to enter the empty condition
signified by the Empty flag (EF) being LOW, and both the Half
Full (HF) and Full flags (FF) being HIGH. Read (R) and write (W)
must be HIGH tRPW/tWPW before and tRMR after the rising edge
of MR for a valid reset cycle. If reading from the FIFO after a reset
cycle is attempted, the outputs are in the high impedance state.
Writing Data to the FIFO
The availability of at least one empty location is indicated by a
HIGH FF. The falling edge of W initiates a write cycle. Data
appearing at the inputs (D0–D8) tSD before and tHD after the
rising edge of W are stored sequentially in the FIFO.
The EF LOW-to-HIGH transition occurs tWEF after the first
LOW-to-HIGH transition of W for an empty FIFO. HF goes LOW
tWHF after the falling edge of W following the FIFO actually being
Half Full. Therefore, the HF is active after the FIFO is filled to half
its capacity plus one word. HF remains LOW while less than one
half of total memory is available for writing. The LOW-to-HIGH
transition of HF occurs tRHF after the rising edge of R when the
FIFO goes from half full +1 to half full. HF is available in
standalone and width expansion modes. FF goes LOW tWFF
after the falling edge of W, during the cycle in which the last
available location is filled. Internal logic prevents FIFO overflow.
Writes to a full FIFO are ignored and the write pointer is not
incremented. FF goes HIGH tRFF after a read from a full FIFO.
Reading Data from the FIFO
The falling edge of R initiates a read cycle provided EF is not
LOW. Data outputs (Q0–Q8) are in a high impedance condition
between read operations (R HIGH), when the FIFO is empty, or
when the FIFO is not the active device in the depth expansion
mode.
When one word is in the FIFO, the falling edge of R initiates a
HIGH-to-LOW transition of EF. The rising edge of R causes the
data outputs to go to the high impedance state and remain such
until a write is performed. Reads to an empty FIFO are ignored
and do not increment the read pointer. From the empty condition,
the FIFO can be read tWEF after a valid write.
The retransmit feature is beneficial when transferring packets of
data. It enables the receiver to acknowledge receipt of data and
retransmit, if necessary.
The Retransmit (RT) input is active in the standalone and width
expansion modes. The retransmit feature is intended for use
when a number of writes equal to or less than the depth of the
FIFO have occurred since the last MR cycle. A LOW pulse on RT
resets the internal read pointer to the first physical location of the
FIFO. R and W must both be HIGH for tPRT and tRTR after
retransmit is asserted. With every read cycle after retransmit, the
data from the first physical location of FIFO is read until the read
pointer equals write pointer. Full, Half Full, and Empty flags are
governed by the relative locations of the read and write pointers
and are updated during a retransmit cycle. Data written to the
FIFO after activation of RT are also transmitted. Full depth of
FIFO data can be repeatedly retransmitted.
Standalone/Width Expansion Modes
Standalone and width expansion modes are set by grounding
Expansion In (XI) and tying First Load (FL) to VCC. FIFOs can be
expanded in width to provide word widths greater than nine in
increments of nine. During width expansion mode, all control line
inputs are common to all devices, and flag outputs from any
device can be monitored.
Depth Expansion Mode
Depth expansion mode (see Figure 14 on page 14) is entered
when, during a MR cycle, Expansion Out (XO) of one device is
connected to Expansion In (XI) of the next device, with XO of the
last device connected to XI of the first device. In the depth
expansion mode the First Load (FL) input, when grounded,
indicates that this part is the first to be loaded. All other devices
must have this pin HIGH. To enable the correct FIFO, XO is
pulsed LOW when the last physical location of the previous FIFO
is written to and pulsed LOW again when the last physical
location is read. Only one FIFO is enabled for read and one for
write at any particular time. All other devices are in standby.
FIFOs can also be expanded simultaneously in depth and width.
Consequently, any depth or width FIFO can be created of word
widths in increments of 9. When expanding in depth, a composite
FF must be created by ORing the FFs together. Likewise, a
composite EF is created by ORing the EFs together. HF and RT
functions are not available in depth expansion mode.