Motorola HC12 Refrence Manual page 227

Table of Contents

Advertisement

Accumulator A holds intermediate results. During antecedent process-
ing, a MIN function compares each fuzzy input to the value stored in A,
and writes the smaller of the two to A. When all antecedents have been
evaluated, A contains the smallest input value. This is the truth value
used during consequent processing. Accumulator A must be initialized
to $FF for the MIN function to evaluate the inputs of the first rule correct-
ly. For subsequent rules, the value $FF is written to A when an $FE
marker is encountered. At the end of execution, accumulator A holds the
truth value for the last rule.
The V status bit signals whether antecedents (0) or consequents (1) are
being processed. V must be initialized to zero in order for processing to
begin with the antecedents of the first rule. Once execution begins, the
value of V is automatically changed as $FE separators are encountered.
At the end of execution, V should equal one, because the last element
before the $FF end marker should be a rule consequent. If V is equal to
zero at the end of execution, the rule list is incorrect.
Fuzzy outputs must be cleared to $00 before processing begins in order
for the MAX algorithm used during consequent processing to work cor-
rectly. Residual output values would cause incorrect comparison.
Refer to
Condition Codes and Boolean Formulas:
S
V:
H, N, Z and C may be altered by this instruction.
Addressing Modes, Machine Code, and Execution Times:
Source Form
REV
(add if interrupted)
Notes:
1. The 3-cycle loop in parentheses is executed once for each element in the rule list. When an interrupt occurs,
there is a 2-cycle exit sequence, a 4-cycle re-entry sequence, then execution resumes with a prefetch of the last
antecedent or consequent being processed at the time of the interrupt.
CPU12
REFERENCE MANUAL
SECTION 9 FUZZY LOGIC SUPPORT
X
H
I
N
Z
?
?
?
1; Normally set, unless rule structure is erroneous.
Address Mode
Special
INSTRUCTION GLOSSARY
V
C
?
Object Code
18 3A
for details.
Cycles
Access Detail
1
see note
Orf(ttx)O
ff + Orf
MOTOROLA
6-167

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents