Memory map¶
Multiple memory areas are used in the system, this includes both register areas for IP cores and shared memory:
Base |
Size |
Name |
0x6000_0000 |
128 MiB |
RPU FW area |
0x6800_0000 |
384 MiB |
NVMe ramdisk |
0xA000_0000 |
64 KiB |
PCIe DMA IP |
0xA001_0000 |
64 KiB |
NVMe IP |
0xB000_0000 |
4 KiB |
VTA Fetch IP |
0xB000_1000 |
4 KiB |
VTA Load IP |
0xB000_2000 |
4 KiB |
VTA Compute IP |
0xB000_3000 |
4 KiB |
VTA Store IP |
PCIe and NVMe Cores¶
Location of PCIe and NVMe cores in memory map is set in Vivado design located in alkali-csd-hw/tree/main/vivado. After making changes to their addresses you need to adjust nvme.overlay for RPU firmware to contain correct base addresses.
VTA Cores¶
Location of VTA cores in memory map is set in Vivado design located in alkali-csd-hw/tree/main/vivado.
After making changes to their addresses you need to adjust vta_params.hpp file used by the apu-app
to contain correct base addresses.
Ramdisk area¶
Ramdisk is also located in the main memory and is shared between Linux on the APU and Zephyr on the RPU.
For RPU it is defined in nvme.overlay as sram1
.
In APU case it is declared in zynqmp-basalt-nvme.dts
as part of reserved-memory
and you need to adjust alkali-csd-fw/blob/main/apu-app/src/lba.h in apu-app
when changing ramdisk location in Zephyr.
To access a particular page you need to first calculate it’s offset with (lba * RAMDISK_PAGE) + RAMDISK_BASE
and then either use that address directly (in case of RPU) or MMAP it (on APU).
Note
Accessing ramdisk area from the BPF code is achieved with help of Use local storage as accelerator input
and Use local storage as accelerator output
commands.
Those commands take LBA value to calculate correct offset, MMAP it and then pass it as a pointer to your main BPF function.