You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »


Required Hardware

  • PGP Generation 3 Card (available from SLAC)


How to connect the PCIe card to the KCU105 board

  • We are using the SFP cage that's closest to the PCIe interface

  • When looking at the KCU105, we are connecting to the SFP connected farthest to the left
  • The PGP card has an integrated SFP transceiver.  However, the KCU105 does not.  The SFP module that you plug in the KCU105 board needs to support "850nm" multi-mode fiber optics.  We recommend using "SFP-10GSR-85" from Fiberstore.com.
  • The fiber optic cable between the PGP card and the DEV board needs to support "850nm", multi-mode, OM2 (or OM3) and LC terminated on both sides.

Getting Firmware From GIT

First download the project from github:

$ git lfs install
$ git clone https://github.com/slaclab/dev-board-examples.git
$ cd dev-board-examples
$ git submodule init
$ git submodule update --recursive

Alternatively you can download a tarball from here:

dev-board-examples-v1.0.0.tgz


Pre-Compiled Firmware

A pre-compiled image is included in:

dev-board-examples-v1.0.0/firmware/targets/XilinxKC705DevBoard/Kc705Pgp/images/Kcu105Pgp-0x00000001-20170503135204-rherbst-123de18.bit.gz

Decompress the bit file with:

$ gzip -d Kcu105Pgp-0x00000001-20170503135204-rherbst-123de18.bit.gz

and load into the evaluation board using Vivado's Hardware Manager


Build Your Own Firmware

Compile the project. Requires Linux and Vivado 2016.4

$ cd dev-board-examples-v1.0.0/firmware

# Our build system requires a local build directory for the compile. You can either 
$ mkdir build

# Or create a link to a scratch area:
$ ln -s /u/local/build build

# Go to the proper target for a KCU105 board with PGP support:
$ cd targets/XilinxKC705DevBoard/Kc705Pgp

# Build the project:
$ make

# The output will be in the images directory. 

PGPCard Driver

# Download the driver package from github.com
$ wget https://github.com/slaclab/aes-stream-drivers/archive/v1.0.1.tar.gz
$ tar -zxvf v1.0.1.tar.gz

# go to the pgpcard directory and build the driver:
$ cd aes-stream-drivers-1.0.1/pgpcard/driver/
$ make

# You will end up with a file pgpcard.ko
# Load the driver as root:
$ sudo insmod pgpcard.ko

# Verify the card loaded:
$ cat /proc/pgpcard_0

# Scroll up and you will see a dump of information for "lane 0" like this
-------------- Lane 0 --------------------
             LoopBack : 0
         LocLinkReady : 1 
         RemLinkReady : 1 
              RxReady : 1
              TxReady : 1
              RxCount : 0
           CellErrCnt : 0
          LinkDownCnt : 1
           LinkErrCnt : 0
              FifoErr : 0
              RemData : 0x00
        RemBuffStatus : 0x00
# "LocLinkReady : 1" means Link up on local side
# "RemLinkReady : 1" means Link up on remote side

# The aes-stream-drivers/include directory will be needed for the next step. 
# Make note of the full directory path (used for "AES_INCLUDE")

Test Software Compile

To compile the test software go to the following directory in the firmware download:

$ cd dev-board-examples-v1.0.0/software/standalone/

Edit the following line in the Makefile to point to the location of the aes stream driver directory:

Change from: 
	AES_INCLUDE := ../../../aes-stream-drivers-1.0.1/include/  
To full path:
	AES_INCLUDE := $(PATH_TO_AES)/aes-stream-drivers-1.0.1/include/  
Where $(PATH_TO_AES) is your full path

Build the test software:

$ make

Run The Test Code

First dump the status register. This will include the firmware version and build string:

> bin/dumpStatus

The output should look like:
FwVersion   = 0x00000001 
BuildStamp  = Kcu105Pgp: Vivado v2016.4, x86_64, Built Wed May  3 13:52:04 PDT 2017 by rherbst
HeartBeat   = 0x00000000
Scratchpad  = 0x00000000
PRBS Length = 255

In one terminal start the data dump process:

> bin/dumpData

In another terminal start the routine which periodically writes a register to generate a data frame:

> bin/genData

The output of the dumpData terminal show show:

Got Data. Size=1024, error=0 
Got Data. Size=1024, error=0
Got Data. Size=1024, error=0
Got Data. Size=1024, error=0
Got Data. Size=1024, error=0
Got Data. Size=1024, error=0
Got Data. Size=1024, error=0
Got Data. Size=1024, error=0
Got Data. Size=1024, error=0
Got Data. Size=1024, error=0
Got Data. Size=1024, error=0
...

Additional Links

Git hub repositories for firmware and drivers:

https://github.com/slaclab/dev-board-examples

https://github.com/slaclab/aes-stream-drivers

Information about the register access protocol used in the CPIX camera and development board:

SLAC Register Protocol (SRP) Version 0

 

 

 

 

 

 

  • No labels