-
Notifications
You must be signed in to change notification settings - Fork 4
Trigger Link from HcalBackplane on ZCU
The DAQ link from the HcalBackplane is connected to SFP0 and the output from the TRG (trigger) link from the HcalBackplane is connected to the input of SFP1 (below SFP0).
A small patch was necessary to the "dualtarget" ZCU firmware necessary in order to confirm that the trigger optical link clock was correctly shared with the daq optical link clock and in order to capture words from the trigger path. Make sure you are on the latest ZCU firmware listed on the firmware page.
Connecting via Link 0 with pflpgbt, you can see the "word rate" for the DAQ and TRIG links are the same (as well as the clocks).
$ ./build/pflpgbt --do 0
> OPTO
> FULLSTATUS
Olink: DAQ
Polarity -- TX: 0 RX: 0
Optical status:
BUFFBYPASS_DONE : 0x0001
BUFFBYPASS_ERROR : 0x0000
CDR_LOCK : 0x0deb
CDR_STABLE : 0x0000
LINK_ERRORS : 0x0003
NOT_IN_RESET : 0x0001
READY : 0x0001
RX_RESETDONE : 0x0001
TX_RESETDONE : 0x0001
Optical rates:
AXIS_clk : 297.148 MHz (0x488bc)
CLOCK_40 : 37.144 MHz (0x9118)
DAQ_LINK_CLOCK : 297.148 MHz (0x488bc)
DAQ_LINK_ERROR : 0.000 MHz (0x0000)
DAQ_LINK_WORD : 37.143 MHz (0x9117)
EXT_REFCLK : 0.000 MHz (0x0000)
GTH_REFCLK : 297.148 MHz (0x488bc)
RX-LINK : 297.148 MHz (0x488bc)
S_AXI_ACLK : 100.000 MHz (0x186a0)
TRIG_LINK_CLOCK : 297.148 MHz (0x488bc)
TRIG_LINK_ERROR : 0.000 MHz (0x0000)
TRIG_LINK_WORD : 37.144 MHz (0x9118)
This is after
- using
OPTO.RESETandOPTO.LINKTRICKin order to get the DAQ linkREADY 1 - applying
GENERAL.STANDARD_HCALto configure the lpGBTs appropriately- using a recent version of pflib is necessary here since the TRG lpGBT configuration needed to be updated! PR 415
-
opto.linktrickafter usingopto.chooseto switch to theTRGlink
The configurations stored in pflib are examples that show necessary parts.
-
config/pftool/hcal-backplane-zcu.yaml: define the target (HcalBackplane on ZCU) and which ROCs are active -
config/econ/econt_hcal_stc.yaml: configure algorithm, formatter buffer, and invert eTx data- will need to update which eRx are active according to which ROCs are active
$ ./build/pftool config/pftool/hcal-backplane-zcu.yaml
> ECON
> IECON 1 # switch to ECON-T that has a ROC connected
> LOAD config/econ/econt_hcal_stc.yaml
> RUNMODE
> IECON 2 # can also do the other ECON-T
> LOAD config/econ/econt_hcal_stc.yaml
> RUNMODE
> EXIT
The alignment block that handles tuning the connection between ECON-T and ROCs is the same as the ECON-D, so the task in software only needed to update the mapping.
$ ./build/pftool config/pftool/hcal-backplane-zcu.yaml
> TASKS
> SETUP
> ALIGN_PHASE_WORD
# choose IECON=1 or IECON=2 for which ECON-T has ROCs connected
$ ./build/pftool config/pftool/hcal-backplane-zcu.yaml
> TASKS
> SETUP
> ALIGN_ECON_LPGBT
# make sure to do the right IECON as before!
> EXIT
The ECON-T outputs a known pattern of data when we send a link_reset_econt command to it.
The 32b words should contain two copies of the 16b idle word.
The 16b idle word is a 5b BX number followed by the 11b idle pattern we configure to be 0x526.
The ALIGN_READ command can decode for this pattern to make it easier for you to observe
by splitting the 32b words into the BX numbers (shown in decimal) and the idle pattern (shown in hex).
If everything is aligned properly you should see an output that looks like
0 : 11 526 11 526 | 12 526 12 526 | 13 526 13 526 | 14 526 14 526
1 : 11 526 11 526 | 12 526 12 526 | 13 526 13 526 | 14 526 14 526
2 : 11 526 11 526 | 12 526 12 526 | 13 526 13 526 | 14 526 14 526
Key Features:
- Two copies of the same BX number in each 32b word (separated by
|) - BX numbers increment by one between 32b words
- BX numbers are the same across links (rows)
- idle patterns are all uniformly equal to the expected pattern
> TRIG
> ALIGN_READ
# view eTx streams output by ECON-T