Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎04-21-2017

Fifo operation when full

Dear Forum,

A basic question I hope, but one I can't answer from the documentation I have read so far.

What happens when a FIFO is full and I try to write a new value into it? Will the new value overwrite the current value in the FIFO's upper most register, or will the new value be lost and the old value preserved?

Further, is it possible to choose between keeping the new value or keeping the old value and ignoring all new data?



Tags (1)
0 Kudos
2 Replies
Registered: ‎07-23-2019


It depends on its implementation. Some won't write, others will overwrite. "FIFO" is just a way of buffering data, it's not a standard with rules written on stone

0 Kudos
Registered: ‎07-23-2019

For the second question, yes, it is possible such a dual-behaviour FIFO. Easily implementable in HLS or HDL, but from the top of my head not an off-the-shelf thing.

Most FIFO implementations are actually more cooperative than that isolated behaviour, they have an "almost full" flag that can tell the producer to pause. Similarly, an "almost empty" flag can trigger data transmission, for example, to keep a constant output data rate.

I think this fits better within the idea of what a FIFO is for: to interface a producer and a consumer with different data rates.

0 Kudos