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

Compare with Current View Page History

« Previous Version 17 Next »

Do this on lcls-pc83236

Preparing git keys 

Add your ssh keys to git (This is unfortunately necessary because the .gitmodules file in lcls2-pcie-apps uses the "git" form of the URL instead of the "http" form):

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

Also note that the firmware requires a new version of git that supports "links to large files" (lfs).  Add /afs/slac/g/reseng/git/git/bin to PATH.

Conda Commands to Create Rogue Environment

This is in addition to the other packages that must be built in for the rogue library (see next step).  These conda commands are derived from:

https://github.com/slaclab/rogue/blob/master/Readme_python3.txt

conda env create -n timetool
source activate timetool
conda install pyyaml
conda install pyzmq
conda install -c conda-forge parse
conda install click
conda install MySQLdb
conda install -c bioconda mysqlclient
conda install -c conda-forge pyro4
conda install numpy
pip install recordclass


Building Rogue

git clone https://github.com/slaclab/rogue.git

Needs a conda env with a bunch of stuff (previous step).  Follow build instruction files in the rogue root directory README files (although I suggest setting up a conda python3 env (previous step) instead of using pip install):

https://github.com/slaclab/rogue/blob/master/Readme_build.txt

cd rogue

git submodule init

git submodule update

make

To run, source this script:

https://github.com/slaclab/lcls2-pcie-apps/blob/master/software/TimeTool/setup_env_template.csh

Some applications are not built by default.  cd to directory and make.

Building Firmware

Follow instructions in the README.md here (make sure to use the modern AFS version of git described here so you can use git-lfs):

https://github.com/slaclab/lcls2-pcie-apps.git

git submodule init

git submodule update

source /afs/slac/g/reseng/xilinx/vivado_2017.3/Vivado/2017.3/settings64.sh  #this isn't working on 1/31/2018. sourcing below instead

source lcls2-pcie-apps/firmware/setup_env_slac.sh

if you want to store the output of "make" on your local machine: in the "firmware/" directory, "ln -s /u1/sioan/build ."

cd firmware/targets/TimeToolKcu1500

make

Making Vivado communicate with board over USB/JTAG

Do this to program with flash chips on the KCU1500 for the first time.  Before programming lspci will show:

02:00.0 Serial controller: Xilinx Corporation Device 8638 (rev ff)

After programming powercycle the machine.  Then lspci will show:

02:00.0 Signal processing controller: SLAC National Accelerator Lab PPA-REG Device 2030

#https://www.xilinx.com/support/answers/59128.html

1) Disconnect all Xilinx USB cables from the host computer.
2) Open a shell or terminal console.
3) Extract the driver script and its support files to a local drive of the machine where the cable will be used by typing:

#must cd to directory. Can't run install_drivers from arbitrary directory.

cd /afs/slac.stanford.edu/g/reseng/xilinx/vivado_2017.4/Vivado/2017.4/data/xicom/cable_drivers/lin64/install_script/install_drivers/
sudo ./install_drivers

#now vivado hardware manager will see the kcu1500 board.

 

#instructions to program using vivado hardware manager in link below

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2013_2/ug908-vivado-programming-debugging.pdf

Larry has some slides on how to program the flash chips (mt25qu512) on the KCU1500 via USB/JTAG:

https://docs.google.com/presentation/d/10eIsAbLmslcNk94yV-F1D3hBfxudBf0EFo4xjcn9qPk/edit#slide=id.g245233f915_0_41

Programming FPGA over PCI

Before doing this, build/install the driver using the instructions here:

https://github.com/slaclab/lcls2-pcie-apps

After the first programming (and power-cycling) described above, use this script to reprogram:

https://github.com/slaclab/lcls2-pcie-apps/blob/master/software/TimeTool/scripts/updateProm.py

 

  • No labels