
Introduction
11
Instruction Cache
SPRU630C
TMS320VC5501/5502 DSP External Memory Interface (EMIF)
Reference
Guide ( literature number SPRU621).
Since data from the EMIF passes through the IPORT to get to the I
−
cache, the
IPORT must be properly enabled to allow proper cache operation. The IPORTI
bit in the Idle Control Register (ICR) controls whether the IPORT is enabled
or disabled after an idle instruction. The IPORT is enabled by default after
reset. The IPORT should not be disabled while the cache is in use. For detailed
information about the ICR, see the data manual for the DSP being used.
Note:
The I-Cache does not automatically maintain coherency. If you write to a
location in program memory, the corresponding line in the I-Cache is not
updated. To regain coherency you must flush the I-Cache as described in
section 2.2 (page 16).
1.1
2-Way Cache
As shown in Figure 2, the 2-way cache has two memory banks. Each memory
bank has the same parts:
-
Data array. Each data array contains 512 lines (0 through 511) that the
I-Cache can fill one by one in response to misses in the 2-way cache.
-
Line valid (LV) bit array. Each line has a line valid bit. Once a line has been
loaded, its line valid bit is set. Whenever the I-Cache is flushed, all 512 line
valid bits are cleared, invalidating all the lines. For more information on
flushing the I-Cache, see section 2.2 on page 16.
-
Tag array. Each line has a tag field. When the I-Cache receives a 24-bit
fetch address from the CPU, the I-Cache interprets bits 23
−
13 as a tag.
When a line gets filled, the associated tag is stored in the tag field for that
line.
Across the two memory banks, every two lines with the same number belong
to one set. For example, line 0 of memory bank 1 and line 0 of memory bank
2 belong to set 0. When the I-Cache receives a fetch address, the I-Cache
finds the set number in bits 12
−
4. If the I-Cache must replace one of the lines
in the set, it uses a least-recently used (LRU) algorithm: The line replaced is
the one that has been unused for the longest time. Each set has an LRU bit
that is toggled to indicate which line should be replaced.
Summary of Contents for TMS320VC5501
Page 1: ...TMS320VC5501 5502 DSP Instruction Cache Reference Guide SPRU630C June 2004 ...
Page 6: ...6 Instruction Cache SPRU630C This page is intentionally left blank ...
Page 26: ...Instruction Cache 26 SPRU630C This page is intentionally left blank ...
Page 28: ...Instruction Cache 28 SPRU630C This page is intentionally left blank ...