36x36 signed multiplier?

Multiplier

Is there a good algorithm (small) to multiply two 36 bit ?signed? numbers to get a 72 bit result.

Is it possible to divide the 36 bit numbers into 18 bit parts and multiply them separately and after some shifting add the results?

I would like to instantiate the MULT18X18 in the Spartan3 for this.

When I write it strait like this without any specific instantiation:

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity test is

Port ( a : in std_logic_vector(35 downto 0);

b : in std_logic_vector(35 downto 0);

q : out std_logic_vector(71 downto 0));

end test;

architecture Behavioral of test is

begin

q
Reply to
Bubba
Loading thread data ...

As far as I know, this should be possible with 4 multipliers, if everything is unsigned. I could imagine that you also get away with 4 signed multipliers, if you cut a bit or two from your a and b.

Regards,

Thomas

formatting link

"Bubba" schrieb im Newsbeitrag news:431037f6$0$18636$ snipped-for-privacy@news.sunsite.dk...

Reply to
Thomas Entner

Sure, google for "Karatsuba multiplication" You should achieve that with just 3 multiplier and some adders.

Try with USE IEEE.STD_LOGIC_SIGNED.ALL

Sylvain

Reply to
Sylvain Munaut

I found a way to make an 35 x 35 signed multiplier with four MULT18X18 in the application note XAPP467 (on page 6). I'm going to test that.

"Thomas Entner" skrev i meddelandet news:43103ac1$0$27168$ snipped-for-privacy@newsreader01.highway.telekom.at...

everything

numbers

multiply

Reply to
Bubba

The mult18x18s are signed multipliers, there is no option to make them unsigned. You can use them as unsigned 17x17 by forcing the MSB to '0'. In order to build a larger multiplier out of smaller ones, you must treat only the most significant 'digit' (where the input to each smaller multiplier represents a digit) as signed, all the lower order digits must be unsigned. Hence, with the Xilinx multipliers, splitting your input into two words will get you up to a 35x35 multiplier. If you attempt 36x36, you will need a third multiplier in each dimension, which means 9 multipliers. You can create 1x35, 35x1 and 1x1 unsigned multipliers in the fabric to complete your multiplication to avoid using up multiplier blocks.

--
--Ray Andraka, P.E.
President, the Andraka Consulting Group, Inc.
401/884-7930     Fax 401/884-7950
email ray@andraka.com  
http://www.andraka.com  

 "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.