
S3C3410X RISC MICROPROCESSOR
UNIFIED CACHE & INTERNAL SRAM
5-1
5
UNIFIED CACHE & INTERNAL SRAM
OVERVIEW
The S3C3410X has internal 4K-byte unified (Instruction/Data) cache. The cache architecture is based on two-
way set associative and use the LRU(Least Recently Used) as cache replacement policy. To maintain the data
coherence between main memory and cache, the cache controller should write the data into the main memory
whenever the CPU update the data in cache memory. Because the cache line size is 4 word, there should be four
word of memory fetch from main memory when cache miss happens. The cost-effective cache architecture can
maintain the good hit ratio by investing the reasonable H/W inside the chip.
The performance difference between cache-on and cache-off is dramatically big. When cache is off, there is
always instruction fetch from main memory. If we assume it takes 4 cycles for instruction fetch from main
memory, the CPU performance will be dropped to 25% of the case of 10% cache hit due to the only instruction
fetch from external memory. The 100% cache hit means that the CPU can fetch the instruction from memory
within one cycle, i.e., zero wait. Usually, the user should turn on the cache to get the higher performance. But, if
user does not want higher performance, the cache can be turn off to reduce the power consumption. If you turn
the cache off and do not use the internal memory as SRAM, the power consumption will be reduced by 40%.
The S3C3410X can support the optional cache configuration. Internal 4KB memory can be configured as 4KB
cache memory, 2KB Cache/2KB SRAM, or 4KB SRAM. Users can select these options suitable for their
application.
The caching area of external memory can be determined to non-cache region by having the configuration. When
the CPU access the non-cacheable region, these data should not be cached. Usually, the program and data area
should be in cacheable region to get higher performance. But, the control-purposed data, for example, the data
handling by DMA, should be in non-cacheable region. If the control data is in the cacheable region, if some of
these data are cached into the cache memory, and if DMA update the data in the external memory of cacheable
region, we can not guarantee the data coherence between data in cache memory and in external memory.
Summarizing, users should always be aware of the memory allocation for non-cacheable and cacheable region.
The S3C3410X can support the 128MB addressing range and it means that the internal address A[26:0] are only
effective even if the CPU can generate the A[31:0] of the internal address. If the S/W generate the address
beyond this range, the cache controller and the memory controller will treat this address as special case. The
reality is as follow. The cache controller accepts the address of A[27:0] and determine whether this access should
be cached, or not when A[27]=0. In other word, the access should be cached if the A[26:0] is corresponding to the
cacheable region and should not be cached if the A[26:0] is corresponding to the non-cacheable region. If A[27] =
1, the cache controller treat this access as non-cacheable access even if the A[26:0] is corresponding to
cacheable or non-cacheable region. When A[27]=1 and the A[26:0] is corresponding to the cacheable region, the
cache controller should treat this access as non-cacheable access and the memory controller should execute the
memory access by using A[26:0] address. The cache controller discard the address of A[31:28] and the memory
controller also discard the address of A[31:27].