Instruction Grouping
SC140 DSP Core Reference Manual
6-5
eight pointers (R0–R7). In order to specify operands that belong to the high register banks
(D8–D15, R8–R15), additional encoding bits are needed in the form of a second prefix word.
The two-word prefix includes a field for each execution unit in the core (namely, four fields for DALU
instructions and two fields for AGU instructions). At most, DALU instructions have three operands (for
example, ADD D0, D1, D2). Therefore, each DALU field is three bits wide. At most, AGU instructions
have two operands (for example, MOVE (R0)+, D0). Therefore each AGU field is two bits wide.
A register extension bit is added for each possible operand in each execution unit. If this bit is set, it
signifies that the respective operand uses a register from the high bank. If this bit is cleared, or if the
respective set does not include a two-word prefix, 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 bank.
6.2.4 Conditional Execution
The SC140 core allows conditional execution of a group or subgroup of instructions in an execution set. A
subgroup represents the instructions that may be conditionally executed depending upon a single condition
specified in the prefix. If no prefix exists, the default is for the unconditional execution of the whole set.
An execution set can have up to eight instruction words, occupying positions 0–7 within the set.
Instructions within a set are assigned to two subgroups:
Subgroup1
— Instructions that occupy the even positions.
Subgroup2
— Instructions that occupy the odd positions.
Refer to
Section 6.2.5, “Assembly Reordering Restrictions,”
for information about how the assembler
reorders instructions for conditional execution sets.
Table 6-1 displays conditional execution options for subgroups. In the table, [inst] represents optional
additional instructions.
In an execution set that uses two subgroups (with IFT/IFF/IFA), the following basic restrictions apply:
At most, each subgroup can include two DALU instructions and one AGU instruction.
If IFA is used, it must be the second subgroup2 in the set as written in the assembly program.
For example:
IFT inc d0 IFA dec d0
Table 6-1. Conditional Execution Options for Subgroups
Assembly Syntax
Meaning
[IFA] inst [inst]
Unconditional execution of the set
IFT inst [inst] IFF inst [inst]
Execution of subgroup1 if T==1
Execution of subgroup2 if T==0
IFT inst [inst]
Execution of the whole set if T==1
IFF inst [inst]
Execution of the whole set if T==0
IFT inst [inst] IFA inst [inst]
Execution of subgroup1 if T==1; always execute subgroup2
IFF inst [inst] IFA inst [inst]
Execution of subgroup1 if T==0; always execute subgroup2