This is a firmware and software repository that moves data between PGP protocol links (commonly an optical interface connected to detectors) and the PCIe DMA engine. Virtual channels (VCs) and higher-level routing are defined by the software stack; the firmware provides the PGP <-> DMA/AXI-PCIe plumbing and board-specific target designs.
This repository is hardware-agnostic and supports multiple Xilinx targets via the firmware/targets/ tree.
- Protocol lane handlers (e.g PGP2b/3/4, HTSP) via SURF
- AXI-PCIe DMA integration (axi-pcie-core)
- Scripts to update FPGA image via Rogue
Install git large filesystems (git-lfs) in your .gitconfig (1-time step per unix environment)
git lfs installClone the git repo with git-lfs enabled
git clone --recursive https://github.com/slaclab/pgp-pcie-apps.gitNote: recursive flag used to initialize all submodules within the clone
# Confirm that you have the board the computer with VID=1a4a ("SLAC") and PID=2030 ("AXI Stream DAQ")
$ lspci -nn | grep SLAC
04:00.0 Signal processing controller [1180]: SLAC National Accelerator Lab TID-AIR AXI Stream DAQ PCIe card [1a4a:2030]
# Clone the driver github repo:
$ git clone --recursive https://github.com/slaclab/aes-stream-drivers
# Go to the driver directory
$ cd aes-stream-drivers/data_dev/driver/
# Build the driver
$ make
# Load the driver
$ sudo /sbin/insmod ./datadev.ko cfgSize=0x50000 cfgRxCount=256 cfgTxCount=16
# Give appropriate group/permissions
$ sudo chmod 666 /proc/datadev_*
# Check for the loaded device
$ cat /proc/datadev_0
In this example, we will build the pseudorandom binary sequence (PRBS) data generator on a Xilinx KCU1500 PCIe card.
- Setup your Xilinx Vivado:
If you are on the SLAC S3DF network:
$ source /sdf/group/faders/tools/xilinx/2025.1/Vivado/2025.1/settings64.shElse you will need to install Vivado and install the Xilinx Licensing
- Go to the firmware's target directory (lots of targets...using XilinxVariumC1100Pgp4_6Gbps for illustration):
$ cd pgp-pcie-apps/firmware/targets/XilinxVariumC1100/XilinxVariumC1100Pgp4_6Gbps- Build the firmware
$ make- Optional: Review the results in GUI mode
$ make guiNote: For more information about the firmware build system:
https://confluence.slac.stanford.edu/x/n4-jCg
- Setup the rogue environment (assumes that you are on SLAC S3DF network)
$ cd pgp-pcie-apps/software
$ source setup_env_slac.sh- Run the PCIe firmware update script:
$ python scripts/updatePcieFpga.py --path <PATH_TO_IMAGE_DIR>where <PATH_TO_IMAGE_DIR> is path to image directory (example: ../firmware/targets/XilinxKcu1500/XilinxKcu1500DmaLoopback/images/)
- Reboot the computer
$ sudo reboot