+ Post New Thread
Results 1 to 11 of 11
  1. #1
    Newbie level 5
    Points: 171, Level: 2

    Join Date
    Aug 2018
    Posts
    8
    Helped
    0 / 0
    Points
    171
    Level
    2

    32x32 Single Cycle Fast Multiplier

    I am looking for 100 Mhz multiplier in a single cycle area is not a problem(180nm ON-semi), (I tried sequential and booth).
    I knew a method but I am not sure if it will reach that speed is the old method from 3rd grade:

    P = multiplicand[31:16]
    Q = multiplicand[15:0]
    R = multiplier [31:16]
    S = multiplier [15:0]

    QxS, PxS, QxR, PxR
    and than have to add them but it does not work, I am sure I am doing something wrong when I add them(I moved the carry too) but even though I don't know if it will reach the requirement.

    Can anyone give me some hints/examples/Verilog ex code about such a fast multiplier?

    •   AltAdvertisement

        
       

  2. #2
    Full Member level 1
    Points: 1,541, Level: 8

    Join Date
    Feb 2014
    Posts
    119
    Helped
    4 / 4
    Points
    1,541
    Level
    8

    Re: 32x32 Single Cycle Fast Multiplier

    Quote Originally Posted by Mr.PAP View Post
    I am looking for 100 Mhz multiplier in a single cycle area is not a problem(180nm ON-semi), (I tried sequential and booth).
    I knew a method but I am not sure if it will reach that speed is the old method from 3rd grade:

    P = multiplicand[31:16]
    Q = multiplicand[15:0]
    R = multiplier [31:16]
    S = multiplier [15:0]

    QxS, PxS, QxR, PxR
    and than have to add them but it does not work, I am sure I am doing something wrong when I add them(I moved the carry too) but even though I don't know if it will reach the requirement.

    Can anyone give me some hints/examples/Verilog ex code about such a fast multiplier?
    So you want to do 32x32 with four 16x16 multipliers? You will need 3 additional adders but need to be careful with the bit positions when you set them up to add.


    1 members found this post helpful.

  3. #3
    Advanced Member level 3
    Points: 7,324, Level: 20
    Achievements:
    7 years registered

    Join Date
    Jul 2010
    Location
    Sweden
    Posts
    973
    Helped
    375 / 375
    Points
    7,324
    Level
    20

    Re: 32x32 Single Cycle Fast Multiplier

    You must shift QxR and PxS left 16 bits before adding. PxR must be shifted left 32 bits.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 77,123, Level: 67
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,623
    Helped
    3560 / 3560
    Points
    77,123
    Level
    67

    Re: 32x32 Single Cycle Fast Multiplier

    Hi,

    Did you decide whether you want unsigned only or you want signed arithmetics?

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.


    1 members found this post helpful.

  5. #5
    Newbie level 5
    Points: 171, Level: 2

    Join Date
    Aug 2018
    Posts
    8
    Helped
    0 / 0
    Points
    171
    Level
    2

    Re: 32x32 Single Cycle Fast Multiplier

    Quote Originally Posted by stanford View Post
    So you want to do 32x32 with four 16x16 multipliers? You will need 3 additional adders but need to be careful with the bit positions when you set them up to add.
    The multiplication algorithm that I used does not matter it just have to finish the operation in 10ns, the method I posed above I saw in same cores from ETHZ and they said that this method is a single cycle although I have my doubts because I think they are doing something like:

    Mul something
    LW something
    SW something
    SLL something
    No OP / stall
    and now them save the result of mul in GPR

    I am not 100% sure they are doing it this way, maybe this algorithm really work fast and single cycle as I said I did not implemented it yet I had some problems with the carrys when I added them number.


    Quote Originally Posted by std_match View Post
    You must shift QxR and PxS left 16 bits before adding. PxR must be shifted left 32 bits.
    I did that but the point it there are some carrys which has to be considered when you add 32b + 32b result can be 33 than when you add 32 + 31 result can be 33 than the 16b has te be added again and the result can be 17b, if you can explain in details the algorithm please do it.


    Quote Originally Posted by KlausST View Post
    Hi,

    Did you decide whether you want unsigned only or you want signed arithmetics?

    Klaus
    I has to work for both cases.



    •   AltAdvertisement

        
       

  6. #6
    Super Moderator
    Points: 77,123, Level: 67
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,623
    Helped
    3560 / 3560
    Points
    77,123
    Level
    67

    Re: 32x32 Single Cycle Fast Multiplier

    Hi,

    I has to work for both cases.
    --> You need different algorithms.

    A unsigned 32 x 32 bit multiplication causes a 64 bits wide result
    A signed 32 x signed 32 bit multiplication causes a 63 bits result. If you store it as 64bit result, then bit62 will be zero all the time.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.


    1 members found this post helpful.

  7. #7
    Newbie level 5
    Points: 171, Level: 2

    Join Date
    Aug 2018
    Posts
    8
    Helped
    0 / 0
    Points
    171
    Level
    2

    Re: 32x32 Single Cycle Fast Multiplier

    Quote Originally Posted by KlausST View Post
    Hi,


    --> You need different algorithms.

    A unsigned 32 x 32 bit multiplication causes a 64 bits wide result
    A signed 32 x signed 32 bit multiplication causes a 63 bits result. If you store it as 64bit result, then bit62 will be zero all the time.

    Klaus
    Can you give some short tips, what with what to mul and to add and how to play with the carrys and how to make it for signed too(just some algorithmical hints) please?



  8. #8
    Super Moderator
    Points: 77,123, Level: 67
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,623
    Helped
    3560 / 3560
    Points
    77,123
    Level
    67

    Re: 32x32 Single Cycle Fast Multiplier

    Hi,

    I never did a multiplier design.
    But a 16 bit signed multiply is rather: 1_bit_sign + 15_bit_value.
    Thus signed x signed = 1_bit_sign x 1_bit_sign = 1_bit_sign and 15_bit_value x 15_bit_value = 30_bit_value

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  9. #9
    Newbie level 5
    Points: 171, Level: 2

    Join Date
    Aug 2018
    Posts
    8
    Helped
    0 / 0
    Points
    171
    Level
    2

    Re: 32x32 Single Cycle Fast Multiplier

    Yes but how do I compose the big number after I do this, how do I shift add move carry and then add the carry again?(if is signed number than only when it comes to check the up half the sign matters the down half can be just multiplier)



  10. #10
    Advanced Member level 1
    Points: 5,592, Level: 17

    Join Date
    May 2005
    Posts
    457
    Helped
    105 / 105
    Points
    5,592
    Level
    17

    Re: 32x32 Single Cycle Fast Multiplier

    Perhaps a silly question, but did you just try synthesizing assign product = multiplicand * multiplier? Design compiler has some fairly decent implementations if you have a DesignWare license. (Make sure you do set_app_var synthetic_library "dw_foundation.sldb")

    https://www.synopsys.com/dw/doc.php/.../dw02_mult.pdf


    1 members found this post helpful.

  11. #11
    Newbie level 5
    Points: 171, Level: 2

    Join Date
    Aug 2018
    Posts
    8
    Helped
    0 / 0
    Points
    171
    Level
    2

    Re: 32x32 Single Cycle Fast Multiplier

    Quote Originally Posted by jbeniston View Post
    Perhaps a silly question, but did you just try synthesizing assign product = multiplicand * multiplier? Design compiler has some fairly decent implementations if you have a DesignWare license. (Make sure you do set_app_var synthetic_library "dw_foundation.sldb")

    https://www.synopsys.com/dw/doc.php/.../dw02_mult.pdf
    I don't have access there.



--[[ ]]--