Instruction Set Restrictions
SC140 DSP Core Reference Manual
6-25
6.4.9.3 Minimum Execution Sets Between Loop Instructions
A number of restrictions apply to the minimum spacing between loop instructions. In these restrictions
between two instructions, it is assumed that the first instruction listed occurs first in the program.
Restriction L.D.1
— A minimum of one execution set must separate the following instructions that
affect the LC register and the SKIPLS instruction:
— DOEN Dn (enables a long loop from a data register)
— DOENSH Dn (enables a short loop from a data register)
— MOVE-like instruction to LC (MOVE, POP)
Restriction L.D.2
— For a long loop, the minimum executions sets between a DOEN or MOVE-like
instruction to the LC register and LA is as follows:
— DOEN Dn: four sets (initialization from a data register)
— MOVE to LC or POP LC: four sets
— DOEN Rn or #x: three sets (initialization from an address register or by an immediate value)
Restriction L.D.3
— For a short loop, the minimum executions sets between the DOENSH or a
MOVE-like instruction to the LC register and SA is as follows:
— DOENSH Dn: two sets (initialization from a data register)
— MOVE to LC or POP LC: two sets
— DOENSH Rn or #x: one set (initialization from an address register or by an immediate value)
Restriction L.D.4
— A move-like instruction that changes the loop flags in SR
(MOVE/POP/BMxxx) is not allowed in the execution set before a DOEN/DOENSH instruction.
Restriction L.D.5
— The minimum execution sets between an instruction that updates the active LC
register and a CONT/CONTD instruction is as follows:
— DOEN Dn: two sets (initialization from a data register)
— MOVE to LC or POP LC: two sets
— DOEN Rn or #x: one set (initialization from an address register or by an immediate value)
Restriction L.D.6
— For a long loop, the minimum execution sets between an instruction that
updates the SA register (DOSETUP, MOVE to SA, or POP SA) and the LA is three execution sets.
Restriction L.D.7
— There should be a minimum of one execution set between an instruction that
updates the SA register (DOSETUP, MOVE to SA, or POP SA) and the CONT/CONTD instruction.
Restriction L.D.8
— For a long loop, there should be a minimum of three execution sets between
an instruction that reads the LC register (MOVE from LC or PUSH LC) and the LA.
Restriction L.D.9
— For a short loop, there should be a minimum of one execution set between an
instruction that reads the LC register (MOVE from LC or PUSH LC) and the SA.
6.4.9.4 Change-of-flow and Looping
Change-of-flow instructions within loops are subject to the following restrictions:
Restriction L.C.1
— No jump/branch is allowed on the last two execution sets of a loop (LA, LA-1).
This restriction does not include SKIP/CONT/BREAK in a nested loop for the last execution set of
an enveloping loop.
Restriction L.C.2
— No change-of-flow instructions are allowed in LA-2 (the execution set with
the LPMARKB). Similarly, these instructions are not allowed in LA and LA-1 due to restriction
L.L.1.