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.

verilog equivalent of C code acc=acc+out;

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
verilog query

hi frz,
how to create a verilog code, for the equivalent C code
acc=acc+out;
Because of repeated addition of the output out, for each clock cycle we need that code.
 

verilog query

Assuming 'acc' is a register and 'out' is the input data (one word per clock cycle), building an accumulator is very simple:
Code:
always @ (posedge clk)
  acc <= acc + out;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top