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,474
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
21,980
Helped
4,591
Reputation
9,196
Reaction score
4,808
Trophy points
1,393
Activity points
145,109
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,906
Helped
1,821
Reputation
3,652
Reaction score
1,799
Trophy points
1,393
Location
USA
Activity points
59,784
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