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.

Counting 1's and 0's

Status
Not open for further replies.

jonnybgood

Full Member level 4
Full Member level 4
Joined
Dec 28, 2010
Messages
214
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Activity points
3,011
I need to implement a system for counting the number of one's and 0's in a bit stream. These will be made of two 4-bit counters one for the 1's and other for 0's. At each rising edge, the system checks the logic of bit stream and increments the counters according.

My simple ASM is attached. Is this the only way to implement this system using an ASM ? or is it possible to go deeper ?

I also need to convert the asm to a one flipflop per state. Will this result in two ring counters? If this is the case then it would need to load the first flip flop initially. The rest would be a 2-to-1 demux to select the clock path according to the input data stream. Any suggestions would be appreciated.
 

Attachments

  • counters_asm.png
    counters_asm.png
    29.1 KB · Views: 67

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top