
TM1100 Preliminary Data Book
Philips Semiconductors
5-12
PRELIMINARY INFORMATION
File: cache.fm5, modified 7/24/99
2. LRU bits that are changed by both ports receive a val-
ue as if the algorithm were rst applied for the access
in port zero and then for the access in port one.
5.6
CACHE COHERENCY
The TM1100 hardware does not implement coherency
between the caches and main memory. Generalized co-
herency is the responsibility of software, which can use
the special operations dcb, dinvalid, and iclr to enforce
cache/memory synchronization.
5.6.1
Example 1: Data-Cache/Input-Unit
Coherency
Before the CPU commands the video-in unit to capture a
video frame, the CPU must be sure that the data cache
contains no blocks that are in the address region that the
video-in unit will use to store the input frame. If the video-
in unit performs its input function to an address region
and the data cache does hold one or more blocks from
that region, any of the following may happen:
A miss in the data cache may cause a dirty block to
be copied back to the address region being used by
the video-in unit. If the video-in unit already stored
data in the block, the write-back will corrupt the frame
data.
The CPU will read stale data from the cache instead
of from the block in main memory. Even though the
video-in unit stored new video data in the block in
main memory, the cache contents will be used
instead because it is still valid in the cache.
To prevent erroneous copybacks or the use of stale data,
the CPU must use dinvalid operations to invalidate all
blocks in the address region that will be used by the vid-
eo-in unit.
5.6.2
Example 2: Data-Cache/Output-Unit
Coherency
Before the CPU commands the video-out unit to send a
frame of video, the CPU must be sure that all the data for
the frame has been written from the data cache to the re-
gion of main memory that the video-out unit will output.
Explicit action is necessary because the data cache—
with its copyback write policy—will hold an exclusive
copy of the data until it is either replaced by the LRU al-
gorithm or the CPU explicitly forces it to be copied back
to main memory.
Before an output command is issued to the video-out
unit, the CPU must execute dcb operations to force co-
herency between cache contents and main memory.
5.6.3
Example 3: Instruction-Cache/Data-
Cache Coherency
If code prepared by a program running on the CPU must
be subsequently executed, coherency between the in-
struction and data caches must be enforced. This is ac-
complished by a two-step process:
1. Coherency between the data cache and main memo-
ry must be enforced since the instruction cache can
fetch instructions only from main memory.
2. Coherency between the instruction cache and main
memory is enforced by executing an iclr operation.
The CPU will now be able to fetch and execute the new
instructions.
5.6.4
Example 4: Instruction-Cache/Input-
Unit Coherency
When an input unit is used to load program code into
main memory, the iclr operation must be issued before
attempting to execute the new code.