Appendix G Prefetching Of Instructions And Its Side Effects - Hitachi SH7750 Hardware Manual

Sh7750 series superh risc engine
Hide thumbs Also See for SH7750:
Table of Contents

Advertisement

Appendix G Prefetching of Instructions and its Side Effects

The SH7750 series incorporates an on-chip buffer for holding instructions that have been read
ahead of their execution (prefetching of instructions). Therefore, do not allocate programs to
memory in such a way that instructions are in the last 20 bytes of any memory space. If a program
is allocated in such a way, the prefetching of instructions may lead to a bus access for reading an
instruction from beyond the memory space. The following shows a case in which such bus access
is a problem.
Address
H'03FFFFF8
H'03FFFFFA
H'03FFFFFC
Area 0
H'03FFFFFE
Area 1
H'04000000
H'04000002
Figure G.1 depicts a case in which the instruction (ADD) indicated by the program counter and the
instruction at the address H'04000002 are fetched simultaneously. The program is assumed to
branch to a region other than area 1 after the subsequent JMP instruction and delay slot instruction
have been executed.
In this case, a bus access to area 1 (instruction prefetch), which is not visible in the program flow,
may occur.
1. Side effects of the prefetching of instructions
a. An external bus access caused by an instruction prefetch may cause malfunctions in
external devices, such as FIFOs, that are connected to the region accessed.
b. If no device responds to an external bus request that is triggered by an instruction prefetch,
execution may hang.
2. Methods of preventing the invalid prefetching of instructions
a. Use an MMU.
b. Do not allocate programs so that they run into the last 20-byte region of any memory space.
.
.
.
.
.
.
ADD R1,R4
JMP @R2
NOP
NOP
Figure G.1 Instruction Prefetch
PC (Program counter)
Address of instruction for prefetching
Rev. 6.0, 07/02, page 977 of 986

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sh7750rSh7750s

Table of Contents