20 March, 2000

State table

Symbolic states

no-action 0-cents no-Nabs 0-cents
no-action 5-cents no-Nabs 5-cents
no-action 10-cents no-Nabs 10-cents
no-action 15-cents no-Nabs 15-cents
nickel 0-cents no-Nabs 5-cents
nickel 5-cents no-Nabs 10-cents
nickel 10-cents no-Nabs 15-cents
nickel 5-cents no-Nabs 15-cents
dime 0-cents no-Nabs 10-cents
dime 5-cents no-Nabs 15-cents
dime 10-cents no-Nabs 15-cents
dime 15-cents no-Nabs 15-cents
button-press 0-cents no-Nabs 0-cents
button-press 5-cents no-Nabs 0-cents
button-press 10-cents no-Nabs 0-cents
button-press 15-cents give-Nabs 0-cents

Binary state table

input old
state
output new
state
00 00 0 00
00 01 0 01
00 10 0 10
00 11 0 11
01 00 0 01
01 01 0 10
01 10 0 11
01 11 0 11
10 00 0 10
10 01 0 11
10 10 0 11
10 11 0 11
11 00 0 00
11 01 0 00
11 10 0 00
11 11 1 00

Expressed with espresso

.i 4
.o 3
.p 16
0000 000
0001 001
0010 010
0011 011
0100 001
0101 010
0110 011
0111 011
1000 010
1001 011
1010 011
1011 011
1100 000
1101 000
1110 000
1111 100
.e

Optimized by espresso

.i 4
.o 3
.p 8
1111 100
01-0 001
01-1 010
101- 001
0-11 001
10-- 010
0-1- 010
-0-1 001
.e

J K flip flop implement

New state table

input state output JK JK
00 00 0 0- 0-
00 01 0 0- -0
00 10 0 -0 0-
00 11 0 -0 -0
01 00 0 0- 1-
01 01 0 1- -1
01 10 0 -0 1-
01 11 0 -0 -0
10 00 0 1- 0-
10 01 0 1- -0
10 10 0 -0 1-
10 11 0 -0 -0
11 00 0 0- 0-
11 01 0 0- -1
11 10 0 -1 0-
11 11 1 -1 -1

Expressed with espresso

.i 4
.o 5
.p 16
0000 00-0-
0001 00--0
0010 0-00- 
0011 0-0-0
0100 00-1-
0101 01--1
0110 0-01-
0111 0-0-0
1000 01-0-
1001 01--0
1010 0-01-
1011 0-0-0
1100 00-0-
1101 00--1
1110 0-10-
1111 1-1-1
.e

Optimized by espresso

.i 4
.o 5
.p 6
1111 10000
0101 01001
01-- 00010
101- 00010
10-- 01000
11-- 00101
.e

Implemented in espresso

JK flip flop implementation