
MOTOROLA
5-8
INSTRUCTION CACHE
For More Information On This Product,
Go to: www.freescale.com
RCPU
REFERENCE MANUAL
This command is not privileged and has no error cases that the user needs to
check.
The I-cache performs this instruction in one clock cycle. In order to calculate the
latency of this instruction accurately, bus latency should be taken into account.
5.4.2 Invalidate All
To invalidate the whole cache, set the
invalidate all
command in the ICCST. This
command has no error cases that the user needs to check.
When the command is invoked, if MSR[PR] = 0, all valid lines in the cache, except
lines that are locked, are made invalid. As a result of this command, the LRU of all
lines points to an unlocked way or to way zero if both lines are not locked. This last
feature is useful in order to initialize the I-cache out of reset.
The I-cache performs this instruction in one clock cycle. In order to calculate the
latency of this instruction accurately, bus latency should be taken into account.
5.4.3 Load and Lock
The
load & lock
operation is used to lock critical code segments in the cache. The
load & lock
operation is performed on a single cache line. After a line is locked it
operates as a regular instruction SRAM; it will not be replaced during future misses
and will not be affected by invalidate commands.
The following sequence loads and locks one line:
1. Read error type bits in the ICCST in order to clear them
2. Write the address of the line to be locked to the ICADR
3. Set the
load & lock
command in the ICCST
4. Issue the
isync
instruction
5. Return to step 2 to load and lock more lines
6. Read the error type bits in the
ICCST to determine whether the operation
completed properly
After the
load & lock
command is written to the ICCST, the cache checks if the line
containing the byte addressed by the ICADR is in the cache. If it is, the line is
locked and the command terminates with no exception. If the line is not in the
cache a regular miss sequence is initiated. After the whole line is placed in the
cache the line is locked.
The user needs to check the error type bits in the ICCST to determine if the oper-
ation completed properly or not. The
load & lock
command can generate two er-
rors:
Type 1 — bus error in one of the cycles that fetches the line
Type 2 — no place to lock. It is the responsibility of the user to make sure that
there is at least one unlocked way in the appropriate set.
F
Freescale Semiconductor, Inc.
n
.