Professional Documents
Culture Documents
CPLB management
What is CPLB ?
CPLB:
Cache:
collection
of data duplicating original values stored elsewhere or computed earlier, where the original data is expensive (usually in terms of access time) to fetch or compute relative to reading the cache
Cache
Direct mapped cache 2-way cache
Instruction Cache
Bank
Only
sub-bank is 4k bytes. One bank has 4 sub-banks. Needs 2-bits to identify each sub-bank.
4-way
Each
cache
sub-bank is organized as 4-way cache. Each way is 1K bytes. Each way is independent with each other. Each way has 32 lines, needs 5-bits to identify. Each lines has 64 words. These words are continuous in memory.
Data Cache
Bank
Each
bank is 16K bytes size. May set one or two banks as data cache.
Half-bank
Each
sub-bank is 4k bytes. Each sub-bank is organized as 2-way cache. Each way is independent with each other.
cache
bank can be configured as one 16k bytes, 2-way cache. Bank A and bank B can be set as two 16k bytes, 2-way cache at the same time, A[23] selects the cache. Each bank serves an alternating 8M byte blocks of memory.
Only
when two banks are set as cache and DCBS=0. A[14] selects cache. Each bank serves an alternating 16K byte blocks of memory. Two blocks of memory are continuous.
I-Cache Operations
Hits
and Misses
Address
for an instruction request from the core does or not match a valid entry in the cache.
Line
Fills
Fetching
32 bytes from memory. 4x64 bits from line buffer, 8x32 bits from EAB.
Line
Replacement
First
check invalid entries. Priority: Way0,Way1,Way2,Way3. LRU (least recently used) algorithm when no invalid entries.
D-Cache Operations
Cache
status
Invalid. Exclusive
method
Write-through
: write to external memory upon write to cache Write-back: write to external memory when replace or load the line
Data
cache flush
the specified cache line with external memory.
Synchronize
Data
cache invalidation
Case
on page management. Consists of CPLB descriptors. One descriptor, one page. Total 16 ICPLB and 16 DCPLB descriptors.
I-CPLB
Total
descriptor
descriptor
attributes
configured in ICPLB_DATA and DCPLB_DATA Page size: 1K, 4K, 1M, 4M bytes. Page cacheable or non-cacheable. Write-through or write-back when cacheable. Dirty or modified. Super and user write access permission. User read access permission. Entry data valid or invalid. Lock (no permit replacement).
Address
Every
comparing
CPLB management
Hardware
Address
compare. Trigger exception when no valid CPLB descriptor. Writes exception trigger source in register SEQSTAT. Writes faulting address in ICPLB_FAULT_ADDR or DCPLB_FAULT_ADDR. Place CPU into supervisor mode. Place PC to vector of exception.
Software
Check
exception trigger source. Data CPLB protection violation Data access multiple CPLB hits Data access CPLB miss Instruction CPLB protection violation Instruction access multiple CPLB hits Instruction access CPLB miss
Critical Registers
DMEM_CONTROL
ICPLB_DATAx
ICPLB_ADDRx DCPLB_DATAx DCPLB_ADDRx ICPLB_STATUS DCPLB_STATUS DCPLB_FAULT_ADDR ICPLB_FAULT_ADDR
15
Page size: 4M bytes Cacheable User read access permission for Instruction User read, write and super write access permission for data For data, write back or write through. For data, cache line read and write permission CPLB valid Lock Dirty for data, replacement permission
Generic
16
Data
17
19
Blackfin Kernel
L1 Memory
Instruction
Page size: 1M bytes User read permission Lock CPLB valid Non-cacheable
Data
Page size: 4M bytes User read and write permission Super write permission CPLB valid Non-cacheable
20