A-6
SC140 DSP Core Instruction Set
A.1.5 Prefix Word Encoding
Each execution set can be associated with a one-word or two-word prefix that is placed at the beginning of
the set. A prefix conveys additional information about the set such as:
Conditional execution of an execution set or a subgroup (originating in the IFT/IFF/IFA
instructions).
The number of instructions that are grouped together in the execution set.
Looping information to support hardware loops (lpmarkA and lpmarkB tags).
Encoding extension for high register banks (D8–D15, R8–R15).
There are two prefix formats: one-word prefix and two-word prefix. A one-word prefix encodes
information concerning the first three items above. A two-word prefix includes all information in the
one-word prefix as well as encoding extension information for high register banks.
The basic 16-bit instruction encoding of the SC140 has three bits allocated to specify a data or pointer
register. Therefore, these encodings alone can specify only eight DALU registers (D0–D7) and eight
address pointers (R0–R7). In order to specify operands that belong to the high register banks (D8–D15,
R8–R15), additional encoding bits are needed. These bits are allocated in a two-word prefix. A two-word
prefix includes a field for each execution unit in the SC140: four fields for DALU instructions and two
fields for AGU instructions. DALU instructions have a maximum of three operands, so each DALU field is
3 bits wide. AGU instructions have a maximum of two operands, so each AGU field is two bits wide. This
provides an encoding extension bit for each possible operand in each execution unit. If a bit is set, it
signifies that the respective operand uses a high-bank register. If there is no two-word prefix, or the
associated bit is clear, the operand uses a register from the low bank. A two-word prefix is generated by the
assembler if at least one of the instructions in the execution set uses a register from the high banks.
Prefix words are optional, generated by the assembler if needed. The rules used by the assembler to
determine if a prefix is needed are:
If any instruction in the set uses D8–D15 or R8–R15, generate a two-word prefix.
If the set contains IFT/IFF/IFA, or includes looping information, generate a one-word or two-word
prefix.
If the set includes just one instruction that does not use a high-bank register, no prefix is needed.
If the set includes more than one instruction using only the low-bank registers, and belongs to the
serial grouping subset, no prefix is needed. The set will be grouped using the serial encodings.
Use of a prefix reduces the space available for instructions in the eight-word execution set by the
size of the prefix. For example, an instruction that references a high-bank register causes the
assembler to generate a two-word prefix, leaving only six words available in that execution set for
instructions.
Note: