HD6417320 RENESAS [Renesas Technology Corp], HD6417320 Datasheet - Page 151

no-image

HD6417320

Manufacturer Part Number
HD6417320
Description
Renesas 32-Bit RISC Microcomputer SuperHTM RISC engine Family / SH7700 Series
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet
3.3
3.3.1
In DSP mode, a specific function is provided to execute repeat loops efficiently. By using this
function, loop programs can be executed without overhead caused by the compare and branch
instructions.
(1)
Examples of repeat loop programs are shown below.
• Example 1: Repeat loop consisting of 4 or more instructions
In the above program example, instructions from the RptStart address (instr1 instruction) to the
RptEnd address (instrN instruction) are repeated four times. These repeated instructions in the
program are called repeat loop. The start and end instructions of the repeat loop are called the
repeat start instruction and repeat end instruction, respectively. The CPU sequentially executes
instructions and starts repeat loop control if the CPU detects the completion of a specific
instruction. This specific instruction is called the repeat detection instruction. In a repeat loop
consisting of four or more instructions, an instruction three instructions prior to the repeat end
instruction is regarded as the repeat detection instruction. In a repeat loop consisting of four or
RptStart: instr1
RptDtct:
RptEnd2:
RptEnd1:
RptEnd:
Examples of Repeat Loop Programs
CPU Extended Instructions
DSP Repeat Control
LDRS RptStart
LDRE RptDtct +4
SETRC #4
Instr0
... ...
... ...
instr(N-3)
instr(N-2)
instr(N-1)
instrN
;Three instruction prior to the repeat
; Sets repeat start instruction address
to the RS register
; Sets the number of repetitions (4) to
the RC[11:0] bits of the SR register
; At least one instruction is required
from SETRC instruction to [Repeat start
instruction]
; [Repeat start instruction]
;
;
end instruction is regarded as repeat
detection instruction
;
;
; [Repeat end instruction]
; Sets (repeat detection instruction
address + 4) to the RE register
Rev. 3.00 Jan. 18, 2008 Page 89 of 1458
Section 3 DSP Operating Unit
REJ09B0033-0300

Related parts for HD6417320