GD32W51x User Manual
121
Paired master feature insure that the processor have a backup method to fetch from
different memory.
It is feasible to separate the traffic to internal flash and the traffic to
internal SRAM (if it is remapped), so as to decrease the processor stalls when ICACHE
is not on hit.
4.3.3.
ICACHE TAG memory
The ICACHE TAG memory includes valid bits and address tags that indicate which data
are contained in the cache data memory
For each cache line
,
there is one corresponding valid bit, which is set while the cache
line is refilled. Valid bit is reset in several cases, for example, reset ICACHE, disable
cache and execute ICACHE invalidate operation.
When input execution port receive cacheable transaction, its AHB address
(AHB_ADDR_in, 32bit) is composed of Bits [3:0], Bits [13:4] and Bits [31:14]. Bits [3:0] is
address byte offset, Bits [13:4] is address cache line index and Bits [31:14] is tag address.
AHB address indicate the byte offset inside a cache line and cache line index inside a
way, furthermore, check if the requested data is valid in cache.
ICACHE main parameters of TAG memory for default 2-way set associative is shown in
Table 4-1. TAG memory parameters.
Table 4-1. TAG memory parameters
Param eter
Value
Cache size
32KB
Cache w ays number
2
Cache line size
128-bit
Cache lines number
1024 per w ay
Address byte offset size
4-bit
Address w ay index size
10-bit
TAG address size
18-bit
4.3.4.
Address remapping
For external memory regions, it is meaningful to define an aliased address on which the
address remapping apply, and transformed to the destination external physical address.
The essence of remapping mechanism is mapping between input AHB address and
specified code region base address.
If AHB_ADDR_in[31:RS] equals to 000:BADDR[28:RS], AHB_ADDR_in belongs to
region x. BADDR is the code sub-region base address, which is defined in the BADDR
field of ICACHE_CFGx. RS defines the number of available bits, it equals to log2(region
size), the minimum is 21, corresponding region size is 2MB, the maximum is 27,
corresponding region size is 128MB.
In case that region x is enabled, the master port output AHB address (AHB_ADDR_out )