LCLS-II HPS LLRF MPS/BSA Receiver firmware.
- HPS Common Platform: Documentation Homepage
- Presentation on concept
- MPS/BSA Data Format and Encoding
- Carrier:
- PC-379-396-01-C06 (or newer)
- BOM Configuration A00
- Installed in ATCA slot# 3
- AMC.BAY[0]:
- PC-379-396-09-C02: (or newer)
- SFP[0] = LLRF Fiber[0]
- SFP[1] = LLRF Fiber[1]
- SFP[2] = LLRF Fiber[2]
- SFP[3] = LLRF Fiber[3]
- SFP[7:4] = Empty
- AMC.BAY[1]:
- Install AMC filler card
- RTM:
- Install RTM filler card
View from the TOP
|---------------------------||-------------|
|-------------| || |
| | || RTM |
| BAY[1] | ||-----| |
| | | | |
|-------------| AMC Carrier | | |
fiber[3] |-------------| | | |
------------|SFP[3] | | | |
fiber[2] | | | | |
------------|SFP[2] | | | |
fiber[1] | BAY[0] | | | |
------------|SFP[1] | | | |
fiber[0] | | | | |
------------|SFP[0] | | | |
|-------------| | | |
|---------------------------| |-------|
Note: 1 fiber per RF station (12 BSA values per RF station)
- shelf manager: shm-b15-rf02
- cpu: cpu-b15-rf02 (tunneled from lcls-dev3)
# SSH into lcls-dev3
$ ssh lcls-dev3 -Y
# Go to the programming directory
$ cd /afs/slac/g/lcls/package/cpsw/utils/ProgramFPGA/current
# Execute the programming script
$ ./ProgramFPGA.bash \
--shelfmanager shm-b15-rf02 \
--slot 3 \
--cpu cpu-b15-rf02 \
--user laci \
--mcs /afs/slac.stanford.edu/u/re/ruckman/projects/lcls/lcls2-llrf/firmware/targets/AmcCarrierLlrfBsaMpsMsgRx/images/AmcCarrierLlrfBsaMpsMsgRx-0x02000000-20210105133725-ruckman-9517804.mcs
# Check new FW loaded
$ source /afs/slac/g/reseng/IPMC/env.sh
$ amcc_dump_bsi --all shm-b15-rf02/3
================================================================================
| BSI: shm-b15-rf02/3/CEN (shm-b15-rf02/3/4) |
BSI Ld State: 3 (READY)
BSI Ld Status: 0x00000000 (SUCCESS)
BSI Version: 0x0103 = 1.3
MAC 0: 08:00:56:00:4e:65
MAC 1: 08:00:56:00:4e:66
MAC 2: 08:00:56:00:4e:67
MAC 3: 08:00:56:00:4e:68
DDR status: 0x0003: MemErr: F, MemRdy: T, Eth Link: Up
Enet uptime: 14 seconds
FPGA uptime: 15 seconds
FPGA version: 0x00000009
BL start adx: 0x04000000
Crate ID: 0x0001
ATCA slot: 3
AMC 0 info: Aux: 01 Ser: 4200000118f89170 Type: 05 Ver: C02 BOM: 00 Tag: 28
GIT hash: 22bcb2b0566c2e11625d305703a4a9cce19fa439
FW bld string: 'AmcCarrierLlrfBsaMpsMsgRx: Vivado v2019.2, rdsrv307 (x86_64), Built Thu 12 Mar 2020 06:42:24 PM PDT by ruckman'
--------------------------------------------------------------------------------
Instructions based on this confluence page
# In the first SSH terminal, start the server using the start_control_server.sh script
$ ssh lcls-dev3 -Y
$ ssh laci@cpu-b15-rf02 -Y
$ cd /afs/slac/g/lcls/package/cpsw/controlGUI/current
$ ./start_control_server.sh \
-a 10.0.1.103 \
-t /afs/slac.stanford.edu/u/re/ruckman/projects/lcls/lcls2-llrf/firmware/targets/AmcCarrierLlrfBsaMpsMsgRx/images/AmcCarrierLlrfBsaMpsMsgRx-0x02000000-20210105133725-ruckman-9517804.cpsw.tar.gz
CONNECTED to 10.0.1.103:8193
CONNECTED to 10.0.1.103:8193
Starting up 'UDP RX Handler (UDP protocol module)'
Starting up 'RSSI Thread'
C SYN received, good checksum (state CLNT_WAIT_SYN_ACK)
Starting up ''Depacketizer' protocol module'
Starting up 'TDEST VC Demux'
Starting up 'SRP VC Demux'
CONNECTED to 10.0.1.103:8194
CONNECTED to 10.0.1.103:8194
CONNECTED to 10.0.1.103:8194
Starting up 'UDP RX Handler (UDP protocol module)'
Starting up 'UDP RX Handler (UDP protocol module)'
Starting up 'RSSI Thread'
C SYN received, good checksum (state CLNT_WAIT_SYN_ACK)
Starting up ''Depacketizer' protocol module'
Starting up 'TDEST VC Demux'
Starting up 'Stream0'
Starting up 'Stream1'
Starting up 'Stream2'
Starting up 'Stream3'
Starting up 'Stream4'
Starting up 'Stream5'
Starting up 'Stream6'
Starting up 'Stream7'
Control id = 1
Starting server at port 8090
Note that the server mapped to port 8090`
# In the Second SSH terminal, start the server using the start_control_server.sh script
$ ssh lcls-dev3 -Y
$ cd /afs/slac/g/lcls/package/cpsw/controlGUI/current
$ ./start_gui.sh cpu-b15-rf02 8090
- Default Configuration
- Standalone Testing Configuration
- Emulates the LLRF MPS/BSA link
- Useful for FW/SW development without LLRF links connected
- Standalone Status Registers Example
https://confluence.slac.stanford.edu/x/vJmDFg
$ git clone --recursive [email protected]:slaclab/lcls2-llrf
- Setup Xilinx licensing
If you are on the SLAC network, here's how to setup the Xilinx licensing
$ source lcls2-llrf/firmware/setup_env_slac.sh
- Go to the target directory and make the firmware:
$ cd lcls2-llrf/firmware/targets/AmcCarrierLlrfBsaMpsMsgRx
$ make
- Optional: Review the results in GUI mode
$ make gui
- Assumes AMC carrier's IP address is 10.0.0.107
- Setup the rogue environment (if on SLAC AFS network) else install rogue (recommend Anaconda method) on your local machine
$ source lcls2-llrf/software/setup_env_slac.sh
- Go to software directory and lauch the GUI:
$ cd lcls2-llrf/software
$ python scripts/devGui.py --ip 10.0.0.107