Purge Of Specific Lines - Hitachi SH7095 Hardware User Manual

Table of Contents

Advertisement

MOV.W #H'FE92, R1
MOV.B @R1, R0;
AND
#H'FE, R0 ;
MOV.B #R0, @R1
OR
#H'10, R0
MOV.B R0, @R1;
OR
#H'01, R0
MOV.B R0, R1 ;
8.5.2

Purge of Specific Lines

Since the SH7095 has no snoop function (for monitoring data rewrites), 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 of the CCR to 1. However, it is efficient to purge only specific lines if only
limited number of entries are be purged.
An associative purge is used to purge specific lines. Since cache lines are 16 bytes, 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 of
the specified address is not fetched to the cache, so no purge occurs.
Example: 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)
216 Hitachi
Cache disable
;
Cache purge
Cache enable
Figure 8.12 Cache Initialization
Figure 8.13 Purging Specific Addresses

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents