Digital Systems I EEC 18 Design and Operation

  • Slides: 9
Download presentation
Digital Systems I EEC 18 Design and Operation of a 3 -bit Counter Bevan

Digital Systems I EEC 18 Design and Operation of a 3 -bit Counter Bevan M. Baas Last modified: February 27, 2020

Specification of the Example Counter • 3 -bit counter – Assuming an unsigned encoding,

Specification of the Example Counter • 3 -bit counter – Assuming an unsigned encoding, valid values range from zero (000) to seven (111) • Specification – Starting at zero, increment by +3 each cycle – at 6, wrap back to 0 • reset signal input reset 0 6 3 – When reset = 1, the next counter value is 0 • Use D Flip-flops © B. Baas 2

Counter Example Using D FFs • State Table • Two different values of reset

Counter Example Using D FFs • State Table • Two different values of reset are treated as different Next States in this example reset 0 6 © B. Baas 3 Present State ABC 000 001 010 011 100 101 110 111 reset=0 reset=1 Next State ABC 011 xxx 110 xxx 000 000 000 000 3

Counter Example Using D FFs 0 reset Combinational Logic XXX DA, B, C Present

Counter Example Using D FFs 0 reset Combinational Logic XXX DA, B, C Present State ABC XXX output (= state) 000 001 010 011 100 101 110 111 clk reset DA, B, C XXX output XXX “current” time © B. Baas reset 0 6 3 reset=0 reset=1 Next State ABC 011 xxx 110 xxx 000 000 000 000 4

Counter Example Using D FFs 1 reset Combinational Logic 000 DA, B, C Present

Counter Example Using D FFs 1 reset Combinational Logic 000 DA, B, C Present State ABC XXX output (= state) 000 001 010 011 100 101 110 111 clk reset DA, B, C XXX 000 output XXX “current” time © B. Baas reset 0 6 3 reset=0 reset=1 Next State ABC 011 xxx 110 xxx 000 000 000 000 5

Counter Example Using D FFs 0 reset Combinational Logic 011 DA, B, C Present

Counter Example Using D FFs 0 reset Combinational Logic 011 DA, B, C Present State ABC 000 output (= state) 000 001 010 011 100 101 110 111 clk reset DA, B, C XXX 000 011 output XXX 000 “current” time © B. Baas reset 0 6 3 reset=0 reset=1 Next State ABC 011 xxx 110 xxx 000 000 000 000 6

Counter Example Using D FFs 0 reset Combinational Logic 110 DA, B, C Present

Counter Example Using D FFs 0 reset Combinational Logic 110 DA, B, C Present State ABC 011 output (= state) 000 001 010 011 100 101 110 111 clk reset DA, B, C XXX 000 011 110 output XXX 000 011 “current” time © B. Baas reset 0 6 3 reset=0 reset=1 Next State ABC 011 xxx 110 xxx 000 000 000 000 7

Counter Example Using D FFs 0 reset Combinational Logic 000 DA, B, C Present

Counter Example Using D FFs 0 reset Combinational Logic 000 DA, B, C Present State ABC 110 output (= state) 000 001 010 011 100 101 110 111 clk reset DA, B, C XXX 000 011 110 000 output XXX 000 011 110 “current” time © B. Baas reset 0 6 3 reset=0 reset=1 Next State ABC 011 xxx 110 xxx 000 000 000 000 8

Counter Example Using D FFs 0 reset Combinational Logic 011 Present State ABC 000

Counter Example Using D FFs 0 reset Combinational Logic 011 Present State ABC 000 output (= state) DA, B, C 000 001 010 011 100 101 110 111 clk reset DA, B, C XXX 000 011 110 000 011 output XXX 000 011 110 000 reset “current” time © B. Baas 0 6 3 reset=0 reset=1 Next State ABC 011 xxx 110 xxx 000 000 000 000 9