Depth of Fifo

R

rsk

Guest
Dear Friends,

How can we caluculate the depth of "FIFO"?

And if the writing and reading rates into a "FIFO" are different how
do we make ensure that no data was lost while reading(suppose reading
is slow )?

I will be waiting for ur reply.

Thankyou,
krs...
 
"rsk" <krs_1980@yahoo.co.in> wrote in message
news:53e609348e80fc15623579303e496e6d@localhost.talkaboutprogramming.com...
Dear Friends,

How can we caluculate the depth of "FIFO"?
This depends on characteristics of your write/read data rate. Say if you
have a 2000ns bursty write data @2G words/s and read them out @100M words/s,
approximately the FIFO needs to 2000 deep to temporarily store the write
data.

And if the writing and reading rates into a "FIFO" are different how
do we make ensure that no data was lost while reading(suppose reading
is slow )?
If reading rate is slower, writing has to be stopped (checking FIFO full,
almost full, etc flags) from now and then, otherwise FIFO will eventually be
filled up.

Jim

I will be waiting for ur reply.

Thankyou,
krs...
 
Dear Jim,

Thanks for ur reply.But i still did not understand how u said that the
depth of fifo should be 2000..

Will you eplain me clearly..

thank you,

krs...
 
"rsk" <krs_1980@yahoo.co.in> wrote in message
news:3b983a264ec21350c9f8e0f811abc39f@localhost.talkaboutprogramming.com...
Dear Jim,

Thanks for ur reply.But i still did not understand how u said that the
depth of fifo should be 2000..
Sorry that I had a typo in my previous reply. I meant to say 2000ns burst
write @ 1G words/s. (or 1word/ns). So there are 2000ns*1word/ns = 2000 words
in this burst. The FIFO needs to be deep enough to save this 2000 words
given that the read rate is much slower than the write.

Jim

Will you eplain me clearly..

thank you,

krs...
 
If the freq is differ and you want to be sure that no data get lost it
must mean that there are gap in between like packet over Ethernet where
there is IPG in between packets.

More over those gap need to be big enough for the FIFO to get back to
empty as otherwise after "enough" packet it will get full and
overflow.

If the write is slower and you don't mind have gap in the read than
the size of the FIFO can be very small and probably you will want to do
it with FF's versus memory.

Assume the gap is big enough and the write is faster than the read, In
order to decide the minimum depth you need than to figure the
difference in frequency and the max size of the packet and this will
tell you the depth of the packet.

You will also need to add few extra "write" space to compensate for
the symbolization when passing info from one clock domain to the other
assuming the clock are not from same source.

Have fun.
 

Welcome to EDABoard.com

Sponsor

Back
Top