From: neelesh
Posted : 4/23/2004 4:37:57 AM some fact about selection of fifo depth
Consider an asynchronous fifo where in write to the fifo is at frequency of F1 and read from the fifo is at frequency of F2. F1 > F2 (write is faster than read)
Fifos are handy, when you have burst data transfers, In the above case, in order for the fifo not to overflow due to high write rate. We make calculations as shown below.
Think of a B burst of data written to the fifo at F1 frequency. read at F2 and F1> F2
Time taken to Write to the fifo = B/F1
Data read from the fifo in this time = (B/F1)*F2
Excess data remains in the fifo = Backlog =
B- (B/F1)*F2
Hence to have no loss of the data, fifo depth should be chosen long enough to accomodate the excess data. The read side may need extra time to read this excess data which is called mop-up time and is calculated as
mop-up time = Backlog/F2 = B.(F1-F2)/(F1*F2)