AXI simple bridge
The AXI simple bridge is a very simple hardware component with 2 slave AXI interfaces and 1 master AXI interface. Its main function is to forward AXI requests on one of its slave AXI interfaces to its AXI master interface. The AXI simple bridge can be ported on any board based on Xilinx [Zynq] cores but has been specifically designed for the ZedBoard prototyping board.
Xilinx Zynq cores embed a ARM processor and all its usual peripherals (USB, Ethernet, flash...) including external memory controllers. This part forms what is named Processing System (PS) in Xilinx terminology. Zynq cores also embed an FPGA matrix, the Programmable Logic (PL).
This page explains how to configure the PL and the software stack on a ZedBoard to boot a Linux kernel with all accesses to the external DDR flowing through the AXI simple bridge in the PL.
SD Card: A SD card archive for ZedBoard (boot image, Linux kernels, device tree blobs,
initramfsroot file systems with networking, python...)
In Zynq cores, the Processing System (PS) usually accesses its external DDR memory in the
[0x0000_0000, 0x4000_0000[ address range (Regular Address Space or RAS in the following). In order to monitor or process the memory accesses, it would be convenient to route them to the Programmable Logic (PL), instead. If this was possible, one could simply configure the PL to implement the desired processing and instruct the PS to access its DDR through the PL. Of course, in order for this to work, the PL would have to route the accesses from the to the DDR and the DDR responses back to the PS. The kind of processing implemented in the PL can be anything from no processing, monitoring, tracing, cryptography...
Indeed, thanks to the Zynq architecture and its quite dense PS-PL interface, it is possible. The SecBus HSM uses this organization to implement cryptographic processing of the memory accesses (encryption, integrity checking). The AXI simple bridge presented here implements only a very simple monitoring of the AXI transactions: it counts them. The AXI simple bridge behaves a bit like a disabled SecBus HSM. This is the first reason why it has been developed: preparing the ground for the complete demonstration of SecBus on the ZedBoard.
The PS and the PL communicate through a set of AXI interfaces. The AXI simple bridge uses 3 of them:
AXI_GP0: 32 bits, master: PS, slave: PL, mapped in the
[0x4000_0000, 0x8000_0000[address range (Alternate Address Space or AAS in the following). The PS uses this interface to access the DDR through the bridge.
AXI_GP1: 32 bits, master: PS, slave: PL, mapped in the
[0x8000_0000, 0xc000_0000[address range (Control Address Space or CAS in the following). The PS uses this interface to access the bridge internal registers. These registers are mainly used for debugging (AXI transaction counters, programmable LED activity...).
AXI_HP0: 32 or 64 bits, master: PL, slave: PS. Configured in 32 bits width. The bridge routes all PS requests falling in the AAS, that is, received on the
AXI_HP0. The addresses from
AXI_GP0requests are added the value of the 32 bits
OFFSETregister (modulus 2^32^) before being routed to
AXI_HP0. This way, accessing an address
[0x4000_0000, 0x8000_0000[range is the same as accessing
A+OFFSET, except that it is routed through the PL. The default (reset) value of
0xc0100000, which translates the
[0x4000_0000, 0x8000_0000[range to
[0x0010_0000, 0x4010_0000[. This default value has not been chosen randomly. Please read the Application Notes section of the AXI simple bridge documentation for explanations.
Prepare a SD card from which the ZedBoard will boot. Create a FAT32 first partition and make it large enough for the provided archive (you can create more partitions if you wish). Mount it on your host PC. In the following we assume its mount point is
Download the SD card archive.
Unpack the archive in the SD card:
tar --directory=/media/SDCard -xf sdcard-axi-simple-bridge.tgz
Unmount the SD card, plug it to the ZedBoard, configure the jumpers to boot from the SD card and connect the USB-UART cable to your host PC.
Power on the ZedBoard and launch a serial console on your host PC (
minicom -D /dev/ttyACM0
Stop the U-Boot countdown, load the environment variables from the SD card, list them and (optionally) save them on the QSPI flash:
secbus-uboot> run uenvboot secbus-uboot> printenv secbus-uboot> saveenv
Two environment variables are defined to boot in two different configurations (AAS or RAS). Select one and run it:
secbus-uboot> run ras secbus-uboot> run aas
Wait until Linux boots, you are done and, if you chose an AAS boot mode, you are running a minimal GNU/Linux OS with all accesses to the external memory routed to the PL.
![Simple bridge console]((axi_simple_bridge_console.png)
Log in either as
rootor the regular
secbusin both cases) and start interacting with the bridge. You can observe the bridge activity thanks to its internal registers. Please read the documentation for detailed information about them. Several aliases are defined to ease the interactions with the bridge, as summarized in the
- The running
devmemapplet built in, so accessing physical addresses can be done using
secbusregular user has
- The SD card partition from which the system booted is mounted on
/mnt, so, if you added some custom files on the SD card, they are in
- The bitstream embeds a Chipscope Integrated Logic Analyzer core allowing to observe the AXI signals from Vivado.