cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Explorer
Explorer
8,847 Views
Registered: ‎07-10-2013

V7 DSP48 Multiplication - Number Of Result Sign Bits

Jump to solution

Tthe DSP48 multiplier can take a first 25-bit 2's complement input, multiply it by a second 18-bit 2's complement input, and produce a 43-bit (internal) 2's complement result, which is then sign-extended by five bits to the width of the 48-bit output P register.

 

Unless I'm majorly mistaken (which is certainly possible), 24 bits of value (excluding the sign bit) multiplied by 17 bits of value (excluding the sign bit) yields just 41 bits of value (including even when one (or both) inputs are negative).  That is, the upper two bits of the 43-bit result will always have the same value, with the bit just below the MSb always being a copy of the MSb (the sign bit).

 

Please confirm that/whether the DSP48 multiplication result is in fact as described.

 

Please likewise confirm that/whether the DSP48 multiplication result in the P output register always has the same value (all 0s or all 1s) in the upper seven (7) bits.

 

 

Tags (3)
0 Kudos
Reply
1 Solution

Accepted Solutions
Teacher
Teacher
15,517 Views
Registered: ‎03-31-2012

Unless I'm majorly mistaken (which is certainly possible), 24 bits of value (excluding the sign bit) multiplied by 17 bits of value (excluding the sign bit) yields just 41 bits of value (including even when one (or both) inputs are negative). That is, the upper two bits of the 43-bit result will always have the same value, with the bit just below the MSb always being a copy of the MSb (the sign bit).

This is incorrect. Consider the most negative number in both inputs: -2^24 and -2^17. The result is 2^41 which has the top 2 bits as 01.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

0 Kudos
Reply
2 Replies
Teacher
Teacher
15,518 Views
Registered: ‎03-31-2012

Unless I'm majorly mistaken (which is certainly possible), 24 bits of value (excluding the sign bit) multiplied by 17 bits of value (excluding the sign bit) yields just 41 bits of value (including even when one (or both) inputs are negative). That is, the upper two bits of the 43-bit result will always have the same value, with the bit just below the MSb always being a copy of the MSb (the sign bit).

This is incorrect. Consider the most negative number in both inputs: -2^24 and -2^17. The result is 2^41 which has the top 2 bits as 01.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

0 Kudos
Reply
Guide
Guide
8,822 Views
Registered: ‎01-23-2009

And remember, the P does not just carry the result of the multiplication - it is an accumulator; you can accumulate the result of successive DSP operations in the P register. You can also add the multiplication result to other operands (like the C input), which is 48 bits wide. These are why the P register is larger than the size of the largest multiplication.

 

Avrum

0 Kudos
Reply