Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FIFO Depth Calculation

Status
Not open for further replies.

cnivaz

Newbie level 6
Joined
Sep 22, 2006
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,382
fifo depth calculation

How to calculate the FIFO Depth based on write and read frequency.
 

how to calculate fifo depth

get the SUNG papers on

h**p://www.sunburst-design/paper

the best meterial on fifo i found
 
fifo size calculation

The logic is very simple. I will expalin it in a non technical way. Suppose there is a person A and B. Now A can throw 10 mangoes at an instant of time. But B can catch only 6 mangoes at the same amount of time(remember this is very important i.e the phrase same amount of time which i have written above. This will help in calculating the FIFO size). So he cannot catch remaining 4 mangoes from A. So he require a bag of size 4. This is the funda behind the FIFO size/depth calculation.

In technical terms i will explain

Asssume sender as Person A
Assume Receiver as Person B.
Assume FIFO as a bag.

Sender is writing a data to FIFO and receiver is reading some data from FIFO. If sender writes 10 data in 't' time and

receiver reads 6 data in the same 't' time then FIFO size is 10-6=4.

FIFO has two frequency one is sender frequency(fs) and the receiver frequency (fr).

fs=1/Ts;
fr=1/Tr;

Now sender wants to transmit M words of data
But FIFO can take only n words of data in Ts time.
So the time taken to transmit M words is M/n*Ts
That is sender wants M/n*Ts time to write M words of data into FIFO.

But our receiver can receive/read 'p' words in Tr time interval.

In Tr times receiver can read p words
So in M/n*Ts time how many words can receiver read.
It is (M/n*Ts*p)/Tr words the receiver can read.

Till now what did we do.
We calculated how much time we want to write M words of data into FIFO. In the same amount of time how much data can our

FIFO read. so simply subtract the the data read from FIFO to the data written into the FIFO.
Here the data written into the FIFO is M words
Data read from the FIFO is (M/n*Ts*p)/Tr words.

So FIFO size is = M-(M/n*Ts*p)/Tr
This is equivalent to our example 10 - 6.
Deduce this u will get
Fifo size= M ( n * fs - &nbspp *fr ) / (n *fs )

Where

M= Max number of bytes that the sender can send
n= No of bytes that the sender sends per clock
fs= sender clock frequency
p= No of bytes that receiver can receive per clock
fr = receiver clock frequency

i hop it is clear,
 
calculating fifo depth

to vinod488

i am not very clear. here is a question:

We have a fifo which clocks data in at 100mhz and clocks data out at 80mhz. On the input there is only 80 data in any order during each 100 clocks. In other words, a 100 input clock will carry only 80 data and the other twenty clocks carry no data (data is scattered in any order). How big the fifo needs to be to avoid data over/under-run.

could you take it as an example and explain your methord?
 

may be depth equals to 0
 

depth is 32...

take back to back two writes

20 80 80 20

so 160 data in 160 cycles

while draining 8*16 = 128 data in 160 cycles.

so fifo size = 32
 

Hi

I am not understanding the word BURST ?! and the Burst size....

then problem is like this ..

FIFO width is 1 bit.

Write Clock freq=50MHz
It will write into 8 locations in FIFO at 50Mhz.

Read Clock=25MHz
It will read 32 locations in FIFO at 20 MHz.


There no latency in between.

Pls help..
Not able to use equations and all. amy be I am not aware of this burst concept.

thanks
 

Burst means back to back reads without any idle clock cycles.
 

atulaxc

For FIFO depth calculation the simple explanantion at Asynchronous FIFO design and calculate the Depth of the FIFO is only if one single burst is coming to the FIFO . It is not for a series of bursts coming to the FIFO from time to time. The explanation there only for a special case where only one or a few bursts are coming. That expalanation is not a general explanation.

Hi vinod488

What is that &nbspp when you writes

Fifo size= M ( n * fs - &nbspp *fr ) / (n *fs ) ?

Even ur explanation is also a special case of calculating FIFO depth. It is only for M words coming.

It is not a general calculation.
 

I do agree with gauravas.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top