
3-6
MPC7400 RISC Microprocessor Users Manual
Instruction Cache Organization
3.3 Instruction Cache Organization
The instruction cache also consists of 128 sets of eight blocks, as shown in Figure 3-3.
Figure 3-3. Instruction Cache Organization
Each block consists of 32 bytes, a single status bit, and an address tag. As with the data
cache, each instruction cache block contains eight contiguous words from memory that are
loaded from an eight-word boundary (that is, bits A[27:31] of the logical (effective)
addresses are zero); as a result, cache blocks are aligned with page boundaries. Also,
address bits A[20:26] provide the index to select a set, and bits A[27:29] select a word
within a block. The tags consist of bits PA[0:19]. Address translation occurs in parallel with
set selection (from A[20:26]).
The instruction cache differs from the data cache in that it does not implement a multiple
state cache coherency protocol. A single status bit indicates only whether a cache block is
valid or invalid. The instruction cache is not snooped, so if a processor modiTes a memory
location that may be contained in the instruction cache, software must ensure that such
memory updates are visible to the instruction fetching mechanism. This can be achieved
with the following instruction sequence:
dcbst
sync
icbi
sync
isync
# update memory
# wait for update
# remove (invalidate) copy in instruction cache
# wait for ICBI operation to be globally performed
# remove copy in own instruction buffer
128 Sets
Block 5
Block 6
Block 7
Block 4
Address Tag 4
Address Tag 5
Address Tag 6
Address Tag 7
Block 1
Block 2
Block 3
Block 0
Address Tag 0
Address Tag 1
Address Tag 2
Address Tag 3
Status
Status
Status
Words [0D7]
Status
Words [0D7]
Words [0D7]
Words [0D7]
Status
Status
Status
Words [0D7]
Status
Words [0D7]
Words [0D7]
Words [0D7]
8 Words/Block