
MOTOROLA
Chapter 3. Instruction and Data Cache Operation
3-11
Note that for accesses performed with direct address translation (MSR[IR] = 0 or
MSR[DR] = 0 for instruction or data access, respectively), the WIMG bits are automatically
generated as 0b0011 (the data is write-back, caching is enabled, memory coherency is
enforced, and memory is guarded).
3.5.1 Write-Through Attribute (W)
When an access is designated as write-through (W = 1), if the data is in the cache, a store
operation updates the cached copy of the data. In addition, the update is written to the
external memory location (as described below).
While the PowerPC architecture permits multiple store instructions to be combined for
write-through accesses except when the store instructions are separated by a
sync
or
eieio
instruction, the 603e does not implement this “combined store” capability. Note that a store
operation that uses the write-through attribute may cause any part of valid data in the cache
to be written back to main memory.
The definition of the external memory location to be written to in addition to the on-chip
cache depends on the implementation of the memory system but can be illustrated by the
following examples:
RAM—The store is sent to the RAM controller to be written into the target RAM.
I/O device—The store is sent to the memory-mapped I/O control hardware to be
written to the target register or memory location.
In systems with multilevel caching, the store must be written to at least a depth in the
memory hierarchy that is seen by all processors and devices.
Accesses that correspond to W = 0 are considered write-back. For this case, although the
store operation is performed to the cache, it is only made to external memory when a copy-
back operation is required. Use of the write-back mode (W = 0) can improve overall
performance for areas of the memory space that are seldom referenced by other masters in
the system.
3.5.2 Caching-Inhibited Attribute (I)
If I = 1, the memory access is completed by referencing the location in main memory,
bypassing the on-chip cache. During the access, the addressed location is not loaded into
the cache nor is the location allocated in the cache. It is considered a programming error if
a copy of the target location of an access to caching-inhibited memory is resident in the
cache. Software must ensure that the location has not been previously loaded into the cache,
or, if it has, that it has been flushed from the cache.
The PowerPC architecture permits data accesses from more than one instruction to be
combined for cache-inhibited operations, except when the accesses are separated by a
sync
instruction, or by an
eieio
instruction when the page or block is also designated as guarded.