CY7C419/21/25/29/33
Document #: 38-06001 Rev. *A Page 12 of 22
Writing Data to the FIFO
The ava ilabi lity o f at leas t one e mpty locat ion is indi cat ed 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 will be 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 fa lli ng ed ge of W following the FIFO actu-
ally be ing H al f Ful l. Therefore, the HF is active once the FIFO
is fill ed to half its capaci ty plus one word . H F will remain LOW
while less than one half of total memory is available for writing.
The LOW -to-HIGH transi tion of HF occurs tRHF after t he ri sing
edge of R when the FIFO goe s from half full +1 to half full. HF
is available in standalone and width expansion modes. FF
goes L OW tWFF after the falling ed ge of W, during the cycl e in
which the last available location is filled. Internal logic prevents
overrunning a full FIFO . Writes to a full FIFO are ignored and
the write po inter is not incr emented. FF goe s HIGH tRFF after
a read from a full FIFO.
Reading Data from the FIFO
The fall ing edge of R initiates a read cycle if the EF is not LOW.
Data outputs (Q0–Q8) are in a high-impedance condition be-
tween read operations (R HIGH), when the FIFO is empty, or
when the FIFO is not the active device in the dep th expansio n
mode.
When one word is in the FIFO, the falling edg e o f R i n it iat e s 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 retrans mi t featu re is be neficial when transferring pac ket s
of data. It enables the receipt of data to be acknowledged by
the receiver and retransmitted if necessary.
The Retransmit (RT) input is active in the standalone and width
expansion modes. The retransmit feature is intended for use
when a numb er of wr ites equa l to or less than t he dep th of th e
FIFO have occurred since the last MR cycle . A LO W pu ls e o n
RT resets th e internal read poin ter to the fi rst physi cal locatio n
of the FIFO. R and W must both be HIGH while and tRTR after
retransm it is LOW. With every rea d cycle afte r retransmi t, pre-
viously accessed data as well as not previously accessed data
is read and the read pointer is incremented until it is equal to
the write po inter. Full, Half Full, and Empty fla gs are governe d
by the relativ e loc ations of th e read and wr ite p ointers and a re
updated during a retransmit cycle. Data written to the FIFO
after acti vation of RT are transmitted also.
Up to the full depth of the FIFO can be repeatedly retransmit-
ted.
Standalone /W idth Expa nsio n Modes
Standalone and width expansion modes are set by grounding
Expansi on I n (XI) an d tying First Load (FL) to VCC. FI FOs ca n
be expan ded in width to pro vide word widths g reater than nin e
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 (see Fig ure 1)
Depth expansion mode is entered when, during a MR cycle,
Expansi on O ut (XO) of one device is c onn ec ted t o Exp ans io n
In (XI) of the next device, with XO of the last device connecte d
to XI of the first dev ice. In the depth expans ion mod e the First
Load (FL) input, when gro un ded , indicates that th is pa rt is th e
first to be loaded. All other devices must have this pin HIGH.
To enable the correct FIFO, XO is pulsed LOW when the last
physic al loc ation of th e previo us FIFO is written to an d pulse d
LOW again when the last physical location is read. Only one
FIFO is enabled for read and one for write at any gi ven 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 ex panding in depth,
a composite FF must be created by ORing the FFs together.
Likew ise, a composite EF is cr eated by ORing th e EFs togeth-
er. HF and RT functions are not available in depth expansion
mode.
Use of the Empty and Full Flags
In order to ach ieve the m aximu m freq uency, the flags must be
valid at the beginning of the next cycle. However, because
they c an be updat ed by eithe r e dge o f the read o f wri te sig nal,
they mus t be valid by one-ha lf of a cycle. Cyp ress FIFOs me et
this requirement; some competitors’ FIFOs do not.
The reason why the flags are required to be valid by the next
cycle is fairly complex. It has to do with the “effective pulse
width violation” phenomenon, which can occur at the full and
empty boundary conditions, if the flags are not properly used.
The empty flag must be used to prevent reading from an empty
FIFO and the full flag must be used to prevent writing into a full
FIFO.
For example, consider an empty FIFO that is receiving read
pulses. Because the FIFO is empty, the read pulses are ig-
nored by the FIFO , and nothi ng ha ppe ns . Next, a si ngl e wo rd
is written into the FIFO, with a signal that is asynchronous to
the read s ignal . The (in ternal) state m achine i n the FIF O goe s
from empty to empty+1. However, it does this asynchro nously
with respec t to the read sign al, so that it cannot b e determined
what the effective pulse width of the read signal is, because
the sta te machi ne do es no t loo k at the rea d signal u ntil it goe s
to the empty+1 state. In a similar manner, the minimum write
pulse width may be violated by attempting to write into a full
FIFO, and as yn chronously perfor mi ng a rea d. Th e em pty an d
full flags are used to avoid these effective pulse width viola-
tions, but in order to do this and operate at the maximum fre-
quency, the flag must be valid at the beginning of the next
cycle.