Address Map
Because the address range might be updated, Efinix recommends that you always refer to the parameter name when referencing an address in firmware, not by the actual address. The parameter names and address mappings are defined in /embedded_sw/<module>/bsp/efinix/EfxSapphireSoc/include/soc.h.
| Device | Parameter | Size | Interrupt ID | Region |
|---|---|---|---|---|
| Off-chip memory | SYSTEM_DDR_BMB | 3.7 GB | – | Cache |
| AXI user master | SYSTEM_AXI_A_BMB | 256 MB | – | I/O |
| User timer 0 | SYSTEM_USER_TIMER_0_CTRL | 4 K | 19 | I/O |
| User timer 1 | SYSTEM_USER_TIMER_1_CTRL | 4 K | 20 | I/O |
| CLINT timer | SYSTEM_CLINT_CTRL | 4 K | – | I/O |
| PLIC | SYSTEM_PLIC_CTRL | 4 MB | – | I/O |
| On-chip BRAM | SYSTEM_RAM_A_BMB | 16 KB | – | Cache |
| External interrupt | – | – | [A]: 1 [B]: 2 [C]: 3 [D]: 4 [E]:
5 [F]: 6 [G]: 7 [H]: 8 [I]:
9 [J]: 10 [K]: 11 [L]:
12 [M]: 13 [N]: 14 [O]:
15 [P]: 16 [Q]: 17 [R]:
18 [S]: 19 [T]: 20 [U]:
21 [V]: 22 [W]: 23 [X]:
24 |
I/O |
volatile. The compiler recognizes this as a memory
mapped I/O register without optimizing the read/write access. An example of the
casting is shown by the following
command:*((volatile u32*) address);
For the cached regions, the burst length is equivalent to an AXI burst length of 8. For the I/O region, the burst length is equivalent to an AXI burst length of 1. The AXI user master is compatible with AXI-Lite by disconnecting unused outputs and driving a constant 1 to the input port.
The following figure shows the default address map and the corresponding software parameters for modules in the memory space.
The following figure shows the default address map and the corresponding software parameters for I/O.
The following table lists the Legacy memory map with space of up to 256 MB when the High-Performance Sapphire RV32 Legacy is selected in the Software API.
| Region | Start | End | Size |
|---|---|---|---|
| 0x000_0000 | 0x000_FFFF | 64 KB | |
| UART 0 | 0x001_0000 | 0x001_0FFF | 4 KB |
| UART 1 | 0x001_1000 | 0x001_1FFF | 4 KB |
| UART 2 | 0x001_2000 | 0x001_2FFF | 4 KB |
| 0x001_3000 | 0x001_FFFF | 52 KB | |
| I2C 0 | 0x002_0000 | 0x002_0FFF | 4 KB |
| I2C 1 | 0x002_1000 | 0x002_1FFF | 4 KB |
| I2C 2 | 0x002_2000 | 0x002_2FFF | 4 KB |
| I2C 3 | 0x002_3000 | 0x002_3FFF | 4 KB |
| I2C 4 | 0x002_4000 | 0x002_4FFF | 4 KB |
| 0x002_3000 | 0x002_FFFF | 44 KB | |
| SPI 0 | 0x003_0000 | 0x003_0FFF | 4 KB |
| SPI 1 | 0x003_1000 | 0x003_1FFF | 4 KB |
| SPI 2 | 0x003_2000 | 0x003_2FFF | 4 KB |
| 0x003_3000 | 0x003_FFFF | 52 KB | |
| GPIO 0 | 0x004_0000 | 0x004_0FFF | 4 KB |
| GPIO 1 | 0x004_1000 | 0x004_1FFF | 4 KB |
| 0x004_2000 | 0x004_FFFF | 56 KB | |
| WDT 0 | 0x005_0000 | 0x005_0FFF | 4 KB |
| 0x005_1000 | 0x00F_FFFF | 700 KB | |
| APB 0 | 0x010_0000 | 0x01F_FFFF | 1 MB |
| APB 1 | 0x020_0000 | 0x02F_FFFF | 1 MB |
| APB 2 | 0x030_0000 | 0x03F_FFFF | 1 MB |
| APB 3 | 0x040_0000 | 0x04F_FFFF | 1 MB |
| APB 4 | 0x050_0000 | 0x05F_FFFF | 1 MB |
| BRAM | 0x060_0000 | 0x06F_FFFF | 1 MB |
The following table lists the HAL memory map with space of up to 256 MB when the High-Performance Sapphire RV32 Hardware Abstraction Layer (HAL) is selected in the Software API.
| Region | Start | End | Size |
|---|---|---|---|
| BRAM | 0x000_0000 | 0x00F_FFFF | 1 MB |
| 0x010_0000 | 0x03F_FFFF | 3 MB | |
| UART 0 | 0x040_0000 | 0x040_0FFF | 4 KB |
| UART 1 | 0x040_1000 | 0x040_1FFF | 4 KB |
| UART 2 | 0x040_2000 | 0x040_2FFF | 4 KB |
| SPI 0 | 0x040_3000 | 0x040_3FFF | 4 KB |
| SPI 1 | 0x040_4000 | 0x040_4FFF | 4 KB |
| SPI 2 | 0x040_5000 | 0x040_5FFF | 4 KB |
| I2C 0 | 0x040_6000 | 0x040_6FFF | 4 KB |
| I2C 1 | 0x040_7000 | 0x040_7FFF | 4 KB |
| I2C 2 | 0x040_8000 | 0x040_8FFF | 4 KB |
| I2C 3 | 0x040_9000 | 0x040_9FFF | 4 KB |
| I2C 4 | 0x040_A000 | 0x040_AFFF | 4 KB |
| GPIO 0 | 0x040_B000 | 0x040_BFFF | 4 KB |
| GPIO 1 | 0x040_C000 | 0x040_CFFF | 4 KB |
| WDT 0 | 0x040_D000 | 0x040_DFFF | 4 KB |
| 0x040_E000 | 0x0FF_FFFF | 11 MB + 968 KB | |
| APB 0 | 0x100_0000 | 0x1FF_FFFF | 16 MB |
| APB 1 | 0x200_0000 | 0x2FF_FFFF | 16 MB |
| APB 2 | 0x300_0000 | 0x3FF_FFFF | 16 MB |
| APB 3 | 0x400_0000 | 0x4FF_FFFF | 16 MB |
| APB 4 | 0x500_0000 | 0x5FF_FFFF | 16 MB |