Digital Systems I EEC 180A Lecture 15 Bevan M. Baas Tuesday, November 20, 2007
EEC 180A, Fall 2007, B. Baas 2 Counter Example 3-bit counter Specification –Starting at zero, it increments by 3 –at 6, it wraps back to 0 Has a reset signal input –When reset=1, the next counter value is 0 Uses D Flip-flops 0 36 reset
EEC 180A, Fall 2007, B. Baas 3 Counter Example Using D FFs xxx 110 xxx 000 xxx 000 Present State ABC Next State ABC Next State ABC reset=0 reset=1 State Table Two different values of reset treated as different Next States in this example 0 36 reset
EEC 180A, Fall 2007, B. Baas 4 Counter Example Using D FFs Combina- tional Logic reset output (= state) clk XXX 0 “current” time reset 011 xxx 110 xxx 000 xxx 000 Present State ABC Next State ABC Next State ABC reset=0 reset=1 XXX output XXX D A,B,C 0 36 reset
EEC 180A, Fall 2007, B. Baas 5 Counter Example Using D FFs Combina- tional Logic reset output (= state) clk XXX000 1 “current” time reset 011 xxx 110 xxx 000 xxx 000 Present State ABC Next State ABC Next State ABC reset=0 reset=1 XXX 000 output XXX D A,B,C 0 36 reset
EEC 180A, Fall 2007, B. Baas 6 Counter Example Using D FFs Combina- tional Logic reset output (= state) clk “current” time reset 011 xxx 110 xxx 000 xxx 000 Present State ABC Next State ABC Next State ABC reset=0 reset=1 XXX 000 output XXX D A,B,C reset
EEC 180A, Fall 2007, B. Baas 7 Counter Example Using D FFs Combina- tional Logic reset output (= state) clk “current” time reset 011 xxx 110 xxx 000 xxx 000 Present State ABC Next State ABC Next State ABC reset=0 reset=1 XXX 000 output XXX D A,B,C reset
EEC 180A, Fall 2007, B. Baas 8 Counter Example Using D FFs Combina- tional Logic reset output (= state) clk “current” time reset 011 xxx 110 xxx 000 xxx 000 Present State ABC Next State ABC Next State ABC reset=0 reset=1 XXX 000 output XXX D A,B,C reset
EEC 180A, Fall 2007, B. Baas 9 Counter Example Using D FFs Combina- tional Logic reset output (= state) clk “current” time reset 011 xxx 110 xxx 000 xxx 000 Present State ABC Next State ABC Next State ABC reset=0 reset=1 XXX 000 output XXX D A,B,C reset