
5-6
SC140 DSP Core Reference Manual
Program Control
ADD
SUB
Compare
Shift
Test
5.1.3.2 Data Moves
Most of the data move instructions take one cycle to execute, assuming a zero wait-state memory. The
exception is for the addressing modes requiring an arithmetic calculation of a new address: (Rn + N0), (Rn
+ Rm), (Rn + x), (Rn + xxxx), (SP – xx) and (SP + xxxx). These addressing modes require one additional
clock cycle to calculate the address of the memory access. All the other versions of data moves are one
cycle, including the versions for byte, word, two-word, long-word, four-word, and two long-word
operands (signed or unsigned). Transfers can be between memory and register, or between registers.
5.1.3.3 Change-of-Flow Timing
The timing of the change-of-flow instructions is usually most affected by the access time to memory as
well as the number of stages in the architecture pipeline. The SC140 core implements a five-stage pipeline
with two stages dedicated to memory access. This results in the addition of two clock cycles for
unconditional change-of-flow instructions that use immediate values as well as the addition of three clock
cycles for the PC-relative change-of-flow instructions. Conditional change-of-flow instructions, where the
condition is true (meaning the change-of-flow operation is taken), always take an additional three cycles.
When a conditional change-of-flow is determined as not taken (meaning the condition is false), there are
no additional cycles.
The core implements a mechanism for fast call-return from subroutine. This mechanism includes a single-
level cache register (RAS) to keep the last return address from a subroutine. Refer to
Section 5.3.4, “Fast
Call-Return from Subroutines,”
for a more detailed description of the fast call-return mechanism.
5.1.3.4 Delayed Change-of-Flow Timing
When a change-of-flow instruction is executed, the core must wait for the pipeline to fill, starting with a
new pre-fetch from memory. The cycles lost during this wait are referred to as delay slots. Since it is
possible to use the delay slots of the change-of-flow operation to continue the execution of the previously
fetched instructions, special delayed instructions are added to the instruction set. These instructions use
part or all of the delay cycles to execute one additional execution set. This effectively reduces the penalty
for utilizing a change-of-flow operation. If the additional execution set in the delay slot is included in the
cycle count, the number of cycles for the change-of-flow instruction are effectively reduced. Refer to
Section 6.3.2, “Change-of-Flow Instruction Timing,”
on page 6-9, for further details.
5.1.3.5 Bit Mask Instruction Timing
The SC140 core includes various instructions for bit mask operations. These instructions are helpful when
several bits need to be changed or tested at the same time. The bit mask instructions include the following:
Bit mask set (BMSET)
Bit mask clear (BMCLR)
Bit mask change (BMCHG)