5 cache operation instruction, 1 coherency between cache and external memory – Renesas SH7781 User Manual

Page 259

Advertising
background image

8. Caches

Rev.1.00 Jan. 10, 2008 Page 229 of 1658

REJ09B0261-0100

8.5

Cache Operation Instruction

8.5.1

Coherency between Cache and External Memory

(1)

Cache Operation Instruction

Coherency between cache and external memory should be assured by software. In this LSI, the
following six instructions are supported for cache operations. Details of these instructions are
given in section 11, Instruction Descriptions of the SH-4A Extended Functions Software Manual.

• Operand cache invalidate instruction: OCBI @Rn

Operand cache invalidation (no write-back)

• Operand cache purge instruction: OCBP @Rn

Operand cache invalidation (with write-back)

• Operand cache write-back instruction: OCBWB @Rn

Operand cache write-back

• Operand cache allocate instruction: MOVCA.L R0,@Rn

Operand cache allocation

• Instruction cache invalidate instruction: ICBI @Rn

Instruction cache invalidation

• Operand access synchronization instruction: SYNCO

Wait for data transfer completion

(2)

Coherency Control

The operand cache can receive "PURGE" and "FLUSH" transaction from SuperHyway bus to
control the cache coherency. Since the address used by the PURGE and FLUSH transaction is a
physical address, do not use the 1 Kbyte page size to avoid cache synonym problem in MMU
enable mode.

• PURGE transaction

When the operand cache is enabled, the PURGE transaction checks the operand cache and
invalidates the hit entry. If the invalidated entry is dirty, the data is written back to the external
memory. If the transaction is not hit to the cache, it is no-operation.

Advertising