Академический Документы
Профессиональный Документы
Культура Документы
An alternative to a state diagram which is sometimes nicer when our hardware is implementing an algorithm that can be drawn as a flowchart. The ASM is tied closely with a hardware implementation. The ASM consists of three types of elements: State Box. Decision Box. Conditional Output Box.
Page 1
State Name
Binary Code
Page 2
0 (false)
Conditional Expression
1 (true)
Page 3
Page 4
Comments
If the ASM Chart does not have any conditional output boxes, then the ASM Chart is describing a Moore Machine. If the ASM chart does have conditional output boxes, then the ASM Chart is describing a Mealy Machine. Also, when we have outputs, we only need to label the output values (in either a state box or a conditional box) when the outputs are 1. If not shown, we can assume the outputs are 0.
Page 5
Of course, once we have a state table, we are pretty much go to go using what we have talked about previously in the course.
Page 6
G=1
S1
01
W=1
A=1
S2
10
Z=1
Page 7
A=1
G=1
S1
01
W=1
A=1
From here, we would proceed as normal in order to get a circuit implementation Pick FF type, generate equations, etc
0
S2
10
Z=1
Page 8
If an output is not explicitly shown to be assigned a non-zero value, then it is assumed that the output is 0 (I made this comment before).
Page 9
Page 10
Entry
Exit
Exit
Page 11
Entry
Entry
Exit0
Exit1
Exit0
Exit1
Page 12
Entry 1
Entry
Exit1
Exit1
Page 13
Entry0
Entry1
Entry0
Entry1
Exit
Exit
Page 14
A=1
D Q
G=1
S1
01
W A
W=1
A=1
S2
10
Z=1
Page 15
Page 16
Multiplication is a shift and add operation. We shift the multiplicand to the left (if multiplier bit is non-zero) and add.
Page 17
Page 18
Page 19
strt valid
dec load1 clear load2 shift din d 1-bit shift register q dout din cout
n product
Page 20
We can draw an ASM chart that generates the correct control signals:
strt
MUL0
Completing the design from the ASM Chart to a schematic for the control part of the design is straightforward, using stuff we learnt before.
valid=1
Page 21
Page 22