ST10R272L - MULTIPLY-ACCUMULATE UNIT (MAC)
70/320
•
EXECUTE: Performs the MAC operation. At the end of the cycle, the Accumulator and
the MAC condition flags are updated if required. Modified GPR pointers are written-back
during this stage, if required.
•
WRITEBACK: Operand write-back in the case of parallel data move.
Note
At least one instruction which does not use the MAC must be inserted between two
instructions that read from a MAC register. This is because the Accumulator and
the status of the MAC are modified during the Execute stage. The CoSTORE
instruction has been added to allow access to the MAC registers immediately after
a MAC operation.
5.2.2 Address
generation
MAC instructions can use some standard ST10 addressing modes such as GPR direct or
#data4 for immediate shift value.
New addressing modes have been added to supply the MAC with two new operands per
instruction cycle. These allow indirect addressing with address pointer post-modification.
Double indirect addressing requires two pointers. Any GPR can be used for one pointer, the
other pointer is provided by one of two specific SFRs IDX0 and IDX1. Two pairs of offset
registers QR0/QR1 and QX0/QX1 are associated with each pointer (GPR or IDX
i
). The GPR
pointer allows access to the entire memory space, but IDX
i
are limited to the internal
Dual-Port RAM, except for the CoMOV instruction.
The following table shows the various combinations of pointer post-modification for each of
these 2 new addressing modes. In this document the symbols “[Rw
n
⊗
]” and “[IDX
i
⊗
]” refer to
these addressing modes.
Symbol
Mnemonic
Address Pointer Operation
“[IDXi
⊗
]” stands for
[IDXi]
(IDXi)
←
(IDXi) (no-op)
[IDXi
+
]
(IDXi)
←
(IDXi) +2 (i=0,1)
[IDXi -]
(IDXi)
←
(IDXi) -2 (i=0,1)
[IDXi
+
QXj]
(IDXi)
←
(IDXi) + (QXj) (i, j =0,1)
[IDXi - QXj]
(IDXi)
←
(IDXi) - (QXj) (i, j =0,1)
Table 8 Pointer post-modification combinations for IDXi and Rwn