Skip to content

slaclab/axi-pcie-core

Repository files navigation

axi-pcie-core

This GIT repository is intended to be a common firmware library submodule used by many other applications.

Example: https://github.com/slaclab/pgp-pcie-apps/tree/master/firmware/submodules

Before you clone the GIT repository as a submodule in another repo

  1. Create a github account:

https://github.com/

  1. On the Linux machine that you will clone the github from, generate a SSH key (if not already done)

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

  1. Add a new SSH key to your GitHub account

https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

  1. Setup for large filesystems on github
$ git lfs install

How to load the driver

# 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

# Example of loading driver with 2MB DMA buffers
$ sudo /sbin/insmod ./datadev.ko cfgSize=0x200000 cfgRxCount=256 cfgTxCount=16

# Give appropriate group/permissions
$ sudo chmod 666 /dev/data_dev*

# Check for the loaded device
$ cat /proc/data_dev0

How to install the Rogue With Anaconda

https://slaclab.github.io/rogue/installing/anaconda.html

How to reprogram the PCIe firmware via Rogue software

Note: This update script will only work if the axi-pcie-core firmware already loaded in FPGA and won't work if the factory default is still loaded. Use the JTAG interface and Vivado Hardware Manager to load the axi-pcie-core firmware for the first time.

  1. Setup the rogue environment
$ source /path/to/my/anaconda3/etc/profile.d/conda.sh
$ conda activate rogue_env
  1. Run the PCIe firmware update script:
$ python axi-pcie-core/python/updatePcieFpga.py --path <PATH_TO_IMAGE_DIR>

where <PATH_TO_IMAGE_DIR> is path to .MCS image directory

  1. Reboot the computer
$ sudo reboot

Vivado flow for Alveo boards removed

Xilinx/XilinxBoardStore#470

Example of copying over a board files to Linux Vivado install:

$ cp -rf au55c <PATH_TO_VIVADO>/data/xhub/boards/XilinxBoardStore/boards/Xilinx/.