Wav And Wavr Instruction Flow Diagram - Motorola HC12 Refrence Manual

Table of Contents

Advertisement

1.0 - O
Read program word if $18 misaligned
2.0 - f
No bus access
3.0 - f
No bus access
TMP1 = TMP2 = TMP3 = $0000
4.0 - f
No bus access
B = B – 1 decrement iteration counter
5.0 - r
Read byte @ 0,Y (fuzzy output F
Y = Y + 1 point at next fuzzy output
6.0 - r
Read byte @ 0,X (singleton S
X = X + 1 point at next singleton
Interrupt pending?
7.0 - f
No bus access
TMP1 = TMP1 + F
i
8.0 - f
No bus access
Start multiply PPROD = S
9.0 - f
No bus access
Continue multiply
10.0 - f
No bus access
Finish multiply, TMP2 = TMP2 + PPROD
11.0 - f
No bus access
TMP3 = TMP3 + (carry from PPROD add)
No
12.0 - O Read program word if $3C misaligned
Adjust PC to point at next instruction
Y : D = TMP3 : TMP2; X = TMP1
Figure 9-11 WAV and wavr Instruction Flow Diagram
CPU12
REFERENCE MANUAL
WAV
)
i
)
i
Yes
No
*F
i
i
B = 0?
Yes
END
FUZZY LOGIC SUPPORT
wavr
2.1 - U
Read word @ 0,SP (unstack TMP3)
SP = SP + 2
3.1 - U
Read word @ 0,SP (unstack TMP2)
SP = SP + 2
4.1 - U
Read word @ 0,SP (unstack TMP1)
SP = SP + 2
5.1 - r
Read byte @ –1,Y (fuzzy output F
6.1 - r
Read byte @ –1,X (singleton S
7.1 - S
Write word @ –2,SP (stack TMP1)
SP = SP – 2
8.1 - S
Write word @ –2,SP (stack TMP2)
SP = SP – 2
9.1 - S
Write word @ –2,SP (stack TMP3)
SP = SP – 2
Adjust PC to point at $3C wavr pseudo-opcode
Continue to interrupt stacking
)
i
)
i
WAV INST FLOW
MOTOROLA
9-25

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents