Showing posts with label Fifo. Show all posts
Showing posts with label Fifo. Show all posts

Fifo depth calculation


Assuming,
  • F1 = frequency of the writing side.
  • F2 = frequency of the reading side.
  • D = data burst.

Burst duration = D/F1
Data Rec'd, Rx= (D/F1) * F2, assuming simultaneous read for the duration.
Extra storage during FULL condition, Backlog = D-Rx = D(F1-F2)/F1

To accommodate latency or response time in the receiver, T, we need additional T * F1 locations.
Receiver also needs time to read all this backlog, so the idle time between bursts must be long enough. So this minimum time is called mop-up time = backlog/F2 = D * (F1-F2)/(F1.F2)

Note: For bursts of data which are written for partial amount time for a given number of cycles and read that are happening continously "or" are also read for a partial amount of time for a given number of cycles, the calculation has to account for the next burst.