Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "CS 140L Lecture 5 Professor CK Cheng CSE Dept. UC San Diego."— Presentation transcript:

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

2 Counters Synchronous counters Johnson counters Odd Length counters

3 Synchronous Counter D Q D Q D Q CLK C(t+1) = C’(t) B(t+1) = B(t) + C(t) A(t+1) = A(t) + (B(t)C(t)) 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 A BC

4 1.There are two things to keep track of: cost vs. performance. 2.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. 3.As the length of the counter increases, the cost increases, since the number of gates increases. Synchronous vs Asynchronous Counters

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

6 Odd Length Walking – Ring Counter A Shifter with Twisted Feedback Loops J K CLR Q Q’ J K Q J K Q ABC 0 0 11 0 0 2 1 1 0 30 1 1 40 0 1 50 0 0 61 0 0 71 1 0 Time Steps A B C J A K A 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 n = 4, length = 15 D Q CLK D Q D Q D Q


Download ppt "CS 140L Lecture 5 Professor CK Cheng CSE Dept. UC San Diego."

Similar presentations


Ads by Google