Lecture A 2.Fsm Review

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 14

Mealy Machine

X1

X2

S1

Y1

Y2

S2

S2

Y3

Y1

S1

S3

Y2

X1

X2

S1

S2

S1

S2

S3

S3

S2

state

x
S

X1

S
S1
S2
S3

X2

S2

S1
Y1

S3

Y2
S2

Y3
S2

Y1
S1

Y2

Y3

Y3
outputs

State table of Mealy Machine

X1

X2

S1

S2

S1

S2

S3

S2

S3

S2

S1

S1

Y2

S2

Y1

S3

Y3

Mealy Machine Graph


X2/Y2
X

X1

S
S1
S2
S3

X2

S2

S1

S1
Y1

S3

Y2

S2

S2
Y3

S2

Y1

X2/Y3

X1/Y2

S1
Y2

X2/Y1

X1/Y1

X1/Y3

Y3
S3

Moore Machine Graph


x

X2
X2

S1

S2

S1

Y2

S2

S3

S2

Y1

S3

S2

S1

Y3

S1/Y2

X1
X2

X1

S2/Y1
X2

X1

X1
S3/Y3

Natural language formulation of a problem


Design a control unit for ligth
signalization on the railway
with car sensors in positions
A, B, C. The cars can go
BA, AB i AC.
In direction BA go only car
sets of length larger than the
distance between sensors B
and A.
In directions AB and AC go
only single cars of length
smaller
than
distance
between sensors A and B
and A and C, respectively.

The designed circuit should light lamp


z=1 if there are no cars between sensors
A and B or sensors A and C
Sensors A, B, C generate signals a=1,
b=1 and c=1 respectively, when sets of
cars or single cars occur to be in their
close distance.

Timing Diagram Specification

Transition and output table for light


signalization circuit
ABC

000

001

011

010

110

111

101

100

S1

S1

S6

S2

S2

S3

S2

S3

S3

S5

S4

S4

S1

S4

S5

S1

S5

S6

S6

S7

S7

S7

S8

S8

S1

S8

Moore Machine graph for the analyzed device


010
6/1

110
7/1
100

1/0

000

100
000

2/1
000

8/1
5/1 001 3/1
000
4/1

010

asynchronous flip-flop sr

Q(t)Q(t+1)

Q(t+1)

Q(t)

Asynchronous sr flip-flop

Asynchronous flip-flop sr

Q(t+1)

Q(t)

Negated sr FF
This version has negated inputs
s r

This FF realizes the function:


s

Q(t)

Q(t+1)

Q(t)Q(t+1)

Negated sr FF

Negated sr FF

Q(t)

Q(t+1)

You might also like