# FIFO Depth `calculation` formula

Formula to calculate FIFO depth below:

D = [B - (clk_rd/clk_wr)*(B)*(1/RD)]

Where,

D = Depth or number of locations in FIFO to store.

B = Burst Width, number of words to store before idle time.

Clk_rd = Read side clock frequency.

Clk_wr = Write side clock frequency.

Example to prove above formula below.

Example: Write side of FIFO:

Write clock frequency = 15 MHz (clk_wr)

Maximum size of the Burst = 100 bytes (burst_width)

Delay between writes in a burst = 1 clock cycle (wr_delay)

Delay between reads = 2 clock cycles (rd_delay)

Apply formula to `calculate` FIFO depth.

= 100- (10/15)*(100)*(1/2)
= 100 - 500/15
= (1500-500)/15
= 1000/15
= 66.67 or 67

So we will need to design a FIFO 67 deep.

LTE - 4G Wireless Technology

Digital fundamentals.

Interview Questions.

Tutorials `@fullchipdesign.com`

Verilog Tutorial.

LTE Tutorial.

Memory Tutorial.

Hope you liked! this page. Don't forgot to access relevant `previous and next sections ` with links below.