
8. Caches
Rev.1.00 Jan. 10, 2008 Page 224 of 1658
REJ09B0261-0100
8.3.3
Write Operation
When the Operand Cache (OC) is enabled (OCE = 1 in CCR) and data is written to a cacheable
area, the cache operates as follows:
1. The tag, V bit, U bit, and LRU bits on each way are read from the cache line indexed by virtual
address bits [12:5].
2. The tag, read from each way, is compared with bits [28:10] of the physical address resulting
from virtual address translation by the MMU:
⎯
If there is a way whose tag matches and its V bit is 1, see No. 3 for copy-back and No. 4
for write-through.
⎯
I If there is no way whose tag matches and its V bit is 1 and the U bit of the way which is
selected to replace using the LRU bits is 0, see No. 5 for copy-back and No. 7 for write-
through.
⎯
If there is no way whose tag matches and its V bit is 1 and the U bit of the way which is
selected to replace using the LRU bits is 1, see No. 6 for copy-back and No. 7 for write-
through.
3. Cache hit (copy-back)
A data write in accordance with the access size is performed for the data field on the hit way
which is indexed by virtual address bits [4:0]. Then 1 is written to the U bit. The LRU bits are
updated to indicate the way is the latest one.
4. Cache hit (write-through)
A data write in accordance with the access size is performed for the data field on the hit way
which is indexed by virtual address bits [4:0]. A write is also performed to external memory
corresponding to the virtual address. Then the LRU bits are updated to indicate the way is the
latest one. In this case, the U bit isn't updated.
5. Cache miss (copy-back, no write-back)
A data write in accordance with the access size is performed for the data field on the hit way
which is indexed by virtual address bits [4:0]. Then, the data, excluding the cache-missed data
which is written already, is read into the cache line on the way which is selected to replace
from the physical address space corresponding to the virtual address.
Data reading is performed, using the wraparound method, in order from the quad-word data (8
bytes) including the cache-missed data. While the remaining data on the cache line is being
read, the CPU can execute the next processing. When reading of one line of data is completed,
the tag corresponding to the physical address is recorded in the cache, 1 is written to the V bit
and the U bit on the way. Then the LRU bit is updated to indicate the way is latest one.
Содержание SH7781
Страница 4: ...Rev 1 00 Jan 10 2008 Page iv of xxx REJ09B0261 0100 ...
Страница 74: ...2 Programming Model Rev 1 00 Jan 10 2008 Page 44 of 1658 REJ09B0261 0100 ...
Страница 272: ...8 Caches Rev 1 00 Jan 10 2008 Page 242 of 1658 REJ09B0261 0100 ...
Страница 376: ...10 Interrupt Controller INTC Rev 1 00 Jan 10 2008 Page 346 of 1658 REJ09B0261 0100 ...
Страница 694: ...13 PCI Controller PCIC Rev 1 00 Jan 10 2008 Page 664 of 1658 REJ09B0261 0100 ...
Страница 762: ...14 Direct Memory Access Controller DMAC Rev 1 00 Jan 10 2008 Page 732 of 1658 REJ09B0261 0100 ...
Страница 788: ...15 Clock Pulse Generator CPG Rev 1 00 Jan 10 2008 Page 758 of 1658 REJ09B0261 0100 ...
Страница 828: ...17 Power Down Mode Rev 1 00 Jan 10 2008 Page 798 of 1658 REJ09B0261 0100 ...
Страница 846: ...18 Timer Unit TMU Rev 1 00 Jan 10 2008 Page 816 of 1658 REJ09B0261 0100 ...
Страница 1292: ...24 Multimedia Card Interface MMCIF Rev 1 00 Jan 10 2008 Page 1262 of 1658 REJ09B0261 0100 ...
Страница 1326: ...25 Audio Codec Interface HAC Rev 1 00 Jan 10 2008 Page 1296 of 1658 REJ09B0261 0100 ...
Страница 1482: ...28 General Purpose I O Ports GPIO Rev 1 00 Jan 10 2008 Page 1452 of 1658 REJ09B0261 0100 ...
Страница 1538: ...30 User Debugging Interface H UDI Rev 1 00 Jan 10 2008 Page 1508 of 1658 REJ09B0261 0100 ...
Страница 1688: ...Appendix Rev 1 00 Jan 10 2008 Page 1658 of 1658 REJ09B0261 0100 ...
Страница 1691: ......
Страница 1692: ...SH7785 Hardware Manual ...