Fixed point signed multiplication algorithm

Hello, I am implementating Fixed point signed multiplication. Is there a algorithm to implement it. I have done the usual method of multiplication i.e partial products ...shift and add method. But its very slow. If you know any algorithm which will faster do mention. Any reference will be great. How does the signed multipliers in xilinx that fast. what algorithm do they use. I need to first implement in on MATLAB and see the result.

waiting for reply praveen

Reply to
praveen
Loading thread data ...

Do you need the full (double-wide) result, or just the lower N bits of an NxN bit imul?

The fastest pure sw method I know (for relatively small values of N) is to use branchless conversion to absolute values, do the multiplication via a lookup table of squares, and then a branchless fixup of the sign at the end.

Terje

--
- 
"almost all programming can be viewed as an exercise in caching"
Reply to
Terje Mathisen

In VHDL, use a signed type and use '*' - synthesis should generate a good result.

In current verilog, just use a signed type.

In older verilog versions you can simply sign extend the inputs to the width of the result and perform an unsigned multiply. Synplify will recognize this as a signed multiply and trim the input arguments back down.

Synthesis tools should give you a good implementation directly. All you need to do is figure out where the binary point went and take the bits you want.

praveen wrote:

Reply to
Ken McElvain

Praveen,

have a look at the multipliers page > Hello,

--

--Ray Andraka, P.E. President, the Andraka Consulting Group, Inc.

401/884-7930 Fax 401/884-7950 email snipped-for-privacy@andraka.com
formatting link

"They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759

Reply to
Ray Andraka

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.