Fifo Depth
Fifo Depth
Fifo Depth
1. Given the following FIFO and rules, how deep does the
FIFO need to be to prevent underflow or overflow?
RULES:
1) frequency(clk_A) = frequency(clk_B) / 4
2) period(en_B) = period(clk_A) * 100
3) duty_cycle(en_B) = 25%
Solution :
Assume clk_B = 100MHz (10ns)
From (1), clk_A = 25MHz (40ns)
From (2), period(en_B) = 40ns * 400 = 4000ns, but we only
output for
1000ns,due to (3), so 3000ns of the enable we are doing no
output work. Therefore, FIFO size = 3000ns/40ns = 75 entries.
2. Given the following FIFO and rules, how deep does the
FIFO need to be to prevent underflow or overflow?
RULES:
1) frequency(clk_A) = frequency(clk_B) / 4
2) period(en_B) = period(clk_A) * 100
3) duty_cycle(en_B) = 50%
Solution :
Assume clk_B = 100MHz (10ns)
From (1), clk_A = 25MHz (40ns)
From (2), period(en_B) = 40ns * 400 = 4000ns, but we only
output for
2000ns,due to (3), so 2000ns of the enable we are doing no
output work. Therefore, FIFO size = 2000ns/40ns = 50 entries.
3. A FIFO has following data rate. What is depth of that?
incoming data = 80 words at 100 clks
outgoing data = 8 words per 10 clks
the depth of the FIFO should be at least 28. (Three clock cycles
are for synchronizer latency).
7. Assume that Write Clock Frequency WClk = 200 Mhz
Read Clock Frequency RClk = 100 Mhz
No of data per 100 WClk cycle (Data rate including delay) = 80
data
Solution :
So
WClk = 200Mhz = 5ns
RClk = 100 Mhz = 10ns
Total Time Taken for writing 80 data = 80*5 = 400ns .
But Time Taken for reading 80 data = 80*10 = 800 ns .
So difference b/w data write & read
same no of data = 800 -400 = 400 ns .
ie we want to store 400ns data to some position. Otherwise
data will over write .
How many data will write this 400ns time = 400ns/5ns = 80 .
We have to store this 80 Data .
So we can say that FIFO should have minimum depth of 80 .
8. Assume that Write Clock Frequency WClk = 200 Mhz
Read Clock Frequency RClk = 300 Mhz
No of data per 200 WClk cycle (Data rate including delay) =
100 data
Solution :
So
WClk = 200Mhz = 5ns
RClk = 300 Mhz = 3.3ns
Total Time Taken for writing 100 data = 100*5 = 500ns .
But Time Taken for reading 100 data = 100*3.3 = 330 ns .
11.
= 1024 (1024*0.833)
= 171.008 ~ 171
12.