English
Language : 

SH7263 Datasheet, PDF (257/1862 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperHTM RISC engine Family / SH7260 Series
Section 8 Cache
8.3.4 Write Operation (Only for Operand Cache)
(1) Write Hit
In a write access in write-back mode, the data is written to the cache and no external memory
write cycle is issued. The U bit of the entry written is set to 1 and LRU is updated so that the hit
way becomes the latest.
In write-through mode, the data is written to the cache and an external memory write cycle is
issued. The U bit of the written entry is not updated and LRU is updated so that the replaced way
becomes the latest.
(2) Write Miss
In write-back mode, an external bus cycle starts when a write miss occurs, and the entry is
updated. The way to be replaced follows table 8.4. When the U bit of the entry to be replaced is 1,
the cache update cycle starts after the entry is transferred to the write-back buffer. Data is written
to the cache, the U bit is set to 1, and the V bit is set to 1. LRU is updated so that the replaced way
becomes the latest. After the cache completes its update cycle, the write-back buffer writes the
entry back to the memory. The write-back unit is 16 bytes. Cache updates and write-backs to
memory are performed in wrap-around fashion. For example, if the value of the lower four bits of
an address that triggers a write miss is H'4, the value of the lower four address bits changes from
H'4 to H'8, H'C, and H'0, in that order, when cache updates or write-backs are performed.
In write-through mode, no write to cache occurs in a write miss; the write is only to the external
memory.
8.3.5 Write-Back Buffer (Only for Operand Cache)
When the U bit of the entry to be replaced in the write-back mode is 1, it must be written back to
the external memory. To increase performance, the entry to be replaced is first transferred to the
write-back buffer and fetching of new entries to the cache takes priority over writing back to the
external memory. After the cache completes to fetch the new entry, the write-back buffer writes
the entry back to external memory. During the write-back cycles, the cache can be accessed. The
write-back buffer can hold one line of cache data (16 bytes) and its physical address. Figure 8.3
shows the configuration of the write-back buffer.
A (31 to 4) Longword 0 Longword 1 Longword 2 Longword 3
A (31 to 4):
Physical address written to external memory (upper three bits are 0)
Longword 0 to 3: One line of cache data to be written to external memory
Figure 8.3 Write-Back Buffer Configuration
Rev. 2.00 Mar. 14, 2008 Page 223 of 1824
REJ09B0290-0200