Re: Block Rams



On Aug 11, 8:44 am, John_H <newsgr...@xxxxxxxxxxxxxxxx> wrote:

Where else can one get information directly from a bona-fide expert on
FIFOs?
Thanks again for being here, Peter.

Hi, John.
Is this what you had in mind?

FIFOs, a tutorial description by Peter Alfke 8-11-2008
A FIFO is a sequential data buffer that is very easy to use:
Write a sequence of data words into the FIFO, and read them out in the
same sequence. Writing and reading can overlap. There is no explicit
addressing.
Most practical implementations use a dual-ported memory (RAM), writing
into one port, addressed by the write counter, and reading through the
other port, addressed by the read counter. This allows the use of two
totally independent clocks for write and read. This is often called
asynchronous operation, although writing as well as reading are each
synchronous operation in their respective clock domain.

Most FIFO designs require free-running clocks, where the write or read
operation is controlled by the respective clock enable. A typical FIFO
has a DATA IN bus, a DATA OUT bus, a free-running write clock with its
Enable control, and a free-running read clock with its Enable control.
Such a FIFO is very easy to use, since it hides all functional and
timing complexity from the user.

FLAGS:
The FIFO uses an EMPTY flag to signal to the user that no more read
operations should be started. At other times the FULL flag can tells
the user that no more write operation should be started.
Generating these flags requires that the two addressing counters be
compared for equality (identity), although they are incremented by two
independent clocks. This is a very tricky operation. To avoid
uncontrolled asynchronous decoding spikes, the counters usually count
in a Gray sequence, where only one bit changes on any increment.
And the two clocks can interact and might cause metastable delays.
Even more complex is the decoding of Almost Empty and Almost Full
conditions, especially when their offset values are programmable.
The user is isolated from all these complexities, but must accept
certain timing ambiguities. The Full and Empty flags will always go
active exactly on-time, to stop further reading or writing, but these
flags must of necessity be allowed to take several clock periods to go
inactive again.
When the first word is being written into an empty FIFO, Empty goes
low, and waits for an enabled read clock to present the Data on the
DATA OUT bus.
There is a special mode of operation, called First Word Fall Through
(FWFT), where the first word written into the empty FIFO directly, on
its own, appears at the DATA OUT port.
The conventional mode can be called Pull, while FWFT can be called
Push. The two modes differ only in their response to the first write
into an empty FIFO.
The preceding described the most demanding case of a high-speed dual-
clock (asynchronous) FIFO. In the special case where both clocks are
identical (even if individually enabled) the internal decoding is much
simpler, and the binary counters and the control can be designed like
a synchronous state machine.
At low clock rates, the two clocks can be synchronized to each other,
or the read and write operations can be time-multiplexed in a single-
port memory.
Very small FIFOs can be implemented with flip-flops or register
arrays, sometimes even with shift registers.


.



Relevant Pages

  • Re: Asynchronous FIFO and almost empty - bug?
    ... FIFO was empty and we get a shift in the almost empty is not asserted ... appropriate clock. ... and needs re-synchronization to the read clock. ...
    (comp.arch.fpga)
  • Re: Virtex 4 FIFO16 blocks - Corruption ?
    ... You are kidding as far as the usefulness of a synchronous fifo (one which has both sides clocked by the same clock), ... I'd be hard pressed to find one of my designs that does NOT have a synchronous FIFO in it. ... This is a real limitation to the FIFO16 design, and has cost me several weeks of debug and redesign time to find and work around it. ...
    (comp.arch.fpga)
  • Re: Virtex 4 FIFO16 blocks - Corruption ?
    ... So, even though I thought the extensive FIFO testing on V4, the problem with a test that passes is that a test is never the application. ... One minor difference for me may be that when I find unusual behavior and have it isolated to a functional portion of the design, I may check the knowledge database for any information relating to my problem area before spending a few more days to further isolate the cause. ... I have a floating point FFT design with a target clock rate of 400 MHz in an SX55-10 part... ... This is a real limitation to the FIFO16 design, and has cost me several weeks of debug and redesign time to find and work around it. ...
    (comp.arch.fpga)
  • Re: Simple clock question
    ... should be computed in the 'write clock' domain. ... Fifos can only become empty when read from. ... Writing to a full fifo is not recoverable, ... the going-full path without the delay of a synchronizer as long as ...
    (comp.arch.fpga)
  • Re: Asynchronous FIFO and almost empty - bug?
    ... domains have "the same" clock speed but different clock oscillators. ... We shift data phits in the FIFO which always form a data packet. ... FIFO was empty and we get a shift in the almost empty is not asserted ...
    (comp.arch.fpga)