Professional Documents
Culture Documents
EEL3701
Menu
ASM charts
ASM Design Look into my ...
EEL3701
ASM Chart Design: Branches,
Conditional Outputs
Branches: Conditional branches indicate that the
next state is determined not only by the present
state, but also by the value of one or more test In1
inputs. Indicate branches with a diamond or a 0 or F
1 or T
diamond-sided rectangle.
Conditional Outputs: Place the output command
description within an appropriate oval placed in a
path to indicate its dependence on a given test CMD2
input. AKA asynchronous outputs, Mealy outputs.
THIS IS THE ENTIRE ASM NOTATION!!!
University of Florida, EEL 3701 File 18
Drs. Schwartz & Arroyo 3
EEL3701
ASM Charts
State Bits Legend:
Strobe | S3 | S2 | S1 | S0 State Name
00010 Open
State Outputs inside
State Bits Motor (State outputs that
(if assigned) are not state bits)
1 Decision an input or a
X
Never start a function of input(s); ex: X
design until after 0
or X=A*B or X=A+B*C
you first create an
ASM diagram Brake Conditional Output
University of Florida, EEL 3701 File 18 (Mealy Output)
Drs. Schwartz & Arroyo 4
Start Start
C=0, B=0, A=0
S1 S1
C=0, B=1, A=0 B
EEL3701
Moore/Mealy Comparison
[Example] Design a Sequence Detector/Acceptor to accept X = 010*1
where 0* = { (nil), 0, 00, 000, 0000, ....... }
STEP 1: Draw the State Diagram.
Mealy (unreduced)
Start
1/0 Moore
000 Start
1/0 Clinton 0/0 X=1
S0 0/0 000
010 X=1 S0/Z=0
Nixon 0/0 001 X=0
Carter Clinton X=0
S4 010
S1 S4/Z=1 X=0 001
1/1 Nixon S1/Z=0
1/1 Carter
0/0 1/0 X=1
110 0/0 011 X=1
111 X=0 X=1
Bush Ford
Reagan X=0
S5 S3 S2 110 011
0/0 111
1/1 S5/Z=1 S2/Z=0
S3/Z=0
Bush Reagan Ford
X=0
X=1
University of Florida, EEL 3701 File 18
Drs. Schwartz & Arroyo 7
EEL3701
Outputs: Conditional on State
Q: Should you use conditional or state outputs?
A: Dealers Choice. You can mix them; just be careful with
conditional outputs.
S0
Note: Z
OR Z
EEL3701
Conditional (Mealy) Outputs
In state S2 (Ford), if X changes between clock pulses, Z changes also
if you use conditional outputs. These changes that occur between
clock pulses are called spurious pulses.
The synchronous circuit that is attached to Z does not care about this
if it is also clocked! Note that this f(Z) will come out one clock later
than if Z was a State (Moore) output.
X Comb Z D Q f (Z)
3 Q
3
3-FF
EEL3701
Why Use an ASM?
We can attach semantic meaning to the state labels e.g., let
Clinton be Start, let X be Sig, let Z be Valid, let Reagan be
Accept-1, let Bush be Accept-2, etc.
To realize the Comb (the Combinational Network), we
choose one of the following:
> 1. Gate approach - K-Maps, AND/OR, NAND, NOR, ...
We know
> 2. PLD, CPLD 1k x 8 = 8 functions of 10 variables 5 ways
000
> 3. MUX already!
f7 f6 f5 f4 f3 f2 f1 f0
> 4. ROM 3FF
> 5. Other LSI circuits fi is a function of 10 inputs labeled A9~A0, and i is
> 6. P or C 0,1,2,3,4,5,6,7. We store the truth table for fi in each
column of ROM
8 bits = 1 byte, 4 bits = 1 nibble,
1k = 210 =1024, M=220 (mega-), G=230 (giga-), T=240 (tera-)
University of Florida, EEL 3701 File 18
Drs. Schwartz & Arroyo
1k x 8bits = 1KB = 1 kilobyte = 2^10 bytes 12
EEL3701
Digital Design for Controllers
In the typical digital design application we are asked
to design circuits to control existing systems.
Circuits
Controller
to be Cars
ASM m-outputs controlled Traffic Lights
n-inputs Jet Engines
Power Plants
Printers
Given m-outputs with n-inputs, the problem is to develop the
ASM to control a system. As in the case of controlling a
printer, the controlled circuits themselves could be an
ASM.
University of Florida, EEL 3701 File 18
Drs. Schwartz & Arroyo 13
EEL3701
ASM Design Example:
Washing Machine Controller
Design a washing machine controller.
n
STRT
Controller Washer
SHOT ASM Timer
When the controller receives a STRT (start) signal (from the user), it
fills the washer with either cold or hot water (user selects, let SHOT be
true if we want hot water). It starts agitating until a timer indicates we
are finished. Now it empties the soapy water. Fills the machine with
cold rinse water, agitates again until a timer times out. Empties the
rinse water and spins the clothes until the timer times out again. If the
start button is ever pushed OFF, the washer HOLDS(stays in
whatever state it is in) until the start button is pressed again.
University of Florida, EEL 3701 File 18
Drs. Schwartz & Arroyo 14
EEL3701
Washing Machine I/O
STEP 1 List the inputs and outputs
Inputs Outputs
STRT (Start from User) OHOT (Turn On Hot water valve)
SHOT (Select Hot from User) PUMP (Turn On Pump)
FULL (Tub Full Indicator) FILL (True: water-in, False: water-out)
EMP (Tub Empty Indicator) AG (Agitate)
TO (Timer Out Indicator) STIME (Clear & Start Timer)
SPIN (Spin Dry)
5-inputs would require 25=32
arrows going out of the bubbles STRTOFF (Go to Idle State)
if we used a state diagram
(which is why we instead use an
ASM chart)
University of Florida, EEL 3701 File 18
Drs. Schwartz & Arroyo 15
EEL3701
Wash Mach: ASM Chart
STEP 2 Draw ASM chart If an output isnt written,
it is assumed to be false.
F A
Agitate B Empty water
Idle
STIME
0 Drain
STRT
1 Agitate
0
1 STRT
SHOT 0
STRT 1
0 OHOT 1
PUMP
1 AG
FULL A
0 0 0
TO EMP
PUMP
1 1
FILL
University of Florida, EEL 3701 File 18 B (go to Rinse 1) C
Drs. Schwartz & Arroyo 16
EEL3701
More Wash Mach ASM
C Rinse 1 D Rinse 2 E Spin Dry
Rinse2 SpinIt
Rinse1
0 STRT 0 0
STRT STRT
1
1 1 1
1 TO 1
FULL TO
0
0 PUMP 0
STIME AG
PUMP SPIN
FILL 0
EMP
1 STRTOFF
D
STIME E F (go to Idle)
University of Florida, EEL 3701 File 18
Drs. Schwartz & Arroyo 17
EEL3701
Wash Mach ROM Realization
STEP 3 ROM realization 100
000 001 010 011 Rinse2
Idle Agitate Drain Rinse 101
SpinIt
STRT A0 D0 PUMP
SHOT A1 256 x 10 D1 FILL Inputs
EMP A2 ROM D2 AG STRT (Start from User)
FULL A3 D3 OHOT SHOT (Select Hot from User)
TO A4 D4 STIME FULL (Tub Full Indicator)
A5 D5 SPIN EMP (Tub Empty Indicator)
A6 D6 STRTOFF TO (Timer Out Indicator)
A7 D7
D8 Outputs
D9 OHOT (Turn On Hot water valve)
PUMP (Turn On Pump)
Q0 D0
FILL (True: water-in, False: water-out)
Q1 D1 AG (Agitate)
Q2 D2 STIME (Clear & Start Timer)
CLK SPIN (Spin Dry)
University of Florida, EEL 3701 File 18
Drs. Schwartz & Arroyo STRTOFF (Go to Idle State) 18
EEL3701
Reducing Number of Inputs
We need 10 data lines (tough to find ROM/RAM with 10
data lines). So in order to reduce the number of data lines,
try to find outputs that are functions of other outputs (or pick
outputs to determine directly outside the ROM/RAM)
> STRTOFF and SPIN are such outputs (both in state SpinIt with
Q2Q1Q0 = 101)
> Simple to get these outputs as function of known signals
Q0(H) Q0(H)
Q1(L) Q1(L)
Q2(H) STRTOFF Q2(H) SPIN
STRT(H) STRT(H)
TO(H) TO(L)
EEL3701
ASM to Timing Diagram
A 00
Count.En
DEFINITION: State = A stable Reg.LD
condition of the controller over a B 01
clock cycle (a fixed period of In.Bit
0
time) C 1 10
Skill 1: From ASM to Timing Reg.LD
Diagram Shown also in
Lam Fig 7.2 (a) 0
Buf.Full
1
Count.En
D 11
University of Florida, EEL 3701 File 18 Out.Flag
Drs. Schwartz & Arroyo 22
EEL3701 A 00
Count.En
EEL3701 A 00
Count.En
0
Buf.Full
1
Count.En
D 11
Out.Flag
A 00
Refine A, B B
Count.En
Reg.LD
00 11
00 11 A In.Bit,Buf.Full ?3
In.Bit,Buf.Full
?1 ?2 01
01 10 10
University of Florida, EEL 3701 File 18 B C ?1 ?2
Drs. Schwartz & Arroyo 27
Again, note that input combination {0,0} and {0,1} are not specified.
What was specified was that if Buf.Full = T, go to D, else go to C. By
the same analysis as for state A, we choose the simplest possibility.
University of Florida, EEL 3701 File 18
Drs. Schwartz & Arroyo 29
EEL3701
ASM from Timing
Diagram (cont.)
C Reg.LD C Reg.LD
00 11 00 11
C (In.Bit,Buf.Full) D C (In.Bit,Buf.Full) D
01 10 01 10
C C D C
C Reg.LD C Reg.LD
00 11 00 11
D (In.Bit,Buf.Full) D D (In.Bit,Buf.Full) D
01 10 01 10
C C D C
EEL3701
The End!
University of Florida, EEL 3701 File 18
Drs. Schwartz & Arroyo 32