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.

[MOVED] difference between accumulator and counter

Status
Not open for further replies.

preethi19

Full Member level 5
Joined
Jun 30, 2014
Messages
273
Helped
0
Reputation
0
Reaction score
1
Trophy points
16
Activity points
3,481
Hi can anybody please tell me the difference between an accumulator and a counter. I thought an accumulator is a same as a counter until i came across this link... https://fpga-dsp-scratch.blogspot.ca/2008/08/vhdl-part-25-accumulator.html

Its told that "A counter increments a signal or variable only by 1. With accumulator I can increment a signal/variable with any number". But how is that a counter can increment only by 1... suppose when incrementing a binary no i can increment it by 00010 rather than just 00001 all the time... so now the counter is incrementing by 10. So isnt counter same as accumulator we we can increment it with any value... in the end everything is in binary only right... can anyone please clear my doubt... thank you!!!!
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
19,707
Helped
4,340
Reputation
8,689
Reaction score
4,303
Trophy points
1,393
Activity points
130,467
Re: difference between accumulator and counter

Hi,

This question is more related to PLD, FPGA, AS IC and languages like VHDL...

Yes, a "counter" usually is a "binary counter". With a step size of "1".
It usually has
* an enable input
* a direction input
* a clock input
* sometimes a preset input.
* a known bit width

A counter is not meant to count in other increments than "1" or sometimes "-1".
One could formulate this as: A = A + 1

With an accumulator you have an extra input for step size.
One could formulate this as: A = A + S.

Klaus
 

ads-ee

Super Moderator
Staff member
Joined
Sep 10, 2013
Messages
7,820
Helped
1,811
Reputation
3,632
Reaction score
1,772
Trophy points
1,393
Location
USA
Activity points
59,026
Semantics aside, technically a counter is just a subset of possible accumulators. An accumulator that only sums up 1's (or -1's) is referred to as a counter, whereas an accumulator is generally a summing function that adds a variable (non-1) value to a summation value.

A language like C distinguishes between the two with different syntax.

count++;
accumulate += number;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top