DSPRelated.com
Forums

Blackfin 32 x 32 multiply

Started by csaudio April 13, 2005
The Blackfin has a 32 x 32 integer multiply that requires 5 cycles. The
UG states that this minics a "C" 32 x 32 integer multiply.

Is this the low 32 bits of the 64 bit result? If so then is this not
able to do signed fractional fixed point 32 x 32 multiplies?

Thanks

C&S Audio Labs

csaudio wrote:
> The Blackfin has a 32 x 32 integer multiply that requires 5 cycles. The > UG states that this minics a "C" 32 x 32 integer multiply. > > Is this the low 32 bits of the 64 bit result? If so then is this not > able to do signed fractional fixed point 32 x 32 multiplies? > > Thanks > > C&S Audio Labs >
The 32x32 integer multiply instruction (R0*=R1) returns the low 32 bits of the multiplication. I've found it wonderful for doing dither generation using a LCG, but it's completely useless for any sort of signed or fractional number manipulation. You can do a "31-bit" fractional multiply or MAC using two clock cycles, with two extra cycles to fetch the accumulated result... eg: A0=R0.H*R1.H,A1=R0.H*R1.L (M); A1+=R1.H*R0.L (M); A1=A1>>>15; R2=(A0+=A1); R0,R1 are inputs and R2 is the output. Since the two LSW's aren't multiplied, there is an error of up to 1 LSB in the result, hence "31-bit". For most things (eg, left-justified audio) this shouldn't matter. -GM