Search code examples
verilogvlsi

Can I make 4x4 multiplier only using 2x2 multiplier?


I want to implement to 4x4 bits multiplier using only 2x2 bits multiplier.

for example, a=1110 b=1011 The 2x2 result is should be 10011010.

I think that I can split like this.

#case 1
a=10
b=11
2x2 multiplier's result = 0110

#case 2
a=11
b=10
2x2 multiplier's result = 0110

I can get the 2 result by using 2x2 multiplier. but how can I make to 4x4 multiplier only using 2x2 multiplier?

But I can't approch to any hint. So how can I make 4x4 multiplier. Does anyone know how to do this? Please help.

In brief, How many 4x4 multiplier would you need to perform an 8x8 multiply. how an 8x8 multiplier would be created using only 4x4 multipliers?

Update :

Is this working? http://blog.pioneermathematics.com/2011/04/26/vedic-trick-on-multiplication/ How ?


Solution

  • See lvds answer on how to cascade multipliers.

    Some other points on Multipliers

    Bare in mind as the input bit width grows to a multiplier, the multiplier size grows exponentially, therefore this is not a linear problem.

    Multipliers can be considered to be a sum of shifts, if each shift is controlled by the position and value of the multiplicand we can build a multiplier out of shifts and some AND gates.

    reg [3:0] a;
    reg [3:0] b;
    reg [7:0] mul;
    
    always @* begin
      // mul = a * b;
      mul = ((a << 3) & {4{b[3]}} )
          + ((a << 2) & {4{b[2]}} )
          + ((a << 1) & {4{b[1]}} )
          + ((a     ) & {4{b[0]}} );
    end