5- 8
MC68349 USER’S MANUAL
MOTOROLA
63
TAG
OFFSET
ADDRESS
31
87
2
TAG
0
1
2
3 SET/BANK
OR
MUX
INSTRUCTION
HIT
0
1
2
3
COMPARATOR
0
UPPER
WORD
LOWER
WORD
VU VL
Figure 5-4. Instruction Cache
When a cache miss occurs, the instruction must be fetched from external memory across
the IMB. A cache miss requires at least two clocks and is dependent on the speed of the
external memory as well as IMB mastership at the time the cache miss occurs. If the
CPU32+ has mastership of the IMB when a miss occurs, the instruction is fetched from
external memory in (2+n) clocks, where n equals the number of wait states. If the CPU32+
does not have mastership of the IMB when a miss occurs, the instruction is fetched from
external memory in (2+n+m) clocks, where m equals the number of clock cycles until the
CPU32+ obtains mastership of the IMB. If the alternate bus master (DMA controller) is
idle, then access times to the cache, QDMM, and 2-clock external memory are all 2
clocks. The performance benefits of the cache are more evident for slower external
memory and/or high utilization of the IMB bandwidth by DMA activity.
For long-word instruction fetches, both words in the cache line are loaded and the two
valid bits are set to flag the entire line as valid. Word accesses to 16-bit memory are
stored into the word selected by address bit A1 of the fetch address; the other word in the
line is invalidated unless the tag is not being changed (i.e., the cache line is being filled
out). When a word fetch to a 32-bit memory port occurs, the cache controller uses the
entire 32 bits from the IMB data bus to update both words in the cache line, requiring 32-
bit external memory to always respond to a word instruction access with valid data for the
full 32-bit port width (when at least one block of the CIC is configured as cache and
enabled). Data accesses only require valid data for the bytes specifically requested.
Following a cache miss, the cache controller updates the cache with the new information
in parallel with the bus access to fetch the required instruction(s) from main memory. Note
that the cache does not allocate on instruction fetches from the QDMM, since accesses to
the QDMM and the cache both take two clocks. For QDMM accesses, the instructions are