Section 8 Cache
Rev. 2.00 Mar 09, 2006 page 372 of 906
REJ09B0292-0200
8.5.2
Purge of Specific Lines
There is no snoop function (for monitoring data rewrites), so specific lines of cache must be
purged when the contents of cache memory and external memory differ as a result of an operation.
For instance, when a DMA transfer is performed to the cache area, cache lines corresponding to
the rewritten address area must be purged. All entries of the cache can be purged by setting the CP
bit in CCR to 1. However, it is efficient to purge only specific lines if only a limited number of
entries are to be purged.
An associative purge is used to purge specific lines. Since cache lines are 16 bytes long, purges are
performed in a 16-byte units. The four ways are checked simultaneously, and only lines holding
data corresponding to specified addresses are purged. When addresses do not match, the data at
the specified address is not fetched to the cache, so no purge occurs.
;
Purging 32 bytes from address R3
MOV.L #H'40000000, R0
XOR R1, R1
MOV.L R1, @(R0, R3)
ADD #16, R3
MOV.L R1, @(R0, R3)
Figure 8.15 Purging Specific Addresses
When it is troublesome to purge the cache after every DMA transfer, it is recommended that the
OD bit in CCR be set to 1 in advance. When the OD bit is 1, the cache operates as cache memory
only for instructions. However, when data is already fetched into cache memory, specific lines of
cache memory must be purged for DMA transfers.
8.5.3
Cache Data Coherency
The cache memory does not have a snoop function. This means that when data is shared with a
bus master other than the CPU, software must be used to ensure the coherency of data. For this
purpose, the cache-through area can be used, or a cache purge can be performed with program
logic using write-through.
When the cache-through area is to be used, the data shared by the bus masters is placed in the
cache-through area. This makes it easy to maintain data coherency, since access of the cache-
through area does not fetch data into the cache. When the shared data is accessed repeatedly and
the frequency of data rewrites is low, a lower access speed can adversely affect performance.
Summary of Contents for SH7616
Page 10: ...Rev 2 00 Mar 09 2006 page x of xxvi ...
Page 132: ...Section 2 CPU Rev 2 00 Mar 09 2006 page 106 of 906 REJ09B0292 0200 ...
Page 568: ...Section 12 16 Bit Free Running Timer FRT Rev 2 00 Mar 09 2006 page 542 of 906 REJ09B0292 0200 ...
Page 582: ...Section 13 Watchdog Timer WDT Rev 2 00 Mar 09 2006 page 556 of 906 REJ09B0292 0200 ...
Page 706: ...Section 16 Serial I O SIO Rev 2 00 Mar 09 2006 page 680 of 906 REJ09B0292 0200 ...
Page 820: ...Section 19 Pin Function Controller PFC Rev 2 00 Mar 09 2006 page 794 of 906 REJ09B0292 0200 ...
Page 932: ...Appendix D Package Dimensions Rev 2 00 Mar 09 2006 page 906 of 906 REJ09B0292 0200 ...
Page 935: ...SH7616 Hardware Manual ...