The 4K boundary in AXI primarily relates to its address mapping granularity, signifying the smallest unit of address space that can be assigned to a specific peripheral or slave device.
Understanding AXI Address Mapping Granularity
Based on the provided reference, the granularity of mapping in AXI is 4KB. This means:
- Smallest Address Block: The smallest "block" of addresses that can be assigned to a given slave/peripheral is 4K. You cannot assign a block of addresses smaller than 4KB to a distinct slave device in the AXI system's address map.
- Allocation Multiples: All address space allocations for slaves are done in multiples of 4KB. You might allocate 4KB, 8KB, 12KB, 1MB (which is 256 * 4KB), and so on, but never, for example, 3KB or 5KB to a single slave's dedicated address range.
Significance of the 4K Boundary
The 4K boundary is significant because when you cross a 4K boundary you are potentially going from slave A's address space to slave B's.
Imagine the total address space managed by the AXI interconnect. This space is logically divided into 4KB chunks. Each 4KB chunk (or multiple chunks) is allocated to a specific slave device.
Address Range (Example) | Assigned Slave | Notes |
---|---|---|
0x0000 - 0x0FFF (4KB) | Slave A | 1st 4KB block |
0x1000 - 0x1FFF (4KB) | Slave A | 2nd 4KB block |
0x2000 - 0x2FFF (4KB) | Slave B | New slave assignment |
0x3000 - 0x3FFF (4KB) | Slave C | New slave assignment |
If an AXI transaction (like a read or write) starts at address 0x0F00 and needs to access data spanning into 0x1000, it crosses the first 4KB boundary (0x0FFF to 0x1000). In the example table above, both addresses belong to Slave A, so it's okay. However, if a transaction starts at 0x1F00 and goes into 0x2000, it crosses the 4KB boundary between 0x1FFF and 0x2000. At this point, the AXI interconnect must potentially switch from directing the transaction to Slave A (addresses up to 0x1FFF) to directing it to Slave B (addresses starting from 0x2000).
This 4KB granularity simplifies the address decoding logic within the AXI interconnect. The interconnect only needs to check the upper bits of the address (specifically, the bits above the lower 12 bits, since 2^12 = 4096 = 4KB) to determine which 4KB block is being accessed and, consequently, which slave owns that block.
In summary, the 4K boundary in AXI exists because it is the fundamental unit for assigning address blocks to peripherals, simplifying address decoding and ensuring that crossing this boundary might require the AXI interconnect to route the transaction to a different slave device.