Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Implementing a multiplier with 4 inputs and 2 outputs.

Status
Not open for further replies.

neefa

Member level 1
Joined
Sep 13, 2006
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,541
hi frz,
i need to implement a multiplier with 4 inputs and 2 outputs. can anyone suggest an efficient multiplier 2 do the same.
thx.
 

multiplier

Four inputs and two outputs?? Are you multiplying complex numbers?

What type of device are you using?
 

Re: multiplier

no iam not multiplying complex nos.just iam giving 4 8bit inputs and i have 2 get 2 outputs.
 

multiplier

An ordinary multiplier has two inputs and one output: Y = A * B

Maybe you mean multiplexer instead of multiplier?
 

Re: multiplier

sorry, i have mistaken it.it is complex multiplier.i used the following code to implement this.
whether we can prescale like this or else we can import some other efficient method 2 implement this?
plz suggest.
module signed_complex(A_R, A_C, B_R, B_C, D_R, D_C);
// D = A * B
input [7:0] A_R, A_C;
input [7:0] B_R, B_C;
output [7:0] D_R, D_C;
wire [15:0]result1,result2,result3,result4;
mult mult1(A_R,B_R,result1);
mult mult2(A_C,B_C,result2);
mult mult3(A_R,B_C,result3);
mult mult4(A_C,B_R,result4);
wire [16:0] prescale_R, prescale_C;

//assign prescale_R = {result1[7], result1} - {result2[7], result2};
// assign prescale_C = {result3[7], result3} + {result4[7], result4};

assign prescale_R = result1 - result2;
assign prescale_C = result3 + result4;

assign D_R = {prescale_R[15],prescale_R[12:6]};
assign D_C = {prescale_C[15],prescale_C[12:6]};
endmodule
module mult(a, b, out);
output [15:0] out;
input [7:0] a;
input [7:0] b;
//wire [7:0] out;
wire [15:0] out;

assign out = a * b;
//assign out = {mult_out[15], mult_out[12:6]};
endmodule
thx.
 

multiplier

I'm not sure what your "prescale" stuff is doing. I didn't study it.

Verilog supports signed arithmetic, so here's how I would do it. I wrote this quickly and didn't check it thoroughly for bugs, so beware!
Code:
module signed_complex (A_R, A_C, B_R, B_C, D_R, D_C);
  input signed   [7:0] A_R, A_C;
  input signed   [7:0] B_R, B_C;
  output signed  [7:0] D_R, D_C;

  assign D_R = (0 + A_R * B_R - A_C * B_C) >>> 8;
  assign D_C = (0 + A_R * B_C + A_C * B_R) >>> 8;
endmodule
Example calculation:
Input: (123 - 75i) * (-88 - 107i)
Output: (-74 - 26i)
It doesn't do any rounding, and the output is of course scaled down by 256 times.
 

    neefa

    Points: 2
    Helpful Answer Positive Rating
Re: multiplier

thx...its working
 

multiplier

can you give me number of cmos multipler ic avilable in mareket and what are there specifications
 

Re: multiplier

4527 4-bit synchronous decade rate multiplier.
CD4527 BCD Rate Multiplier.
4089 4-bit synchronous binary rate multiplier.
CD4089BE Binary Rate CMOS Multiplier
CD4085BF CMOS Multiplier
this r presently/mostly used IC's for multiplying
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top