1 / 7

CS 140L Lecture 5: Counters

CS 140L Lecture 5: Counters. Professor CK Cheng CSE Dept. UC San Diego. Counters Synchronous counters Johnson counters Odd Length counters. Synchronous Counter. Q. Q. Q. A. B. C. D. D. D. D C. D A. D B. State Table. CLK. A B C A(t+1) B(t+1) C(t+1)

latricea
Download Presentation

CS 140L Lecture 5: Counters

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 140L Lecture 5: Counters Professor CK Cheng CSE Dept. UC San Diego

  2. Counters Synchronous counters Johnson counters Odd Length counters

  3. Synchronous Counter Q Q Q A B C D D D DC DA DB State Table CLK A B C A(t+1) B(t+1) C(t+1) 0 0 0 0 0 0 1 1 0 0 1 0 1 0 2 0 1 0 0 1 1 3 0 1 1 1 0 0 4 1 0 0 1 0 1 5 1 0 1 1 1 0 6 1 1 0 1 1 1 7 1 1 1 0 0 0 Combinational Logic C(t+1) = DC(t) = C’(t) B(t+1) = DB(t)= B(t) + C(t) A(t+1) = DA(t)= A(t) + (B(t)C(t))

  4. Synchronous vs Asynchronous Counters • There are two things to keep track of: cost vs. performance. • For example, the synchronous counter has better performance but higher costs due to the added gates. On the other hand, the asynchronous counter is easier to implement. • As the length of the counter increases, the cost increases, since the number of gates increases. Exercise: What factors limit of the length of the counter?

  5. Johnson Counter: A Shifter with An Inverted Feedback Loop A B C Q Q Q D D D Q’ CLR CLK • Given n flip-flops, we have 2n states. Much less than previous counters. But Johnson is fast! • Only one output changes (low power). • Each output has n clock width (symmetrical). • Reset is needed. (ie, starts with 010, the counter ends up as 010->101->010->101) Time Steps A B C • 0 0 0 • 2 1 0 0 • 1 1 0 • 1 1 1 • 0 1 1 • 0 0 1 • 0 0 0

  6. Odd Length Walking – Ring CounterA Shifter with Twisted Feedback Loops A B C Q Q J J Q J CLR K Q’ K Q’ K Q’ Time Steps A B C • 0 0 0 0 • 1 1 0 0 • 2 1 1 0 • 0 1 1 • 0 0 1 • 0 0 0 • 1 0 0 • 1 1 0 JA KA A(t+1) 0 0 A(t) 0 1 0 1 0 1 1 1 A’(t) n JK F-Fs => 2n-1 states The counter works itself back to the proper sequence.

  7. Pseudo Random Sequencer D0= Q3 XNOR Q2 Q0 Q1 Q2 Q3 Q Q Q Q D D D D CLK n = 4, length = 15

More Related