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.

An interview question? Is my answer right?

Status
Not open for further replies.

littlefield

Junior Member level 3
Joined
Jul 7, 2007
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,472
there is a fifo design which the clock of data input is running at 100mhz,while the clock of data output is running at 80mhz. The input data is a fix pattern . 800 input clocks carry in 800 data continuously,and the other 200 clocks carry in no data.how big the fifo should be in order to avoid data over/under_run?please select the minimum depth below to meet the requirement.
A.160 B.200 C.800 D.1000

my answer is A. Is it right?
 

samuraign

Full Member level 2
Joined
May 18, 2006
Messages
127
Helped
12
Reputation
24
Reaction score
5
Trophy points
1,298
Activity points
1,881
100Mhz is 10ns
80Mhz is 12.5ns

160 is correct.
 

bg21359

Member level 3
Joined
Mar 1, 2005
Messages
56
Helped
7
Reputation
12
Reaction score
5
Trophy points
1,288
Activity points
1,802
worst case: 800 signal + 200 blank
input: 800 clk causes 800 signals
output: 800 clk causes 800*0.8=640 signals
the min FIFO buffer size = 800 - 640 = 160
 

cheggy

Member level 5
Joined
Jul 3, 2007
Messages
85
Helped
6
Reputation
12
Reaction score
1
Trophy points
1,288
Activity points
1,706
for (800+200)*10ns = 10 000ns input passes 800 signals. Output passes 10 000/12.5 = 800 signals => this can work. Now, after sending 800 signals from input register, the fifo is full and starts to empty in next 200*10ns. While 800 signals were coming from input, output has taken 800*10ns/12.5ns=640 signals. Meaning, you need to store max 800-640=160 signals in FIFO.
 

foster_cn

Member level 4
Joined
Jan 14, 2003
Messages
73
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Activity points
442
the minimum size FIFO should contain the data come in 200 clocks, to have the read side have time to pop them up. so that the FIFO will not get overflow.
 

kanagavel_docs

Member level 1
Joined
Aug 18, 2007
Messages
41
Helped
8
Reputation
16
Reaction score
1
Trophy points
1,288
Location
Chennai
Activity points
1,520
Hi,

time taken to fill 800bytes with 100Mhz clock is 8us.
Time taken to read single byte on the other side is .00125us
No. of bytes read in 8us is 640 bytes
so remaining byte count is the required buffer size i.e 800-640 = 160

So 160 is the correct answer.

Regards,
Kanags.
 

bharat_in

Member level 4
Joined
Oct 5, 2006
Messages
78
Helped
9
Reputation
18
Reaction score
7
Trophy points
1,288
Activity points
1,716
Well, I guess worst write can be as follows:

<-200-><-800->|<-800-><-200->
First burst | second burst

Then in this case fifo depth needs to be 320.
please, see the below link to know, how i derived it...


Am I Correct...???
Please, correct me if I am wrong.
 

kanagavel_docs

Member level 1
Joined
Aug 18, 2007
Messages
41
Helped
8
Reputation
16
Reaction score
1
Trophy points
1,288
Location
Chennai
Activity points
1,520
Hi Bharat,


time taken to fill 800bytes with 100Mhz clock is 8us.
Time taken to read single byte on the other side is .00125us
No. of bytes read in 8us is 640 bytes
so remaining byte count is the required buffer size i.e 800-640 = 160

So 160 is the correct answer.


Peak buffer requirement will be at the end of 800bytes i.e completion of 800cycles write. The remaining 160bytes can be read in the period of remaining 200 write clock cycles. So at the end of 800 + 200 write clock cycles fifo will be empty and be available for next burst transfer.
 

bharat_in

Member level 4
Joined
Oct 5, 2006
Messages
78
Helped
9
Reputation
18
Reaction score
7
Trophy points
1,288
Activity points
1,716
Seems like i misinterpreted the problem... :cry:
"The input data is a fix pattern . 800 input clocks carry in 800 data continuously,and the other 200 clocks carry in no data. ".

I thought 200 ideal cycle can come at any time, at the start, in between or in the end.... But that is not the case.

@kanagavel_docs, you are right, in this case, as the input pattern is fix, the depth needed is only 160.

Anyways, thanks for correcting me...:D
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top