Motorola HC12 Refrence Manual page 48

Table of Contents

Advertisement

Mnemonic
MEM
Membership Function
REV
MIN-MAX Rule Evaluation
REVW
MIN-MAX Rule Evaluation
Calculates Numerator (Sum of Products)
and Denominator (Sum of Weights) for
Weighted Average Calculation
WAV
Results Are Placed in Correct Registers
For EDIV immediately After WAV
Resumes Execution of
wavr
Interrupted WAV Instruction
MOTOROLA
5-10
Table 5-13 Fuzzy Logic Instructions
Function
INSTRUCTION SET OVERVIEW
Operation
µ (grade)
(X) + 4
X; (Y) + 1
if (A) < P1 or (A) > P2, then µ = 0, else
µ = MIN [((A) – P1) × S1, (P2 – (A)) × S2, $FF]
where:
A = current crisp input value
X points to a four byte data structure that describes a trap-
ezoidal membership function as base intercept points
and slopes (P1, P2, S1, S2)
Y points at fuzzy input (RAM location)
See instruction details for special cases
Find smallest rule input (MIN)
Store to rule outputs unless fuzzy output is larger (MAX)
Rules are unweighted
Each rule input is an 8-bit offset from a base address in Y
Each rule output is an 8-bit offset from a base address in Y
$FE separates rule inputs from rule outputs
$FF terminates the rule list
REV can be interrupted
Find smallest rule input (MIN)
Multiply by a rule weighting factor (optional)
Store to rule outputs unless fuzzy output is larger (MAX)
Each rule input is the 16-bit address of a fuzzy input
Each rule output is the 16-bit address of a fuzzy output
Address $FFFE separates rule inputs from rule outputs
$FFFF terminates the rule list
Weights are 8-bit values in a separate table
REVW can be interrupted
B
S
i
=
1
B
F
i
=
1
Recover immediate results from stack
rather than initializing them to zero.
M
(Y)
Y; A unchanged
F
Y:D
i
i
X
i
CPU12
REFERENCE MANUAL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents