Forum Discussion
Altera_Forum
Honored Contributor
17 years agosigned/unsigned multipliers
I can't seem to find a way to instantiate a multiplier that will dynamically select between signed and unsigned multiplication. This is on a Cyclone II, but applies to other parts as well. Read...
Altera_Forum
Honored Contributor
17 years agoits just the standard 2's compliment rules. -ve numbers are just the same as the unsigned upper range.
The signa/b inputs will simply be to sign extend the inputs to the hardware multiplier. Using an appropriate type (signed/unsigned in VHDL) should get these turned on/off by the synthesisor. But if you're not on the limit of the length of input (18x18 for most FPGA multipliers) you can manual sign extend up to the 18 bit limit and then ignore the top bits from the 36 bit result to get the correct answer.