DSP Core Instruction Set

A.1.5 Prefix Word Encoding

Each execution set can be associated with a one-word (low or high register) 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 bits).

Encoding extension for high register banks (D8–D15, R8–R15).

There are two prefix formats: a one-word low register prefix, and a two-word prefix. A one-word low register prefix encodes information concerning the first three items above. A two-word prefix includes information on all items above.

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 the 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 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 that uses a register from the high banks has 3 operands, and/or is conditionally executed or is in a loop.

Prefix words are optional, generated by the assembler if needed. The rules used by the assembler to determine if a prefix is needed are described in Section 5.2.4, “Prefix Selection Algorithm.” :

Note: Use of a prefix reduces the space available for instructions in the eight-word execution set by the size of the prefix. For example, if an instruction that references a high-bank register causes the assembler to generate a two-word prefix,only six words are left available in that execution set for instructions.

SC140 DSP Core Reference Manual

A-7

Page 321
Image 321
Freescale Semiconductor SC140 specifications Prefix Word Encoding