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.

Implementing 64x64 bit multiplication in asm

Status
Not open for further replies.

kirgizz

Member level 2
Joined
Sep 7, 2004
Messages
52
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
644
64x64 multiplication

Hi,

I'm using an AD SHARC-DSP (32 bit fixed/float) and I'm implementing an IIR-filter in fixed pont data format. My design needs more than 32x32 bit MAC for accurate calculations. The best choise could be 64x64 multiplication/mac. But I can't get my multiplication algorithm working. I use something like:

x=x1.x0 //x= 64 bit
y=y1.y0 //y= 64 bit
z= z0.z1 //z= 64 bit
----y1*x1 (signed fract*signed fract) +
--------y1*x0 (signed fract*unsigned fract) +
--------x1*y0 (signed fract*unsigned fract) +
-------------y0*x0 (unsigned fract*unsigned fract).

Anyone used such multiplication algorithms?
 

bit multiplication asm file

Hi

Try this one.
If we suppose that x0, x1, y0, & y1 are 32 bit then the 128-bit result is:

z = x0.y0 + x1.y0<<32 + y1.x0<<32 + x1.y1<<64
only x1.y1 is signed all other are unsigned.

Regards
 

32x32 bit multiplication

Thank you Circuit_seller,

I see it must work and I tried it. The only problem is taking signed/unsigned while multiplication of parts, so the result doesn't match the theoretical 128 bit value (the last 64 bits).
 

64x64 32 bit

Hi

only x1.y1 is signed multipication and others are unsigned and the last multipication result is 64-bit so if you shift it left the sign bit goes to 64 bit and the result is ok.


Regards
 

what is 64x64 multiplication

Excuse me,

I didn't understand. Do you mean

z =
x0.y0(unsigned) +
x1.y0<<32(unsigned) +
y1.x0<<32(unsigned) +
x1.y1<<64 (signed) ? And then "last multipication result is 64-bit so if you shift it left the sign bit goes to 64 bit", do you mean x1.y1?

regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top