Vous êtes sur la page 1sur 28

Circuit,, State Diagram,

g
, State Table
Circuits with Flip-Flop = Sequential Circuit
Circuit = State Diagram = State Table
State Minimization
Sequential Circuit Design
Example: Sequence Detector
Example:
p Binary
y Counter

Circuit, State Diagram, State Table

Circuit, State Diagram, State Table


Terms:
State: flip-flop output combination
Present state: before clock
Next state: after clock
State transition <= clock
1 flip-flop => 2 states
2 flip-flops => 4 states
3 flip
flip-flops
flops => 8 states
4 flip-flops => 16 states
...
...
N flip-flops => 2N states

Circuit, State Diagram, State Table


Sequential circuit components:
Flip-flop(s)
Clock
Logic gates
Input
Output

Circuit, State Diagram, State Table


State diagram:
Circle => state
Arrow => transition
input/output

Circuit, State Diagram, State Table


State table:
Left column => current state
Top row => input combination
Table entry => next state, output

Example: Binary Counter


ce

... 1110 1111 0000 0001


0010 0011 0100 0101 ...
next state
ce=0 ce=1

present state
0000
0001
0010
16
...
states 1101
1110
1111

0000 0001
0001 0010
0010 0011
...
...
1101 1110
1110 1111
1111 0000

0
1

0
1

state table

0
1

...

state diagram

1
1
0

1
0

1
0

1
0

Circuit, State Diagram, State Table


Example:

Circuit, State Diagram, State Table


Example:

Input and output values


separated by dash along
the directed lines

Meal t pe
Mealy-type

Circuit, State Diagram, State Table


Example:

Circuit, State Diagram, State Table


Example:

state diagram
state table

Circuit, State Diagram, State Table


Example:

Moore-type
yp
Input values labeled along
the directed lines
Output values indicated
inside the circles

Circuit, State Diagram, State Table


Example: Show the second form truth table similar to Table 5.3

0
00 /0

0
1

11 /1
0

circuit
i it
state table
state diagram

01 /0

10 /0
0

Circuit, State Diagram, State Table


Example: state diagram = state table

state table/state diagram


circuit

D-FF characteristic eq: D = Q*

AB

00 01

11

10

DA

DA=Ax+Bx

AB

00 01

11

10

DB

DB=ABx

AB

00 01

11

10

z=Ax

z=Ax

DA=Ax+Bx
D

DB=ABx

SET

Q A

CLR

SET

CLR

Circuit, State Diagram, State Table


Example: Show the state diagram of following circuit

Circuit, State Diagram, State Table


Example: Show the state diagram of following circuit
0
0
00 /0
0
11 /1
1

y = AB
DA = Ax+Bx
DB = Ax+Bx

1
0

01/0
1

10 /0

Circuit, State Diagram, State Table


Example: Show the second form truth table

From circuit (equations)


y = AB
DA = Ax+Bx
DB = Ax+B
Ax+Bxx

x: input, y: output
A, B: present state
DA, DB: next state (D-FF)

From state diagram

S0
S1
S2
S3

Circuit, State Diagram, State Table


More Example: Binary Counter show state diagram and table

Circuit, State Diagram, State Table


More Example: Binary Counter show state diagram and table

present
state
A2 A1 A0
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

next
state
A2 A1 A0
0
0
0
1
1
1
1
0

0
1
1
0
0
1
1
0

1
0
1
0
1
0
1
0

Circuit, State Diagram, State Table


More Example: Word Problem
Design a 2-bit complex counter with one input x that can be
- a down counter when x=0 (...1110010011...)
- a Johnson
J h
counter
t when
h x=1
1 ((...0001111000...)
0001111000 )

0
00

11

01

1
1
0

10

present
state
AB
00
01
10
11

next state
x=0
x
0 x=1
x 1
AB AB
11 01
00 11
01 00
10 10

present
state
AB
00
01
10
11

next state
x=0
x
0 x=1
x 1
AB AB
11 01
00 11
01 00
10 10

DA
AB
x
0
1

DB

00 01

11

10

1
0

1
1

0
0

0
1

AB
x
0
1

00 01

11

10

1
1

0
0

1
0

DA=AB+Bx+ABx

0
1

DB=Bx+Ax

DA

DB

clock

Circuit, State Diagram, State Table


Quiz:
http://www.eelab.usyd.edu.au/digital_tutorial/part3/t-diag.htm

Circuit, State Diagram, State Table


Quiz: solution
http://www.eelab.usyd.edu.au/digital_tutorial/part3/t-diag.htm

Circuit, State Diagram, State Table


More Example:
http://www.eelab.usyd.edu.au/digital_tutorial/part3/example1-1.htm

Vous aimerez peut-être aussi