11 CACHE CONTROLLER (CCU)
11-4
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
LRU
MUX
CMP0 CMP1 CMP2 CMP3
Entry 0
Entry 1
Entry 2
Entry 3
Frame 0
Frame 1
Frame 2
Frame 3
TAG
DATA
Address for comparison
Selection of Way
A[25:8]
A[3:2] A[1:0]
8
4
5
6
7
3 2 1 0
25
External memory address A[31:0] from SRAMC
Hit data
Way 1
Way 0
W3 W2
Line 3
W1 W0
Hit
Way 2
Way 3
WO
FO : Frame offset
LO : Line offset
WO: Word offset
BO : Byte offset
BO
A[31:26]
31
26
Area
A[5:4]
LO
A[7:6]
FO
D[31:0]
W3 W2
Line 2
W1 W0 W3 W2
Line 1
W1 W0 W3 W2
Line 0
W1 W0
Way 1
Way 0
Way 2
Way 3
3.3.1 Cache-wise Operation
Figure 11.
The following describes operation up to cache hit/mishit judgement.
1. Generates entry numbers (0–3) from address A[7:6] output by the SRAMC.
2. Reads information for four Ways from the TAG section in the selected entry. Reads word data for four Ways at
the same time from the Data section that are indicated by the line offset (A[5:4]) and the word offset (A[3:2]).
3. Compares CA[25:8] in the TAG section in each Way against A[25:8].
4. It is judged as Hit if a matching Way is found in Step 3 and at the same time data in the relevant line are valid
(cached from the external memory). At this stage, which Way is hit is determined.
If no matching Way is found in Step 3, it is judged as mishit.
For example, if Way 0 is hit at A[7:6] = 0b01, A[5:4] = 0b10 and A[3:2] = 0b11, reading/writing is performed from/
to Way 0 - Frame 1 - Line 2 - W3 in the cache memory.
Reading Operation
11.3.4
The following describes operations for cases where any data are hit or not hit in reading.
When any data is hit
The 32-bit data hit are transferred to the CPU and at the same time the LRU information of the relevant entry is
updated.
When any data is mishit
No instructions or data in the cache are transferred to the CPU.
If no data is hit, the CCU updates (refills) the replace Way (the Way accessed earliest) obtained from the current
LRU information. Refill operation takes place in units of one line (containing four words each). The CCU reads
four words including the subject instruction or data from the external memory and writes the words to the rel-
evant frame/line in the cache memory. At the same time, it transfers the subject instruction or data to the CPU
and updates LRU information. The line cached is enabled in the CCU, after which instructions/data in the same
line are read from the cache memory. Other lines within the same frame are disabled until it is refilled through
access to the relevant addresses.