Title: Digital Systems I
1Digital Systems I
- EEC 180A
- Lecture 15
- Bevan M. Baas
- Tuesday, November 20, 2007
2Counter 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 reset1, the next counter value is 0
- Uses D Flip-flops
reset
0
3
6
3Counter ExampleUsing D FFs
- State Table
- Two different values of reset treated as
different Next States in this example
reset0 reset1
Present State ABC
Next State ABC
Next State ABC
000 001 010 011 100 101 110 111
011 xxx xxx 110 xxx xxx 000 xxx
000 000 000 000 000 000 000 000
reset
0
3
6
4Counter ExampleUsing D FFs
reset0 reset1
Present State ABC
Next State ABC
Next State ABC
XXX
XXX
Combina- tionalLogic
0
output ( state)
000 001 010 011 100 101 110 111
011 xxx xxx 110 xxx xxx 000 xxx
000 000 000 000 000 000 000 000
reset
DA,B,C
clk
reset
DA,B,C
XXX
output
XXX
reset
0
current time
3
6
5Counter ExampleUsing D FFs
reset0 reset1
Present State ABC
Next State ABC
Next State ABC
XXX
000
Combina- tionalLogic
1
output ( state)
000 001 010 011 100 101 110 111
011 xxx xxx 110 xxx xxx 000 xxx
000 000 000 000 000 000 000 000
reset
DA,B,C
clk
reset
DA,B,C
XXX
000
output
XXX
XXX
reset
0
current time
3
6
6Counter ExampleUsing D FFs
reset0 reset1
Present State ABC
Next State ABC
Next State ABC
000
011
000
Combina- tionalLogic
0
output ( state)
000 001 010 011 100 101 110 111
011 xxx xxx 110 xxx xxx 000 xxx
000 000 000 000 000 000 000 000
reset
DA,B,C
clk
reset
DA,B,C
XXX
000
011
output
XXX
XXX
000
reset
0
current time
3
6
7Counter ExampleUsing D FFs
reset0 reset1
Present State ABC
Next State ABC
Next State ABC
011
110
Combina- tionalLogic
0
output ( state)
000 001 010 011 100 101 110 111
011 xxx xxx 110 xxx xxx 000 xxx
000 000 000 000 000 000 000 000
reset
DA,B,C
clk
reset
DA,B,C
XXX
000
011
110
output
XXX
XXX
000
011
reset
0
current time
3
6
8Counter ExampleUsing D FFs
reset0 reset1
Present State ABC
Next State ABC
Next State ABC
110
000
Combina- tionalLogic
0
output ( state)
000 001 010 011 100 101 110 111
011 xxx xxx 110 xxx xxx 000 xxx
000 000 000 000 000 000 000 000
reset
DA,B,C
clk
reset
DA,B,C
XXX
000
011
110
000
output
XXX
XXX
000
011
110
reset
0
current time
3
6
9Counter ExampleUsing D FFs
reset0 reset1
Present State ABC
Next State ABC
Next State ABC
000
011
Combina- tionalLogic
0
output ( state)
000 001 010 011 100 101 110 111
011 xxx xxx 110 xxx xxx 000 xxx
000 000 000 000 000 000 000 000
reset
DA,B,C
clk
reset
DA,B,C
XXX
000
011
110
000
011
output
XXX
XXX
000
011
110
000
reset
0
current time
3
6