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.

multiply accumulator in vhdl help needed

Status
Not open for further replies.

saraiust

Newbie level 5
Joined
Nov 15, 2009
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Iran
Activity points
1,328
multiply accumulator

hi everybody,

I need to make a multiply accumulator in vhdl and i dont have any idea..
can you help me to find an architecture for multiply accumulato with simple gates, like and,nand,or... --asap--
i mean a simple architecture to understand how to simulate that.

thanks!
 

i want that too please but without using (*)
 

I need to make a multiply accumulator in vhdl and i dont have any idea..

As I understand you have 2 inputs and want to MAC

you should implemennt this simple algorithm:

out_next = in1 * in2 + out;

The following simple module can do that:
Code:
module mac (in1, in2, out, clk, init);

input clk, init;
input [7:0] in1, in2;
output reg [31:0] out;

wire [15:0] mult_res;

assign mult_res = in1*in2;

always @(posedge clk) begin

  if (init) begin
    out <=  mult_res;
  end else begin
    out <=  mult_res + out;
  end

end

endmodule



i want that too please but without using (*)

There are a lot of different multiplication algorithms. It depends on your needs. You can choose 1 cycle, multy cycles or pipelined.


Bests,
Syswip
http://syswip.com/
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top