Continue to Site

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.

help me with the interview quiz pls!

Status
Not open for further replies.

ecse

Junior Member level 2
Joined
May 10, 2002
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
51
write synthesizable code for the equation below:

A[4:0]=B[8:0]*218/( 64*8 )-90/8

It is up to you to figure out the format of the A and B, just using minimum
number of the sythesizable gate counts.

Any good suggestion? or a link of reference?

Thanks in advance.

ecse
 

I vote use a look up table, like a simple 256x4 bit flash or eeprom, in address you can put the B data, and result is in data lines. Data in flash is the result of formula you posted.
 

Usualy when asked this kind of Quiz - people DO NOT expect you to propose an EPROM based solution. This is too easy.

They want to check your ability to design logic for Arithmetic functions, deal with Signed Arithmetic, Saturation of vectors, etc.

Hint: In the formula above you MUST saturate correctly [signed saturation] the result 5-bit vector AFTER the signed 2's complement arithmetic was done [correctly] for the 9-bit (and other) vectors. You also must correctly relate to the sign bit.

Why ? Because the above is not straight-forward with Synthesizable code !!!
 

I suggest the following
1- put 90/8 (45/2) as a constant in 2's complement form.
2- define A,B as integeres with restricted range.
3- 218/64*8 = 109/64*4 = 109/ 2exp7 --->
a: express 109 as a constant
b: use one of the techniques used for contant multiplication as (Booth algorithem) for example.
c: shift the output of multiplication left by 7 position. (note the output of shift operation it may cancel steos of multipication in the previous step)
4- do the final substraction operation.

regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top