VLDMaking e-log entries:
1) please always put most recent entries at the top;
2) give a N-ate in green; use the 'Heading 2' style so it shows up in the TOC.
3) once entry is made, please don't change it later;
4) use
red ink : things to be done
black ink : important things in the analysis
blue ink : ongoing things
comments from people (not me): Use courier new
6) insert horizontal line at the end of each entry;
7) save the entry once you are done;
8) update toc by clicking on it and selecting "Update Now"
TO DO:
re-read 7 series MGT and ultrascale MGT TX/RX to understand better what I have glissed over , like pre-emphasis etc.
Asics Vs FPGA:
VC709 connectivity KIT: https://www.xilinx.com/support/answers/54355.html
Phase II F/W Block Design: https://gitlab.cern.ch/atlas-tdaq-felix/documents/blob/master/Phase2_FW_BlockDesign/FELIXPhaseIIFW.pdf
Phase II Readout Requirements: https://edms.cern.ch/document/2166531/1
ITK Pixel Readout Task Force: https://cds.cern.ch/record/2650732/files/ATL-COM-ITK-2018-053.pdf?
RD53B :
readout resource usage and latency estimation: https://cds.cern.ch/record/2711795
DPR: https://www.xilinx.com/support/documentation/application_notes/xapp1214-drp-bridge.pdf
Link Integrity (also in HEP/Linkintegrity folder):
equalization: WP419 (https://www.xilinx.com/support/documentation/white_papers/wp419-7Series-XCVR-Equalization.pdf)
eye diagram: https://www.edn.com/eye-diagram-basics-reading-and-applying-eye-diagrams/ , https://www.xilinx.com/support/answers/66517.html , ug576 Chap 4 (RX Marginal Analysis ) and Fig 4-21 (Eye scan state machine)
jitter: https://www.keysight.com/upload/cmc_upload/All/Download2.pdf; ug578
64b667 interlaken: http://interlakenalliance.com/wp-content/uploads/2019/12/Interlaken_Protocol_Definition_v1.2.pdf (see comparison with 6466b)
RD53A readout via FELIX: https://cds.cern.ch/record/2690124/files/ATL-COM-DAQ-2019-160.pdf
ASIC Vs FPGAs:
https://www.embedded.com/improve-fpga-communications-interface-clock-jitters-with-external-plls/ ,
https://www.mouser.com/pdfdocs/clock-tree-101-timing-basics.pdf
https://numato.com/blog/differences-between-fpga-and-asics/#:~:text=ASIC%20stands%20for%20Application%20Specific,implies%2C%20ASICs%20are%20application%20specific.&text=The%20difference%20in%20case%20of,a%20number%20of%20configurable%20blocks.
RD53A Readout DOC: https://cds.cern.ch/record/2690124/files/ATL-COM-DAQ-2019-160.pdf
Timing Analysis: ~/work/ArgonneNationalLab/HEPTiming_Analysis_of_Computer_Hardware.pdf , http://www.vlsi-expert.com/2011/03/static-timing-analysis-sta-basic-timing.html, https://en.wikipedia.org/wiki/Static_timing_analysis
TDAQ Snowmass Paper: https://arxiv.org/abs/2203.14894
-(Infer of) Latch: https://www.intel.com/content/www/us/en/programmable/quartushelp/13.0/mergedProjects/msgs/msgs/wvrfx_l2_vhdl_id_in_comb_process_holds_value.htm
- Latch= signal preserved
My talks
29.08.2018 (PixelReadout); https://indico.cern.ch/event/751991/
05.02.2019 (PIxel Readout): https://indico.cern.ch/event/792307/
18.02.2019 (RD53A Testing): https://indico.cern.ch/event/790617/contributions/3319980/
30.08.2019: (PixReadout): https://indico.cern.ch/event/838055/contributions/3517389/
26.09.2019 (ITK week) : https://indico.cern.ch/event/728934/
13.12.2019 (PixelReadout): https://indico.cern.ch/event/866357/
27.03.2020 (PixelReadout): https://indico.cern.ch/event/895153/
07.04.2020 (F/W meeting / External Gearbox) : https://indico.cern.ch/event/907704/
24.07.2020 (PixelReadout): https://indico.cern.ch/event/936207/
11.09.2020 (PixelReadout): https://indico.cern.ch/event/948391/
24.09.2020 (ITk Week): https://indico.cern.ch/event/950039/
23.11.2020 (Felix General): https://indico.cern.ch/event/977667/
01.12.2020 (AUW week ITK TDAQ): https://indico.cern.ch/event/976599/
18.12.2020 (PixelReadout / LPGBT readout finalized): https://indico.cern.ch/event/986346/
08.03.2021 (LTI/TTC interface FELIX): https://indico.cern.ch/event/1016173/
07.05.2021 (Deskew/Service Data) https://indico.cern.ch/event/1036079/
21.05.2021 (Optoboard V0 test) https://indico.cern.ch/event/1037631/
14.07.2021 (LpGBT Internal Emulato) https://indico.cern.ch/event/1058298/
30.07.2021 (Yarr optimization and Lpgbt readout) https://indico.cern.ch/event/1060464/
09.09.2021 (LpGBT readout with FELIX summary) https://indico.cern.ch/event/920307/#b-430531-itk-tdaq
28.09.2021 (SW API for ITk Pixel): https://indico.cern.ch/event/1080385/
16.11.2021 (Upgrade Week, given by Sasha): https://indico.cern.ch/event/1092013/
27.01.2022 (FELIX PDR): https://indico.cern.ch/event/1108368/
01.08.2022 (Felix general, testbeam): https://indico.cern.ch/event/1186927/
03.09/2022 (ItkPix Readout): https://indico.cern.ch/event/1192113/
13.09.2022 (ITkPix Readout): https://indico.cern.ch/event/1179940/sessions/452651/#20220913
13.09.2022 (YARR SW Optimization for FELIX): https://indico.cern.ch/event/1179940/sessions/452651/#20220913
Other relevant talks
>Sasha
https://indico.cern.ch/event/779046/
https://indico.cern.ch/event/860295/contributions/3683599/attachments/1968405/3273876/2020_01_12_FELIX_RD53A_Firmware_Status.pdf (systest at LBL workshop)
>Outer Barrel workshop
> DCS
(Timon): https://indico.cern.ch/event/838560/
DCS-Upgrade Week Apr 2020 : https://indico.cern.ch/event/909598/
(ITk Pixel Read-out meeting, July 3rd 2020, Oyulmaz) https://indico.cern.ch/event/935232/timetable/
> Phase 2 Block Design
(Carsten): https://indico.cern.ch/event/780769/timetable/
(JJ Teoh F/W): https://indico.cern.ch/event/728933/contributions/3294735/attachments/1786558/2909133/Atlas_ITKWeekCERN_29Jan2019.pdf
https://gitlab.cern.ch/atlas-tdaq-felix/documents/tree/master/Phase2_FW_BlockDesign
(Pixel Meeting LpGBT emulator + FELIX/RD53B resource usage ): https://indico.cern.ch/event/859936/
>TDAQ: Mar 2019
https://indico.cern.ch/event/803708/
https://indico.cern.ch/event/805929/
>ITK week:
Feb 2020: https://indico.cern.ch/event/824593/
>Upgrade week
Apr 2020 (RD53, DCS, pixel event size, etc.): https://indico.cern.ch/event/907990/
>Kick-off Phase2 Mar 2019
https://indico.cern.ch/event/805384/
Developer week: https://indico.cern.ch/event/806346/
> RD53B
https://indico.cern.ch/event/800821/
https://indico.cern.ch/event/800821/attachments/1801048/2937708/RD53B_Main.pdf
(plans decdoding, no decoding in F/W) https://indico.cern.ch/event/913724/
Readout Marius
Upgrade Week May 12: https://indico.cern.ch/event/1149581/contributions/4863172/attachments/2441838/4183223/FELIX-ITkPixV1_20220511.pdf
ITK PIX readou: Jul 22 https://indico.cern.ch/event/1183537/
> RD53A readout system test
(CERN timeline) https://indico.cern.ch/event/871587/contributions/3675876/attachments/1971656/3280022/RD53A_readout_schedule.pdf
ITK Pixel test:
1) https://indico.cern.ch/event/940885/
2) https://indico.cern.ch/event/943067/
3) Upgrade Week May 2022 https://indico.cern.ch/event/1149581/contributions/4860746/attachments/2443252/4186105/Preparations_towards_a_multi_module_DAQ_testbench_AUW12052022.pdf
https://indico.cern.ch/event/1149581/contributions/4860736/attachments/2442956/4186044/BM_20220512_SR1SystemTest.pdf
Liverpool/ SLAC setup https://indico.cern.ch/event/1019700/
>PCIe Gen 4 HW
https://indico.cern.ch/event/883614/
>YARR
(optimization readout) https://indico.cern.ch/event/884314/ (zijun)
>Netio
C. Gottardo 12 Jul 2021: https://indico.cern.ch/event/1058472/
>VLDB
Upgrade Week April 2020 (Ali): https://indico.cern.ch/event/909598/
>VL+/VLDB+/BOB
VLDB+ manual: https://espace.cern.ch/GBT-Project/VLDBplus/_layouts/15/start.aspx#/SitePages/Home.aspx, https://vldbplus.web.cern.ch/manual/introduction.html
setup VLDB+:
https://espace.cern.ch/project-Versatile-Link-Plus/Shared%20Documents/Versatile%20Link%20PLUS%20Project%20V2.3.pdf
on the VDLB+ 7 links GBT, 4 links VTRX+ -> 3 in principle cannot be connected, however, only 1 link out of the 7 is connected
Configure LpGBT: https://indico.cern.ch/event/1026910/
> BOB
itk readout meeting VLDB+ breakout boards (Ali): https://indico.cern.ch/event/909095/
ITK Readout meeting (Ali) https://indico.cern.ch/event/897070/#2-vldb-break-out-board
https://indico.cern.ch/event/986346/
git repo: https://gitlab.cern.ch/askaf/vldbplus-fmc-to-minidp-breakout-board
>PDR Phase2 requirement
Phase2 PDR planning: https://indico.cern.ch/event/979650/
> Phase2 FELIX HW
Hongbin Lie: https://indico.cern.ch/event/985638/
Hao Xu (10.05.2021): https://indico.cern.ch/event/1034805/;
Hao Xu (07.06.2021): https://indico.cern.ch/event/1046529/
10.06.2021: https://indico.cern.ch/event/1044952/
> Status DAQ during UAW Dec 2020 (Joern)
https://indico.cern.ch/event/977116/
> Pixel Chain
https://indico.cern.ch/event/977111/
> UVVM
UVM Vs UVVM: https://forums.xilinx.com/t5/Simulation-and-Verification/cheapest-and-easiest-way-to-use-uvm/td-p/1057217
>64b667b (Interlaken):
LAr/TDAQ Phase2 (Najib) https://indico.cern.ch/event/996654/
White paper:
>64b66b Hermes
https://indico.cern.ch/event/978579/contributions/4144261/attachments/2161487/3647054/Hermes_protocol.pdf
>SW Rod
Carlos 26.01.2021: https://indico.cern.ch/event/997213/
>GBT/lpGBT
IC/EC comunication based on HDLC protocol: https://pos.sissa.it/313/083/pdf
>ITK SW Review:
Joern 19 Feb 2021: https://indico.cern.ch/event/1008502/
>TTC
Options for communicating with FELIX for integration in March 2021: https://indico.cern.ch/event/1010862/ -> chose to go with option A, so we avoid TTC system for now
LTI/TTC during TDAQ week (Paschalis): https://indico.cern.ch/event/1008889/contributions/4275095/attachments/2215496/3750583/my_talk_LTI_v5.pdf
FELIX and CTP interface LTI/TTC: https://indico.cern.ch/event/1172448/contributions/4924119/attachments/2513762/4321614/2022.09.22.phase2-central-trigger.pdf
Internal FELIX/TTC meeting: https://indico.cern.ch/event/1021181/
> Fiber connectivity
L. Franconi 08 Jun 2021: https://indico.cern.ch/event/1042255/
FELIX+Optoboard+ITkPix Dec 9 2022 (Angira): https://indico.cern.ch/event/1229021/
Git: https://gitlab.cern.ch/mtrovato/felixrd53a
copied the necessary files from ~mtrovato/FELIX_latest_Aug272018_mod_test1link_gtwizTX_auroraRX
for now included firmware/Project dir
test firmware/scripts/FELIX_fullmode_top/do_implementation_VC709.tcl ; if it works erase Project dir
version prior to make aurora "quick"
quick aurora in /users/mtrovato/FELIXaurora4lanes/FELIX_latest_Oct152019_quickaurora_worksJan172020/
the F/W is also in teh FELIX repo but the 2018.1 never worked properly for the vc709 (VLDB not lit)
Pixel/YARR: https://its.cern.ch/jira/browse/FLXUSERS-433
TX/RX mapping pixel flavor F/W : https://its.cern.ch/jira/browse/FLXUSERS-494
24CH Pixel: https://its.cern.ch/jira/browse/FLXUSERS-477
fice
lpGBT v1 : https://its.cern.ch/jira/browse/FLXUSERS-442
https://its.cern.ch/jira/browse/FLXUSERS-413, https://its.cern.ch/jira/browse/FLXUSERS-503
netio and felixcore: https://its.cern.ch/jira/browse/FLX-1112
data duplication felixcore: https://its.cern.ch/jira/browse/FLX-1263
LpGBT: https://its.cern.ch/jira/browse/FLX-1270, https://its.cern.ch/jira/browse/FLX-1215
Aurora: https://its.cern.ch/jira/browse/FLX-942
LpGBT Uplinkdata sometimes wrong: https://its.cern.ch/jira/browse/FLX-1334
phase2 incompatibility with SW: https://its.cern.ch/jira/browse/FLX-1374, https://its.cern.ch/jira/browse/FLX-1380
Trickle: https://its.cern.ch/jira/browse/FLX-1431
IC/EC LpGBT: https://its.cern.ch/jira/browse/FLX-1470, https://its.cern.ch/jira/browse/FLX-1449
LpGBT 5.12 Gbps: https://its.cern.ch/jira/browse/FLX-1489
LTI/TTC interface in FELIX: https://its.cern.ch/jira/browse/FLX-1537, https://its.cern.ch/jira/browse/FLX-1314, https://its.cern.ch/jira/browse/FLX-1430, https://its.cern.ch/jira/browse/FLX-2104, https://its.cern.ch/jira/browse/FLX-2108 (Versal)
LpGBT internal emulator: https://its.cern.ch/jira/browse/FLX-1566
YARR calPulse+trigger not landing in wupper in a deterministic way: https://its.cern.ch/jira/browse/FLX-1613
LPGBT debug info : https://its.cern.ch/jira/browse/FLX-1641
fix/optimization for pixel firmware flavor to be used with YARR: https://its.cern.ch/jira/browse/FLX-1649
SI5345 missing reset: https://its.cern.ch/jira/browse/FLX-1707
RD53B integration: https://its.cern.ch/jira/browse/FLX-1676
(TODO) FIFO to XPM libraries plus moving mem: https://its.cern.ch/jira/browse/FLX-1669
LpGBT Alignment false positive: https://its.cern.ch/jira/browse/FLX-1825
32b FromHost Hdr Data Format: https://its.cern.ch/jira/browse/FLX-1975
felix-star: https://its.cern.ch/jira/browse/FLX-1271
ITkPix Readout: https://its.cern.ch/jira/browse/FLX-1676, https://its.cern.ch/jira/browse/FLX-1989
testbeam: https://its.cern.ch/jira/browse/FLX-1744, https://its.cern.ch/jira/browse/FLXUSERS-567
link alignment with optoboard: https://its.cern.ch/jira/browse/FLX-2032
service data not observed in FELIX: https://its.cern.ch/jira/browse/FLX-1994
dcs and hit data with CB: https://its.cern.ch/jira/browse/FLX-1959
LPGBT VC709 : https://its.cern.ch/jira/browse/FLX-1533
VHDL coding style VSG: https://its.cern.ch/jira/browse/FLX-1587
Ghost packet from FELIX with ItkPix V1.1 and optosystem: https://its.cern.ch/jira/browse/FLX-2047
LPGBT Alignment issues FEC12: https://its.cern.ch/jira/browse/FLX-2038
Simulation via Free Modelim : https://its.cern.ch/jira/browse/FLX-2019
Simulation for 64b66b decoding: https://its.cern.ch/jira/browse/FLX-2106
RD53A/ LDO (default) configuration with the jumpers
- power from PS
> measured: 1.4 V, 0.4 A (as seen from the PS)
> increasing voltage doesn’t change much the drawn current
- power from PS and clk from SCC interface
> clk chain: 1) felix to VLDB (versatile link demo board), 2) versatile to SSC interface, 3) SSC interface to RD53A
- 1) optical connection, default felix F/W, communication 8b/10
- elinkconfig -> set from-host, e-group 0, epath: 0 to 8b10b 4b (Fig. 1 W. Wu document)
- flx-config set GBT_TXPOLARITY=0x1
- leds on if correctly configured
- 2) via hdmi
- WHERE ARE THE TEST POINTs for the clk?
- 3) via hdmi
- WHERE ARE THE TEST POINTs for the clk?
> measured: 1.41 V, 0.548 A (as seen from the PS); 1.9 V, 0.592 A
- doesn’t exactly match Fig 6 of RD3A manual or presentation from Jeglot Jimmy [1]. Ask them the exact config (ie: LDO, trigger provided?)
N.B: SSC interface is just transforming electrical signals from RD53A to optical
[1]: https://indico.lal.in2p3.fr/event/4815/contributions/15833/attachments/12883/15283/Testing_RD53_at_Lal_140318.pdf
F/W locations
1) 1 TX and 1 RX link: ~/FELIX_latest_fromSasha_mod_1TX_1RXlink_gbt
2) 4 TX and 1 RX link: ~/FELIX_latest_fromSasha_mod
Changes:
- AN5, ..., AJ5, AH7,8 (clock) are pins for bank_113 (X1Y12-15) ( ug476 ) below
- those pins look correct from https://www.xilinx.com/support/documentation/boards_and_kits/virtex-7/vc709_Schematic_xtp213_rev1_0.pdf
- generated the aurora/gtwizard IP for X1Y12-15
- ~/aurora_1_28Gbps_X1Y12to15_RXonly_2
- ~/gtwizard_GTH_4_8_X1Y12to15_TXonly : bistream generation failed...to be investigated
in felix_gbt_fullmode_sfp_VC709.xdc
# SFP 1-4
set_property PACKAGE_PIN AN5 [get_ports {RX_N[1]}]
set_property PACKAGE_PIN AM7 [get_ports {RX_N[0]}]
set_property PACKAGE_PIN AL5 [get_ports {RX_N[2]}]
set_property PACKAGE_PIN AJ5 [get_ports {RX_N[3]}]
#MT
set_property PACKAGE_PIN AP3 [get_ports {TX_N[1]}]
set_property PACKAGE_PIN AN1 [get_ports {TX_N[0]}]
set_property PACKAGE_PIN AM3 [get_ports {TX_N[2]}]
set_property PACKAGE_PIN AL1 [get_ports {TX_N[3]}]
- gtwizard -> X1Y12; aurora -> X1Y15 : no more [1] but got [2]
- f/w: ~/FELIX_latest_fromSasha_mod_1TX_1RXlink_gbt
- commented GTH_common module in gtwizard_support IP
-> needed signals (outclk, outrefclk) are passed from aurora IP to gtwizard_support in _wrapper_v7
[1]
CRITICAL WARNING: [Vivado 12-1411] Cannot set LOC property of ports, Instance g1.u2/GTH_inst[0].GTH_FM_TOP_INST/gtwizard_fullmode_TX_4_8_cpll_support_0_i/U0/gtwizard_fullmode_TX_4_8_cpll_init_i/U0/gtwizard_fullmode_TX_4_8_cpll_i\
/gt1_gtwizard_fullmode_TX_4_8_cpll_i/gthe2_i can not be placed in GTHE2_CHANNEL of site GTHE2_CHANNEL_X1Y12 because the bel is occupied by g1.u2/GTH_inst[0].GTH_FM_TOP_INST/aurora_64b66b_0_RX_i/inst/aurora_64b66b_0_RX_block_i/au\
rora_64b66b_0_RX_i/inst/aurora_64b66b_0_RX_wrapper_i/aurora_64b66b_0_RX_multi_gt_i/aurora_64b66b_0_RX_gt_inst_lane2/gthe2_i. This could be caused by bel constraint conflict [/users/mtrovato/FELIX_latest_fromSasha_mod/felix/firmw\
are/constraints/felix_gbt_fullmode_sfp_VC709.xdc:66]
[2] N.B: GTHE_COMMON bank 113 is X1Y3 (ug476 page 406)
Phase 1.1.2 IO and Clk Clean Up
ERROR: [Place 30-510] Unroutable Placement! A GTHE_COMMON / GTHE_CHANNEL clock component pair is not placed in a routable site pair. The GTHE_COMMON component can use the dedicated path between the GTHE_COMMON and the GTHE_CHANNEL if both are placed in the same clock region. If this sub optimal condition is acceptable for this design, you may use the CLOCK_DEDICATED_ROUTE constraint in the .xdc file to demote this message to a WARNING. However, the use of this override is highly discouraged. These examples can be used directly in the .xdc file to override this clock rule.
< set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets g1.u2/GTH_inst[0].GTH_FM_TOP_INST/gtwizard_fullmode_TX_4_8_cpll_support_0_i/U0/common0_i/gt0_qplloutclk_i] >
g1.u2/GTH_inst[0].GTH_FM_TOP_INST/gtwizard_fullmode_TX_4_8_cpll_support_0_i/U0/common0_i/gthe2_common_i (GTHE2_COMMON.QPLLOUTCLK) is provisionally placed by clockplacer on GTHE2_COMMON_X1Y2 -> wrong
g1.u2/GTH_inst[0].GTH_FM_TOP_INST/gtwizard_fullmode_TX_4_8_cpll_support_0_i/U0/gtwizard_fullmode_TX_4_8_cpll_init_i/U0/gtwizard_fullmode_TX_4_8_cpll_i/gt0_gtwizard_fullmode_TX_4_8_cpll_i/gthe2_i (GTHE2_CHANNEL.QPLLCLK) is locked to GTHE2_CHANNEL_X1Y12
Clock Rule: rule_bufds_gthcommon_intelligent_pin
Status: PASS
Rule Description: A BUFDS driving a GTHCommon must both be placed in the same or adjacent clock region
(top/bottom)
g1.u2/GTHREFCLK_1.ibufds_instq2_clk0 (IBUFDS_GTE2.O) is locked to IBUFDS_GTE2_X1Y6
g1.u2/GTH_inst[0].GTH_FM_TOP_INST/aurora_64b66b_0_RX_i/inst/aurora_64b66b_0_RX_block_i/gt_common_support/gthe2_common_i (GTHE2_COMMON.GTREFCLK0) is provisionally placed by clockplacer on GTHE2_COMMON_X1Y3 ->right
[3]:
VC709 evaluation board used:
https://www.xilinx.com/support/documentation/boards_and_kits/virtex-7/vc709_Schematic_xtp213_rev1_0.pdf
--
TO DO:
- follow https://www.xilinx.com/Attachment/AR47672.pdf to have aurora IP 1 and 2 using the same transceiver for TX and RX respectively
-
sasha said that currently felix is getting a 240 Mhz clk, but we should assume in the future that it will get a 160 Mhz. This can be done manually by changing ttc output to 160
commented out hack in the aurora IP since they were not there when packaging the exdes
-> hacks in aurora IP are used for monitorning purposes (rxfsmdone, rxresetdone) -> I may be able to do without them
Notes:
- set_max_delay video: https://www.xilinx.com/video/hardware/false-path-delay-set-case-analysis.html
- follow https://www.xilinx.com/support/documentation/sw_manuals/xilinx2013_2/ug903-vivado-using-constraints.pdf, https://www.xilinx.com/support/documentation/sw_manuals/xilinx2013_2/ug906-vivado-design-analysis.pdf
- pag 48 The CPLL in the GTH transceiver has a nominal operating range between 1.6 GHz to 5.16 GHz.
page 55 QPLL GTH 8.0–13.1
-Program felix
-reboot pc
-flx-init -T 3 -I 0
-elinkconfig:
to host: Egroup0 16 b -> 8b/10b enable
- T2H (63b) ticked
from host: Egroup 0 Epath 0 4b -> 8b10b
- EC (3f) ticked
clink TO_HOST/FROM_HOST remove emulator (E)
click CLOCK = TTC
- elink config takes care of TOHOST/FROMFRONTEND_FANOUT from the W. W doc
- flx-config set GBT_TXPOLARITY=0x1
/users/aparamonov/work/FELIX_latest/felix/software/RD53A_test
fupload -D -G 0 -g 0 -p -w 4 RD53A_write_commands.txt
write_commands.txt generated from ./map_to_bistream RD53A_write_commands.txt RD53A_write_commands.txt
G = GBT link number
g = group number
p = e-path number
w = number of bits
verify from e-link config whethere w is set to 4
- git clone ssh://get@getlab.cern.ch:7999/atlas-tdaq-felix/firmware.git
- enable TXPOLARITY/RXPOLARITY in gtwizard IP and set TXPOLARITY=1 (inverted), RXPOLARITY=0 (normal)
- to do: control the polarities via register as it is done in the top mode
- from vivado v2015.4(64-bit)
- source vivado_import_felix.tcl;
- source do_implementation_VC709.tcl
- programmed felix
- reboot
- source setup_FELIX-4.0.sh
- flx-init -T 1
> set the clock
- flx-init
> set the links
Note: to power cycle felix -> reprogram and reboot
Questions:
1) why flx-init -T 1 -I 3 doesn't work right after rebooting the computer? But it works after -T 1
- Attempted answer: according to felix manual (pag 14) -T 1 uses the Si5324 chip on the Vc709 board rather than Si5345 chip on TTCfx V3 (-T 3)
2) -is this needed? check /users/aparamonov/work/FELIX_latest/felix/software/flxcard/src/flx-init.cpp
- Fundamentals of Phase-Locked Loops: http://www.analog.com/media/en/training-seminars/tutorials/MT-086.pdf
- Heavy lifting by
- PD:
- if frequency of +IN (refernce clk) is much higher than -IN (Fo?) than the input to VCO will be mostly positive, thus resulting in increased frequency after VCO (see VCO explanation)
- N.B: the higher +IN frequency is the longer the input of VCO will be high (ie: 2A the deep at 0 will be shorter) -> higher -IN frequency
- opposite applies if the frequency of +IN is smaller than -IN
- if same frequency 2C -> input to VCO is 1) mostly 0 -> no increase in frequency? and 2) - and + are balanced
- VCO: https://people.eecs.ku.edu/~callen58/501/Voltage-Controlled_Oscillator.pdf
- need to understand a bit more, but the ideas is that there is a proportional dependence (can be linear) between input voltage and frequency
~/RD53A_test directory where codes/txt files to change RD53A registers are store
./map_to_bitstream <register_map.txt> <write_commands.txt>
user friendly register_map.txt converted into commands to be sent via fupload
fupload -I0 -G0 -w4 -t 0 -D write_commands.txt
currently using using the default jumper cable setting (LDO mode) rather than the direct powering settings
Timon (email from July 30, 2018) suggested to used direct power settings
change jumper cables PWR_A, PWR_D to VDDX
Drawn current increase quite a bit (0.560 A to 0.7 A).
Write into the register 68 0x00 (clk) or 0xFF (ground) I see waveforms changing. See below pictures (left: 0x00, right: 0xFF)
N.B: the Y scale is no huge (20 mV) but the change is there. Moreover the clock frequency is not that far ~1/2* 1/1.28 GHz ~ 400 MHz, as per 11.4.6 and 11.4.7 of RD53A Manual V 3.42
N.B: I was probably using version of EPROC_OUT4_ENCRD53A.vhd w/o data_out bit inversion
Tried again w/ bit inversion and the waveforms do not change. Checked again w/o inversion and it works
w/o inversion is firmware/output/FLX709_FULLMODE_RM0403_4CH_CLKSELECT_GIT_master_rm-4.3_66_180916_16_20.bit
F/W: ~/FELIX_latest_Aug272018_mod_test1link_gtwizTX_auroraRX
forgot to backup this mornig. Wrt to working version just added rx_data_i_fromgtxinterface_i, pre_rxdata_from_gtx_i in aurora_exdes
if needed remove them all the way to wrapper
working bit file: firmware/output/FLX709_FULLMODE_RM0403_4CH_CLKSELECT_GIT_master_rm-4.3_66_180917_17_41.bit
lane/channel up in both
ila (see below)
and flx-config list | grep "GBT_ALIGNMENT_DONE"
GBT_ALIGNMENT_DONE 0x00000000000f RX ALIGNMENT DONE [47:0]
NB: QPLLLOCK=0 [1] 0x7730 [R 47:00]
sanity check: removed fiber from SFP cage in VC709 -> alignment down
From https://www.xilinx.com/products/boards-and-kits/dk-v7-vc709-g.html#documentation downloaded: https://www.xilinx.com/member/forms/download/design-license.html?cid=390042&filename=rdf0232-vc709-ibert-c-2015-1.zip
now in felix02:~/vc709_ibert
upgraded for 2015.4
generated my ibert for bank 113
felix02:~/IBERT_X1Y15/ibert_7series_gth_0_example_1.28workextloopback_linerateseen1_25Gbpsduetogthregfclkdiff
modified top and xdc file as per example in vc709_ibert
main change: output USER_CLK programmable clock (page 30-31 ug887) to J31-J32 SMA port
this clock will be routed to via J25-J26, SMA connectors wired to GTH transceivers (pag 32 of ug887)
see picture below
TO DO: take a closer look at the schematics (xtp213) and understand that
another question: what are the banks at page13 of ug887 (0 to 39)? and why they don't appear in ug476? is this because they are not transceivers?
made sure that clk was at 156.25 Mhz via scope
external loopback done with optical fibers
IBERT was seeing 1.25 Gbps rather than 1.28 Gbps, as expected
f/w settings with GTREFCLK @ 160 Mhz
156.25/160 * 1.28 Gbps = 1.25 Gbps
Installed USB to UART drivers on windows ANL laptop
Installed tera term on windows ANL laptop
installed on the windows anl laptop
just googled for one
From https://www.xilinx.com/products/boards-and-kits/dk-v7-vc709-g.html#documentation downloaded https://www.xilinx.com/member/forms/download/design-license.html?cid=390048&filename=rdf0238-vc709-si570-prog-c-2015-1.zip
now on felix02:~/VC709
from anywhere connected to the fpga open vivado and source freq_adjust.tcl (contains bit file and everything)
Downloaded SiLabs Programmable Oscillator Calculator on the ANL laptop
https://www.silabs.com/documents/login/software/ProgOscillatorSwInstall.zip
already installed in the windows ANL laptop
followed instructions and generated registers to be inputted into VC709 via tera term and USB UART cable
generated first a 200 Mhz clk
checked in both vio and with the scope that frequency is correct
generated 160.32 Mhz
160.32 MHZ clk since from the TTC system the clk is expected to be 40.08x4 Mhz
values are
reg7: 0x01; reg8 : 0xc2; reg9:0xce; reg10:0x3c; reg11:0xf3; reg12=0x66
you should be able to see changed value in VIO/Si570_USER_CLK
Connected loopback fiber -> IBERT sees 1.28 Gbps when USERCLK = 160 Mhz
Connected fiber from RD53A via michael's board interface -> lots of errors and no link
TO DO: investigate
gtwizard?
External jitter cleaner
***REMINDER****: IF VC709 power cycled reprogram oscillator with TERA TERM because clock will go back to its default values
user reg values above
200 MHz (4 ns reso scope) 160 Mhz (1 ns reso scope)
felix : ~FelixtoRD53A/4lanes/notbonded/FLX709_FULLMODE_RM0403_4CH_CLKSELECT_GIT_master_rm-4.3_66_190523_15_28.bit
usual setup for clock (flx-init -T 3), elinkconfig (using local clock rather than TTC this time)
(extra VC709): felix02 :~/IBERT_X1Y15/ibert_7series_gth_0_example_1.28workextloopback_linerateseen1_25Gbpsduetogthregfclkdiff
wrt to example design from IBERT changed
top file, xdc
USER_CLK used to feed GTREFCLK as explaned in https://sites.google.com/site/tdaqatlas/#TOC-Sep-25-2018-IBERT-for-VC709-
Changed the clock on the receiving VC709 to 160.32 Mhz via Oscillator calculator and tera term as explained in https://sites.google.com/site/tdaqatlas/#TOC-Sep-25-2018-Si570-programmable-oscillator-on-VC709-
I guess .32/160 ~ .2% difference in frequency from incoming data recovered and local clocks was not accpetable
configure RD53A chip to generate PRBS 7-bit for all four channels
register 61 0x3C; registers 68 -> 0xAA;
all lanes activated and spitting PRB7
3 lanes work
one lane doesn't work because mike's board has polarity inverted
eye diagram:
wrt to IBERT defaults noticed that
RXTERMMOD=Programmable yields a way better open area (covers all the vertical (ie voltage) scale)
RXTERM doesn't matter
used finisar instead of avago transceiver modules improved open are by about 20%
F/W: ~aurora_1_28Gbps_X1Y12_workstandaloneVC709
work for data received in standalone VC709
when trigger from TTC is sent I see (N.B: make sure in the TTC system trigger is enabled to Random and choose trigger rate )
1e040000, 02X1ZZZZ
which means frame (b) from fig 53 of the manual and data x71
expected since newtriggerunit.vhd is configured to send x71 together with Trig ID
x71 is Data_02 before the decoding
1e040000, 02X0ZZZZ
which means frame (b) from fig 53 of the manual and data x6a
6a is Data_00 before the decoding
not expected
Event header -> wrong dataout
Event header -> right data out
Configure Global pulse routing: fupload -I0 -G0 -w4 -t 0 -D commands/RD53A_write_commands_register_config_reg44.txt
from ./map_to_bitstream registers/RD53A_default_register_config_reg44.txt commands/RD53A_write_commands_register_config_reg44.txt
RD53A_default_register_config_reg44.txt = 44 0x100
N.B: cannot be disabled unless you power cycle the chip
once global pulse is sent the monitoring will continue -> read sec 7 of the manual to understand the details
Send Pulse: fupload -I0 -G0 -w4 -t 0 -D commands/RD53A_write_commands_GlobalPulse.txt
commands/RD53A_write_commands_GlobalPulse.txt = 5c 5c 6a 6c
see table 4 of manual (chose Data_01)
Change default register address: fupload -I0 -G0 -w4 -t 0 -D commands/RD53A_write_commands_reg101102_6168.txt
from ./map_to_bitstream registers/RD53A_reg101102_6168.txt commands/RD53A_write_commands_reg101102_6168.txt
registers/RD53A_reg101102_6168.txt = 101 61; 102 68
Reading 68 and 61 as address
Reading 0...001010101 and 0...00100 as (default) values
default registers
changed registers
f/w (felix): FELIX_latest_Aug272018_mod_test1link_gtwizTX_auroraRX_backupOct22018_commandtriggworks
f/w (extra VC709): ~/aurora_1_28Gbps_X1Y12_workstandaloneVC709
changed SM in cmd_top.vhd to support trigger as command
disable trigger from TTC
triggering ila on 1EXXXXXX
fupload -I0 -G0 -w4 -t 0 -D commands/RD53A_write_commands_Trigger_tmp.txt
RD53A_write_commands_Trigger_tmp.txt = 2D D2
2D Trigger_2 (see Table 3)
D2 is Data_30 (see table 4)
I see:
trig_id = 19
19 is just a counter of pending triggers in the chip (sec 9.4, fig 40, 41 of the manual)
see also fig cmd_15triggers to see that it's a counter from 0 to 31
there I send RD53A_write_commands_Trigger.txt which is all 15 triggers one after the other
Data_30 (decoded = D2)
cmd_2d_d2
cmd_15triggers
Configure Global pulse routing: same as autoread
Send Pulse: same as autoread
Set Ila Trigger on D2XX XXXX
Send RdReg command: fupload -I0 -G0 -w4 -t 0 -D commands/readreg1and2.txt
from RD53A_readreg/map_to_bitstream looping only over reg = 1, 2
checked that if only reg 1 to be read trigger fires only for 55 or 99 (table 11 of the manual)
output shows: 32b (clk100) + 32b (clk101) which decoded as per Fig 3 means:
addr1=2
value1=3
addr2=1
value2=0
N.B: value1,2 previously set to those values with WrReg commands
addr1=515 (ie: offset pixel row number)m value =1285 (?); addr2/val2 as above
not sure why two D2
f/w (felix): FELIX_latest_Aug272018_mod_test1link_gtwizTX_auroraRX_backupOct22018_commandtriggworks
f/w (extra VC709): aurora_1_28Gbps_X1Y12_workstandaloneVC709_Oct16
IMPORTANT: FIX in aurora*_wrapper.v: .bit_err_chan_bond_in ( 1'b0), //MT disable CB bit error the RD53A sequence may be different
aurora IP expects Channel Bonding control characters in a precise order
From aurora_64b66b_0_cbcc_gtx_6466.v
//---- Logic to detect bit errors ----
// By architecture, 1st CB that goes in to FIFO would Be CB, and the next
// CB is expected to be after 9 NA idles, ie, the 11th Write should be
// CB, Also between 2nd to 10th writes, CB character should not be
// written in to FIFO;
l1140-1170
If they come differently than expected it will throw an error (bit_err_chan_bond_i)
error fed into aurora_64b66b_0_common_logic_cbcc, which will cause some signals/resets (e.g all_start_cb_writes_i) to go to 1
that will cause data to be lost: see L945-962 aurora_64b66b_0_cbcc_gtx_6466
do_wr_en depend on final_gater*, all_start_CB*
final_gater depends on all_start_CB*
if all_start_CB do_wr_en=0 and data will not be written in FIFO36E1 and will be lost (see figure)
always @(posedge USER_CLK)
begin
if(CBCC_FIFO_RESET_WR_CLK)
do_wr_en <= `DLY 1'b0;
else if(wait_for_wr_en_wr4 != 2'h3)
do_wr_en <= `DLY 1'b0;
else
begin
if(overflow_flag_c)
do_wr_en <= `DLY 1'b0;
else if(!raw_data_r[34])
do_wr_en <= `DLY 1'b0;
else
do_wr_en <= `DLY (FINAL_GATER_FOR_FIFO_DIN | (ALL_START_CB_WRITES_IN & (cb_fifo_din_detect_q && (raw_data_r_r[34]))));
end
end
before fix: most of the times dor_wr_en=0 -> data lost
after fix: data all there -> correctly reach the user (rx_tdata)
example on how the rx_tdata is paused when control characters are received
example on how the tlast is asserted when 1E (seperator) is received
TO DO: ANY particular request on clock compensation in the IP Core?
state machine to route from Aurora to Central Router A-D frames in one GBT lane, E frame in another GBT lane
DRAW a diagram here
inputs: rx_rdata,
f/w (simu): ~/RouterRD53A_testbench
f/w (extra VC709): ~/aurora_1_28Gbps_X1Y12_userK_littleendian
state machine changed so that doesn't rely on header bits any longer
only relying on valid, valid_k, last, data[63:0]
not properly working in simu (issue on data_out2)
synchronize valid signals with data
default RD53A: https://gitlab.cern.ch/mtrovato/FELIXPhase2/blob/master/aurora_64b66b_0_example_X1Y13/aurora_64b66b_0_example.srcs/sources_1/new/RouterRD53A.vhd
f/w: ~/aurora_1_28Gbps_X1Y12_userK_littleendian/
enabled in IP User K (and little endian support)
same procedure as https://sites.google.com/site/tdaqatlas/#TOC-Oct-3-2018-Procedure-to-RdReg-
after 55 clk rx_user_k_tvalid goes up -> data is the same as rxdata_to_fifo_i = D2f00401 0402000 (2 clks), but stripped of D2 (kchar)
Conclusion: can drop header bit in RouterRD53A and use k_tvalid instead
zoom on trigger
f/w: aurora_1_28Gbps_X1Y12RXonly_userK_littleendian
~works: same results as duplex aurora
programmed one time -> worked
programmed another time -> didn't work
issue is described here https://sites.google.com/site/tdaqatlas/#TOC-Mar-11-2019-change-in-the-Aurora-IP-_core:-switched-to-recovered-clock-to-create-user_clk-
f/w: aurora_1_28Gbps_X1Y12_userK_littleendian_testX1Y13, aurora_1_28Gbps_X1Y13RXonly_userK_littleendian_fromscratch
doesn't work: channel_up down
issue is described here https://sites.google.com/site/tdaqatlas/#TOC-Mar-11-2019-change-in-the-Aurora-IP-_core:-switched-to-recovered-clock-to-create-user_clk-
N.B: X1Y13 in duplex mode works
f/w: ~/FELIX_latest_Aug272018_mod_test1link_gtwizTX_auroraRX, https://gitlab.cern.ch/mtrovato/FELIXPhase2
data correctly received
armed ila with tlast=1
send a pulse
saw data
rx_lane_up
0x76e0 [R 47:00] GBT_RXCDR_LOCK 0x00000500000f RX CDR LOCK [47:0]
0x00000400000f if fiber disconnected from the first SFP (the one closest to the wall)
programmed 3 times -> same result (may need to power cycle RD53A to have rx_lane_up=1)
TO DO: include rx_channel_up in the register if not included
***Set Clocks/links***
> flx-init -T 3
> elinkconfig
- fromHost: Enable Epath0 w/ 4b 8b10b
- toHost: Enable 16b 8b10b Fullmode
- Clock : choose TTC
- From/ToHost: remove “E”
(flx-config set GBT_TXPOLARITY=0x1 not needed any longer)
***Check comunication***
> flx-config list | grep GBT_RXCDR_LOCK should output 0x00000500000f to show that FELIX is correctly receiving data (idles) from RD53A
***Configure Chip and Send Cal Injection***
> source /users/mtrovato/RD53A_test/CalInjection.sh
wrt to previous F/W modified (TO DO: upload to gitlab)
FELIX_FM_gbt_wrapper.vhd fifo_wr_en(i) <= GT_RxByteisAligned(i) and not fifo_full(i); -> to rx_tvalid and not fifo_full(i);
synchronized RXdata33b and rx_tvalid_out from FullModeWrapper and aurora_exdes
RX_DATA_gt0_33b[32] is now an indicator whether data is Kchar (eoc, soc only) or data
terminal1: fdaq -D RD53A_Dec5_2 -t 10;
terminal2 (right after): source CalInjection.sh;
Opened FLX-card 0, firmw FM-4ch-709-1812051501-GIT:rm-4.3/66 channels=4 (cmem buffersize=1073741824)
**DEBUG ON**
Before startRec: Receiver@FLX0 DEBUG: head=0, tail=0, pwrite=0f64400000
start=0f64400000, end=0fa4400000, pread=0f64400000(0f64400000), pcurr_addr=0f64400000, 0 0
wraps=0, recvd=0, last-recvd=0, last-av=0, fullcnt=0
After startRec: Receiver@FLX0 DEBUG: head=0, tail=0, pwrite=0f64400000
start=0f64400000, end=0fa4400000, pread=0f64400000(0f64400000), pcurr_addr=0f64400000, 0 0
wraps=0, recvd=0, last-recvd=0, last-av=0, fullcnt=0
**START** using DMA #0 polling
-> 1 sec, Rates: recv 0.0 MB/s, file 0.0 MB/s; Total: recvd 0 B, file 0 B; Buffer: 0%, wraps 0
-> 2 sec, Rates: recv 0.0 MB/s, file 0.0 MB/s; Total: recvd 0 B, file 0 B; Buffer: 0%, wraps 0
-> 3 sec, Rates: recv 0.0 MB/s, file 0.0 MB/s; Total: recvd 0 B, file 0 B; Buffer: 0%, wraps 0
-> 4 sec, Rates: recv 0.0 MB/s, file 0.0 MB/s; Total: recvd 4096 B, file 4096 B; Buffer: 0%, wraps 0 #####start receiving data here
-> 5 sec, Rates: recv 0.0 MB/s, file 0.0 MB/s; Total: recvd 4096 B, file 4096 B; Buffer: 0%, wraps 0
-> 6 sec, Rates: recv 0.0 MB/s, file 0.0 MB/s; Total: recvd 4096 B, file 4096 B; Buffer: 0%, wraps 0
-> 7 sec, Rates: recv 0.0 MB/s, file 0.0 MB/s; Total: recvd 4096 B, file 4096 B; Buffer: 0%, wraps 0
-> 8 sec, Rates: recv 0.0 MB/s, file 0.0 MB/s; Total: recvd 4096 B, file 4096 B; Buffer: 0%, wraps 0
-> 9 sec, Rates: recv 0.0 MB/s, file 0.0 MB/s; Total: recvd 4096 B, file 4096 B; Buffer: 0%, wraps 0
fcheck -F 1 RD53A_Dec5_2-181205-170319-1.dat
Notice that 88 89 71 41 89 88 00 00 matches with first 64b of waves below (red backward),
c8 09 00 02 88 88 00 80 matches with the second (even though c8 09 00 do not appear in the the display)
...
last block matches?
Chunk types: BOTH="<<", FIRST="++", LAST="&&", MIDDLE="==", TIMEOUT="]]", NULL="@@",
OUTOFBAND="##" and "TEC" for chunk truncation/error/CRCerr.
==> BLOCK 0 (E=000=0-0-0 seq=0): 1016 databytes
88 89 71 41 89 88 0 0 c8 9 0 2 88 88 0 80 88 89 0 7c 88 89 0 78 88 88 0 74 89 88 0 70
89 89 0 6c 77 88 1 80 89 89 1 7c 88 89 1 78 89 89 1 74 89 88 1 70 88 89 0 68 88 88 0 64
89 89 1 6c 89 88 10 80 89 88 10 7c 88 88 10 78 88 88 10 74 89 88 10 70 89 88 10 6c 88 8a 1 68
88 88 10 68 88 88 11 80 89 88 11 7c 89 88 11 78 89 88 11 74 89 88 11 70 89 88 11 6c 88 88 11 68
77 89 1 64 89 89 20 80 88 88 20 7c 88 89 20 78 89 88 20 74 89 89 20 70 89 8a 20 6c 88 88 20 68
88 89 10 64 88 88 21 80 88 89 21 7c 89 88 21 78 89 89 21 74 88 88 21 70 89 89 21 6c 88 89 21 68
88 89 11 64 88 88 30 80 89 89 30 7c 88 88 30 78 88 88 30 74 88 88 30 70 88 88 30 6c 89 88 30 68
88 88 20 64 89 88 31 80 88 88 31 7c 88 88 31 78 88 89 31 74 89 88 31 70 89 88 31 6c 89 88 31 68
88 88 21 64 88 88 40 80 88 88 40 7c 89 88 40 78 88 89 40 74 88 88 40 70 89 88 40 6c 88 88 40 68
88 88 30 64 88 88 41 80 89 88 41 7c 88 89 41 78 88 88 41 74 88 88 41 70 88 88 41 6c 89 89 41 68
89 88 31 64 89 88 50 80 88 88 50 7c 88 89 50 78 88 89 50 74 89 88 50 70 89 88 50 6c 88 89 50 68
88 88 40 64 88 88 51 80 88 88 51 7c 88 89 51 78 88 89 51 74 88 88 51 70 89 89 51 6c 88 88 51 68
88 88 41 64 88 89 60 80 88 88 60 7c 88 88 60 78 88 88 60 74 88 88 60 70 88 89 60 6c 8a 88 60 68
89 89 50 64 88 88 61 80 89 88 61 7c 89 88 61 78 88 88 61 74 88 88 61 70 89 88 61 6c 88 89 61 68
88 89 51 64 89 88 70 80 88 89 70 7c 89 89 70 78 88 88 70 74 88 88 70 70 88 89 70 6c 88 88 70 68
88 89 60 64 89 88 71 80 89 88 71 7c 89 89 71 78 88 88 71 74 88 88 71 70 8a 88 71 6c 88 88 71 68
88 88 61 64 89 89 80 80 88 88 80 7c 89 88 80 78 88 89 80 74 89 88 80 70 88 89 80 6c 88 89 80 68
89 89 70 64 89 89 81 80 89 88 81 7c 88 88 81 78 89 89 81 74 89 88 81 70 89 88 81 6c 89 88 81 68
89 88 71 64 88 88 90 80 89 88 90 7c 88 88 90 78 88 88 90 74 88 88 90 70 88 89 90 6c 89 89 90 68
88 88 80 64 88 88 91 80 88 89 91 7c 89 89 91 78 88 88 91 74 88 88 91 70 88 88 91 6c 88 88 91 68
89 88 81 64 88 89 a0 80 88 89 a0 7c 88 88 a0 78 89 89 a0 74 88 89 a0 70 89 88 a0 6c 89 88 a0 68
88 88 90 64 89 88 a1 80 88 88 a1 7c 88 89 a1 78 89 88 a1 74 88 89 a1 70 88 89 a1 6c 88 88 a1 68
89 88 91 64 89 88 b0 80 88 89 b0 7c 88 88 b0 78 88 88 b0 74 88 89 b0 70 89 89 b0 6c 88 88 b0 68
89 88 a0 64 88 88 b1 80 88 88 b1 7c 89 89 b1 78 89 88 b1 74 88 88 b1 70 88 89 b1 6c 88 89 b1 68
88 88 a1 64 89 89 c0 80 89 88 c0 7c 89 89 c0 78 89 88 c0 74 89 88 c0 70 88 89 c0 6c 88 88 c0 68
88 89 b0 64 88 89 c1 80 88 88 c1 7c 89 89 c1 78 88 89 c1 74 89 89 c1 70 89 89 c1 6c 88 88 c1 68
88 89 b1 64 89 88 d0 80 88 88 d0 7c 89 89 d0 78 89 88 d0 74 88 88 d0 70 88 89 d0 6c 89 88 d0 68
88 88 c0 64 89 88 d1 80 89 88 d1 7c 89 88 d1 78 89 88 d1 74 88 89 d1 70 89 98 d1 6c 89 89 d1 68
88 89 c1 64 88 88 e0 80 89 89 e0 7c 88 89 e0 78 88 88 e0 74 88 88 e0 70 8a 88 e0 6c 88 88 e0 68
88 88 d0 64 88 89 e1 80 89 88 e1 7c 89 88 e1 78 89 88 e1 74 89 88 e1 70 88 88 e1 6c 89 88 e1 68
88 89 d1 64 88 88 f0 80 88 88 f0 7c 88 88 f0 78 89 89 f0 74 89 89 f0 70 89 88 f0 6c 88 88 f0 68
88 89 e0 64 88 89 f1 80 89 88 f1 7c 88 88 f1 78 89 89 f1 74 89 89 f1 70 ++ (sz=1016)
TO DO:
check if the change in thFMch_fifo_driver.vhd is needed to have fdaq output data, if not revert it --MT CRC_error := '1'; CRC_error := '0'; --temporarily disabled
as far as I understand CRC will only cause a flag to be raised in the SW
deploy RD53ARouter and check whether data and register readout are properly routed to the right lanes
aurora_20MHZ
aurora_20MHZ_zoombeginning
aurora_20MHZ_zoomend
aurora_40MHZ
aurora_40MHZ_zoombeginning
aurora_40MHZ_zoombeginning
thFMch_fifo_driver
thFMch_fifo_driver_issoc_trigger
thFMch_fifo_driver_iseoc_trigger
Modified CalInjection.sh
activating only Core Column 15 (Synchronous FE according to Fig 13 of RD53A)
reg32 set to x8000, register33to36 to 0x0000
reg2 points to col15 for calinjection
saved output of fdaq and ila csv on felix02:~/TESTDEC14/col15only/
python ReadParseCSVFile.py, I get all 2x32b messages with col = 15 (bit 0 to 5 as in Figure 53) and different rows
N.B: for readout we need 16b=6b for col + 6b for row + 4 for core region (Fig 57)
no bit for pixel pair since pixel are red in quadruplet
N.B: for writing we need 17b=6b for col + 6b for row + 4 for core region + 1b for pixel pair (Fig 57)
pixel are written in pair
Notes:
pixel matrix is 400 (col) x 192 (row) pixels
1 core region is 8 cols x 8 rows
in Fig 57 only 32 pixels appear => is each pixel a pair of pixel? That's our guess since the minmimum element for writing or reading is 2 pixels
=> pixel matrix is 50 core col x 24 core row
sync FE for istance is 16 core col x 24 core row
To DO: why when all columns are deactivated no signal is valid? Header and trailer should be valid
Understand how the BUSY signal in handled in the Central router for the full mode protocol
gbt mode has it for sure
Route the 4b status code of the message readout to the BUSY signal
fupload -I0 -G0 -w4 -t 0 -D commands/RD53A_write_commands_register_config_reg44.txt
fupload -I0 -G0 -w4 -t 0 -D commands/RD53A_write_commands_GlobalPulse.txt
a) last byte is 3 (0xB4)
ila triggered on rx_user_k_tvalid = 1
N.B: last byte is the block_k_no which is the user k block # of table 5-3 of https://www.xilinx.com/support/documentation/ip_documentation/aurora_64b66b_protocol_spec_sp011.pdf
so rather than copying the all BTF byte only the block # is stored -> the other half byte is zeroed
b) fupload -I0 -G0 -w4 -t 0 -D ../RD53A_readreg/commands/readreg1.txt
last byte of is 1 (0x99) or 2 (0x55)
ila triggered on rx_user_k_tvalid = 1 and rx_user_k_tdata[3 downto 0] != 3 to avoid autoread block_k_no
c) fupload -I0 -G0 -w4 -t 0 -D commands/readreg1and2.txt
last byte of is 0 (0xD2)
ila triggered on and rx_user_k_tvalid = 1 rx_user_k_tdata[3 downto 0] != 3 to avoid autoread block_k_no
a) = 0xB4
b) = 0x99
b) = 0x55
c) = 0xD2
No need to use RouterRD53A (https://sites.google.com/site/tdaqatlas/#TOC-Oct-25-2018-RouterRD53A---deprecated-) any longer since
a,b messages in Aurora coming in one bus (rx_tdata)
e messages in Aurora coming in another bus (rx_user_k_tdata)
Set up FELIX: https://sites.google.com/site/tdaqatlas/#TOC-Dec-4-2018-Procedure-to-readout-RD53A-from-FELIX-using-ila-
Set up RD53A for Autoread: https://sites.google.com/site/tdaqatlas/#TOC-Jan-8-2018-Read-out-registers:-better-described-procedure-
ila results (FullModeWrapper leve)
zoom 64b
zoom 33b
fdaq -t 1 -D aa ; fcheck -F 1 aa..
output = 60 d4 9 f2 3 0 0 88
reading bytes backward (as usual) and forming 32b words
f2 09 d4 60 = 1111 0010 0000 1001 1101 0100 0110 0000
88 00 00 03 = 1000 1000 0000 0000 0000 0000 0000 0011
from Fig53 RD53A manual v3-42
4b stas = 1111 =15 = spare
addr1 = 0010000010 = 130
val1 = 0111010100011000 = 29976
addr2 = 0010001000 = 136
val2 = 0000 0000 0000 0000 = 0
Because of the aurora logic, which suppresses the most significant two bytes of a k-character (e.g: 0xb2) and introduces 0x0N, where N is the k-char # in table 5-3 of https://www.xilinx.com/support/documentation/ip_documentation/aurora_64b66b_protocol_spec_sp011.pdf I see:
0000: extra
N= 0011 = 3 , which is 3rd kchar (=0xb4) which is both registers is autoread (Table 11 of RD53A manual v3-42)
explanation why aurora logic suppresses/replaces is in table 2-10 of https://www.xilinx.com/support/documentation/ip_documentation/aurora_64b66b/v11_2/pg074-aurora-64b66b.pdf
user_k_block_no = N (checked in the F/W)
------fdaq/fcheck output
Chunk types: BOTH="<<", FIRST="++", LAST="&&", MIDDLE="==", TIMEOUT="]]", NULL="@@",
OUTOFBAND="##" and "TEC" for chunk truncation/error/CRCerr.
==> BLOCK 0 (E=000=0-0-0 seq=1): 676 databytes
&& (sz=0)
@@
60 d4 9 f2 3 0 0 88 << (sz=8)
@@
60 d4 9 f2 3 0 0 88 << (sz=8)
@@
Jan 12 2018 (FELIX can do both Register Readout and Cal Injection)
F/W: https://gitlab.cern.ch/mtrovato/felixrd53a
.bit/.ltx files : ~mtrovato/FelixtoRD53A/*rm-4.3_66_190115_17_44*
change to elinkconfig wrt default (https://sites.google.com/site/tdaqatlas/#TOC-Dec-4-2018-Procedure-to-readout-RD53A-from-FELIX-using-ila-): activate also link=1 (/users/mtrovato/RD53A_test/ConfigTwoLinks.elc)
.dat files (fdaq -t 10) : ~mtrovato/RD53ATestJan16/
Jan16_testCalInjection-190116-105538-1.dat : Sent Cal injection only
Jan16_testRegReadout-190116-110036-1.dat : Activated Monitorning for Register Readout only
Jan16_testCalInjectionRegReadout-190116-112429-1.dat : Sent Cal Injection, then activated Monitoring for Register Readout
fcheck -F 1000 Jan16_testCalInjectionRegReadout-190116-112429-1.dat | grep BLOCK | grep "=0-“ you will see lines from the Cal injection
fcheck -F 1000 Jan16_testCalInjectionRegReadout-190116-112429-1.dat | grep BLOCK | grep “=1-“ you will see lines from the Register Readout
N.B: if you activate Register Monitoring first and do cal injection after the cal injection is not see
Send a global pulse every 50usec. It's up to the user (from software) to set the reg44 to F to allow for autozeroing at the nex available global pulse
in testbeam reg44 won't be used for any other reason (N.B: won't need calinjection.sh and i won't need to st reg44 since I do not need to inject pixels)
if you need to use reg44 for other reason shut off the automatic global pulse from the f/w
the width set the width of the global pulse to 0 to turn it off
global pulse is 16b , so has to be threated in f/w as a cmd lasting 2x16b
create an auto_zero module that behaves as cmd_top (global_pulse case of the SM), such that generates every 4x40Mhz az_pattern_16(15 downto 0) from az_pattern(31 downto 0)
CMD (BCR) correctly handled
-CMD-WrReg (4x16b) followed by CMD-AutoZero (2x16b) not correctly handled: first 16b (5c5c) of AZ read right after the WrReg and not after the send command -> hence lost
-switched to First Word Fall Throug (rather than Standard FIFO) and problem fixed (stop reading as soon as fifo_rd_en goes down) : TO SHOW
Successfully done from Windows machine
download programmer (.jar) https://gitlab.cern.ch/gbtproj/gbtxprogrammer/tree/master/releases
I chose programmerv2.20180116.zip
download java to open the .jar : https://www.java.com/en/download/
to program VLDB
open prompt
cd Desktop
java -jar programmerv2.20180116.jar
load GBTX_20180524_092606_RD53A_SASHAP.txt
Import Image
push Write GBTX
Successfully done from felix02 (as root)
java -jar ~mtrovato/VLDBprogramming/programmerv2.20180116.jar
load VLDBprogramming/GBTX_20180524_092606_RD53A_SASHAP.txt
more info on how to allow different user to program VLDB is here https://gitlab.cern.ch/gbtproj/gbtxprogrammer
Troubleshoot:
Use dmesg or lsusb or usb-devices to see whether the dongle is being seen
should appear cern among vendor device
***output of usb-devices
T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=03 Dev#= 19 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=16c0 ProdID=05df Rev=01.00
S: Manufacturer=cern.ch
S: Product=usbi2c
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
dongle should have leds on when .jar is opened
register readout results presented here: https://indico.cern.ch/event/790617/contributions/3319980/attachments/1797767/2931695/MarcoTrovato_RD53Atesting_Feb182019.pdf
Addresses not increasing by 64 (slide 13) all the time is due to Aurora hand-shake
Slide 14 still not understood
Comment on register readout https://anl.box.com/s/ress9lw6li08n5ki50rzt1ianv15itrp
addSOPEOP
when receiving 1Edata 1Edata I will have to output SOP, 1Edata, EOP, SOP, 1Edata, EOP -> output tripled wrt to input -> put a fifo not to loose data
Se also Joseph's email
--
jumpers have been moved from direct powering so we are on LDO mode (https://yarr.readthedocs.io/en/latest/rd53a/#jumper-configuration-and-power-on or Fig 1 of https://yarr.readthedocs.io/en/latest/rd53a/#jumper-configuration-and-power-on) -> PS at 1.9 V (but we measure that the voltage is 1.7 V at the entrance of the chip) and current ~0.5-0.6 A so ok
jumpers in LDO mode (
N.B: we are not in shunt-mode)
Configuring the chip to get lock
usual flx-init -T 3, elinkconfig
source /users/lambertj/felix/setup_joseph.sh
felixcore -t 1 –-data-interface lo
on other terminal source /users/lambertj/felix/setup_joseph.sh
cd /users/lambertj/Yarr/build/
bin/scanConsole -r configs/controller/felix.json -c configs/connectivity/example_rd53a_setup.json -s configs/scans/rd53a/std_digitalscan.json -p
have to look but Timon said that contains some analogo/digital settings configurations through registers that will facilitate the locking
if it doesn't work disconnect cable and reconnect, so voltage ramps up quickly enough
Pag 59 of https://www.xilinx.com/support/documentation/ip_documentation/aurora_64b66b/v11_2/pg074-aurora-64b66b.pdf states: "Generation of Aurora Without GT This option is available only in UltraScale and UltraScale+ devices"
F/W (VC709 standalone): /users/felix/aurora4lanes/aurora1lane_woGT_backupFeb26
F/W (VC709 standalone): /users/felix/aurora4lanes/aurora1lane_woGT_worksimu
GTH and protocol decoupled
F/W: /users/felix/aurora4lanes/aurora1lane_woGT
addSOPEOP.v wasn't handling properly contiguous x1E in a row (see image)
fixed addSOPEOP.v : proper SM handles the flow of the data
data always written into FiFO
FIFO rd_en
=0 for two clocks when frame b (1E+data) containing header received
=0 for one clock when header or frame c (x1E no data)
=1 elsewhere
replaced the addSOPEOP in FELIX_latest_Aug272018_mod_test1link_gtwizTX_auroraRX and compiling
bugged addSOPEOP: you can see that two SOPs appearing without and EOP
data from cal injection (YARR) and output after adding SOP=3c and EOP=dc
zoom in data from core (Aurora IP)
zoom on data_out after adding SOP and EOP
From User Manual flx-tools part of the flx-card which allows FELIX to talk to the Host and viceversa (fupload is from user to front-end via felix and host pc)
DMA = Director Memory Access (https://en.wikipedia.org/wiki/Direct_memory_access)
CPU free to work on something else while I/O transfer in progress. I/O and processing parallelized
allows I/O to happen when CPU is busy and
Drivers (https://en.wikipedia.org/wiki/Device_driver): software interface to the HW mounted in the computer. It's a program which allows the CPU to talk to the HW
F/W (FELIX needed for tx):
~mtrovato/FELIX_latest_Aug272018_mod_test1link_gtwizTX_auroraRX/firmware/output/FLX709_FULLMODE_RM0403_4CH_CLKSELECT_GIT_master_rm-4.3_66_190310_19_34.bit
F/W (extra VC709): /users/felix/aurora4lanes/aurora4lanes_woGT
put it on git
duplex mode: need to switch to RX mode only to have it working on FELIX
Decoupled MGT and Aurora protocol as per ultrascale example
Aurora 4 lanes working on extra VC709
lane_up/channel_up (5 LEDs on)
data received on all lanes
modified Aurora IP:
FIX in *channel_init_sm.vhd: chan_bond_timeout_val = 20'd20000; (rather than chan_bond_timeout_val = 9'd500;
watchdog reset links if bonding not achieved in 20000 (previously 500 clks)
not exactly sure why but that may be due to CC characters not being sent very oftend by RD53A (l545 of *cbcc_gtx.vhd)
assign valid_btf_detect_c = ((GTX_RX_HEADER_IN == 2'b10) &&
(GTX_RX_DATA_IN[31:16] == CC_CHARACTER)
&& GTX_RX_DATAVALID_IN);
FIX in aurora*_wrapper.v: bit_err_chan_bond_in ( 1'b0), //MT disable CB bit error the RD53A sequence may be different
modified ~mtrovato/RD53A_test/Calinjection.sh such to activate 4 lanes
fupload -I0 -G0 -w4 -t 0 -D commands/RD53A_reg61_60.txt
fupload -I0 -G0 -w4 -t 0 -D commands/RD53A_reg69_F.txt
fupload -I0 -G0 -w4 -t 0 -D commands/RD53A_reg68_55.txt
TO DO: check that every lane receives header. If so, bonding may not be needed
1) aurora4lanes_woGT: /users/felix/aurora4lanes/aurora4lanesRXonly_woGT
2) default FELIX/FullMode: (/users/mtrovato/FELIX_latest_Aug162018_Mesfininstructions/
1) aurora_64b66b_0_support.vhd -> aurora_64b66b_0_multi_wrapper.v, aurora_64b66b_0_gt_common_wrapper.vhd -> aurora_64b66b_0_gtx.vhd, GTHE2_COMMON -> GTHE2_CHANNEL,
2) gth_fullmode_wrapper_v7.vhd -> gth_fullmode_wrapper_v7.vhd, GTHE2_COMMON -> (IP) gtwizard_fullmode_txcpll_rxqpll_v7.vhd, -> gtwizard_fullmode_txcpll_rxqpll_v7_init.vhd, -> gtwizard_fullmode_txcpll_rxqpll_v7_multi_gt.vhd, -> gtwizard_fullmode_txcpll_rxqpll_v7_GT.vhd, -> GTHE2_CHANNEL x 4,
-GTHE2_COMMON matches for 1) and 2) -> need to externalize signals in/out gthe_common in aurora up to exdes (check also if the values are the same in two designs)
- N.B: for the parameters all values match, except QPLL_FBDIV (check what it does).
generate transceiver wizard with 4 GTH in duplex and hook aurora on the RX and GBT on the TX -> be careful on the gtx settings that have to match what I have in auroraRXsimplex (ie: elastic buffer)
- looking at how multi_gt is instantiated (aurora_64b66b_0_support Vs gtwizard_fullmode_txcpll_rxqpll_v7_init )
-listing things that 1) has and 2) doesn't have
- USE_BUFG
- because gtwizard_fullmode_txcpll_rxqpll_v7_cpll_railing not 2) -> is this due to the fact that TX is CPLL in MESFIN's
- WRAPPER_SIM_GTRESET_SPEEDUP (do I care?)
- gt0_gtrefclk1_in -> create in the multi_gt and fix _gtx.v (now tied to ground, while gt0_gtrefclk0_in is getting the clk, swap those as in 1))
- gt0_rxdisperr_out, gt0_rxnotintable_out : 8b/10b stuff don't care
- gt0_rxbyteisaligned_out => gt_rxbyteisaligned_out(0),
gt0_rxmcommaalignen_in => '0',--gt0_rxmcommaalignen_in,
gt0_rxpcommaalignen_in => '1',--gt0_rxpcommaalignen_in,
gt0_rxcharisk_out
same as above
- gt0_rxoutclkfabric_out : open anyway
-listing things that 2) has and 1) doesn't have
-loopback
- RXBUFSTATUS_out : open anywat
- 64b/66b specifics : check when generating gt wizard with 64b66b in rx
//-------------------- Receive Ports - RX Gearbox Ports --------------------
.GT0_RXDATAVALID_OUT (pre_rxdatavalid_i),
.GT0_RXHEADER_OUT (pre_rxheader_from_gtx_i),
.GT0_RXHEADERVALID_OUT (pre_rxheadervalid_i),
//------------------- Receive Ports - RX Gearbox Ports --------------------
.GT0_RXGEARBOXSLIP_IN (rxgearboxslip_i),
- 64b66b specifics on TX I don't care
GT0_TXSEQUENCE_IN
GT0_TXHEADER_IN
- keep rx and disregard of tx (or generate gtwizard with tx at 20b no protocol and rx at 32b and see if those are there) -> they may have just not been in able when generating the wizard -> do I care?
//----------------------- Receive Ports - CDR Ports ------------------------
.GT0_RXCDROVRDEN_IN (gt_rxcdrovrden_in),
.gt0_RXPMARESET_IN (tied_to_ground_i),
.gt0_txpmareset_in (tied_to_ground_i),
.gt0_txpcsreset_in (tied_to_ground_i),
.gt0_rxpcsreset_in (tied_to_ground_i),
.gt0_rxbufreset_in (tied_to_ground_i),
.gt0_rxpmaresetdone_out (),
.gt0_txprbssel_in (tied_to_ground_vec_i[2:0] ),
.gt0_rxprbssel_in (tied_to_ground_vec_i[2:0] ),
.gt0_txprbsforceerr_in (tied_to_ground_i),
.gt0_rxprbserr_out (),
.gt0_rxprbscntreset_in (tied_to_ground_i),
.gt0_dmonitorout_out (),
.gt0_txbufstatus_out (),
//---------------------- TX Configurable Driver Ports ----------------------
.GT0_txpostcursor_in (5'b00000),
.GT0_txdiffctrl_in (4'b1000),
.GT0_txmaincursor_in (7'b0000000),
.gt0_txprecursor_in (5'b00000),
//--------------- Transmit Ports - TX Polarity Control Ports ---------------
.GT0_txpolarity_in (tied_to_ground_i),
.gt0_txinhibit_in (tied_to_ground_i),
//----------- Transmit Ports - TX Initialization and Reset P
- N.B: gt0_qplloutclk_in, gt0_qplloutrefclk_in same as gt_qpllclk_quad4_in and gt_qpllrefclk_quad4_in
- In Summary the to do in the FELIX F/W is :
1) generate gtwizard IP with TX at 20b / no encoding at 4.8 gbps, RX at 32b / 64b66b at 1.28 Gbps
2) in gth_fullmode_wrapper_v7.vhd three entities :
a) gtwizard_fullmode_txcpll_rxqpll_v7 contains both TX and RX ins/outs
b)GTHE2_common
b)aurora_exdes:
- all rx ins/outs will be connected to a)
- remember to externalize all connections from/to aurora_64b66b_0_multi_wrapper.v
- remove GTHE2_COMMON entity from aurora as is already in gth_fullmode_wrapper_v7.vhd
- remove GTHE2_CHANNEL entity from aurora as is already in gth_fullmode_wrapper_v7.vhd/gtwizard_fullmode_txcpll_rxqpll_v7/gtwizard_fullmode_txcpll_rxqpll_v7.vhd -> gtwizard_fullmode_txcpll_rxqpll_v7_init.vhd -> gtwizard_fullmode_txcpll_rxqpll_v7_multi_gt.vhd -> gtwizard_fullmode_txcpll_rxqpll_v7_GT.vhd
- can also do the above in the extra VC709 standalone F/W for quick turnround -> there I will only need to test that the RX is not broken
/users/felix/aurora4lanesRXonly
changed IP/aurora_64b66b_0_core.v : assign tx_out_clk = rxrecclk_from_gtx_lane2_out (was = raw_tx_out_clk_i[2])
bug in the IP: user_clk, which drives everything (also rx logic) was driven by TXOUTCLK. Now driven by the recovered clock
Question: why for the duplex mode I didn't see any problem, despite of the bug? In any case, need to propagate this change to all aurora instances
other changes in https://sites.google.com/site/tdaqatlas/#TOC-Oct-16-2018-Aurora-data-received-from-RD53A-fully-working-on-extra-VC709-fix-in-Aurora-IP- and https://sites.google.com/site/tdaqatlas/#TOC-Mar-11-2019-change-in-the-aurora-IP-channel_init_sm-
/users/felix/aurora4lanesRXonly_woGT : same change as above but the change happens in *support.v
Procedure to achieve lane_up/channel_up:
power cycle chip
program extra vc709
(send cal injection)
(if you power cycle chip after programming, lane_up=channel_up=0 and you need to reprogram the extra vc709)
N.B: addSOPEOP SM from idle (=0) to evtprc (=1) when first valid data is seen
CalInjection.sh right after rebooting felix (data received with fdaq)
trigger on addSOPEOP SM changing (should be at 0 if no data received) at power cycling the chip -> state stuck at evtprc
CalInjection.sh after powercycling doesn't work because SM starts at state=1 (evtprc) (no fdaq received)
very first trigger lost in YARR is due to the bug in https://sites.google.com/site/tdaqatlas/#TOC-Mar-29-2019-power-cycling-the-chip-sends-valid-data-thus-confusing-addSOPEOP-SM-)
lost trigger details in slide 7 of https://indico.cern.ch/event/805929/contributions/3358715/attachments/1813839/2965166/2019_03_17_FELIX_RD53A_Firmware_YARR.pdf
before ...02102ae4 no SOP (ie: isSOPEOP=1 happens only after it), which means that 02102ae4 will rejected by the central router
02102ae4 not received in YARR
fixed by resetting the SM in addSOPEOP when rx_lane_up goes down (COMPILONG: TO BE CHECKED)
Sasha also asked to distinguish
c frames from b frames (ie: c frame don't need the lowest significant 32b to be sent out, so I could send an EOP right away)
to replace 24b after 1E with xFFFFFF to avoid bug in RD53A where data is !=0 (see email to roberto on Mar 12 2019 at 11:10 am)
TO DO: in porting aurora_woGT into felix start over from fixed F/W (after the erase)
elinkconfig: LOCAL clock
clock from internal VC709 oscillators (~40 MHZ) goes to the jitter cleaner in TTCVx mezzanine whose output (~160 MHZ) and is routed to GTREFCLK pins via sma cables
no modifications to the F/W
TO DO : look at the clocking diagram to understand the above
RD53A powered directly from Michael's interface card
no need to power supply anymore (checked with single lane F/W that fdaq received data)
Sasha made Tim fix increase a resistor to 100 ohm for decoupling the grounds?
F/W: /users/mtrovato/FELIX_latest_Aug272018_mod_test1link_gtwizTX_auroraRX_testbeam/
generated trigger N/P from pulse generator and hooked it up to J31,32 sma outlets of VC709
checked in the scope: those signals are not perfectly LVDS like (ie: P has + 1/2V offset, N has -1/2 V, which means in the difference offset doesn't cancel out, and they have some spike)
modified f/w to trigger N/P -> trigger via IBUFGDS, (shown)
to stretch trigger for 16 40 MHZ clks (a la YARR) (shown)
to issue one 16 clks trigger stretched signal per input trigger pulse
ila outputs are below
the spike at clk ~170 is shown
at clk400 is how the F/W works: input trigger about 160 clks (=4 us), stretched signal 16 clks
RXRESETDONE :
is the final output of the reset fsm which reset sequentially each components (fig 2.21 of ug476)
depends on recovered clock
depends on rxusrrdy which is defined as follows (Table 2-28): "This port is driven High from the user's application when RXUSRCLK and RXUSRCLK2 are stable. For example, if an MMCM is used to generate both RXUSRCLK and RXUSRCLK2, then the MMCM lock signal can be used here"
since rxusrclk source is RXOUTCLK (Tab 3 of transceiver wizard), then to have a RXUSRCLK stable is ~RXOUTCLK stable, which is only due to QPLLCLK locked (fig 2-4 of ug476)
This explains why if I unplug the fibers RXRESETDONE=1
Q: where is the recovered clock being used?
Tests:
F/W: FELIX_latest_Aug162018_Mesfininstructions,
used flx-config list -> GBT_RXRESET_DONE 0x00000000000f
N.B: w/ FELIX_latest_Aug272018_mod_VLDBonQPLLlock_auroraprotocoltobeins I 0x7 so one transceiver is down
Q: why?
configured transceiver wizard w/ GTREFCLK=160 MHZ, line rate = 1.28 Gbps, internal=external datawidth = 32b
GTHE_COMMON
QPLL_FBDIV =64 and QPLL_FBDIV_RATIO =1 => N=64
QPLL_REFCLK_DIV=1 => M=1
GTHE_CHANNEL
RXOUT_DIV=8 => D=8
fPLLCLKOUT = 160 x 64/(1x2) = 5.12 GHZ (Eq 2-3 ug476)
N.B we still comply with Table 2-2 of ug476 since VCO output frequency is 5.12 x 2 = 10.24 GHZ which is within spec
(fLineRate = 5.12 x 2/8 = 1.28 Gbps, Eq 2-4)
fPLLCLKOUT is the serial clock used to derive parallel clock (ie: RX PMA CLK or RXOUTCLK since RXOUTCLKSEL="010")
RXOUTCLK= fPLLCLKOUT/8/4/4 = 40 MHZ (Page 210 211 ug476)
8=D
4 is because RX_DATA_WIDTH=32
4 is because RX_INT_DATAWIDTH=1
Notes:
can't change SOFT_TXRST_ALL, so in order to to see whether I can reset txstartup SM I changed the soft reset to GTTX_RESET_IN
SOFT_RESET_TX_IN => GTTX_RESET_IN, --MT TMP SINCE I CANNOT
--CHANGE SOFT_TXRST_ALL
reset fsm worked
aurora4lanes in FELIX
****TEST performed to have downlink working (ie: VLDB on)****
Starting from FELIX_latest_Aug272018_mod_test1link_gtwizTX_auroraRX
-1-
gtwizard_fullmode_txcpll_rxqpll_v7_common IP (already) changed to support asymmetric TX/RX
generated example design so II can get the GTHE2_COMMON/multi_gt (ie: channel) and put in the gth_fullmode_wrapper_v7.vhd
check that common settings match with what I have in aurora
continue checking gtwizard_fullmode_txcpll_rxqpll from .vho against what Kai has
Notes/Quesions
GTHE2_COMMON
QPLLREFCLKSEL= 001 since I’m using GTREFCLK0 but in gtwizard_fullmode_txcpll_rxqpll_v7 I use GTREFCLK1
gtwizard_fullmode_txcpll_rxqpll_v7 instance (OK stated in ug476 that only when one source is give you should use 001)
GT*_TX_MMCM_LOCK_IN = 1 (as Kai does in the TX_FSM_STARTUP) (solved)
no elastic buffer on RX ok? I wll switch to elastic bugger below
QPLLPD=0 while for aurora =1 (which means that QPLL is powered down and not used) -> how do you achieve lock in aurora? In any case at the end check if we are locked
MULTI_GT
uSE_BUFG=0 from Kai, not present in Aurora . I will leave it for now
rx_fsm_startup using the one from KAI as it has Kai’s _gt.vhd the right rxsysclksel=11 (ie:QPLL and clock from common)
rx_clk_locked=1 (used as CE in the BUFG that goes from rxrecclk_from_gtx_lane2_in to rxreclk_to_fabric_i) since Kai’s gtwizard RX_STARTUP_SM doesn’t have rx_clk_locked as outputs signals as in the aurora*support_rx_startup
aurora _gt.v has rxsysclksel=txsysclksel=00 which means both TX and RX with CPLL which is ok if both TX and RX are at 1.28 Gbps or TX is disabled (pag38 of ug476)
gt_fullmode_wrapper_v7/aurora rx_fsm_reset_done_in => and all rxfsmtesetdone of from gtwozard 4 RX startups
TO DO: route the other 3 RXData_gt2,3,4 to CR
results: LEDS off
-2-
DRPCLK => tied_to_ground_i, --it was DRP_CLK_IN
BGRCALOVRD => "00000",
#set_property PACKAGE_PIN AP3 [get_ports {TX_N[1]}]
#set_property PACKAGE_PIN AN1 [get_ports {TX_N[0]}]
set_property PACKAGE_PIN AP3 [get_ports {TX_N[0]}]
set_property PACKAGE_PIN AN1 [get_ports {TX_N[1]}]
results: LEDS off
-3-
started from scracth (MEsfin: /users/felix/FELIXaurora4lans/FELIX_latest_Aug162018_Mesfininstructions_mod))
regenereated gtwizard @160 Mhz 4.8 gbos, 1.28 gbps
changed _v7.vhd (added clock module, removed 8b/10b signals, etc.)
connected txusrclk to wordclk in wrapper.vhd
results: LEDS off
-4-
more chanhes:
gt0_gttxreset_in <= GTTX_RESET_IN(0); --MT or (not GT0_QPLLLOCK_I); and for gt1,2,3
results: LEDS off
-5-
more chnages
in GTHE2_COMMON
QPLLREFCLKSEL => "010", --MT Apr 10 to be consistent with how IP was generated and channel "001",
GTREFCLK0 => tied_to_ground_i, --GTH_RefClk MT Apr 10 to be consistent with how IP was generated and channel
GTREFCLK1 => GTH_RefClk, --tied_to_ground_i MT Apr 10 to be consistent with how IP was generated and channel ,
results: LEDS off
GBT_RXRESET_DONE 0x00000000000f RX Reset done [47:0], GBT_RXFSMRESET_DONE 0x00000000000f RX FSM Reset done [47:0] ,GBT_PLL_LOCK_QPLL_LOCK boutncing between 1 and 0
-6-
TO ADDRESS QPLL intermittent locking
regenerated exdes such that refclk = 160.325 = (40.08*4, where 40.08 is the right frequency from TTC clk) to see if QPLL locks
QPLL not locked, but QPLL is always locked with default Kai’s F/W (*Mesifininstructions) @240 Mhz -> so I don’t think that gtrefclk=160 Mhz is the problem if 240 Mhz has no problem
N.B: single lane working F/W FELIX_latest_Aug272018_mod_test1link_gtwizTX_auroraRX QPLL not locked —>> WARNING!!!
6) constraint file change
Kai is using IP @ 240
QPLL not locked
-7-
****starting from https://twiki.cern.ch/twiki/bin/viewauth/Sandbox/TDAQATLASANL -> produced /users/felix/ /users/felix/FELIXaurora4lans/FELIX_latest_Aug272018_mod_backApr15***
externalized each component of support (gtwizard IP w/ multi_gt inside, GTHE_COMMON, common_reset, useclk_source)
commented common_reset module
results: LEDS on, QPLL lock alternating between 0 and 1
-8-
Noticed that fupload -I0 -G0 -w4 -t 0 -D commands/RD53A_write_commands_ECR.txt works if TX fiber connected to first transceiver from the motherboard. So moved TX fiber from second transceiver to first
******Test performed to have downlink working
***** /users/felix/ /users/felix/FELIXaurora4lans/FELIX_latest_Aug272018_mod****
-9-
gt0_gttxreset_in <= GTTX_RESET_IN(0); --MT Apr15 or (not GT0_QPLLLOCK_I);
similar for gt1,2,3
reconfigured the gtwizard IP to have RX 64b/66b with internal=external data width = 32b I connected in portmap
added/changed
gt0_rxgearboxslip_i => 0
gt0_rxdatavalid_out => open
gt0_rxheader_out => open
gt0_rxheadervalid_out => open
gt0_txheader_in => “00”
removed from portmap
gt0_drp_busy_out => open,
gt0_rxdisperr_out => gt0_rxdisperr_out,
gt0_rxnotintable_out => gt0_rxnotintable_out,
gt0_rxphmonitor_out => open, --MT gt0_rxphmonitor_out,
gt0_rxphslipmonitor_out => open, --MT gt0_rxphslipmonitor_out,
gt0_rxbyteisaligned_out => gt_rxbyteisaligned_out(0), --MT
gt0_rxmcommaalignen_in => '0', --MT
gt0_rxpcommaalignen_in => '1', --MT
gt0_rxcharisk_out => gt0_rxcharisk_out,
results: VLDB off, QPLL always lock
-10-
change in the IP (_gt.v): TXGEARBOX_EN=“FALSE” (BUG in Xilinx IP for asymmetric design)
results: VLDB on, QPLL always lock (checked with ila)
-11-
GEARBOX_MODE=“001” (RX for aurora)
=> VLBD off, QPLL bouncing (switching to 320 MHZ may still make sense because N=64 will be lower)
-12-
plop in aurora in
results: VLBD on, QPLL bouncing but almost stable at 1 (probed 200 times , 5 % QPLL =0), GBT_RXCDR_LOCK 0x00000000000f RX CDR LOCK [47:0]
Notice that aurora standalone design (e.g: /users/felix/aurora4lanes/aurora4lanesRXonly_woGT or aurora4lanes_woGT) uses CPLL for both tx and rx (TXRX are both at 1.28 Gbps so ok) because RXSYSCLKSEL=TXSYSCLKSEL=00 in GTHCHANNEL,
CPLL settings: N=16, N2=N1=4, M=1 => fPLLCLKOUT=160x(4x4/1)=2560 MHZ, fLR= 2.56x2/4=1.28 MHZ per eq 2-1, 2-2 of ug476).
fPLLCLKOUT is specs (Pag 48 of ug476), LR matched to what I put in
****FELIX_latest_Aug272018_mod_gtwizardauroraprotocol signals with aurora IP*****
-13-
in gtwizard_init.vhd commented EXAMPLE_USE_CHIPSCOPE and allowed for external reset (BUG in FELIX)
Fixed following WARNING: [Synth 8-3848] Net rxrecclk_from_gtx_lane2_in in module/entity aurora_64b66b_0_support does not have driver.
Clock previously disconnected now connected
results: VLBD on, QPLL stable at 1 , GBT_RXCDR_LOCK 0x00000000000f RX CDR LOCK [47:0], gt0,1,2 3 fsm completed, RXRESETDONE for all transceiver
-14-
in support.v user_clk_i was disconnected gt0_rxusrclk_i and replaced with user_clk_i
//MT Apr 23_2 commented .USER_CLK(gt0_rxusrclk_i), //MT user_clk_i),
.USER_CLK(user_clk_i),
results: VLBD on, QPLL stable at 1 , GBT_RXCDR_LOCK 0x00000000000f RX CDR LOCK [47:0], gt0,1,2 3 fsm completed, RXRESETDONE for all transceiver, in ila rx_lane_up bouncing but channel_up=0
-14-
noticed that /users/felix/aurora4lanes/aurora4lanesRXonly_woGT : lane/channel up after flushing bit, but down if powercycle board
and /users/felix/aurora4lanes/aurora4lanes_woGT : lane/channel up after flushing bit, up after power cycle the board
Questions:
TO DO: why is duplex computed the rxpolarity ("sync_rx_polarity" in the F/W) based on the rxheader (01 = polarity 2, 10 = polarity 1 or the other way around), while the simplex doesn't?
why is the rxpolarity different from one lane Vs the others? Looked at Mike's schematics for the interface board and there is a mistake in pag 4 of 18pc014.pdf (GTX2 lanes have polarity inverted)
Hard coded rx_polarity=1 in aurora4lanes_woGT as input of the gthe_channel for the lane0 and simplex behaves the same as duplex
in FELIX_latest_Aug272018_mod_gtwizardauroraprotocol connected rxpolarities to vio w/ default value 0010
TO DO: HAvE POLARITIES SET FROM REGISTERS
results: VLBD on, QPLL stable at 1 , GBT_RXCDR_LOCK 0x00000000000f RX CDR LOCK [47:0], gt0,1,2 3 fsm completed, RXRESETDONE for all transceiver, and
FELIX_latest_Aug272018_mod_gtwizardauroraprotocol: in ila rx_lane_up and channel_up bouncing
if channel_up is not achieved in a given time rx_lane_up gets reset
aurora4lanes_woGT : rx_lane_up=channel_up stable at 1
-15-
looked in aurora4lanesRXonly_woGT and saw that the RX startup FSM gets his soft_reset from channel bonding module (the same that reset lane_up)
connected soft_reset of the RX startup FSM in FELIX_latest_Aug272018_mod_gtwizardauroraprotocol to channel_bonding link reset
results: rx_lane_up=channel_up stable at 1
TO DO : DOCUMENT WAVES
sync block SM: oscillates between monitor (16) and valid (32), after 6000 correct headers (01 or 10) is done (state=1) and goes back to monitor
wrong polarity in lane0 (header =1 data !78100000 = 87EFFFFF, ...) make the channel bond fail
channel bonding failing cause the reset and thus the "lossoflink"
rxpolarity as correctly calculated and used (duplex extra VC709 F?W): as you can see lane 0 has different polarity (=1) than the others (=0) and once that is used headers of all lanes are the same (=2)
rxpolarity as wrongly calculated and used (simplex extra VC709 F?W): as you can see lane 0 has same polarity =0 as others and once that is used headers of lane0 is different (=1) than header of all other lanes (=2)
***Summary***
Aurora 4 lanes with MGT decoupled and removed successfully integrated into FELIX (see https://sites.google.com/site/tdaqatlas/#TOC-May-1st-2019-Aurora-4-lanes-working-in-FELIX- )
While debugging found bug in
Xilinx GTWIZARD IP: for asymmetric configuration with TX no protocol and RX aurora 64b/66b: TXGEARBOXM=EN
FELIX:
in gtwizard_init.vhd commented EXAMPLE_USE_CHIPSCOPE and allowed for external reset
some registers (e.g: GTTX/RXRESET from GBT_GTTX/RX_RESET) do not work as they should or at all (see above)
Mike's interface card has an undocumented polarity inversion
***Additional Notes***
FELIX:
GTRXRESET as the register doesn’t seem to be working
FULL_Mode_Data_Valid goes to 1 (see in ila with FULL_Mode_Data_Valid=1 as trigger)
elinkconfig is set such TH_FO not in E and not locked
is the emulator interfering? FULL_Mode_Data_Valid can come either from FullModeWrapper or Emulator depending on the selection register_map_control.GBT_TOHOST_FANOUT.SEL in fromfrontend_fanout_selector_FM.vhd
if not in E and locked FULL_Mode_Data_Valid never goes to 1
FHFO not locked
running fdaq
test FELIX with GTREfclk at 320 MHZ
added new option in flx-init to generate higher frequency clock
goal was to have lower N in the QPLL such that could lock easily
had troubled in compiling the F/W with the clock_module from aurora. Had to move from 320 to 240 with clock wizard IP(FELIX_latest_Aug272018_mod_320GTHRefclk/FLX709_FULLMODE_RM0403_4CH_CLKSELECT_GIT_master_rm-4.3_66_190414_20_09.bit)
test didn't work
generated a bunch of gtwizard with different protocol selection in /users/felix/FELIXaurora4lanes/gtwizard_differentflavor to compare a) among each other and b) aurora
diff gtwizard_auroraprotocol_verilog/gtwizard_auroraprotocol.srcs/sources_1/ip/gtwizard_0/gtwizard_0_gt.v gtwizard_fromscratch_samesettingsasauroraprotocol/gtwizard_fromscratch_optionalportsauroraprotocol.srcs/sources_1/ip/gtwizard_0/gtwizard_0_gt.v
< .ALIGN_MCOMMA_DET ("FALSE"),
---
> .ALIGN_MCOMMA_DET ("TRUE"),
283c282
< .ALIGN_PCOMMA_DET ("FALSE"),
---
> .ALIGN_PCOMMA_DET ("TRUE"),
diff gtwizard_auroraprotocol_verilog/gtwizard_auroraprotocol.srcs/sources_1/ip/gtwizard_0/gtwizard_0_gt.v ../../aurora4lanes/aurora4lanes_woGT/aurora_64b66b_0_example/aurora_64b66b_0_example.srcs/shared_logic/aurora_64b66b_0_gtx.v
differences understood since aurora uses CPLL and gtwizard uses QPLL
(focus on differences at RX level)
< .RXOUT_DIV (8),
---
> .RXOUT_DIV (4),
TO BE DESCRIBED
F/W: /users/felix/FELIXaurora4lanes/FELIX_latest_Aug272018_mod_gtwizardauroraprotocol_backMay1st_working4lanes
HW: describe change in configuration
elinkconfig: same as usual, but replicated to all 4 links
N.B: TH_FO locked (describe bug)
fdaq, fcheck
link number shown in red
data appearing in the two waveforms zoom below is bolded
==> BLOCK 0 (E=000=0-0-0 seq=0): 1012 databytes
77 f7 6 3c 80 12 0 2 7f 77 c 3c f7 77 e 3c f7 ff 12 3c 77 f7 14 3c ff f7 18 3c 77 f7 1a 3c
f7 ff 20 3c f7 ff 22 3c ff f7 2d 3c f7 7f 28 3c 7f ff 35 3c ff f7 37 3c 7f 7f 3d 3c ff 7f 3f 3c
7f ff 43 3c ff 77 47 3c ff 7f 4b 3c ff f7 4d 3c f7 ff 53 3c 7f ff 55 3c f7 f7 59 3c 7f f7 5b 3c
ff f7 6e 3c 7f f7 61 3c 77 ff 77 3c 7f ff 70 3c 7f f7 79 3c ff f7 7b 3c f7 f7 8a 3c 7f ff 8e 3c
ff 77 92 3c ff 77 94 3c 77 ee 98 3c 77 77 9a 3c 77 f7 a7 3c 7f f7 a0 3c f7 ff ad 3c 77 7f af 3c
77 7f b1 3c f7 77 b5 3c 7f ff c4 3c f7 ff c6 3c 7f 7f ca 3c ff f7 cc 3c 77 f7 d5 3c f7 7f d7 3c
7f 7f db 3c ff f7 dd 3c f7 ff e3 3c 77 f7 e5 3c f7 f7 eb 3c 77 7f ed 3c 77 ff f3 3c 7f ff f5 3c
77 ff 6 3d f7 77 fb 3c ff 7f c 3d 7f 77 e 3d 7f ff 17 3d f7 f7 10 3d 7f e7 19 3d f7 ff 1b 3d
7f f7 21 3d ff 7f 23 3d 7f ee 29 3d 77 f7 2b 3d ff 7f 31 3d 7f ff 33 3d 77 f7 46 3d ff 7f 39 3d
7f 7f 4c 3d f7 ff 4e 3d 77 ff 52 3d ff f7 54 3d 7f 77 5f 3d f7 ff 58 3d ff 77 65 3d f7 f7 60 3d
f7 ff 74 3d f7 f7 76 3d 77 f7 7c 3d 7f 77 7e 3d
==> BLOCK 1 (E=040=1-0-0 seq=0): 1012 databytes
7f f7 7 3c fe ee 0 3c ff 7f b 3c 77 ff d 3c ff 77 11 3c ff 7f 13 3c ff 7f 19 3c 7f 7f 1b 3c
ff f7 2e 3c 7f ff 23 3c f7 7f 34 3c ff f7 36 3c f7 ff 3c 3c 7f 7f 3e 3c 7f ff 44 3c f7 77 46 3c
f7 f7 4a 3c ff 77 4c 3c 77 f7 52 3c 7f 77 54 3c f7 ff 58 3c ff 7f 5a 3c ff 7f 60 3c 77 ff 62 3c
f7 ff 6b 3c f7 7f 68 3c f7 ff 78 3c 77 ff 7c 3c f7 77 80 3c 7f ff 82 3c 7f 77 8b 3c 7f 77 8d 3c
7f 7f 93 3c ff f7 95 3c 77 fe 99 3c f7 7f 9b 3c 77 7f ae 3c 77 ff a1 3c 77 ff b2 3c f7 7f b4 3c
77 fe b8 3c 77 ff ba 3c 7f 7f c5 3c 77 7f c7 3c 77 f7 d4 3c 7f ff d6 3c f7 7f da 3c f7 7f dc 3c
7f f7 e2 3c 7f f7 e4 3c f7 7f ea 3c 77 7f ec 3c ff f7 f2 3c 7f 7f f4 3c ff 7f f8 3c f7 ff fa 3c
7f f7 7 3d f7 7f 0 3d 7f 7f b 3d f7 7f f 3d 77 7f 18 3d f7 f7 11 3d 7f fe 20 3d 77 77 22 3d
f7 f7 28 3d 77 ff 2a 3d 77 7f 30 3d 7f 7f 32 3d ef ef 38 3d 77 77 3a 3d f7 7f 45 3d 7f ff 47 3d
ff 77 4d 3d 7f f7 4f 3d 7f f7 51 3d f7 77 53 3d f7 f7 66 3d ef ee 59 3d f7 7f 6a 3d ff 77 6e 3d
f7 ff 75 3d 7f 7f 77 3d f7 f7 7d 3d 77 ff 7f 3d
==> BLOCK 2 (E=080=2-0-0 seq=0): 1012 databytes
f7 7f 3 3c f7 ff 5 3c ff f7 16 3c ff 77 9 3c 7f ff 1c 3c 7f ff 1e 3c ff 77 24 3c 7f ff 26 3c
f7 ff 2a 3c ff 7f 2c 3c 7f f7 30 3c f7 7f 32 3c ff 7f 38 3c 7f ff 3a 3c ff 77 40 3c ff 7f 42 3c
ff 77 4f 3c ff 7f 48 3c f7 ff 57 3c ff ef 50 3c 77 7f 5d 3c ff f7 5f 3c 7f f7 65 3c ff f7 67 3c
ff f7 72 3c f7 f7 76 3c 77 ff 7d 3c 77 7f 7f 3c ff f7 83 3c f7 f7 87 3c 77 f7 96 3c e7 ff 89 3c
7f 7f 9e 3c 77 f7 91 3c 7f ff a4 3c 77 ff a6 3c ff 77 a8 3c f7 ff ac 3c f7 f7 b7 3c 7f ff b0 3c
7f 77 b9 3c 7f f7 bb 3c 7f ff ce 3c f7 f7 c1 3c ff 7f d0 3c f7 77 d2 3c ff f7 df 3c ff 77 d8 3c
f7 7f e7 3c f7 7f e0 3c 7f f7 ef 3c ee ef e8 3c 7f 7f f7 3c 7f f7 f0 3c f7 7f fd 3c ff 7f ff 3c
7f 7f 1 3d 77 ff 3 3d f7 77 14 3d 7f f7 16 3d 77 f7 1d 3d 7f f7 1f 3d 7f ff 25 3d 77 77 27 3d
7f 7f 2d 3d ff 77 2f 3d ff 77 35 3d 7f 7f 37 3d ff 7f 3b 3d ff f7 3f 3d f7 f7 41 3d 7f ff 43 3d
7f f7 56 3d 7f ff 49 3d 77 ff 5a 3d f7 f7 5e 3d ff 7f 62 3d ff 77 64 3d 77 ff 6f 3d ff f7 68 3d
f7 f7 71 3d 77 f7 73 3d ff 77 79 3d ff f7 7b 3d
==> BLOCK 3 (E=0C0=3-0-0 seq=0): 1012 databytes
77 7f 2 3c 7f f7 4 3c f7 f7 f 3c 7f 7f 8 3c 7f f7 17 3c 77 f7 10 3c 77 ff 1d 3c ff 77 1f 3c
7f f7 25 3c f7 ff 27 3c ff f7 29 3c ff f7 2b 3c 7f ff 31 3c f7 ff 33 3c 7f 7f 39 3c ff 7f 3b 3c
ff f7 4e 3c f7 f7 41 3c 7f 7f 56 3c f7 ff 49 3c ff 77 5c 3c f7 ff 5e 3c 7f ff 64 3c 7f ff 66 3c
f7 ff 6a 3c 7f 7f 6c 3c 7f 7f 7e 3c 7f ff 73 3c 77 7f 84 3c 7f ff 86 3c 7f ff 8f 3c 77 7f 88 3c
7f f7 97 3c ff f7 90 3c f7 ff 9d 3c 77 f7 9f 3c ff 77 a3 3c 7f ff a5 3c 7f 7f b6 3c ff f7 ab 3c
f7 7f bc 3c f7 f7 be 3c 7f 77 c0 3c ff 77 c2 3c 77 7f c9 3c 77 77 c8 3c ef ee d1 3c 77 7f d3 3c
f7 ff e6 3c 7f ff d9 3c 7f 77 ee 3c f7 f7 e1 3c 7f ff f6 3c e7 fe e9 3c f7 7f fc 3c 77 7f fe 3c
f7 f7 2 3d ff 7f 4 3d 77 ff 8 3d 7f f7 a 3d f7 7f 13 3d f7 ff 15 3d ff 7f 24 3d 77 ff 26 3d
7f 7f 2c 3d 7f 7f 2e 3d f7 f7 34 3d ff 7f 36 3d 7f f7 3c 3d ff 77 3e 3d f7 f7 40 3d 7f ff 44 3d
f7 ff 48 3d ff 7f 4a 3d f7 7f 57 3d 7f 77 50 3d 77 ff 5b 3d 7f 77 5d 3d f7 ff 61 3d f7 f7 63 3d
7f ff 70 3d 7f f7 72 3d ef ef 78 3d f7 e7 7a 3d
F/W (FELIX): /users/felix/FELIXaurora4lanes/FELIX_latest_Aug272018_mod_gtwizardauroraprotocol
F/W (extra VC709) : /users/felix/aurora4lanes/aurora4lanesRXonly_woGT_tlasttvaliddecouple_backMay20
HW: 1 RD53A only
1E frame come only in one lane (lane may vary from calibration to calibrations)
1chip : /users/mtrovato/YarrFromJoseph/Yarr
2chips: /users/mtrovato/YarrFromJoseph/Yarr_merge
----
YARR
To compile:
download the precompiled version of the felix software and source the setup script #using Joseph's for now
setupATLAS
lsetup cmake
lsetup "gcc gcc620_x86_64_slc6"
make a build directory and cd into this
cmake3 .. -DCMAKE_TOOLCHAIN_FILE=../src/cmake/linux-gcc -DENABLE_NETIO:BOOL=ON -DNETIO_DIR:PATH=/users/lambertj/tmp/felix/felix-04-00-05/x86_64-slc6-gcc62-opt/ #using josep
make -j 20
YARR LBL
#Assumes that one has the precompiled software and the felix code from git available.
#clock/elinkconfig
cd ~/software
source /home/user14/software/cmake_tdaq/bin/setup.sh x86_64-centos7-gcc62-opt
x86_64-centos7-gcc62-opt/flxcard/flx-init
x86_64-centos7-gcc62-opt/elinkconfig/elinkconfig
YARR+felixcore
source /home/user2/felix-04-00-05/x86_64-centos7-gcc62-opt/setup.sh
felixcore -t 1 –-data-interface lo
cd ~/Yarr_merge
source /home/user2/felix-04-00-05/x86_64-centos7-gcc62-opt/setup.sh
cd src/build
#only the first time (or to cleanup)?
cd ../
rm -r build
cmake3 .. -DCMAKE_TOOLCHAIN_FILE=../src/cmake/linux-gcc -DENABLE_NETIO:BOOL=ON -DNETIO_DIR:PATH=/home/user2/felix-04-00-05/x86_64-centos7-gcc62-opt/
scanConsole//s->run ; ScanBase.cpp//run ; LoopActionBase.cpp//execStep();
1) Rd53aCoreColLoop.cpp//execPart1 (I see this appearing two times why?) ->
2) Rd53aMaskLoop.cpp // execPart1,2 (does the masking for each channel)
-> Rd53aMaskLoop.cpp//g_tx->setCmdEnable -> NetioTxCore::setCmdEnable//enableChannel(chan) -> NetioTxCore::enableChannel
#3) Rd53aTriggerLoop.cpp//execPart1 -> g_tx->setTrigEnable(0x1) -> NetioTxCore.cpp//setTrigEnable, calls prepareTrigger-> NetioTxCore::prepareTrigger
I see 40000 events per chip which means 1 (mask stage) x 25 (core loop) 16 (#trigger) x 100 (injection). FIrst two can be decided in the json
F/W: /users/felix/FELIXaurora4lanes/FELIX_latest_Aug272018_mod_gtwizardauroraprotocol_working4lanesnotbonded
FLX709_FULLMODE_RM0403_4CH_CLKSELECT_GIT_master_rm-4.3_66_190523_15_28.bit
Yarr version working for two chips in here: /users/mtrovato/YarrFromJoseph/YarrTimonJun5/YARR
now committed to https://gitlab.cern.ch/YARR/YARR/tree/devel_rd53a_felixNetio_multichip
downloaded on June 5 from https://gitlab.cern.ch/YARR/YARR/tree/channel_refactor
fixes from Timon applied especially in the NetioTx/RxCore.cpp (https://gitlab.cern.ch/YARR/YARR/commit/3d3108a14b98a4c76be7746f83c52289c5783104)
I think now sends triggers and configuration messages (https://gitlab.cern.ch/YARR/YARR/blob/master/src/libNetioHW/NetioTxCore.cpp#L226 and https://gitlab.cern.ch/YARR/YARR/blob/master/src/libNetioHW/NetioTxCore.cpp#L188) one channel at the time, rather than packing messages for the two chips together
TO DO: compare /users/mtrovato/YarrFromJoseph/YarrTimonJun5 and /users/mtrovato/YarrFromJoseph/YARRLBL to see differences
YARRLBL not working for two chips, but working for one
Instructions to run YARR
felixcore (terminal 1)
source /users/lambertj/tmp/felix/felix-04-00-05/x86_64-slc6-gcc62-opt/setup.sh
felixcore -t 1 –-data-interface lo
YARR (terminal 2)
cd YarrFromJoseph
source /users/mtrovato/YarrFromJoseph/setup_joseph.sh
cd /users/mtrovato/YarrFromJoseph/YarrTimonJun5/YARR/src/build/
(#if want to start from scratch) cd ..; rm -r build; mkdir build; cd build/ ; cmake3 .. -DCMAKE_TOOLCHAIN_FILE=../src/cmake/linux-gcc -DENABLE_NETIO:BOOL=ON -DNETIO_DIR:PATH=/users/lambertj/tmp/felix/felix-04-00-05/x86_64-slc6-gcc62-opt/ ; make -j 20
bin/scanConsole -r configs/controller/felix.json -c configs/connectivity/example_rd53a_setup.json -s configs/scans/rd53a/std_digitalscan.json -p
Tuning means adusting some parameters of the FEs to reduce noise w/o killing signals
From https://yarr.readthedocs.io/en/latest/rd53a/ Tuning of the differential FE starts from VTH1_DIFF
from https://indico.physics.lbl.gov/indico/event/679/contributions/1852/attachments/1618/1921/2018_07_10-LBNL_friday_meeting.pdf ( slide 7) it's obvious that VTH1 increase the global threshold and a larger injection bias is needed
increasing thresholds is to get rid of the noise (https://indico.cern.ch/event/653169/contributions/2659489/attachments/1493031/2321582/talkMaria.pdf_
Define enable (EN) @ clk40 (40 MHZ) as follows
=1 for 1 clk40 period
=0 for 1clk40 period
EN is equivalent to a 20 MHZ
used EN as aurora_lane_initialization clk (instead of the 20 MHZ clk): nothing worked (lane_up=0 etc...)
fed EN into BUFG and used the output of the BUFG as aurora_lane_initialization clk: worked
take home message: clk to drive logic has to be free of routing delays, which can be achieved by using BUFG
5 clk latency (extra VC709): /users/mtrovato/aurora4lanes/aurora4lanesRXonly_woGT or ~/aurora4lanes/aurora4lanesRXonly_woGT_startfromscractch
Aurora IP cleaned up, cb modules removed (to be put back)
almost done migrating to a single clk domain (40 MHZ)
FELIX latest F/W: see above /users/felix/FELIXaurora4lanes/FELIX_latest_Aug272018_mod_gtwizardauroraprotocol_working4lanesnotbonded
******
source CalInjection.sh 6 while triggered on tvalid=1
looked rxdata_to_fifo_lane2 = 3d797fff, 3d7dfff7
rx_tdata = f7ff7d3dff7f793d (from the last byte of _to_fifo to the first byte)
****
/users/mtrovato/aurora4lanes/aurora4lanesRXonly_woGTworksimu
generate 32b data (=0xaaaaaaaa), header (=01), valids (=1) in support and passing it to the aurora core
bypassing data from MGT
works: after 72us receiving 0x55555555 (=0xaaaaaaaa reverted)
firmware:
/users/mtrovato/aurora4lanes/aurora4lanesRXonly_woGT_startfromscractch_backupOct18_cbccbugnotconsideringmgtvalidfixed_enseparatedforalllanes
reworked channel bonding module is converting 32b data from MGT (after unscrambling) to 64b
once two 32b word are accumulated EN is asserted
in the module I was not taking into account
the invalid signal from MGT
nd that the 64b word should always start from 0x78
000000ada data from the trasnceiver streched because of invalid
causes data from cbcc to be 000000ada 000000ada and throw an illegal_btf
now fixed
all lanes working: first valid data
lanes (rxdata_to_fifo*) show 1 clk skew (lane1 wrt thge others)
second valid data 1/2
second valid data 2/2
firmware (tested): /users/mtrovato/aurora4lanes/aurora4lanesRXonly_woGT_startfromscractch_backupOct22
firmware (tested): /users/mtrovato/FELIXaurora4lanes/FELIX_latest_Oct152019_quickaurora_backupOct22
Corrected small bug:
always @(posedge CLK40)
if(RESET)
begin
count_1b <= `DLY 1'b0;
first_time <= `DLY 1'b1;
end
else if (fifo_din_i[36]) //valid
begin
if (first_time && fifo_din_i[31:24] == 8'h78) //start counter if first idle seen
begin
count_1b <= `DLY 1'b1;
first_time <= `DLY 1'b0;
end
else if (!first_time) //count -----> bug fix
begin
if (count_1b == 1'b0)
begin
count_1b <= `DLY 1'b1;
end
else
begin
count_1b <= `DLY 1'b0;
end
end
end
else
begin
count_1b <= `DLY count_1b;
end // if (first_time and fifo_din_in[31:24] = 0x"78")
Procedure:
Power Cycle RD53A
Connect fibers such that lane0 chip goes to MGT2 felix, and the polarity inverted lane goes to the right place
look at data from MGT to see if any polarity should be inverted (0x78... -> ok)
RESET RXFSM via vio (0xF, 0x0)
make sure no soft_err are thrown and lane_up = f in ila
set up triggers as in the screenshots
terminal 1: fdaq - t 20 -D blabla; terminal 2: source CalInjection.sh 6
Results (repeated twice; fdaq outputs
testOct22_quickaurora_2-191022-132455-1.dat,
testOct22_quickaurora_3-191022-134545-1.dat)
After 5 clks MGT data seen correctly (rx_tdata)
-> What's the invalid garbage (valid=0) a48... at clk 999?
-> why 003c rather than 103c? Bit flip not there if I repeat the measurement
data correctly outputted by my module 1/2
data correctly outputted by my module 2/2
Data correctly seen by fdaq (showing only one link)
64b/66b quick aurora F/W integrated in FELIX: https://gitlab.cern.ch/atlas-tdaq-felix/firmware/tree/phase2/64b66b
locally available in /users/mtrovato/Phase2/64b66b_dacanc/firmware/
hold slack slightly failed
TO DO:
implement channel bonding
get rid of the vio that reset MGT SM
optimize 64b66b for BRAM usage (see email exchange with Marius on Oct 29 2019
adapt to FLX-712
integrate simulation from Macallan
incorporate lpGBT changes as it was done in https://gitlab.cern.ch/atlas-tdaq-felix/firmware/tree/GBTvc709flx712unified
remove elastic buffer from MGT
resource usage from aurora in ~/FELIXaurora4lanes/FELIX_latest_Oct152019_quickaurora/firmware/Projects/felix_fullmode_top/felix_fullmode_top.runs/impl_1/
addSOP, split64b: (2+2)x4 = RAMB36
split1b uses RAMB18 (to account for that)
_core, ilas: 7 + 7 + 25 + 101
total = 156 (as the number of RAMB36 that I sent to Marius)
F/W (FELIX): /users/mtrovato/FELIXaurora4lanes/FELIX_latest_Oct152019_quickaurora_backupOct22
F/W (extra VC709): ~/aurora4lanes/aurora4lanesRXonly_woGT_startfromscractch_headerfirstbytefirst32bword_BackNov13
before fix
after fix
swapped the 32b from RD53a to have header in the first 32b word (N.B: assuming that RD53A spits out header as second 32b word . True in the b frames (1E....32b header data), not obvious from the manual from a frames.
LINKS TO BE SORTED OUT:
https://www.xilinx.com/support/documentation/white_papers/wp271.pdf
http://www1.pldworld.com/@xilinx/html/technote/TOOL/MANUAL/15i_doc/ALLIANCE/LIB/lib10_10.htm
https://www.xilinx.com/support/documentation/sw_manuals/xilinx13_2/7series_scm.pdf
https://www.xilinx.com/support/documentation/application_notes/xapp465.pdf
https://www.xilinx.com/support/documentation/user_guides/ug474_7Series_CLB.pdf
https://www.xilinx.com/support/documentation/sw_manuals/xilinx14_1/7series_hdl.pdf
genvar iw;
generate for (iw = 0; iw < 256; iw=iw+1) begin : srl16
SRL16E #(
.INIT(16'h0000) // Initial Value of Shift Register
) SRL16E_inst (
.Q(rx_tdata_shift[iw]), // SRL data output
.A0(srl_addr[0]), // Select[0] input
.A1(srl_addr[1]), // Select[1] input
.A2(srl_addr[2]), // Select[2] input
.A3(srl_addr[3]), // Select[3] input
.CE(1'b1), // Clock enable input
.CLK(clk40_i), // Clock input
.D(rx_tdata_out[iw]) // SRL data input
);
end endgenerate // block: srl16
F/W:
/users/mtrovato/aurora4lanes/aurora4lanesRXonly_woGT_startfromscractch_wCB
/users/mtrovato/aurora4lanes/aurora4lanesRXonly_woGT_startfromscractch_wCB_noelasticbuffer
changed in RX_BUF_EN ("FALSE") in _gtx.v
w/ MGT RX elastic buffer: skew change each time I power cycle the chip. Skew as bad as 10x2 40 MHZ clks
no MGT RX elastic buffer
deskew / channel bonding module with no fifo: /users/mtrovato/aurora4lanes/aurora4lanesRXonly_woGT_startfromscractch_wCB_noelasticbuffer/aurora4lanesRXonly_woGT_startfromscractch.srcs/sources_1/ip/64b66b_ip/64b66b_deskew.v
Merge Phase2/master into Phase2/64b66b
resolve conflicts by renaming files of my fullmodewrapper to distinguish with what Kai has
commit those files as test files
write a testbench
coordinate with Marius to write a wrapper the include both RD53B and 64b66b decoder
Details in https://sites.google.com/site/tdaqatlas/#TOC-Sep-26-2018-PRBS7-from-RD53A-to-other-VC709-works-
Main difference is that in the IBER GUI -> Ports -> RXPOLARITY = 1 given the polarity swap in the 12 channel card
4 -channels
12-channels
> current working dir: ~/YARR_dwilbern/software_tarball
> get started
- tarball from Joseph: ~~/YARR_dwilbern/software_tarball
- a snapshot of felix software on git a while back (if interested git log in each subdir and see the last commit)
- applied changes in flx-init.cpp to have a 160 MHz
- precompiled: ~mtrovato/YARR_dwilbern/software_tarball_409
- from https://atlas-project-felix.web.cern.ch/atlas-project-felix/user/dist/software/apps/4.x/
-git
followed instructions here: https://gitlab.cern.ch/atlas-tdaq-felix/software/blob/master/README.md (cheeck also the requirements)
1. mkdir YARR_dwilbern/felixcoreMT_backFeb25/
2. git clone ssh://git@gitlab.cern.ch:7999/atlas-tdaq-felix/software; cd software; ./clone_all.sh ssh
3. source <your felix work directory>/software/cmake_tdaq/bin/setup.sh x86_64-centos7-gcc8-opt4.cd software; cmake_config x86_64-centos7-gcc8-opt
4. cd x86_64-centos7-gcc8-opt/felicore; make -j
> run
- tarball: cd YARR_dwilbern/software_tarball/
source cmake_tdaq/bin/setup.sh x86_64-centos7-gcc8-opt #for centos7 (x86_64-slc6-gcc62-opt for SL6)
cd x86_64-centos7-gcc8-opt
./felixcore -d 0 -t 1 --data-interface lo (flx-init and elinkconfig must be set already)
[N.B: for two devices do -d 0 -d 1; for debugging -v or --trace; --trace will save output in .csv, important messages are TOHOST or FROMHOST listing data received by felixcore..check the manual]
- precompiled:~mtrovato/YARR_dwilbern/software_tarball_40
- source felix-04-00-09/x86_64-centos7-gcc8-opt/setup.sh; cd felix-04-00-09/x86_64-centos7-gcc8-opt/bin; ./felixcore
- git: YARR_dwilbern/felixcoreMT_backFeb25/
source cmake_tdaq/bin/setup.sh x86_64-centos7-gcc8-opt
cd x86_64-centos7-gcc8-opt/
cd felixcore; ./felixcore --noweb --trace -d 2 -d 3 -t 1 --data-interface lo
> branch: https://gitlab.cern.ch/YARR/YARR/-/tree/devel_rd53a_felixNetio_multichip_rebase
- as backup use https://gitlab.cern.ch/YARR/YARR/-/tree/devel_rd53a_felixNetioNext
> current working dir: ~/Phase2/DirectReadout/software/YARR/YARR_latest_devel_rd53a_felixNetio_multichip_rebase/<
- it was ~/Phase2YARR_dwilbern/YARR
> clone and build YARR
git clone https://gitlab.cern.ch/YARR/YARR.git Yarr
(felixcore -d 0 --data-interface lo --monitoring-interface lo --toflx-tlp 64)
flx-config set GBT_SOFT_RESET=0xFFFFFF; flx-config set GBT_SOFT_RESET=0; flx-reset SOFT_RESET)
(use GBT_SOFT_TX_RESET_RESET_GT, GBT_SOFT_TX_RESET_RESET_ALL if the Rd53A is not locked)
1. source /opt/rh/devtoolset-7/enable
2. cd Yarr/;
3. mkdir build; cd build/
4. cmake3 .. -DYARR_CONTROLLERS_TO_BUILD="Spec;Emu;NetioHW" -DNETIO_DIR:PATH=$FELIXSW/x86_64-centos7-gcc8-opt
- if it doesn't point to the right gcc do add "-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/gcc"
- FELIXSW is the SW PATH (e.g; /users/mtrovato/Phase2/DirectReadout/software/software)
5. make install -j4
6. make -j
3'.4'.5'.6' [new instructions master branch ad in README]
cmake3 -S ../Yarr -B build -DYARR_CONTROLLERS_TO_BUILD="Spec;Emu;NetioHW"
cmake3 --build build -j4
cmake3 --install build
cd build; make -j
7. copy the currecnt configs (cp -r /users/mtrovato/Phase2/DirectReadout/software/YARR/configs/configs_MTwithSyncFEplusothermodasZijun/ .)
To recompile starting from scratch (while keeping current Yarr version) rm -rf build and start over from 3
To compile when making change in the .cc : make -j
7.' [new instructions master branch]
To compile when making change in the .cc : make -j
cmake3 --install build -j4
cd build; make -j; cd ..
or
make -C build -j12 install
> run
source /opt/rh/devtoolset-7/enable
cd Yarr/build,
bin/scanConsole -c configs_zijun/connectivity/example_rd53a_setup.json -s configs_zijun/scans/rd53a/std_digitalscan.json -r configs_zijun/controller/felix.json -p
[bin/scanConsole -c configs_MT/connectivity/rd53a_oneChip_directreadout.json -s configs_MT/scans/rd53a/std_digitalscan.json -r configs_MT/controller/felix_directreadout.json]
- configs stored in /users/mtrovato/Phase2/DirectReadout/software/YARR/configs/
bin/scanConsole -c configs/connectivity/rd53a_oneChip.json -s configs/scans/rd53a/std_digitalscan.json -r configs/controller/felix.json -p
[You can edit the config file "configs/defaults/felix_rd53a.json" to configure the registers on RD53a, and "configs/connectivity/rd53a_oneChip.json" to change which lane to use for TX and RX]
> comments:
- in Yarr/README.md there are instructions on how to install YARR and the requirements
- sudo yum install cmake3 # to comply with the instructions; sudo yum install zeromq-devel # to comply with the netio
- point to the same netio package of the felix SW repo you want to use in the cmake3
- configs_MT/defaults/felix_rd53a.json Vs configs_zijun/rd53a_0.json to understand how to disable FEs
> notes
- Jun 21 2021
+ merged zijun changes (https://gitlab.cern.ch/YARR/YARR/-/merge_requests/311)
> fc8d980d causes soft errors at the beginning because of the global pulse
+ in order to make it work needed to commen out ECR in NetioRXCore.cpp (https://gitlab.cern.ch/YARR/YARR/-/commit/0da632c92668834b8bdc4436d531de5aad6d9cd2)
/ other ECR in libRd53a/Rd53a.cpp
+ didnt' change the CMakeLists.txt.external
F/W: /users/mtrovato/FELIXaurora4lanes/FELIX_latest_Oct152019_quickaurora_worksJan172020
64b66b_top
switched to clk40_i rather rxrecclk_i everywhere to fix WHS violations
the two clocks are equivalent
addSOPEOP :
everything in 40 MHz clk domain since aurora is in the 40 MHz clk domain
wr_en of the FIFO = en_out & valid at the output of aurora so don't write twice the same data into the fifo
split64bword:
everything in 40 MHz clk domain since aurora is in the 40 MHz clk domain
fifo_split6b4word_1b increase input to 2b width to match the aspect ratio of the fifo_split64bword and synchronize isSOP with the data
w/o this trick I was RX_gtData_33b_out = 0...3c or 1..hitdata which is wrong (1...3c or 0...hitdata is correct)
after power cycling the chip got a good scan (repeated two or three times)
scan hungs is I run w/o power cycling the chip
I've seen in the YARR printout two headers in the same bunch but I can 't reproduce the problem anymore
TO DO:
-> fix the problem with tlast = 4 when lane0 only is activated (tlast should be only 0 or 1)
machine's name is "yarr"
username is "yarr" , passwd t3stb3am!
YARR" in /home/yarr is a copy of YARR from me that works
and Felix is located in /home/yarr/FELIX/software_tarball.
If you want to reprogram the VLDB you can do "cd /home/yarr/VLBD_programmer && java -jar programmerv2.20180725.jar" and select the txt file in the same directory.
Minipod
Electrical pins D[0,11]: in Fig. 7 https://svn.inside.anl.gov/repos/hep_elecdesign/FELIX_PH2/19PC038/Datasheets/MiniPod/AFBR-811VxyZ_20160510175056390.pdf
MPO to 12 LC Optical fibers: each LC fiber is labelled with a number 1-12 : https://store.cablesplususa.com/jh12-gx50mm025pf.html
Electrical to Optical mapping: DN -> LCFiberN+1, where N from 0 to 12
not exactly the VCSEL (fig.1 minipod datasheet) of the minipod but I think the same mapping applies to the minipod
testbench: /users/mtrovato/Phase2/EPROCRD53ADownlinktest/triggerunit_TianXingZheng/forVivado2015_4/triggerunit
just copy the .vhd (cmd.vhd, etc.) in the srcs and test it
F/W (still testing): /users/mtrovato/FELIXaurora4lanes/FELIX_latest_Oct152019_quickaurora_workfwdigscan_Feb132029
Goal : Sending one special command will activate a full digital injections + triggers (31 x 16b commands)
Changes in cmd_top.vhd
In the main SM included case where if data received via PCIE starts is {"111",X_12,X_11,X_10,X_9,X_8,X_7,X_6,X_5,X_4,X_3,X_2,X_1,X_0} cmd is interpreted as follows :
do not send the command itself (as opposed as the other commands)
start sending this Cal + trigger sequence (x"817e", x"6969", x"6363", x"a971", x"a66a", x"6969", x"6969", x"6969", x"6969", x"6969", x"6969", x"6969", x"6969", x"6969", x"6969", x"6969", x"6969", x"566a", x"566c", x"5671", x"5672", x"6969", x"6969", x"6969", x"6969", x"6969", x"6969", x"6969", x"6363", x"a96a", x"6a6a") #iteraions times at a given frequency
sequence from YARR
removed first 817e since I don't need to two syncs (one sync to reset f/w counter is enough)
removed last 6969 6969 (no need)
code for this sequence in ~/YARR_dwilbern/YARR/src/libRd53a/Rd53aTriggerLoop.cpp / setTrigDelay; 817e added in libNetioHW/NetioTxCore.cpp / prepareTrigger
calinj is x"6363", x"a971", x"a66a"
triggers (16) = x"566a", x"566c", x"5671", x"5672"
#iterations (7b)=X_12,X_11,X_10,X_9,X_8,X_7,X_6 in [0,511]
frequency (6b)= {"X_5,X_4,X_3,X_2,X_1,X_0, "111111"" in [127+2,4097+2] @ 40 Mhz =[614.5 kHz, 9.8 kHz]
frequency counter from dsp_counter (check code)
"111111" hard coded
frequency = 0 not allowed, it will mess up the code. TO DO Build a protection from that
+2 is due to: +1 counting from 0 to 128, +1 due to DSP taking one extra clock to load
N.B: in RD53A manual it is stated that no command, data, or trigger can have a word having theree 111;'s in a row, except the sync, but sync doesn't start with 111
Changes in EPROC_OUT4_ENCRD53A.vhd
sending Noop (x6969) rather than Sync (x817e) when not doing anything else (trigger, cmd, etc.)
still needs to send a sync every 32 40/4 Mhz clks
4 is because a 16b word needs 4 x 40 MHz to get aggregated
Results from ILA ( fdaq)
---e082=111 0000010 000010 -> #iteraions=2, frequency=2~307 kHz
---f902=111 1100100 000010 -> #iterations = 100, freq = 191+2 = 307 kHz
- felixcore from tarball: /users/mtrovato/YARR_dwilbern/software_tarball
[from Daniel, ask which version in https://atlas-project-felix.web.cern.ch/atlas-project-felix/user/dist/software/apps/4.x/]
- felixcore from git: /users/mtrovato/YARR_dwilbern/felixcoreMT/software
[git clone ssh://git@gitlab.cern.ch:7999/atlas-tdaq-felix/software
cd software/
./clone_all.sh ssh
cd drivers_rcc/
grep -r "tdaq" *
git co 7db11305781839435c535485e5bb23e7e0893156 #previous version of the driver which is compatible with the 4.1.0 that we have installed in the felix02 (felixcore relies on the driver to compile)]
- Doesn't work properly
almost 1 out of two times YARR prints and it's good data
WARNING: good data may be lost during the ECR flusgh buffer. msg size: 50
- while felixore from tarball has no problem like this (tried 5 times and printout like that)
things to do:
check how flushBuffer works (timeout in there)
how ECR data gets ignored
include Joseph counters in downlink (#wrreg in EPROC_OUT4, #hdr in uplink in aurora) so I can compare #wrreg with yarr cmd and #wrreg with #hdr and see if felixcore with git has issues
f/w after the fix with the sync
~mtrovato/YARR_dwilbern/YARR/
Tasks to be performed for the scan are in build/config/scans/rd53a/std_digitalscan.json (parameters omitted)
"loops": [
...
"loopAction": "Rd53aMaskLoop"
...
"loopAction": "Rd53aCoreColLoop"
...
"loopAction": "Rd53aTriggerLoop"
...
"loopAction": "StdDataLoop"
-> Starting scan!
1) libYARR/ScanBase
run()
2) libYARR/LoopEngine
execute()
3) libYARR/EngineTBase
execute( LT &task_list ) - loop over tasks
4) libYARR/LoopActionBase
execute
run()
execStep()
5a) libRD53a/Rd53aMaskLoop
execPart1()
...
6a) libRD53a/Rd53aCoreColLoop
init() : settriggerDelay, setfrequency, iterations, etc.
settriggerDelay : prepare the sequence (ecr, nops, cal, triggers) to be sent by libNETIOHW/NETIOTXcore::trigger(). Sequence is partially overwritten in NETIOTXCore::prepareTrigger(). N.B: ecr won't be sent as you can see from prepareTrigger() (ie: m_trigWords16]))
...
7a) libRD53a/Rd53aTriggerLoop
execpart1():
...
send ecr, idles
- send ecr through low_latency _socked (see RD53aCmd.cpp and releasefifo in NetIoTxCore) N.B: it was m_socket before, I changed it to ensure casuality between ecrs and triggers (both from the same socket now)
flushsockets, buffer
enabletrigger (setTrigConfig(INT_COUNT) since Rd53aTriggerLoop/count>0 are given in std_digitalscan.json)
- when cmdempty
8a) libNetioHW/NetioTXCore
doTriggerCnt() (separate thread started from setTrigEnable(0x1) in Rd53aTriggerLoop/execpart1)
prepareTrigger() : prepare m_trigFifo[it->first] = 817e817e noops cal nops triggers noops cal
trigger() - send msg=(m_trigFifo[it->first], size) via low_latency_socket
5b) libYARR/StdDtaaLoop
execPart1():
check that trigger is enabled
execPart2()
add 32b data into in RawDataContainer while ( g_rx->notReceivedAllData((int)m_getExpectTrig)
sleep for 1 ms
keeps adding newData to container until available to make sure we don't loose any data which may be late TO BE UNDERSTOOD
push RawDataContainer into storage
...
---> Mask Stage 0
void LoopActionBase::execStep()
virtual void Rd53aMaskLoop::execPart1() --only one every first iteration of the core loop (one out of 5
void LoopActionBase::execStep() done execPart1
void LoopActionBase::execStep() m_inner 0x1fa8810
void LoopActionBase::execute()
void LoopActionBase::run()
(::init() when available)
same for
Rd53aCoreColLoop
Rd53aTriggerLoop
StdDataLoop
void LoopActionBase::execStep()done execPart2
virtual void StdDataLoop::end()
virtual void Rd53aTriggerLoop::execPart2()
void LoopActionBase::execStep()done execPart2
virtual void Rd53aTriggerLoop::end()
virtual void Rd53aCoreColLoop::execPart2()
void LoopActionBase::execStep()done execPart2
virtual void Rd53aCoreColLoop::end()
virtual void Rd53aMaskLoop::execPart2() --only at the last iteratiorn of the coreloop (one out of 5)
void LoopActionBase::execStep()done execPart2 --only at the last iteratiorn of the coreloop
NetionHandler running in a different thread before scan starts (at the ###inithardware stage in scanconsole)
hwCtrl = ScanHelper::loadController(ctrlCfg);
netiohandler rx channel is added by doing right after the configure FE stage (socket is opened)
hwCtrl->setRxEnable(dynamic_cast<FrontEndCfg*>(fe)->getRxChannel());
change in YARR: https://gitlab.cern.ch/YARR/YARR/commit/398248f5b689651f961e4c85056cc4f62fced489
F/W: /users/mtrovato/FELIXaurora4lanes/FELIX_latest_Oct152019_quickaurora_workfwdigscan_Feb132029
continuare la descrizione eprepare slides on F/W sequence
GBT: TX/RX: 4.8 GBps 20b no encoding/decoding
alignment is searched for in Kai's SM: https://gitlab.cern.ch/atlas-tdaq-felix/firmware/blob/master/sources/GBT/gbt_code/gbt_rx_gearbox_FELIX_wi_rxbuffer.vhd#L152-173, if not found MGT is sled https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/master/sources/GBT/gbt_code/FELIX_gbt_wrapper_KCU.vhd#L1076
look at GBT header if contains data or IDLE
Fullmod: TX = 4.8 GBps 20b no encoding; RX = 9.6 Gbps, 40b, 8b/10b encoding
alignment is done at MGT level : fig 4.25 of https://www.xilinx.com/support/documentation/user_guides/ug576-ultrascale-gth-transceivers.pdf
RX (or TX polarity of the sender) doesn't matter since negative or positive COMMAs are looked at
4 lanes F/W: ~/FELIXaurora4lanes/FELIX_latest_Oct152019_quickaurora_testbeam/
F/W: /users/mtrovato/FELIXaurora4lanes/FELIX_latest_Oct152019_quickaurora_testbeam_withtimestamp
bitfile: (to be tested)
added timestamp to the data routed to centralrouter
new format: SOP SOP Data_1 Data_2 ....Data_N TimeStamp_1 TimeStamp2 EOP EOP
all are 32b
TimeStamp_1 TimeStamp2 = {16'h0,timestamp_48b}
timestamp added in addSOPEOP SM: new state evttmpstmp added
DSP counter fed by clk40 (from local oscillator or TTC) at top level increase timestamp
is zeroed (reset) when rx_laneup goes down
when trigger arrived (either external or by command) timestamp written into the fifo
when addSOPEOP starts receiving data fifo is read out (one clk40 only, N.B: aurora clk40) and time stamp is added
N.B: c message is now threated as the b message, ie: 2 x 0xFFFFFFFF sent before EOP (in the b message is 0xFFFFFFFF Data)
in the the previous version no 2 x 0xFFFFFFFF before EOP
Test: activated TTC trigger as trigger_in can be either via SMA (external trigger) or TTC
TO DO: check how TTC trigger gets routed from TTC system through FELIX all the way to the chip
-showing timestamp saved for one trigger and another trigger at the end
-timestamp in the RX data
Summary:
a 256b splitted in up to 15bx16b + end of message. a 2b code added to form up to 16x18b words
every 5 x 40 Mhz clock the 18b word is sent out at chunks of 4b, as expected for a 4b elink
felix_fullmode_top
fifo16KB_256bit: fromHostFifo_din 256b -> fromHostFifo0_dout 256 b
wupper / fromHostFifo_din
TO BE STUDIED
CRFM / fromHostFifo_dout 256 b
FifoDout_array(I) <= fhFifoDout; //I=0 to 23 GBT
GBTdmUpstreamEgroup / fifoDin 256 b
fifo_256to16_bit : fifoDins 256 b -> din16bit 16b
fifoDin = fifoDins if the 5 MSB = GBT id
UPSTREAM_TRANSFER_MANAGER : din16bit 16b -> EgroupIn 18b
code 2b added (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/blob/master/sources/centralRouter/UPSTREAM_TRANSFER_MANAGER.vhd#L140-149)
after the possible 16x16b (=256) input words patched with the code above , add and end of message 18b word
EgroupIn_array (I) 18b <= EgroupIn 18b ; //I = 0 to 4 different Egroups
UpstreamEgroup / EpathFifoDin 18b
EpathFifoDin_array(I) <= EpathFifoDin; //I=0 to 7 possible different Epath
upstreamEpathFifoWrap / din 18b
fh_epath_fifo2K_18bit_wide_bif: din_r 18b -> dout18bit (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/blob/master/sources/centralRouter/upstreamEpathFifoWrap.vhd)
din_r shifted by one wrclk wrt din
rd_en => rd_en_s , where rd_en_s <= rd_en and (not byte_cnt) and (not empty_efifo0);
rd_en from EPROC_OUT4->EPROC_OUT_ENCRD53A
empty_efifo0 <= '1' when (rd_en_r = '1' and empty_efifo_r = '1') else empty_efifo; //empty_efifo is connected to the fifo
rd_en_r shifted one rd_clk wrt rd_en
empty_efifo_r shifted one rd_clk wrt empty_efifo
in firmware used for VC709 (rm-4,3) rd_en_s connected directly to empty_efifo
rd_en_s <= rd_en and (not byte_cnt) and (not empty_efifo); (~/FELIXaurora4lanes/FELIX_latest_Oct152019_quickaurora/firmware/sources/centralRouter/upstreamEpathFifoWrap.vhd)
to accomodate this change I've modfied how the rd_en is driven in EPROC_OUT4_ENCRD53A
it's important that a) rd_en =1 after empty_efifo = 1 otherwise empty_efifo0=1 and rd_en_s=0 constantly and the fifo will be never read again
this approach works for data being written into the fifo at slow rate (ie: empty_efifo=1 after being read for two clocks)
a more robust approach is to every rd_en up for two 160 Mhz clock every 5 40 MHz clks (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/blob/master/sources/centralRouter/EPROC_OUT4_ENC8b10b.vhd#L89-110
in 5 x 40 MHz clk can send one 16b word plus the 2b code
5 x 4b = 2x(2b+8b) , where 2b code in the 18b word from UPSTREAM_TRANSFER_MANAGER
process(clk160)
begin
if rising_edge(clk160) then
--rm-4.3. rd_en_s of fifo in upstreamEpathFifoWrap based on empty_efifo
--connected to FIFO
--almost_full_fifo160 <= almost_full_fifo;
--if ( almost_full_fifo160 = '0') then
-- ReadEnable <= '1';
-- ReadEnable_tmp <= '1';
--else
-- ReadEnable <= '0';
-- ReadEnable_tmp <= '0';
--VC709. rd_en_s of fifo in upstreamEpathFifoWrap based on empty_efifo0 which
--is not directly connected to FIFO. ReadEnable cannot be 1 all the time
if( empty_efifo_epath_in = '0' and almost_full_fifo160 = '0') then
ReadEnable <= '1';
else
ReadEnable <= '0';
end if;
end if; --clock
end process;
- din and wr_en connected to fh_epath_fifo2K_18bit_wide_bif
- trigger on wr_en
- fupload with a message of 28 bytes x00 x01 .. x1a1b
- fupload with a message of 28 bytes x00 x01 .. x1a1b x1b1c x1e1f : message interrupted at the 30th byte
- CR can support 16x(2b+16b) words = 15x(2b+16b) + 18b (end of message)
zoom in
firmware: ~/Phase2/64b66bmigrationFLX712/firmware_downlinkworkinguplinktestedokfupload/
bitfile: /users/mtrovato/FelixtoRD53A/FLX712/gearboxMGT/FLX712_FULLMODE_4CH_CLKSELECT_GIT_master_rm-4.9_110_200317_10_20.bit
~/Phase2/64b66bmigrationFLX712/firmware_downlinkworkinguplinktestedokfuploadTOBETESTED_GBT24compiled compiled with GBTNUM=24
removed all ila and vios wrt to firmware_downlinkworkinguplinktestedokfupload. Test it
felixcore: cd /users/mtrovato/YARR_dwilbern/software_tarball; source cmake_tdaq/bin/setup.sh x86_64-slc6-gcc62-opt; cd x86_64-slc6-gcc62-opt/felixcore; ./felixcore --noweb --trace -d 2 -d 3 -t 1 --data-interface lo
opens both 2, 3 devices
cd RD53_test; source CalInjections.sh (fupload d 3 -G 0 -g 0 -p 6 -t 0 0-D ..)
fdaq -d 2 -t 10 -D test receives data
N.B: sending to device 3, receiving from device 3
RX data is from MGT 2 which is CR1, ID 0
MGT 0 -> CR 0, ID 0
MGT 1 -> CR 0, ID 1
MGT 2 -> CR 1, ID 0
MGT 3 -> CR 1, ID 1
felixcore --trace
successfull digital scan: ~/tracse_fromDaniel_scansuccessful.csv: shows 1584656828.602604587,TOHOST_BLOCK_READ,128,139856168064768 , meaning that tohost data
TO DO:
install felixcore tarball and git for centos7
from git should be already ok
instructions here: https://sites.google.com/site/tdaqatlas/#TOC-Dec-15-2019-Instructions-to-run-install-felixcore-CENTOS-7-
install yarr for centos7
should already done in Yarr_dwilbern/testYarr
instructions here: https://sites.google.com/site/tdaqatlas/#TOC-Dec-15-2019-Instructions-to-install-run-YARR-CENTOS-7-
Make sure they both use the same version of NETIO
YARR: use branch felix-4.0.x branch, last commit by Fabrice (https://gitlab.cern.ch/atlas-tdaq-felix/netio/commits/felix-4.0.x)
checked in /users/mtrovato/YARR_dwilbern/testYARR/Yarr/build/src/external/src/netio4 with git branch; git log;
felixcore:
software_tarball is in sync with YARR for netio4 (different branch but a) last commit is the same and b) diff between the src is not different) . N.B: I'm screweing up the architecture. Change architecture by hand
Verufy that Joseph's version has no difference with https://atlas-project-felix.web.cern.ch/atlas-project-felix/user/dist/software/apps/4.x/ besides flx-init
slides presented here: https://indico.cern.ch/event/907704/
got following comments:
investigate whether process 2 can be removed. gearbox does 32 -> 66b which feeds aurora. Q. can aurora handle that?
the alternative 32->34b (already a possible option): not an answer since a conversion to 64b will have to happen anyhow, given Marius' request: aurora outputwidth =64b (payload)+2b (hdr)+1b (valid)
Verify difference in resource usage 34b Vs 66b in aurora
can do with the scrambler only by compiling 32b Vs 64b as an estimate
Sasha thinks that resource usage ~ datawidth (bandwidth=frequency*datawidth the same for the two design)
Compare my gearbox module and Frans module and suggest Frans what to add
F/W:
/users/mtrovato/Phase2/64b66bmigrationFLX712/externalgearbox/phase264b66buptodate24 CH: no ila, no vio, meets timings
before moving to here I used this: /users/mtrovato/Phase2/64b66bmigrationFLX712/externalgearbox/firmware
4 CH: added all ilas (including the ones for DecodingGearBox) : waiting to be tested
all should be in git: https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/phase2/64b66b. TO DO: understand whether my branch is mergeable in master branch
N.B: it is based off (phase1) master (not phase2/master)
Suggestions from Sasha on how to improve external 64b66b gearbox f/w (more details in the skype conversation of that day):
Add BUSY_OUT;
HARD_ERR/SOFT_ERR make them a counter and connect to registers along with lane/channel_up
revisit the reset in AddSOP SM to avoid cases where SOP is not followed by EOP due to loss of lane;
https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/64b66b/sources/64b66b/64b66b_rx_err_detect_simplex.v does not do very much . Remove it or merge with something else
keep cleaning aurora f/w and remove the "aurora" word
2x32b AXI stream outputs (1 for service and 1 for data)
header is not needed anylonger as the output type (data or service) tells me the data type
Marius has implemented broadcast on phase2/64b66b and committed to phase2/64b66b-broadcast branch
https://its.cern.ch/jira/browse/FLX-1431
look at Elena slides in F/W meeting from a while back
trickle: two ways to do it
dma: configure RD53 via NETIO, via low level tools (e.g: fupload) or over ethernet (YARR);
Same way as we do for the F/W digital scan
logic/memories delegated to software
latency may not be deterministic (ethernet buffers for istance)
elink: configure RD53 automatically with memory in FW
heavy logic/memories in F/W
for trickle config we need to balance FPGA resource utilization, latency, and bandwidth. For example, adding all the RD53 registers to FELIX register map is not an option the register map will explode and Frans will have alot of issues in Wupper to meet timing also, it will be very slow to configure. Having a single register or two (oner with address and one with data), which will check/write the entire rd53 map, map may be fine
https://its.cern.ch/jira/browse/FLX-1431
can do with f/w as is since the pcie bandwidth in that direction is 200 Gbps. No need to optimize further
lpgtb+auroradec from F/W based off phase1 master rebasing off phase2/master: /users/mtrovato/Phase2/64b66bmigrationFLX712/lpgbt/firmware_lpgbtplusaurorabasedphase1master_incomplete_longtimetocompile (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/commit/020eb0ba2b6ec2e451d7501d3b24d6f89f1bc96e)
take forever to compile, incomplete (missing lpgbt decoding)
pgtb+auroradec: decided to start from scratch from phase2/master.
Therefore phase2/64b66b reverted back to support only direct readout (w/ or w/o external gearbox): https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/commit/1d3464548c9c3695a0a3b74cd7050f33a596efae
ITKRD53TEST up to 4 (1=MGT internal gearbox; 2,3,4 with external gearbox)
phase2/64b66b -> 64b66b since it's based off (phase1) master : 64b66b will be for direct out readout
phase2/64b66b: will be for lpgbt readout
Tested Version A board in May/June and board seems functional
about 20 tested, for 4 cards the fuse blew
Sasha suggested to connect/disconnect the board to/from the wall outlet and not from the board connector (I think capacitors of the transformers help the ramp up/down)
Extra items needed to have a functional board (some in BOM in https://anl.box.com/s/8frzbmf1glayi39xef8twe1bpqwab8c5)
power supply. the boards takes DC from 5V to 14V. We use https://www.digikey.com/product-detail/en/mean-well-usa-inc/GST25A05-P1J/1866-2087-ND/7703645
different amperage (>3 A) ok
minipods (AFBR-811VxyZ) TO DO verify exact part number that Kai bought for FELIX
light prism cable (https://www.digikey.com/product-detail/en/molex/1062672011/WM9086-ND/3305775).
male MTP connector
The cable type will depend on the type of minipod you get. There are flat and round optical cables: https://www.digikey.com/en/product-highlight/m/molex-connector/versabeam-pod-cable-assemblies. Please note that the MPO connectors can also be male or female
FLX712: MTP48 or 24 to four or two breakout cables (https://store.cablesplususa.com/24-fiber-100g-mtp-to-2x-mtp-cfp-fiber-optic-cable-multimode-om4.html)
MTP48 default for 4 RX minipod on RX
female MTP connectors
VC709: use an LC to MTP12 breakout cable: https://store.cablesplususa.com/12-fiber-mtp-to-lc-cassette-to-sfp-fiber-optic-cable-multimode-om4.html
MTP female connector.
miniHDMI-miniHDMI cables (1175-1678-ND)
miniDP-miniDP cable (AE11262-ND)
Reccomendations for power supply: plug the cable in the board first and then the PS in the wall outlet
variables in VHDL are updated immediately immediately https://www.allaboutcircuits.com/technical-articles/variable-valuable-object-in-sequential-vhdl/ . So
out1 doesn't have any delay wrt var1
out1 ranges from 0 to 5 (and not to 6)
process(clk) 10 variable var1 : integer range 0 to 6; 11 begin 12 if (clk'event and clk='1') then 13 var1 := var1+1; 14 if (var1=6) then 15 var1 := 0; 16 end if; 17 end if; 18 out1 <= var1; 19 end process;
firmware:~/Phase2/64b66bmigrationFLX712/externalgearbox/phase264b66buptodate_64b66bbranchrenamed/firmware/
latest modification at the F/W: reverting the bit order of the 32b MGT input word in the 6466b Decoding Gearbox (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/commit/0b80bccea39d9ca4c8a28dcd6317cfb014070f67)
rationale: don't know what choice the SIPO made in the MGT when forming the 32b word
thanks to the reversion sync_sm in aurora initialize the lane
result previously verified in software: ~/RD53A_test/findphase_64b66b.cc, ~/RD53A_test/findphase_64b66b_LSB.out
bitfile: /users/mtrovato/FelixtoRD53A/FLX712/externalgearbox/FLX712_FULLMODE_4CH_CLKSELECT_GIT_64b66b_rm-4.9_91_200714_10_51.bit
GBT_NUM=4
works with fdaq/fupload
cd RD53_test; source CalInjection_flx712.sh (fupload d 3 -G 0 -g 0 -p 6 ...)
drawn current stable at ~0.42 A since I've activated only one lane
result confirmed from VC709 and w/ Mike's card
fdaq -d 2 -t 10 -D test receives data
didn't check the data but fdaq shows that data is being received
TO DO:
why the lane_up is 1111 at the beginning? And it doesn't seem to respond very well
check felixcore/YARR
firmware:~/Phase2/64b66bmigrationFLX712/externalgearbox/phase264b66buptodate_64b66bbranchrenamed/firmware/
bit file: /users/mtrovato/FelixtoRD53A/FLX712/externalgearbox/FLX712_FULLMODE_4CH_CLKSELECT_GIT_64b66b_rm-4.9_91_200714_10_51.bit
clock/elinkconfig: cd /users/mtrovato/YARR_dwilbern/felix_precompiled_409
./felix-04-00-09/x86_64-centos7-gcc8-opt/bin/flx-init -d 3
./felix-04-00-09/x86_64-centos7-gcc8-opt/bin/flx-config -d 3 set GBT_TXPOLARITY=0xFFFFFFFFFFFF
./felix-04-00-09/x86_64-centos7-gcc8-opt/bin/elinkconfig
felixcore: cd /users/mtrovato/YARR_dwilbern/felix_precompiled_409
source felix-04-00-09/x86_64-centos7-gcc8-opt/setup.sh
./felix-04-00-09/x86_64-centos7-gcc8-opt/bin/felixcore -d 2 -d 3 --data-interface lo --monitoring-interface lo
yarr: cd /users/mtrovato/YARR_dwilbern/YARR/build
source /opt/rh/devtoolset-7/enable
bin/scanConsole -c configs/connectivity/rd53a_oneChip.json -s configs/scans/rd53a/std_digitalscan.json -r configs/controller/felix.json -p
with /users/mtrovato/YARR_dwilbern/testYarr ddownlink working but not uplink. Why? TO DO : cleanup
digital scan shows some issues. To be investigated
Additional notes
to reset the MGT
flx-config set -d 3 GBT_SOFT_RX_RESET_RESET_ALL=0xFFF
[mtrovato@felix01 ~]$ flx-config set -d 3 GBT_SOFT_RX_RESET_RESET_ALL=0x0
Hi Sasha, do you find anything wrong from what I'm stating below?
1) https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/64b66b/sources/FelixTop/felix_fullmode_top_bnl711.vhd#L1257-1268 => 1/2 of TX/RX routed from/to logical device 2, 1/2 of TX/RX routed from/to logical device 3; 2) GBT_NUM=4 => BANK_128 (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/64b66b/constraints/felix_gbt_minipod_BNL711_transceiver_24ch.xdc#L1-6) => all 4 TX and RX on the same MTP24 (=#1) from (Fig 16 of BNL_711_V2P0_manual)
Cern Authentication
https://gitlab.cern.ch
Cern Authentication
https://gitlab.cern.ch
if not we should be able to find a TX and a RX from the same logical device and use felixcore only for that device
H/W:
using MTP coupler farther away from motherboard
=> -d 3 in felixcore
=> "txport": 12343 in YARR
=> why not rxport 12353? There is a reason but I forgot
MTP to 12LC and then patch panel
RD53A fiber 4 from interface card to FELIX fiber 10 (rx lane 2)
=> rx 128 (64x2) in yarr config
fiber 12 (tx lane 0) from felix to VLDB and VDLB talking to interface card via elink 6
=> tx 6 in yarr config
Driver: tdaq_sw_for_Flx-4.5.0-2dkms.noarch
F/W: /users/mtrovato/Phase2/DirectReadout/firmware or https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/64b66b (commit=0f548a242c888301813b065d3d1a216a33e58eea)
~/FelixtoRD53A/FLX712/externalgearbox/bitfiles/FLX712_FULLMODE_24CH_CLKSELECT_GIT_64b66b_rm-4.9_107_210307_09_37.bit, FLX712_FULLMODE_48CH_CLKSELECT_GIT_64b66b_rm-4.9_106_210305_11_28.bit
S/W (README in https://cernbox.cern.ch/index.php/s/T9Tr20yZKZaOJ1U)
scripts in ~/YARR_dwilbern/YARR/build/directreadout_usefulstuff/
felix initializion/configuration:
cd /users/mtrovato/YARR_dwilbern/felix_precompiled_41rc7
source felix-04-01-00-rc7-stand-alone/x86_64-centos7-gcc8-opt/setup.sh
cd felix-04-01-00-rc7-stand-alone/x86_64-centos7-gcc8-opt/bin/
flx-init -d 3 -> VLDB LEDs on
#flx-config -d 3 set GBT_TXPOLARITY=0xFFFFFFFFFFFF #done by default in FW
elinkconfig
load ~/FelixtoRD53A/FLX712/externalgearbox/flx712_4gbt_fullmode.elc
#disable emulators (TH/FH_FO) #now by default
flx-config -d 3 set GBT_GENERAL_CTRL=0x4 #change ctrl to be able to monitor #now by default at 0x4
flx-config -d 3 list | grep GBT_ALIGNMENT_DONE
flx-config -d 3 list | grep GBT_RXCDR_LOCK
#soft_err_conunter: 8b per link *
flx-config -d 3 list | grep GBT_FM_RX_NOTINTABLE1
flx-config -d 3 list | grep GBT_FM_RX_NOTINTABLE2
if errors increase or saturate at 255 reset via flx-config -d 3 set GBT_SOFT_RX_RESET_RESET_ALL=0xFFF 0x000. If that still doesn't fix the problem power cycle the chipfelixcore:
TO DO: test counter when errors are found
felixcore
cd /users/mtrovato/YARR_dwilbern/felix_precompiled_41rc7 (~/setup_FELIX-4.0_MT_Jun102021_rm4.sh works)
source felix-04-00-09/x86_64-centos7-gcc8-opt/setup.sh
./felix-04-01-00-rc7-stand-alone/x86_64-centos7-gcc8-opt/bin/felixcore -d 3 --data-interface lo --monitoring-interface lo
YARR:
cd /users/mtrovato/YARR_dwilbern/YARR/build
https://gitlab.cern.ch/YARR/YARR/-/tree/devel_rd53a_felixNetioNext (commit https://gitlab.cern.ch/YARR/YARR/-/tree/9333ac19951c2eb3975ec1ba1e54724afd06f0ee)
source /opt/rh/devtoolset-7/enable
bin/scanConsole -c configs/connectivity/rd53a_oneChip_directreadout.json -s configs/scans/rd53a/std_digitalscan.json -r configs/controller/felix_directreadout
log and configs backedup directreadout_usefulstuff
***rd53a_oneChip_directreadout.json***
{
"chipType" : "RD53A",
"chips" : [
{
"config" : "configs/defaults/felix_rd53a.json",
"tx" : 6, --epath 6 downlink
"rx" : 128, ---link 2 FELIX (e.g: fiber 12-2=10 patch panel)
"enable" : 1
}
]
}
***configs/controller/felix_directreadout.json****
{
"ctrlCfg": {
"type": "Netio",
"cfg": {
"NetIO": {
"host": "127.0.0.1",
"txport": 12343, ----d 3 (change to 0,1,2,3 according to the logical device used)
"rxport": 12350,
"manchester": false,
"flip": false,
"extend": false,
"fetype": "rd53a"
}
}
}
}
Result: perfect digital scan
Additional notes:
make sure to restart felixcore every time yarr is restarted, otherwise data replication is observed (https://its.cern.ch/jira/browse/FLX-1263)
ruplication seen also when subscribing via netio_cat
netio/netio_cat subscribe -H 127.0.0.1 -p 12350 -t 0 -e raw
Zijun has fixed the problem in YARR (unsubscribtpion from felixcore) and it shound't be needed to restart felixcore any longer (https://gitlab.cern.ch/YARR/YARR/-/merge_requests/311)
TO DO:
Sasha suggested to improve the SM in addSOPEOP.v (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/8df03790ed89eee990be9ba58f32f9093d1d8970/sources/64b66b/addSOPEOP.v#L158-249) by changing asserting the rd_en at the moment of retrieving data and removing data_fifo_dly_reg to save resources and make the SM simpler. That should be ok since FWFT fifos have 0 latency
lane_up=F even though one fiber only is connected
Clock is provided by the second MGT of each quad. Relax this assumption
Test multiple lane from same chip
analog scan, threshold scan
compile with 48 links
check is Marius did anything there
TO DO (optimization)
given the resource usage of with 24 links I will exceed the total RAM/LUTS resources in the FPGA. We can have only 3 GBT links (1 GBT links feeds 1 VLDB which feeds up to 20 RD53A), we can have only 8b10b downlink. What else?
resource utilization: 24 channels
Documentation:
draw a diagram on which TX to use given the fiber number (assuming MTP to 48 LC) and how to configure YARR config. Same for RX
add this to YARR procedure
emacs -nw ./cmake/CMakeLists.txt.external
ExternalProject_Add (
netio4
# GIT_REPOSITORY https://gitlab.cern.ch/atlas-tdaq-felix/netio.git
GIT_REPOSITORY ssh://git@gitlab.cern.ch:7999/atlas-tdaq-felix/netio.git
# GIT_TAG felix-4.0.x
GIT_TAG felix-04-01-00-rc7
GBT decoding is clocked by TTC (or local) 40 MHZ clock, while RX data from MGT is synchronous with the recovered clock (240 MHZ, ie: 4.8 Gbps at 20b)
The alignment block (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/master/sources/GBT/gbt_code/gbt_rx_gearbox_FELIX_wi_rxbuffer.vhd) find the right phase (120b possible phases) and runs in the recovered clock domain. Once aligned phase difference between TTC and recovered clocks equal or larger than one bit (0.21 ns) are compensated
it will slip by one bit until the right phase is found.
It's vital to run the alignment block on the recovered clock domanin
if the intent is to run the alignment block with the a 240 MHZ derived from TTC clk (TTC_240) one can sample on the rising and falling edge of TTC_240 and choose the scenario where alignment is achieved. Based on temperatur, cable length, etc. one can get in some cases both scenarios are good, in other cases only one is feasible
A 120b RX frame is then formed. The clock domain is the recovered clock
A fifo (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/master/sources/GBT/gbt_code/FELIX_gbt_wrapper_KCU.vhd#L957-969) handles the crossing between recovered clock and TTC clock. FIFO also handles the 240 MHz to 40 MHz crossing.
notice that w/o fifo metastability may happen: phase differences between the recovered clock and TTC clock smaller than 0.21 ns may cause data to be garbage. Immagine for instance TTC clock rising edge at the same moment of the recovered clock edge: what will it happen? RXDATA will be still transitioning and TTC clock cannot sample it correctly.
Fullmode: Domain crossing between recovered clock and ttc-driven clock is handled via fifos (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/master/sources/FullModeWrapper/FELIX_FM_gbt_wrapper_ku.vhd#L740-753)
no alignemnt if performed as fullmode doesn't have headers
fiber from/to FELIX to/from KCU105 (lpgbt emulator)
Instruction from Zijun: https://1drv.ms/b/s!AhEfroiycPJpgt44KYtSV3LB8Yd82w?e=vQXxRc (in bold what you should once everything is installed and you want to open the GUI again)
Program board ~/Phase2/LpGBT/KCU105_SLACEMUL//bitfilesFromLarryAtlasRd53FmcXilinxKcu105_EmuLpGbt-0x02030000-20200827145001-ruckman-470827b.bit
connected baoard to felix02 at the other ethernet port (eth1). Then sudo ifconfig eth1 192.168.2.1 netmask 255.255.255.0
192.168.2.X since it needs to be in the same network as kcu (192.168.2.10)
. Verifiied with the ethtool that auto-negotiation and duplex are activated. see "ethernet setup" instructions in https://www.xilinx.com/support/documentation/boards_and_kits/kcu105/2017_3/xtp352-kcu105-setup-c-2017-3.pdf
Install rogue within Anaconda: https://slaclab.github.io/rogue/installing/anaconda.html
conda
source ~mtrovato/anaconda3/etc/profile.d/conda.sh
creating a rogue environment (https://slaclab.github.io/rogue/installing/anaconda.html#creating-a-rogue-environment)
conda create -n rogue_tag -c tidair-tag -c tidair-packages -c conda-forge rogue
for a given rogue tag : conda create -n rogue_v5.10.0 -c tidair-packages -c conda-forge -c pydm-tag -c tidair-tag rogue=v5.10.0
this matched v2.15.1 atlas-rd53-atca-dev release
git lfs install (https://github.com/slaclab/atlas-rd53-atca-dev#before-you-clone-the-git-repository)
software:
git clone --recursive git@github.com:slaclab/atlas-rd53-atca-dev (https://github.com/slaclab/atlas-rd53-atca-dev#clone-the-git-repository)
Added ssh key to my ssh-agen (https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
to checkout a given tag: git checkout tags/v2.7.0; git submodule update --init --recursive
cd Phase2/64b66bmigrationFLX712/lpgbt/KCU105_SLACEMUL/atlas-rd53-atca-dev_v2.3.0/software; source setup_env.sh
change setup.sh to conda activate rogue_v5.10.0 for different tags like V5.10.0
python3 scripts/gui.py --ip 192.168.2.10 --remoteDevice Kcu105 &
choose FEC5 or FEC12
You may have to reprogram the KCU105 with if GUI doesn't show Up/DownLinkUp=1, RD53LinkUp=1
~/Phase2/LpGBT/KCU105_SLACEMUL//bitfilesFromLarryAtlasRd53FmcXilinxKcu105_EmuLpGbt-0x02030000-20200827145001-ruckman-470827b.bit
What to check
From the GUI check RD53Linkup=0x8 (bit position depends on the miniDP connector used), LpGBTDownLinkUp/Down=1
5 GPIO LEDs from the left should be on (callout 23 pag 10 of https://www.xilinx.com/support/documentation/boards_and_kits/kcu105/ug917-kcu105-eval-bd.pdf)
2 LEDs for LpGBTUplink, 2 Leds for LpGBTDownLink, 1 for each Rd53A lanes (https://github.com/slaclab/atlas-rd53-atca-dev/blob/master/firmware/targets/XilinxKcu105/AtlasRd53FmcXilinxKcu105_EmuLpGbt/hdl/AtlasRd53FmcXilinxKcu105_EmuLpGbt.vhd#L189-L196)
one miniDP one aurora lane
FW from Larry (git branch v1.2.0 as suggested by Zijun)
git-lfs install
KCU105:
source ~/setup_FELIX-4.0_MT_Aug182020.sh
git clone https://github.com/slaclab/atlas-rd53-atca-dev.git
cd atlas-rd53-atca-dev; git checkout v1.2.0
git submodule update --init --recursive #fundamental to have all submodules with the same tag
git status #to check if I'm aligned
cd firmware/targets/XilinxKcu105/AtlasRd53FmcXilinxKcu105_EmuLpGbt; make gui
gui: select FEC5 (even though showing FEC5 you need to reselect by hand)
F/W in firmware/build/AtlasRd53FmcXilinxKcu105_EmuLpGbt
ZCU102:
source setup_Vivado2019_1.sh (only felix01)
git clone https://github.com/slaclab/atlas-rd53-atca-dev.git
cd atlas-rd53-atca-dev; git checkout v1.2.0
git submodule update --init --recursive #fundamental to have all submodules with the same tag
git status #to check if I'm aligned
cd firmware/targets/XilinxZcu102/XilinxZcu102LpGbt/; make gui
F/W in firmware/build/XilinxZcu102LpGbt/
64b to 8b downlink gearbox (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/master/sources/LpGBT/LpGBT_FELIX/FLX_LpGBT_BE.vhd#L192-208)) may have a problem, given that TXCLK320 and TXCLK40 have non deterministic phase
TXCLK320 from MGT whose GTREFCLK from LMK, fed by clk40_xtal (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/master/sources/housekeeping/housekeeping_module.vhd#L299)
TXCLK40 is TTC or local clock
notice that the gearbox is such that the very first 8b are synchronized with the
switched to TXCLK40 to feed LMK (TO DO: https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/commit/bf76a10b8df0ea63e00b6839069ff657eeece03a)
TXCLK40 and TXCLK320 now have the same frequency. Phase may be same deterministic difference (TXCLK320 and TXCLK40 have different paths) but it doesn't matter (check below signals wrt https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/64b66b/sources/LpGBT/LpGBT_FELIX/FLX_LpGBT_BE.vhd#L195-232)
LMK030200_wrapper (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/master/sources/spi/LMK03200_wrapper.vhd#L325)
when CFG12 =>
if lmk_cfg='1' then
lmk_cfg <='0';
LMK03200_SPI_data <= x"1000400"; --2000200 for 160M; x"1400300" 240M; x"1000400";320M --in Phase1master was x"1400300" (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/feligFLX712/sources/spi/LMK03200_wrapper.vhd#L330)
LMK_ADDR_wr <= x"F";
LMK03200_SPI_update <='1';
two probes: positive and negative side of the CMD. Ground aligators connected to shields
in scope set up ch3 as ch1-ch2
show signal peak to peak ~900mV, no DC component
compatible with LVDS (check Fig 1 of https://www.ti.com/lit/an/slla120/slla120.pdf: 400mV x 2)
single-ended ch1, ch2 show an offset of about 1.25 V (common mode) and a peak-to-peak of 450-500 mV, compatible with LVDS
zoom
half noop = 0110 1001
HW:
driver: tdaq_sw_for_Flx-4.5.0-2dkms.noarch
SW: source setup_FELIX-4.0_MT_Aug182020.sh #mix of rm5 and rm4 software
FLX-712:
bit file: FelixtoRD53A/FLX712/LpGBT/*1627_210817_13_40*
initialization/config
flx-init -c C;
elinkconfig: /users/mtrovato/FelixtoRD53A/FLX712/LpGBT/Phase2Lpgbt_fromHost4b.yelc
enable downlnk Epath=6 since Rd53A is connected to ch3 (see figure)
=0,2,4 for ch0,1,2 respectively
./config_decoding.sh D
monitor
flx-config -d D list | grep DECODING
KCU102 (more info in https://sites.google.com/site/tdaqatlas/#TOC-Aug-13-2020-Instruction-on-how-to-run-software-for-LpGBT-emulator-from-SLAC- ... some bit or dir info may be obsolete):
Program board ~/Phase2/64b66bmigrationFLX712/lpgbt/KCU105_SLACEMUL/bitfilesFromLarry/AtlasRd53FmcXilinxKcu105_EmuLpGbt-0x02150100-20201204171116-ruckman-1789fce.bit
source ~mtrovato/anaconda3/etc/profile.d/conda.sh
cd Phase2/64b66bmigrationFLX712/lpgbt/KCU105_SLACEMUL/atlas-rd53-atca-dev_v2.15.1/atlas-rd53-atca-dev/software; source setup_env.sh
python3 scripts/gui.py --ip 192.168.2.10 --remoteDevice Kcu105 &
choose FEC5 or FEC12
You may have to reprogram the KCU105 with if GUI doesn't show Up/DownLinkUp=1, RD53LinkUp=1
choose BitOrderCmd=0x1 to invert the 4b downlink to Rd53A (see https://sites.google.com/site/tdaqatlas/#TOC-Oct-7-2020-downlink-in-encoding-module-compatible-with-AXI-works-)
choose RXPhyXbar -> {PytoApp[0] -> Ch3, PytoApp[1] -> Ch2, PytoApp[2] -> Ch1, PytoApp[3] -> Ch0} to readout 4 lanes of a single SCC from one miniDP (ch0 for me)
more info in https://docs.google.com/presentation/d/1JeL44NBegv8-Uhd-YAk6MHiev9_jjPXee5FWwLCvAi0/edit#slide=id.g4ecf007e48_1_10
monitor:
From the GUI check RD53Linkup=0x8 (bit position depends on the miniDP connector used), LpGBTDownLinkUp/Down=1
5 GPIO LEDs from the left should be on (callout 23 pag 10 of https://www.xilinx.com/support/documentation/boards_and_kits/kcu105/ug917-kcu105-eval-bd.pdf)
results : perfect YARR digital scans
for ch3, in yarr configs tx=6, rx=4*3=12
for ch0, tx=rx=0
Once Frans merged phase2/addEncoder8b10b into phase2/master rebase and use all rm5 software (source ~setup_FELIX-4.0_MT_Aug182020_rm5.sh) so I can test fupload/fdaq and validate the aurora to axi conversion
tested: FLX712_FE-I4B_4CH_CLKSELECT_GIT_phase2-64b66b_rm-5.0_55_200831_12_18.bit and I see for Egroup3 that sm_init=0001 , which mean read_r=1 and should mean lane_up=1. TO DO add lane_up either from firmware_backupAug30downlinkuplinkworks (which I believe is the same as git) or from the current lpgbt/git which it doesn't work for the latest changes
JIRA: https://its.cern.ch/jira/browse/FLX-1270
LpGBT upgraded to the latest package: https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/merge_requests/177
working bit:
/users/mtrovato/Phase2/64b66bmigrationFLX712/lpgbt/64b66brebasephase2master/firmware_LpGBTUpgrade/output/FLX712_UNKNOWN_24CH_CLKSELECT_GIT_phase2-LpGBTUpgrade_rm-5.0_877_200924_16_54.bit, FLX712_UNKNOWN_4CH_CLKSELECT_GIT_phase2-LpGBTUpgrade_rm-5.0_849_200924_10_51.bit
source setup_FELIX-4.0_MT_Aug182020_rm5_updateSep23.sh
flx-init -c 1
reprogam KCU -> sel FEC5 from GUI -> UpDownLink=1, Rd53ALink=0 (Encoder not in FELIX yet)
on FLX712 Alignment always 1
-TO DO: frans suggestions about using linkaligned rather than qplllcok and rx_fsm_resetdone
-TODO: Use lapgbt_donwlink with clockration=8 output=16 multycicle delay=3. Verify that Kai and new gearbox are the same. There is no latch with frame clock in the new one. I’m not sure how it is going to work
implement service data one virtual e-link (check chat with Carlos on Octover 1st)
Link to gitlab:
change EPROC+OUT4 cmd_top SM (describe)
bitfile: FLX712_UNKNOWN_4CH_CLKSELECT_GIT_phase2-Add64b66bdecoderRD53encoder_rm-5.0_889_201006_11_39.bit
local dir: /users/mtrovato/Phase2/64b66bmigrationFLX712/lpgbt/64b66brebasephase2master/firmware_backOct62020_downlinkworks/
Instructions for KCU105 from https://sites.google.com/site/tdaqatlas/#TOC-Sep-2-2020-Instructions-on-how-to-test-RD53A-SLAC_LPGBT_EMU---FLX712-
Procedure:
Oct 12 2020 (VM at CERN with questasim license)
Quick procecdure (/afs/cern.ch/user/m/mtrovato/)
https://openstack.cern.ch/project/instances/
go to Project -> Compute -> Instances to view my VM
restarte instance if not behaving
create it if not there with "Launch Instances"
vnc
vnc_vmcerndouble 5906 5944 #N.B: change IP for this alias if machine has changed
vncserver :06 -name marcotrovatoanl2 -geometry 1600x900 -localhost -rfbauth ~/.vnc/passwd on VM
On Sep 2022 vnc didn't work (gray image in the viewer), used ssh (slow)
download felix repo (git clone .., git submodule update --init)
cd simulation/UVVMTests; ./ci.sh [TESTS]
make sure -c option is removed to see GUI (vsim -do ci-test...sh)
OLD procedure: cd Phase2/firmware/simulation/UVVMExamples; ./runsimu.sh
****More details*****
log in lxplus; from lxplus log into my Virtual Machine (VM, ssh mtrovato@188.184.98.210)
VM was created via https://openstack.cern.ch/project/instances/
go to Project -> Compute -> Instances to view my VM
I may need to reboot it if something gets stuck
cd firmware/simulation/UVVMExample/
load questasim libraries in from firmware/simulation/UVVMExample/ci.sh
export PATH=/afs/cern.ch/work/f/fschreud/public/questasim_2019.1/linux_x86_64/:$PATH
questasim can be downloaded from ttps://dfsweb.web.cern.ch/dfsweb/Services/DFS/DFSBrowser.aspx/Applications/Mentor/QuestaSim/ but not the exact version. Using Frans' one that has licenses
export MGLS_LICENSE_FILE=1717@lxlicen01,1717@lxlicen02,1717@lxlicen03,1717@lnxmics1,1717@lxlicen08
cp -r /afs/cern.ch/work/f/fschreud/public/UVVM ../UVVM (can be downloaded from https://github.com/UVVM/UVVM)
cp -r /afs/cern.ch/work/f/fschreud/public/xilinx_simlib/ ../xilinx_simlib
can be produced from Xilinx (https://www.xilinx.com/support/answers/64083.html)
./ci_gui.sh decodingpixel #removed -c to show aves # vsim -do ci-encodingepath.do
produced ~/public/_Log.tx
BUFG_GT now generates if explicitly importing unisims_verilog library
vsim -voptargs=+acc work.bufg_test work.glbl -L ../xilinx_simlib/unisims_ver/
TO DO:
fix warnings and see if internal signal show up in verilog modules
is FDR generated?
Sep 22 2022
Install and run modelsim
modelsim 21.2 installed from https://www.intel.com/content/www/us/en/software-kit/670231/intel-quartus-prime-pro-edition-design-software-version-21-2-for-linux.html
choose "individual files" tab and download modelsim_part2-21.2.0.72-linux.qdz and ModelSimProSetup-21.2.0.72-linux.run
chmod u+x ModelSimProSetup-21.2.0.72-linux.run; ./ModelSimProSetup-21.2.0.72-linux.run
during installation choose "Modelsim - Intel FPGA Starter Edition" (no license); accept the agreement; choose the installation directory (MODELSIMDIR)
$MODELSIMDIR/modelsim_ase/bin/vsim
Note for Marco: MODELSIMDIR=/opt/Altera/Modelsim/modelsim_ase/
Two options (use felix01 where modelsim is installed in /opt/intelFPGA_pro/21.2/modelsim_ase/bin/) :
Manual
Generate xilinx libraries from Vivado 2021.2
mkdir $FIRMWAREDIR/simulation/xilinx_simlib
cp $VIVADODIR/data/verilog/src/glbl.v $FIRMWAREDIR/simulation/xilinx_simlib
Tools -> Compile Simulation Libraries
choose Simulator: ModelSim Simulator
Compiled library location : $FIRMWAREDIR/simulation/xilinx_simlib
Simulator executable path : $MODELSIMDIR/modelsim_ase/bin
rest are default settings
tcl command is : ompile_simlib -simulator modelsim -simulator_exec_path {$MODELSIMDIR/modelsim_ase/bin} -family all -language all -library all -dir {$FIRMWAREDIR/simulation/xilinx_simlib}
Note for Marco: have Ben erase ~/.cxp.ip/incl. Still relying on libraries generated by Ricardo
Alternatively cp -r ~/xilinx_simlib $FIRMWAREDIR/simulation/
if using IP cp Projects/FLX712_FELIX/FLX712_FELIX.gen/sources_1/ip/IP/IP_sim_netlist.vhdl sources/ip_cores/sim
UVVM libraries
$MODELSIMDIR/modelsim_ase/bin/vsim
cd $FIRMWAREDIR/simulation/UVVM/script; do compile_all.do
Automatic (via ci.sh)
Assume that xilinx_simlib are present on the computer. If not see above
./ci.sh DecEgroup_8b10b
will generate UVVM and xilinx_simlib for you if not available alread
may have to run twice
ci.sh, compile-uvvm.sh are modified wrt git repo. Available in /users/mtrovato
****Other info ****
questasim 22.2 does not work (https://www.intel.com/content/www/us/en/software-kit/734929/questa-intel-fpgas-edition-software-version-22-2-for-linux.html)
Installed in fpga02:/opt/Altera/Questa/
Download free license from https://www.intel.com/content/www/us/en/support/programmable/licensing/support-center.html
questa-intel FPGA edition
sent via email on 26 Sep in a .dat format and saved in /opt/Altera/Questa/
I get this error even after export LM_LICENSE_FILE=/opt/Altera/Questa/LR-095255_License.dat
the error is the same that I get with lxplus when I don't load the license as in ci.sh
from https://support.xilinx.com/s/question/0D52E00006q090LSAQ/failed-to-find-the-questasim-simulator-executable-when-i-try-to-compile-vivado-libraries-for-questasim?language=en_US it is stated that it belongs to quartus and it's not even supported in vivado
/opt/Altera/Questa/questa_fse/bin/vsim
Unable to checkout a license. Make sure your license file environment variable (SALT_LICENSE_SERVER, MGLS_LICENSE_FILE, LM_LICENSE_FILE)
is set correctly and then run 'lmutil lmdiag' to diagnose the problem.
Unable to checkout a license. Vsim is closing.
SW: setup_FELIX-4.0_MT_Aug182020_rm5_updateSep23.sh
F/W: /users/mtrovato/Phase2/64b66bmigrationFLX712/lpgbt/64b66brebasephase2master/firmware_backOct22workingfdaqseen
bit: FLX712_UNKNOWN_4CH_CLKSELECT_GIT_phase2-Add64b66bdecoderRD53encoder_rm-5.0_894_201022_13_04.bit/ltx
Procedure:
source setup_FELIX-4.0_MT_Aug182020_rm5_updateSep23.sh
flx-reset -d 3 SOFT_RESET to empty fifo (s_axis_tready=1)
(reprogrammed KCU to clear soft_reset in aurora)
source RD53A_test/CalInjection_flx712_lpgb.sh where the command below is commented out # to configure chip
Arm the ILA triggers here if needed
important ilas in CRToHostdm for FromHost, in ByteAxisStream from ToHost
fupload -d 3 -G 0 -g 0 -p 0 -t 0 -D commands/RD53A_write_commands_CAL_mode1delay0duration30aumxmode0auxduration0_1cal5sync1T000trig1cal.txt
fdaq data observed: ~RD53A_test/testOct22-1.log
not tested with yarr yet
TO DO: FELIX busy: once the Rd53 issue the buys frame assert the busy signal
Goal: given the same project uplink data was changing from one bit file to the other, thus sometimes being incorrect and preventing aurora from locking
https://its.cern.ch/jira/browse/FLX-1334
https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/phase2/master_timingconstraintsFix
Improvements to phase2/master LPGBT flavor
timing_constraints_lpgbt.xdc: https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/master_timingconstraintsFix/constraints/timing_constraints_lpgbt.xdc
fixed uplink multicycle paths as per https://gitlab.cern.ch/gbt-fpga/lpgbt-fpga-kcu105/-/blob/master/constraints/lpgbtfpga_core_timing.xdc#L8-11
now LMK clocks are properly created (previously not present thus preventing the tx/rxclkout[*]) to be part of the timing analysis
now GT_TX/RX_WORD_CLK[*] created by using input pins of the BUFG_GT rather than the inexistent output pins
clock will be propagated by Vivado through the BUFG_GT [1]
KCU_RXBUF_PMA_QPLL_4CH_LPGBT.xci: https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/master_timingconstraintsFix/sources/ip_cores/kintexUltrascale/KCU_RXBUF_PMA_QPLL_4CH_LPGBT.xci
disabled KCU_RXBUF_PMA_QPLL_4CH_LPGBT.xdc for manual placement of the GT [2] (N.B: same IP used all 6 quads)
correct procedure in [3], not sure if it was ported correctly in GIT
preferred option: added set_multycicle_path to relax timing on the downlink in the crossing from TXCLK40 to TXCLK320 (timing met for GBT_NUM=4, timing violated for GBT_NUM=24 but for pcie paths
backup option: using xpm_cdc_array_single to register TXCLK40 into TXCLK320 domain rather than double-flopping by hand (timing met)
timing met by construction since set_false_path are applied (see /opt/Xilinx/Vivado/2020.1/data/ip/xpm/xpm_cdc/tcl/xpm_cdc_single.tcl)
TO DO: test downlink data and if needed delay data in the gearbox or change cnter in the gearbox and test (firmware_Nov10_xpm_cdc_back).
Useful INFO
[1] create clock propagate through BUFGT_GT (https://forums.xilinx.com/t5/Timing-Analysis/bufg-gt-clock-can-t-be-inferred/td-p/802105)
[2]
Pag 98 of I also see from page 98 of https://www.xilinx.com/support/documentation/ip_documentation/gtwizard_ultrascale/v1_7/pg182-gtwizard-ultrascale.pd
"The constraints provided in the core-level XDC file are required for proper operation of the core instance. This file is managed by the Vivado design tools and can change to reflect core customization changes or core version upgrades. Do not modify this file. For advanced use cases, if you want to manage GT locations manually, set DISABLE_LOC_XDC user parameter to ‘1’ during IP customization. Note: GT parent IP could be driving the value of this user parameter as part of the hierarchical instantiation, and using this parameter may not be always possible in a locked IP scenario. If you need to manage the GT locations, Xilinx recommends that you configure the GT parent IP as GT outside and then customize the UltraScale GT wizard IP based on your design requirement."
[3]
followed https://www.xilinx.com/support/answers/57546.html or pag 111 of https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_1/ug896-vivado-ip.pdf,
set_property CONFIG.DISABLE_LOC_XDC 1 [get_ips KCU_RXBUF_PMA_QPLL_4CH_LPGBT]
reset_runs KCU_RXBUF_PMA_QPLL_4CH_LPGBT_synth_1
launch_runs KCU_RXBUF_PMA_QPLL_4CH_LPGBT_synth_1 -jobs 16
---
optional: disabling of the .xdc file
set_property IS_MANAGED false [get_files KCU_RXBUF_PMA_QPLL_4CH_LPGBT.xci]
set_property is_enabled false [get_files ${project_dir}/${PROJECT_NAME}.srcs/sources_1/ip/KCU_RXBUF_PMA_QPLL_4CH_LPGBT/synth/KCU_RXBUF_PMA_QPLL_4CH_LPGBT.xdc]
set_property IS_MANAGED true [get_files KCU_RXBUF_PMA_QPLL_4CH_LPGBT.xci])
(this is optional since set_property CONFIG.DISABLE_LOC_XDC 1 comments out in the .xdc set_property LOC GTHE3_CHANNEL_X0Y8 [get_cells -hierarchical -filter {NAME =~ *gen_channel_container[2].*gen_gthe3_channel_inst[0].GTHE3_CHANNEL_PRIM_INST}] , which is all we need
[4] set_multicycle_path
http://www.ee.bgu.ac.il/~digivlsi/slides/Multicycles_6_2.pdf
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug903-vivado-using-constraints.pdf
[5]: miscellanea (crossing clock domains. metastability, etc.)
https://www.nandland.com/articles/crossing-clock-domains-in-an-fpga.html
https://www.xilinx.com/support/documentation/sw_manuals/xilinx11/ug612.pdf
Understand better the set_max_delay
VLDB+: https://vldbplus.web.cern.ch/
control kit: https://pigbt.web.cern.ch/manual/
connected via Rj45 and followed 2.2.2 of https://pigbt.web.cern.ch/manual/quick_start.html
master mode switch to off
sudo ifconfig en0 169.254.214.0 netmask 255.255.255.0
to have ethernet in the same network as rpi (192.254.214.88 read from the LCD)
Powered up rpi4 from my mac via usb-usbc
N.B: Rj45 needs to be connected before powerin
System=Server Leds gree, Lpgbt orange (not locked)
http://ip_address:8080 where IP_address in on the lCD
https://lpgbt.web.cern.ch/lpgbt/v0/
https://vldbplus.web.cern.ch/
uplink polarity swap from https://vldbplus.web.cern.ch/manual/quickstart.html#configure-the-lpgbt
overview: https://vldbplus.web.cern.ch/manual/overview.html
only 2 out of the 12 optical lines of the VTRX+ are connected (6=TX, 7=RX)
FMC: https://vldbplus.web.cern.ch/manual/fmcside.html#
more in VITA 57.1 doc: https://cds.cern.ch/record/1172409/files/AV57DOT1.PDF?
page 49 for HPC table and later definitions
EDINGCPN/P (uplink) FMC mapping in https://vldbplus.web.cern.ch/manual/appendix.html#appendix
E=elink, D=data, IN=input (LpGBT chip side), G=group (0-6), C=channel number (0-3) according to the lpgbt manual
C equivalent to eproc for gbt : minimum width 4b
Rpi/monitoring/configuring: https://pigbt.web.cern.ch/manual/
lpgbt lock signal (spinner green at the top right of the gui) is for downlink
EDIN lock not implemented: so do not trust (https://pigbt.web.cern.ch/manual/exemple_features.html#transceiver-configuration)
test to be performed (https://pigbt.web.cern.ch/manual/configuration.html#test-features or https://pigbt.web.cern.ch/manual/exemple_features.html):
eyediagram (downlink), probably good: https://pigbt.web.cern.ch/manual/configuration.html#perform-eye-diagram-measurement
uplink data test pattern : https://pigbt.web.cern.ch/manual/configuration.html#uplink-data-path-test-pattern
this excluded the BOB. if it aurora locks then VLDB+ good
BERT checker: https://pigbt.web.cern.ch/manual/configuration.html#bert-checker
does it support the same PRBS as RD53 so I can check? If so that will tell me whether BOB is the problem
other tests available
FLX712
F/W: ~/Phase2/64b66bmigrationFLX712/lpgbt/64b66brebasephase2master/tmpphase2master/gitlatest/firmware
bit file: FLX712_PIXEL_4CH_CLKSELECT_GIT_phase2-master_timingconstraintsFix_rm-5.0_1018_201121_08_10.bit
S.W: source setup_FELIX-4.0_MT_Aug182020_rm5_updateNov19.sh
Driver: tdaq_sw_for_Flx-4.5.0-2dkms.noarch
VLDB+:
connect to Rpi wifi via phone for instance (https://pigbt.web.cern.ch/manual/quick_start.html#connect-to-pigbt-wi-fi)
in the browser type: http://121.224.4.10:8080 IP=121.22.4.10 printed on the LCD
choose the following settings:
TRX
TXdata rate = 10 Gbps
TX encoding = FEC5
Uplink EPRX
EPRX0
Data Rate = 1280
Track Mode = Continues
Control TERM
Equalization 300 MHz
=> channel Lock in green is meaningless
EPRX1-6
Data Rate off
Uplink EPTX
Data Rate 160 Mpbs
Drive strength 4.0 mA
Invert polarity uplinks
click on the menu -> high speed
Invert high speed data output enabled
VLDB+ (Extra tests)
details in testVLDBplusBOBchain_Dec12020.key
PRBS7 uplink data test pattern: https://pigbt.web.cern.ch/manual/configuration.html#bert-checker
RD53A configured to output PRBS7 data (https://pigbt.web.cern.ch/manual/configuration.html#uplink-data-path-test-pattern)
constant patter: https://pigbt.web.cern.ch/manual/configuration.html#uplink-data-path-test-pattern
phase2/64b66b now closed: to retrieve git clone ...; git reset --hard d89f3ad0c3d538e0277ebbcf967401cb7a6afe25
https://www.xilinx.com/support/documentation/ip_documentation/fifo_generator/v13_1/pg057-fifo-generator.pdf
FWFT (empty), see Table 3-34 Vs 3-26 of )
single clock: (N-2*)*clk+1
dual clocks: wr_clk +(N-4)*rd_clk+1
N=2 (sync staged for depth=1024)
https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/phase2/master_pixelmode (commit 84752684a166541cb6aae97e1b6952fa7a90e564 works, tested 4CH and compiled 24CH)
local copy in ~/Phase2/64b66bmigrationFLX712/lpgbt/64b66brebasephase2master/tmpphase2master/gitlatest/firmware_downlinkanduplinkworkingwithfdaqmR_Dec10
bit file in FLX712_PIXEL_4CH_CLKSELECT_GIT_phase2-master_timingconstraintsFix_rm-5.0_1018_201210_15_36.bit
latest changes:
fifo_RD53_Encoder now at 16b rather than 18b and single clock (to shrink latency and make the cmd_top SM easier)
cmd_top SM now has additional initial state which waits until burst data is fully written in the fifo not to risk that the fifo will be empty before the end of the message processing
incoming data is 8b @40 MHz, processing is 16b @40MHz so we cannot start process data as soon as it is received as it happened in Phase1 (8b of payload @160 MHz, processing 16b @40MHz )
Procedure for testing
source ~/setup_FELIX-4.0_MT_Aug182020_rm5_updateNov19.sh (N.B always use the software version compatible with firmware)
Configuration:
flx-init -c 1
elinkconfig: FelixtoRD53A/FLX712/LpGBT/Phase2Lpgbt_fromHost4b.elc, disable Fr/TOHO emulators
enable only FrHO 4b elink of epth0
flx-config -d 3 set DECODING_LINK00_EGROUP0_CTRL_PATH_ENCODING=0x3
flx-config -d 3 set DECODING_LINK00_EGROUP0_CTRL_EPATH_ENA=0x1
flx-config -d 3 set DECODING_LINK00_EGROUP0_CTRL_EPATH_WIDTH=0x4
flx-config -d 3 set DECODING_REVERSE_10B=0x1
source CalInjection_flx712_lpgb.sh; fupload -d 3 -G 0 -g 0 -p 0 -t 0 -D commands/RD53A_write_commands_CAL_mode1delay0duration30aumxmode0auxduration0_1cal5sync1T000trig1cal.txt
fdaq -R ; fcheck -F
example output
(uplink) ~/RD53A_test/test2Dec102020_VLDBp-201210-173604-1.log or /users/mtrovato/Phase2/64b66bmigrationFLX712/lpgbt/64b66brebasephase2master/tmpphase2master/gitlatest/firmware_downlinkanduplinkworkingwithfdaqmR_Dec10/output/encrd53a_Dec10_VLDBp.csv or ila_6466b_Dec10_VLDBp.csv
(downlink) encrd53a_Dec10_VLDBp.csv
VLDB+
connect to Rpi wifi via phone for instance (https://pigbt.web.cern.ch/manual/quick_start.html#connect-to-pigbt-wi-fi)
in the browser type: http://121.224.4.10:8080 IP=121.22.4.10 printed on the LCD
choose the following settings:
TRX
TXdata rate = 10 Gbps
TX encoding = FEC5
Uplink EPRX
EPRX0
Data Rate = 1280
Track Mode = Continues
Control TERM
Equalization 300 MHz
=> channel Lock in green is meaningless
EPRX1-6
Data Rate off
Uplink EPTX
Data Rate 160 Mpbs
Drive strength 4.0 mA
Invert polarity uplinks
click on the menu -> high speed
Invert high speed data output enabled
TO DO:
add protection to start reading (starttread=1 when fifo is almost full?). Observeded that a continuous burst of data that arrives can be be as long as the user want
Register map : https://atlas-project-felix.web.cern.ch/atlas-project-felix/user/regmap/registers-4.0.html: 0x00090 NUM_CHANNELS
Wupper doc: https://atlas-project-felix.web.cern.ch/atlas-project-felix/user/docs/wupper.pdf (TO READ)
https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/master/sources/templates/dma_control.vhd?expanded=true&viewer=simple#L19003 : -> when REG_NUM_OF_CHANNELS => register_read_data_25_s(7 downto 0) <= register_map_monitor_s.register_map_gen_board_info.NUM_OF_CHANNELS;
https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/master/sources/templates/pcie_package.vhd#L243: REG_NUM_OF_CHANNELS = 0x00090 as defined in
Merged 64b66b_48ch (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/64b66b_48ch) into 64b66b (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/64b66b) : https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/commit/eab30add88a2c8409542f5c867eceed974083751
there is a fix for the bug that prevented downlink epath 0,2,4 to work (6 works fine)
rxcdrlock now replaces rxpmarestedone which is used for the aurora init SM
once fixed I shouldn't need vio to mask not connected lanes
Sasha's change to use central clk40 rather than recovered is default option since MGT elastic buffer is used (tested by sasha). FOr no elastic buffer use recovered clock unless it gets tested (https://sites.google.com/site/tdaqatlas/#TOC-Feb-10-2021-FELIX-to-RD53A-to-FELIX:-close-loop-clock-)
USECLOCKLOC=false (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/commit/eab30add88a2c8409542f5c867eceed974083751#c2e37aa598a75598be8e3c4f18094b2fbcadd152_84_84) to switch to recoveredd clock
USECLOCKLOC=true the requirement to use second MGT of the quad is relaxed
aurora_lane_up assigned to register (GBT_ALIGNMENT_DONE)
no need for ila
removed MMCM in aurora (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/commit/eab30add88a2c8409542f5c867eceed974083751#a34912ef6b2e93b5162e4919d37c609fc904e131_855_860)
TO DO:
output via registermap or ila numbers of issued triggers and headers to be compared
output the clock distance between cal injection and trigger
make a soft_err counter
backport 64bb66b module from phase2/master
decoder is per lane
bytetoaxistream:
bytetoaxistream with 4 bytes belonging to the same message (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/master/sources/decoding/ByteToAxiStream.vhd#L162-181)
running RD53A with 320,640 MHZ will have different configuration of gearbox and not differeren configuration of bytetoaxistream, which is still a single message of 4 correlated bytes 32b (which is the elementary message from RD53A)
real usecase is when you have 4 decorrelated byes which need to be aggregated in a single 32b axi message
strips with 8b10b aggregated (4 chips_ or running at faster link rate than 320 MHZ)
FELIX:dma and register access are different , so you can change registers (flx-config) while felix core is running.
fupload cannot be done while felixcore is running : they both access DMA
phase adjustment and lpGBT: check how the automatic phase adjustment in lpGBT is done.
how the phase and BER (jitter are related)
https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.73.2679&rep=rep1&type=pdf
- FELIX sends TTC/local clked (a) data to RD53A
- RD53A recovers the clock (b) and send b-driven data data back to FELIX.
- FELIX recovers the clock (c)
Conclusion:
- Since b=a and c=b => c=a, which means that the recovered clock on FELIX is equivalent in frequency to the TTC clock/local
- Phase differences between c and b (=a) due to the fiber lenght for istance
- either do not matter in the case of MGT w/ elastic buffer (since there is a FIFO to cross clock domain)
- or are compensated by dedicated circuitry when there is no elastic buffer (pge 253 of https://www.xilinx.com/support/documentation/user_guides/ug576-ultrascale-gth-transceivers.pdf)
>>>downlink (34x16b words (up to trigger 22x16b words))
81 7e 81 7e 69 69 63 63 a9 71 a6 6a 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 56 6a 56 6c 56 71 56 72 69 69 69 69 69 69 69 69 69 69 69 69 69 69 63 63 a9 6a 6a 6a 69 69 69 69
>>>uplink (50x32b + 15x2x32b = 25x64b + 15x64b -> (considerind the encoding which is already removed from the printoutbelow) 40 x 66b)
msg size: 2
02005454 l1id[0] tag[0] bcid[21588]ffffffff
msg size: 2
02105455 l1id[1] tag[0] bcid[21589]ffffffff
msg size: 2
0220d456 l1id[2] tag[1] bcid[21590]ffffffff
msg size: 2
0230d457 l1id[3] tag[1] bcid[21591]ffffffff
msg size: 2
0240d458 l1id[4] tag[1] bcid[21592]ffffffff
msg size: 2
0250d459 l1id[5] tag[1] bcid[21593]ffffffff
msg size: 2
0261545a l1id[6] tag[2] bcid[21594]ffffffff
msg size: 50
0271545b l1id[7] tag[2] bcid[21595]c40f9fff 600f9fff c41ff9ff 601ff9ff c42fff9f 602fff9f c43ffff9 603ffff9 c44e9fff 604e9fff c45ef9ff 605ef9ff c46eff9f 606eff9f c47efff9 607efff9 c48f9fff 608f9fff c49ff9ff 609ff9ff c4afff9f 60afff9f c4bffff9 60bffff9 c4ce9fff 60ce9fff c4def9ff 60def9ff c4eeff9f 60eeff9f c4fefff9 60fefff9 c50f9fff 610f9fff c51ff9ff 611ff9ff c52fff9f 612fff9f c53ffff9 613ffff9 c54e9fff 614e9fff c55ef9ff 615ef9ff c56eff9f 616eff9f c57efff9 617efff9 ffffffff
msg size: 2
0281545c l1id[8] tag[2] bcid[21596]ffffffff
msg size: 2
0291545d l1id[9] tag[2] bcid[21597]ffffffff
msg size: 2
02a1d45e l1id[10] tag[3] bcid[21598]ffffffff
msg size: 2
02b1d45f l1id[11] tag[3] bcid[21599]ffffffff
msg size: 2
02c1d460 l1id[12] tag[3] bcid[21600]ffffffff
msg size: 2
02d1d461 l1id[13] tag[3] bcid[21601]ffffffff
msg size: 2
02e05462 l1id[14] tag[0] bcid[21602]ffffffff
msg size: 2
02f05463 l1id[15] tag[0] bcid[21603]ffffffff
msg size: 50
0271545b l1id[7] tag[2] bcid[21595] c40f9fff 600f9fff c41ff9ff 601ff9ff c42fff9f 602fff9f c43ffff9 603ffff9 c44e9fff 604e9fff c45ef9ff 605ef9ff c46eff9f 606eff9f c47efff9 607efff9 c48f9fff 608f9fff c49ff9ff 609ff9ff c4afff9f 60afff9f c4bffff9 60bffff9 c4ce9fff 60ce9fff c4def9ff 60def9ff c4eeff9f 60eeff9f c4fefff9 60fefff9 c50f9fff 610f9fff c51ff9ff 611ff9ff c52fff9f 612fff9f c53ffff9 613ffff9 c54e9fff 614e9fff c55ef9ff 615ef9ff c56eff9f 616eff9f c57efff9 617efff9 ffffffff
how many pixels do you output for one trigger?
2 pixels = 64 bits (WHY?)
FROM THIS FIND OUT THE NUMBER OF PIXEL PER MASK IN YARR
please note than each trigger sequence takes a DMA transaction if it is passed to FELIX on its own
1 TLP = 1 kB
the interface runs at about 60 Gbps
so that limits the trigger rate to about 8 MHz
downlink limit = 160 Mb/s * T = 22x16b => T = 2 us => F=0.45 MHZ
so that's still higher than the max frequency for uplink = 20 MHZ * 66b/40x66b = 0.5 MHZ
itself
but it will be worse per RD53A when multiple cards are connected unless we broadcast
UPLINK LIMITATIONS BECOME BETTER WITH MORE LINKS PER CARD
From BNL_711_V2PO manual: "As shown in Figure 3, the FPGA has two Super Logic Regions (SLRs). To balance resource usage and
51 minimise the number of traces crossing the boundary each SLR has one 8-lane PCIe endpoint"
Therefore for a given design we need to make sure that MGT
are balanced (half on SRL0 and half on SRL1)
LMK or SI sources routed to GTREFCLK MGT are not used simultaneously in two SRLs, otherwise critical warning below which then leads to an error
LMK or SI are used as in figure 8 below
-BNL_711_V2PO
-BNL_711_V2PO (LMK_ and SI5345_ numbering matches https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/FLX-1441_CRFromHostOptimization/sources/LpGBT/LpGBT_FELIX/RefClk_Gen.vhd
-DS890
- MGT banks Vs GBT_NUM based on constraint files felix_gbt_minipod_BNL711_transceiver_[8,16,24]ch.xdc (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/phase2/master/constraints)
-FELIX implementation log
CRITICAL WARNING: [Place 30-739] Sub-optimal placement for an IBUFDS_GT / GT component pair. Processing will continue as all instances of this rule have been LOCed.
linkwrapper0/g_LPGBTMODE.u2/Reference_Clk_Gen/lmk1_gen (IBUFDS_GTE3.O) is locked to GTHE3_COMMON_X0Y4 (in SLR 0)
linkwrapper0/g_LPGBTMODE.u2/FLX_LpGBT_BE_INST/GTH_inst[1].GTH_TOP_INST/gtwizard_ultrascale_four_channel_qpll_inst/inst/gen_gtwizard_gthe3_top.KCU_RXBUF_PMA_QPLL_4CH_LPGBT_gtwizard_gthe3_inst/gen_gtwizard_gthe3.gen_\
channel_container[2].gen_enabled_channel.gthe3_channel_wrapper_inst/channel_inst/gthe3_channel_gen.gen_gthe3_channel_inst[3].GTHE3_CHANNEL_PRIM_INST (GTHE3_CHANNEL.GTREFCLK0) is locked to GTHE3_CHANNEL_X0Y36 (in SLR 1)
use dedicated tools (BUFGCE) to gate clock and save power or to disable unused logic and save power (e.g: CE of luts) rather than LUTs (if reset clk=0) since when using LUTs clocks need to leave dedicate nets, go to fabric, and come back to dedicated nets, thus causing delays and glitched
https://forums.xilinx.com/t5/General-Technical-Discussion/Reg-Clock-gating-for-FPGAs-good-or-bad/td-p/279154
FELIX presentation: https://indico.cern.ch/event/1016173/
Comments received:
TTC legacy ttc-elinks: b-chan somebody is using (are those all FPGA based or some are ASIC? in case of Asica we need to encode
long commands not for all L1A, so, even though are 42b>40MHz/1MHZ, can be queued and sent whenever . We need an implementation for that
use nico’s implementation: record ---------> DONE on Mar 15 (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/commit/488d54b5865eeb2df5bb0dd29436e3bbfb74612c). TO DO COMPILE and SEE if EVERTYHING IS OK
enabling legacy TTC qrapper or new LTITTC wrapper via generics --------> DONE on Mar 15 (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/commit/488d54b5865eeb2df5bb0dd29436e3bbfb74612c).
LTI/TTC RX and TX needs to be driven by different refclks. TX is recclock as FELIG. So no more jitter cleaners to spare. Lpgbt can go to 240 MHZ so can use currently available jitter cleaners -> DONE on Mar 22 (). to be tested.
25th MGT for LTI/TTC where it does come from for hardware with 24 channel only: Sasha is suggesting another mezzanine with an SFP cage * ----> Discussion with BNL folks
Sorb how it is done check the current TTC implementation by sasha. Lorne will send a jira
-the thing is that you cannot change the orbit in the middle of the next one
syncusrdata include to FEs
--------*: LTI/TTC data from SFP-----
Schematic:
Page 4 J16 connector to the mezzanine
Page 5: changing C91, C97 caps routes data from J16 to route MGT bank 231 to either minipod or SFP (though J16 connector). Sasha will request a TTCpon or white rabbit mezzanine so we can test case with 24ch FLX712 (4 minipods rather than 8). For now assume that MGT bank 231 is connected to minipod (check) and test
9.6 Gbps cannot be processed directly in the fabric since it's too fast (9.6 GHZ) , it needs to go through MGT for SIPO so parallel data (32b for instance) can be processed at slower pace (240 MHZ)
SFP is just to have an optical connection to FELIX. No much more than that
Fig 2 of http://www.fit-foxconn.com/Images/Products/Spec/AFBR-709SMZ_20160510175049811.pdf shows that SFP still needs a SERDES and IC for protocol decoding
MGT with 8b10b decoding , four bytes boundary alignment will always have comma aligned to the LSByte
test:
TX (before encoding): ... 56789abc bc0000ef abcd036b .... (comma in magenta)
TX encoded in MGT and serialized
Looped back
RX (after decoding and alignment): .. 0000ef56 cd036bbc ...
Parallel RX word is different than parallel TX word since a) comma=bc needs to be on LSByte and b) serialization LSb deserialization with MSb
TX PISO=LSb first serial data
5 6 7 8 9 a b c -> (time)
0101 0110 0111 1000 1001 1010 1011 1100 -> 0011 1101 0101 1001 0001 1110 0110 1010 1111 0111 0000 0000 00000 0000 |0011 1101 1101 0110 1100 0000 1011| 0011 1101 0101
b c 0 0 0 0 e f
1011 1100 0000 0000 0000 0000 1110 1111
a b c d 0 3 6 b
1010 1011 1100 1101 0000 0011 0110 1011
SIPO=MSb RX
0 0 0 0 e f 5 5
0000 0000 0000 0000 1110 1111 0101 0110
b c c d 0 3 6 b
1011 1100 1100 1101 0000 0011 0110 1011
No matter which byte contains comma is in the TX, RX will also be aligned to have the comma in the LSB
1) comma in the 4th byte
2) comma in the 3rd byte
https://www.ti.com/lit/ds/snas478c/snas478c.pdf?ts=1615906599669&ref_url=https%253A%252F%252Fwww.google.com%252F
registers in table 6-1,
fVCO = (fOSCin / Rdiv )*VCOdiv*Ndiv
first input of the phase detector: (fOSCin / Rdiv )
second input of the phase detector:(CLK/Ndiv)= fVCO/(Ndiv*VCOdiv)
CLK=fVCO/VCOdiv
output of the phase detector: CPout=fVCO
regime (fVCO constant) is achieved if the two inputs are equal, ie: fVCO/(Ndiv*VCOdiv)=fOSCin / Rdiv => fVCO = (fOSCin*Ndiv*VCOdiv) / Rdiv
=> CLK= (fOSCin*Ndiv) / Rdiv
In FELIX Phase2 (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/master/sources/spi/LMK03200_wrapper.vhd)
fOSCIn=40 MHz (L291-2 reg13)
Ndiv=64 (L325-6, reg15)
VCodiv=4 (L325-6, reg15)
RDiv=8(L308-309, reg14)
DIV4 not used
divider after CLK and before CLKoutX not used
=> CLKoutX=40*64/8=320 MHz; fVCO=CLK*4=1280 MHz
In FELIX Phase 1 : CLKoutX=40*48/8=240 MHz; fVCO=CLK*10=2400 MHz (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/master/sources/spi/LMK03200_wrapper.vhd)
https://indico.cern.ch/event/1021181/
changes:
uplink (TX in FELIX) at 4.8 Gbps
given that we do 8b10b encoding we cannot upsample duplicating the bits and run the TX at 9.6 Gbps
PT= 1 ATLAS 0, generic (for debugging), PT# (2bits rather than 3) since 4 partitions only
Testing the LTI/TTC interface in FELIX
loopback=2 in FELIX not possible any longer since the TX and RX in the MGT will run at different speed
solutions
loopback parallel data in the fabric to ttest the logic
set up a modified version of fullmode emulator on a different board to test clock recovery etc.
(probably annoying) have two different MGT IPs for debugging (9.6 Gbps both directions) and usecase (9.6 RX, 4.8 Gbps TX) for use case
Thilo et al. won't a provide instructions to setup an evaluation kit plus f/w or even only the fw until the end of the year
Info:
Downstream User Message can be sent when no L0A, not set bits. TTC messages can be sent (eg: set bits) when L0A=0
Important info discuss with Sasha: TC (timing control) link automatically adjust link latency to preserve downlink fixed latency
downlink latency can change because of temperature for istance
change is at sub ns level
procedure: TC latency is measured for the roundtrip (TC link run in loopback mode), latency measured and adjsutment made wrt in the MGT to the reference . Adjustment are made based on the measured latency minus the contribution from of the RX side. Assumptions are made in that subtraction
More details in the TTC-PON firmware doc (To BE searched)
More info in https://its.cern.ch/jira/browse/FLX-1314
TO UNDERSTAND
abort gap/tricke: LTI can be programmed to produce a trigger command in syncuserdata? LTI is aware of filled bunches
PLL can be used for TX and RX at different line artes or different links running at different line rates. What’s the constraints on those lines rates? Do they have to be multiple?
It all starts from .yaml. Then files in firmware and software need to be generated from it
modify [firmwaredir]/firmware/sources/templates/registers-5.0.yaml
cd [softwaredir]/software/wuppercodegen/wuppercodegen
./cli.py [firmwaredir]/firmware/sources/templates/registers-5.0.yaml [firmwaredir]/firmware/sources/templates/pcie_package.vhd.template [firmwaredir]/firmware/sources/templates/pcie_package.vhd
./cli.py [firmwaredir]/firmware/sources/templates/registers-5.0.yaml [firmwaredir]/firmware/sources/templates/dma_control.vhd.template [firmwaredir]/firmware/sources/templates/dma_control.vhd
./cli.py [firmwaredir]/firmware/sources/templates/registers-5.0.yaml [softwaredir]/regmap/src/regmap-symbol.h.template [softwaredir]/regmap/regmap/regmap5-symbol.h
./cli.py [firmwaredir]/firmware/sources/templates/registers-5.0.yaml [softwaredir]/regmap/src/regmap-symbol.c.template [softwaredir]/regmap/src/regmap5-symbol.c
recompile firmware and software
N.B: use regmap4-symbol.* reg4
JIRA: https://its.cern.ch/jira/browse/FLX-1554 , https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/phase2/FLX-1554_cb
TO DO:
24 channel exceeds LUTs. Understand where to save or if I can freeze epaths (ie: downlink only using epath 4b and less links than uplinks (ie: 1 downlink per 2 uplink if 2x3 lanes chips per lpgbt), so why bother implementing all of it)
xpm_cdc for 40 to 160 MHZ crossing to avoid metastability
optimizing the firmware: ByteToAxiStream32b can be removed (as per Marius suggestion), descrambler operating at 64b to simplify the design
simulation in CI
remove DIS_LANE reg, since it's not needed any longer
https://www.xilinx.com/products/intellectual-property/7_series_gen_3_pci_express.html#documentation
wupper: https://atlas-project-felix.web.cern.ch/atlas-project-felix/user/docs/wupper.pdf
xapp1117=pcie-gen3-sriov
PCI Express Base Specification, Rev. 4.0 Version 1.0 (https://members.pcisig.com/wg/PCI-SIG/document/)
pg156-gen3https://www.xilinx.com/support/documentation/ip_documentation/pcie3_ultrascale/v4_4/pg156-ultrascale-pcie-gen3.pdf
Egroup*31+31 downto 0 to in FELIX: making it configurable
allow for configurable polarity swap within egroup in FELIX wi
channel bonding may span accross different lpgbt lanes: wait for Laura to understand
do Zijun's test for direct readout
autozeroing : reactivate it in a configurable way
write info into YARR document. I can create a page
> HW
- FELIX
8 Minipods with ADDR[2downto0]=000-111 (check schematics U6-U9, U33-36)
- Minipod
TC Memory Map 5ih byte 9 -> LOS
- TWS: http://ww1.microchip.com/downloads/en/devicedoc/doc0180.pdf
- describe ADDR (8 minipods addr), SCL , SDA fr byte accessing/page (7b -> 128 bytes)
> FW
- i2c_interface.vhd -> I2C_RDFifo whose input rdfifo_din which comes from a SM which obeys to fig 11? of doc0180 (I'm only missing second device addr)
> SW (example on how to read minibod LOS) ()
- regmap-symbol.h
#define REG_I2C_WR "I2C_WR"
- flx-info.cpp
moda2.minipod[podnum].los
-FlxCard.cpp
get_monitoring_data -> i2c_devices_read(minipoddevices->name, 0x09, &msb); i2c_devices_read(minipoddevices->name, 0x0a, &lsb); moda.minipod[podnum].los = (msb << 8) + lsb;
i2c_devices_read- >i2c_read -> i2c_read_byte -> cfg_set_reg(REG_I2C_WR, value);
Output of flx-info POD
ow to the read the table below:
# = FLX link endpoint OK (no LOS)
- = FLX link endpoint not OK (LOS)
First letter: Current channel status
Second letter: Latched channel status
Example: #(-) means channel had lost the signal in the past but the signal is present now.
Latched / current link status of channel:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
|======|======|======|======|======|======|======|======|======|======|=======|=======|
1st TX | #(#) | #(#) | #(#) | #(#) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) |
1st RX | #(#) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) |
2nd TX | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) |
2nd RX | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) |
3rd TX | #(#) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) |
3rd RX | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) |
4th TX | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) |
4th RX | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) | -(-) |
Port RD53A encoder changes from Direct Readout to Lpgbt flavor
Auto zeroing
analog scans
update doc
caltrigsequence : load it from ram. I can write into the ram via software
/etc/dhcpcd.conf -> modified as follows to be able to access from local network with the given assign IP of 192.168.0.115
#MT
#nohook wpa_supplicant
#interface wlan0
#static ip_address=121.224.4.10/24
#static routers=121.224.4.1
nohook wpa_supplicant
interface wlan0
interface eth0
static ip_address=192.168.0.115/24
static routers=192.168.0.1
FW sequence configurable via SW. Implement RAM in FW
Aggregate register breack things in YARR. Understand what that means
saturation for analog scan for istance is at 20KHz (https://indico.cern.ch/event/861427/contributions/3675533/attachments/1963019/3263348/2019_12_16-DAQ_studies.pdf) so no point to go faster
Marius said that he's loosing triggers for analog scan
https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/master/sources/RD53A/ENCRD53A.vhd#L402 : this may be a bug: while the sequence is running if the user send a command it will be stored in fifo. However the starread will be issued since it depends on command_rdy (from CR) . cmd_top will ignore startread, which is ok since once done will see cmd_valid=1 (fifo not empty) and will issue commands (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/phase2/master/sources/RD53A/cmd_top.vhd#L717-719)
timing : how does it scale with more chips, linear or each chip runs in parallel
Three I2C switches in the FLX712
one connected to the FPGA (U50)
flx-i2c tool to use that
one connected to PCIe (U10)
one to both FPGA and the first switch
Check Schematics and manual
command grouping in software to ensure a particular sequence of commands (up to 8B) will be interrupted
Daniel Hernandez commented via email (Oct 6 20201) that the lpGBT losing configuration (and not rpi) may be due to ground loops arising from VLDB+ and RPI connected to different grounds (e.g: from the two different power supplies) and interconnected through ribbon cables.
Fix : interconnect the grounds from the two power supplies
J3 jumper on RPI for I2C PWR => OUTSIDE to have I2C lines powered by FEASTMP and not RPI
Ground loop explanation links
https://en.wikipedia.org/wiki/Ground_loop_(electricity)
1)
move_alldelay
deassert valid output for all lanes when the very first lane (lane i)) is pausing for gearbox. Other lanes will see their pointers increase. If all lanes have CB already aligned the lane i will always have pointer to 0 (output pause aligned to the input pause)
The other pointers will have their pointer decrease back to 0 (assumin lanes aligned here) when their gearbox will pause
in current implementation output valid=0 is aligned to last input gearbox pause, thus causing the latency introduced by this module to be +>=2 most of the time. With the new approach to the first
2) //TO DO: add protection against delay between lanes larger than 5 clks
when overflow (probably CB was lost in one lane deskew_lost=1 and have SM for all lanes start over
3) Improve DecodingGearbox_64b66b in latency: 4 clks is too much
--
probe HITOR0 testpoints or use DP cable board made by Carol
scope has 1 Mohm coupling by default -> swing ~ 2*350V (350V is what we expect from LVDS signals when terminated at 100 ohm)
build/bin/scanConsole -m 1 -c configs/connectivity/example_rd53a_setup.json -r configs/controller/felix.json -s configs/scans/rd53a/std_digitalscan.json
-m 1 necessary to activate the hit-or-buses (table 33 of the Rd53A doc)
https://its.cern.ch/jira/browse/FLXUSERS-433
/users/mtrovato/RD53A_test/countHits.py
Modified F/W to enable/disable AZ module while felixcore is running, modified YARR software to enable (Rd53A::TriggerLoop - execpart1) and disable (execpart2) AZ module
https://gitlab.cern.ch/YARR/YARR/-/commit/f62097363945ab8cca81d8f19f0e716557b8b34a
Perfect scan with up to 1 stage, count=1 and no ECR
Scan with 1 stage 1 count loose 1 hits
Scans with 256 stages, count=100 have few hot pixels (hits=101,102, few hundreds of hits with less than 100 hits
hot pixels due to tuning
pixels less than 100 hits seems less if I increase the @ stages. Try rebasing on master to see if things improve
Q. I have a question about BCID in the FEs. I read that BCR resets the counter of each FE BCID after the orbit is completed. But, in principle, if two FEs run on different clock domains there can be a mismatch between the BCIDs within the orbit: is that correct? This is not the case of pixel chips recovering clock from LpGBT/FELIX
A1. all the front-ends should be in the same clock domain by design
A2: phase difference
let’s imagine we get a BCR synchronous to the LHC bunch structure but with an unknown phase. There may be phase differences in BCRs arriving at FEs, since a) LTI -> FELIXes cabling may be of different length, and b) FELIX -> LpGBTs -> FEs cabling may be of different length
a) is easily adjusted* by shifting the phase of BCR in FELIX
b) however, we can adjust* the phase of each e-link in 6.25 ns stes by delaying the bitstream from the encoders by a few bits. More than that you need to have more BCRs to be sent to the different LpGBTs
(Phase1: currently FELIX just passes the BCRs to the front-ends and the front-ends needs to adjust the phase)
in phase 2 we can do it differently we can adjust the phase of BCR in FELIX
Summary: all FEs are synchronized since they recover clock from FELIX (through LpGBT). Phase is adjusted in FELIX
Extra
the phase variation from lpGBT to lpGBT should be tiny
all LTI's get the clock from the same source -> so all FELIXes should be synchronized
*Given a cabling, Adjustment is done mesuring the phase differences between two signals arriving at FELIX and you adjust accordingly
Extended LpGBT support to VC709: https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/phase2/master_FLX-1533_VC709LPGBT
compiled pixel
compiling LpGBT
Problems encountered:
Unspecified I/O Standard: 8 out of 165 logical ports use I/O standard (IOSTANDARD) value 'DEFAULT', instead of a user assigned specific value (for TX_N/P). This was due to the linkwrapper not being connected and thus removed by the tool. Saw it from the implemented design -> Netlist
Placement error because cascade of BUFG in two different halves of the FPGA *
1) ttc0/ttc_dec/from_cdr_to_AandB/clock_iter (BUFG.O) is provisionally placed by clockplacer on BUFGCTRL_X0Y16 (top half of the FPGA)
2) ttc0/BUFGMUX_ttc_local (BUFGCTRL.I0) is provisionally placed by clockplacer on BUFGCTRL_X0Y14 (bottom half)
rule is explained in https://www.xilinx.com/support/documentation/user_guides/ug472_7Series_Clocking.pdf#page=37
"in the 7 series FPGAs clocking architecture BUFGCTRL multiplexers and all derivatives can be cascaded to adjacent clock buffers within the group of 16 in the upper and lower half of the device"
This was due to the fact the all BUFGs in the bottom half were taken
Freed three BUGs in FLX_LpGBT_BE_Wrapper (TXOUTCLK[0] only used for the whole quad) and problem was solved (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/commit/6ed976cd3bd584734068ea7ae545ac82320a8925)
Previously attempted to move clk250 MMCM to bottom half with set_property LOC IBUFDS_GTE2_X1Y11 [get_cells ... ] in .xdc but the problem persisted
Lessons learnt
check if resources are taken before moving other things around
check if part of the designs are removed by the tool because of errors in vhdl
*Error message
Place 30-120] Sub-optimal placement for a BUFG-BUFG cascade pair. If this sub optimal condition is acceptable for this design, you may use the CLOCK_DEDICATED_ROUTE constraint in the .xdc file to demote this message to a WARNING. However, the use of this override is highly discouraged. These examples can be used directly in the .xdc file to override this clock rule.
< set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets ttc0/ttc_dec/from_cdr_to_AandB/ttc_clk_gated] >
ttc0/ttc_dec/from_cdr_to_AandB/clock_iter (BUFG.O) is provisionally placed by clockplacer on BUFGCTRL_X0Y16
ttc0/BUFGMUX_ttc_local (BUFGCTRL.I0) is provisionally placed by clockplacer on BUFGCTRL_X0Y14
All BUFGs in bottom half occupied (zoom). So clock_iter BUFG in top half
All BUFGs in bottom half occupied . Regions X1Y4,5 are visible
Freed three BUFGs in FLX_LpGBT_BE_Wrapper, so now clock_iter BUFG in bottom half
Docs: https://www.skyworksinc.com/-/media/SkyWorks/SL/documents/public/reference-manuals/si53xx-reference-manual.pdf, https://www.skyworksinc.com/-/media/SkyWorks/SL/documents/public/data-sheets/Si5324.pdf
Goal: Want to generate 320.632 MHz from 160.316 MHz for LPGBT design VC709
cross-check: want to match reg map in match https://gitlab.cern.ch/atlas-tdaq-felix/flxcard/-/blob/master/src/flx-init.cpp#L164
As indicated in the manual download DSPLLsim in www.silabs.com/timing. Then
Run Start Up Wizard -> Create a new Frequency Plan -> Si5324
first page:
CLKIN1=160.316 MHz, CLKOUT1 to CLKIN1 Ratio = 2, Number of input clocks = 1
CLKIN1 Ratio = 3/2
rest is default
other pages are default
Input Clocks Tab
AUTOSEL_REG = Manual
FOSREFSEL = CLKIN1
FOR_THR = +/- 11 to 12 ppm
CLKIN1RATE=CLKIN2RATE=95 to 215 MHz
Output Clocks Tab
SFOU1_REG=SFOUT2_REG=LVDS
From https://twiki.cern.ch/twiki/bin/viewauth/Sandbox/TDAQATLASANL
ClockBuilderPro on my Windows machine
settings (listing only the ones different wrt default)
Device revision: B or D
XTAL -> 48 MHz
Enable Zero Delay Mode
OUT9
IN0,1,2 @ 40.079 MHz enabled
OUT0,1,2 @ 160.316 MHz enabled
for Revision B you may have to lock the output to N0 to avoid errors
Target Loop Bandwidth 200 Hz
to match https://gitlab.cern.ch/atlas-tdaq-felix/hardware/blob/master/TTCfx/tools/Si5345_RevB_RegisterMap1_40_240_474.h
generated .h (https://twiki.cern.ch/twiki/pub/Sandbox/TDAQATLASANL/Si5345-RevB-Si5435-Registers_40_079_to_160_316.h)
imported registers from .h in felix02: ~/FELIX_latest_Aug242018/software/software/flxcard/src/flx-init.cpp
follow suggestions in the file
cd ~/FELIX_latest_Aug242018/software/software/x86_64-slc6-gcc62-opt/flxcard/; make; source ~/setup_FELIX-4.0_MT.sh
N.B: registers in .cpp can be changed by hand by reading https://www.silabs.com/documents/public/reference-manuals/Si5345-44-42-D-RM.pdf
to be figured out
ANLtoMerge Branch (devel_rd53a_felixNetio_multichip_rebase_master) being merged to master
branched from ANL branch: devel_rd53a_felixNetio_multichip_rebase
initially merged master to ANLtoMerge branch
merge request: (https://gitlab.cern.ch/YARR/YARR/-/merge_requests/463)
Removed constraint on # of received headers in StdDataLoop mainly to fix pipelines and simplify the merge
commits:
6904f18d, dfc1beaa
prior to 6904f18d (commit # 7b10a438c2a99c3f1774802a5a571ae1cee76de6) successful digital scan with ANLtoMerge branch (bit file https://atlas-project-felix.web.cern.ch/atlas-project-felix/user/dist/firmware/Bitfiles_development/FLX712_PIXEL_4CH_CLKSELECT_GIT_phase2-master_rm-5.0_2030_211118_20_23.tar.gz from FLXUSERS-433)
TO DO: test again by tuning waitime (https://gitlab.cern.ch/YARR/YARR/-/blob/6904f18d0a74925619dda3b9a21fed14c98e5c4a/src/libYarr/StdDataLoop.cpp#L72) with json (https://gitlab.cern.ch/YARR/YARR/-/blob/6904f18d0a74925619dda3b9a21fed14c98e5c4a/src/libYarr/StdParameterLoop.cpp#L78-79)
> hardware: FLX712 + LPGBT emulator , FEI4 telescope + RCE/HSIO II + Tim’s box (single to LVDS)
> digital scan:
- TX: both injection and trigger from encoder
% sequence: calInj + syncsync + … + syncsync + trigger
* #syncsync = delay/8, where delay is user defined in std_digitalscan.json
* delay is the latency x 25ns between calinj and first trigger
% downlink latency:
* FELIX downlink ~ 2x25 ns in GBT (Figure 5 of https://www.osti.gov/pages/servlets/purl/1424952)
* LGBT emulator
> RX (receive felix commands)
> TX (send felix commands)
- RX:
% uplink latency
- RD53A: store hits that have reached the programmed latency *, latency x 25ns defined by the user (latency_config in which file?)
% latency - delay must be > 0 . Moreover, this value depends on RD53A internal circuitry. TO DO: test with <0 doesn’t work
> testbeam
- TX:
% injection: from beam
% trigger: from FEI4 Hitor -> RCE/HSIOII -> Tim’s box -> FLX712 TTC -> encoder
* latency: RCE/HSIOII ~ 5x25ns , Hitor/Tim’s box = 0 (?), FLX712 TTC -> encoder = few clocks (TO DO estimate from f/w)
- RX: same as digital scan
- RD53A: trigger Vs injection scheme is changed so latency must be adjusted. It need to be (latency - delay)_digitalscan + trigger latency (to be measured)
Observation:
1) downlink latency doesn’t play a role in deciding the RD53A latency in digital scans since it affects (ie: delay) both calin and trigger, so it cancels out
2) downlink latency plays a role in testbeam since only affect trigger
3) assume deterministic latency downlink
—————————
* From Rd53A Manual: A trigger pulse (see Sec. 9) causes the next available row in this table to be filled as depicted in Fig. 40.
The pulse is also sent to the pixel matrix where it causes storage of all hits that have reached the
programmed latency at that point” and Fig 40
TO DO: LatencyConfig in std_noisescan/digital_scan is what matters since it ovewrites the latency in rd53a config. Joseph confirms that. Double check that at ANL running YARR and then reading register 37
Input to Output HSIOII
GBT latency: https://www.osti.gov/pages/biblio/1424952
All 4 links from the same FELIX MTP coupler
from BNL712 schematics and constraint file (felix_gbt_minipod_*transceiver)
decoding/encoding monitoring/controllin: 0,1 links to pcie device 0; 2,3 links to pcie device 1
one device <-> endpoint <-> pcie_ultrascale_703[8.9] IP
from felixtop: one encoding/decoding (controlling 2links) per endpoint (per device)
=> flx-config -d 0 will control/monitor 0,1 links, -d 1 will control/monitor 2,3 links
Q; from the software are the registers initially loaded with https://gitlab.cern.ch/atlas-tdaq-felix/flxcard/-/blob/master/src/FlxCard.cpp#L257-259 . REG_MAP_VERSION is static and won't change with operations
/dev/flx* how is it created
TO DO :
take a timing analysis and a typical FF in ultrascale FPGA and check typical TSU, TH, TP (https://www.nandland.com/articles/setup-and-hold-time-in-an-fpga.html)
look at the xilinx document and when the double FF is suggested wp231
[1]: https://en.wikipedia.org/wiki/Metastability_(electronics)#/media/File:Metastability_D-Flipflops.svg
[2]: https://www.nandland.com/articles/crossing-clock-domains-in-an-fpga.html
[3]: https://electronics.stackexchange.com/questions/26981/if-a-flip-flop-has-a-setup-violation-and-goes-metastable-is-it-guaranteed-to-se ; https://electronics.stackexchange.com/questions/237919/after-metastability-does-the-value-eventually-settle-to-the-correct-value
Metastability : what is it
registering an asynchronous signal into a clock domain (CLK) (ie: signal clocked with an async clock wrt CLK) output of the register (e.g: FF) may be undefined (something not 0 or 1 [1]) and may cause faulty behavior in logic gates the signal is applied to. Fig. 1
think about the signal rising from 0 to 1 and the sampling clock comes when the signal is 60%, which is not above the logical 1 threshold or below 0 threshold
this happens is the input is not available a bit before CLK rises (setup time) or it doesn't stay constant up to a bit after CLK has risen (hold time). Fig.2
Metastable states also happens in fully synchronous systems when the input setup and hold time requirements on flip-flops are not satisfied. Timing analysis will tell you
it applies for clocks which are asynchronous to each other, ie: unrelated phase (regardless of frequency relationship between the two).
I don't think it applies to synch clocks with different frequency (ie 100 MHZ and 200 MHz, where both clocks have been derived from the same source via a PLL)
Metastability: solution
insert a 2nd FF capture the signal when it became stable (https://en.wikipedia.org/wiki/Metastability_(electronics)#/media/File:Metastability_D-Flipflops.svg)
it doesn't allow the metastable output from the first register to be sent downstream
the stable output will be available in two CLKS (rather than 1)
assumption: time for a single FF (the first one) to become stable less than clock period
Q.: after metastability interval the first FF output stabilizes to the input or can be either 0 or 1? Regardless of the answer metastability is avoided
according to [1] and forum of [2]
in [3] they say the opposite: when the FF goes in mestable state the output is not guaranteed until next clock even though the output won't be mestable (either 0 or 1 regardless of the input) way before next clock comes:
also notice that the "equal to the input" is an undefined concept given that when the clock arrives the input may not be completely defined yet (in between 0 and 1 state)
if the assumption is not true, you have to ensure that the input lasts at least two of the destination clock domain, otherwise the output of the second FF will be stable but unrelated to the input
Fig 1 : Metastability example (faster and slower clock should be replaced by async clocks)
Fig2. Setup time (t_su) and hold time (t_h)
one spill only
FEI4 sees 100K hits
w/ ILA @160 MHz( between CR and decoding): 50K hits
counters in decoding were validated with a digital scan
YARR sees few hits in the plot (~1/3) -> confirm once at FNAL
thanks to {if(numWords<=2) return} (w/o this change very few hits)
is felixcore or yarr choking ?
also test by using the Hitor_TEL5 and Hitor_TEL0 rather than only Hitor_TEL0
from Netiohandler I also see 1/3 of the hits. -> Redo it by activating Sasha's printout and parsing the output with parseYarrNetioHandlerMessages.py
counting in the parser validated with digital
if confirmed 2/3 of the hits are lost either in the f/w (CR or wupper) or felixcore
TX/RX mapping pixel flavor F/W: https://its.cern.ch/jira/browse/FLXUSERS-494
Optopboard V1.1 schematics: https://gitlab.cern.ch/itk-pixel-electronics/services/optosystem/-/blob/master/G6341_OptoBoard_V1/G6341_OptoBoard_V1_1_schematics.pdf
LPGBT U101 (master): IC interface to configure registers
N.B: in page 2 of SC_I2C = 1 (I2C) but checked the board and R110 is not mounted => SC_I2C = 0 (IC default see LpGBT manual)
LPGBT U[2,3,4]01 (slave):
IC to configure related LPGBT master registers (I2CM[1,2][Address,Config,Data[0,1,2,3],Cmd])
see table 12.1, 12.3 and Section 12.6 for examples
I2C master needs to be configured first (e.g: frequency)
and then data to slave needs to be written
proper cmd (e.g: 1 bytes, 4bytes, see table 12.5)
I2C interface to configure the LPGBT U[2,3,4]01 (slave) registers
see 3.5 (I2C slave) of the LPGBT manual to check
More info
page3,4,5 SC_I2C=1 (I2C) and R[2,3,410] are mounted
I2C slaves (in the sense of master-slave I2C communication) of the LPGBT slave chips will receive data from the I2C master
I2C slaves have SL[SCL,SDA] pins of U[2,3,401F]
SL[SCL,SDA] pins of U101F not connected
I2C master have pins M[1,2][SCL,SDA] of U101D
M[1,2][SCL,SDA] of U[2,3,4]01D not connected
M0[SCL,SDA] of U[1,2,3,4]01D not connected
We can use either M1 or M2 I2C masters to write into slave LPGBT registers
Setup ready (ADD PHOTO HERE)
check whether it is mounting v0 or v1 LPGBT (can do that in fice by added some printouts), it should be v1
Email from Roman on May 4
Additional info
Pipeling to decrease logic delay and increase clock frequency (https://www.youtube.com/watch?v=uTzb4oNcIvQ)
https://www.nandland.com/articles/propagation_delay.html
> previous instructions for direct readout here: https://sites.google.com/site/tdaqatlas/home#h.pvthyl3hcmjx
> bit file in ~/FelixtoRD53A/FLX712/LpGBT/
> branch: https://gitlab.cern.ch/YARR/YARR/-/tree/devel_rd53a_felixNetio_multichip_rebase
> current working dir: /users/mtrovato/Phase2/LpGBT/software/YARR/YARR/
> clone and build YARR
git clone https://gitlab.cern.ch/YARR/YARR.git Yarr
git checkout evel_rd53a_felixNetio_multichip_rebase
1. source /opt/rh/devtoolset-7/enable
2. cd Yarr/;
3. mkdir build; cd build/
4. cmake3 .. -DYARR_CONTROLLERS_TO_BUILD="Spec;Emu;NetioHW" -DNETIO_DIR:PATH=$FELIXSW/x86_64-centos7-gcc8-opt
- if it doesn't point to the right gcc do add "-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/gcc"
- FELIXSW is the SW PATH (e.g; /users/mtrovato/Phase2/LpGBT/FLX-1533_VC709LPGBT/felix/software/)
5. make install -j4
6. make -j
> clone and build felix SW
instructions on felix git repo (https://gitlab.cern.ch/atlas-tdaq-felix/software)
> initialize felix and run felixcore
flx-init -c X # X = 0 if one device,
cd /users/mtrovato/RD53A_test
./config_encoding_decoding.sh Y (Y+1) #Y=0 if one device
./monitoring.sh Y
felixcore -d 0 --data-interface lo --monitoring-interface lo (--toflx-tlp 64)
> run Yarr
source /opt/rh/devtoolset-7/enable
cd Yarr/build (TO DO: move configs to Yarr dir and commit so I will be running yarr from the root directory ad per instructions)
bin/scanConsole -c configs/connectivity/rd53a_oneChip.json -s configs/scans/rd53a/std_digitalscan.json -r configs/controller/felix.json
[You can edit the config file "configs/defaults/felix_rd53a.json" included in rd53a_oneChip.json to configure the registers on RD53a, and "configs/connectivity/rd53a_oneChip.json" to change which lane to use for TX and RX; change configs/controller/felix.json tx/rx port for felixcore if needed]
> previous instructions: https://sites.google.com/site/tdaqatlas/home#h.jv42htdhdk5c
> bit file in ~/FelixtoRD53A/FLX712/LpGBT/
> branch: https://gitlab.cern.ch/YARR/YARR/-/tree/devel_rd53a_felixNetio_multichip_rebase_devel
> current working dir: /users/mtrovato/Phase2/LpGBT/software/YARR/YARR_rebaseFeb14/Yarr
> clone and build YARR (followed README with some changes_
cmake3 -S ../Yarr -B build -DYARR_CONTROLLERS_TO_BUILD="Spec;Emu;NetioHW" -DNETIO_DIR:PATH=$FELIXSW/x86_64-centos7-gcc8-opt
cmake3 --build build -j4
cmake3 --install build
Important: make sure that felixbase4/felixbase and netio4/netio are the same as in $FELIXSW. To enforce that before building change cmake/CMakeLists.txt.external
To compile when making change in the .cc :
cmake3 --install build -j4
(cd build; make -j; cd .. do I need this? Check)
or if you don't add/removed files
make -C build -j12 install (check Timon's email Mar 4 2022)
if in doubt rerun the whole README procedure
> clone and build felix SW, initialize felix and run felixcore instructions same as https://sites.google.com/site/tdaqatlas/home#h.jv42htdhdk5c
> run Yarr
from Yarr root dir (not build!)
source scl_source enable devtoolset-9
bin/scanConsole -c configs/connectivity/example_rd53a_setup.json -s configs/scans/rd53a/std_digitalscan.json -r configs/controller/felix.json -p
YARR: https://gitlab.cern.ch/YARR/YARR/-/tree/devel_rd53a_felixNetioNext/
local dir: /users/mtrovato/Phase2/LpGBT/software/YARR/YARR_devel_rd53a_felixNetioNext/YARR
felix-star
felix-tohost -d0 -p 12350 -i 127.0.0.1 -v
felix-toflx -p 12340 -i 127.0.0.1 -u
I'm anot receivind data in CR (using this bit file: /users/mtrovato/Phase2/LpGBT/FLX-1676_ITkPixV1/phase2master/firmware/output/*220805_09_42*)
start with the example from the jira
felix-star also supports netio? or only netionext?
1) start recv
./netio-next/recv 127.0.0.1 12350
data rate: 0.000000 Gb/s message rate: 0.000000 kHz
data rate: 0.000000 Gb/s message rate: 0.000000 kHz
data rate: 0.000000 Gb/s message rate: 0.000000 kHz
data rate: 0.000000 Gb/s message rate: 0.000000 kHz
data rate: 3.005057 Gb/s message rate: 6.154356 kHz --> send starts
data rate: 10.606471 Gb/s message rate: 21.722053 kHz
data rate: 11.241722 Gb/s message rate: 23.023046 kHz
data rate: 11.121156 Gb/s message rate: 22.776127 kHz
data rate: 11.020663 Gb/s message rate: 22.570319 kHz
data rate: 11.357253 Gb/s message rate: 23.259655 kHz
data rate: 11.777008 Gb/s message rate: 24.119312 kHz
data rate: 10.532730 Gb/s message rate: 21.571031 kHz -> send stop
2022-08-11 11:19:48 ERRORnetio completion_event.c:46: code 5 reading Completion Queue of recv socket: Input/output error
2022-08-11 11:19:48 ERRORnetio completion_event.c:47: Provider-specific error -5: Input/output error
2022-08-11 11:19:48 ERRORnetio completion_event.c:50: Send socket CQ I/O error, connection possibly closed: ignored
data rate: 3.819817 Gb/s message rate: 7.822986 kHz
data rate: 0.000000 Gb/s message rate: 0.000000 kHz
data rate: 0.000000 Gb/s message rate: 0.000000 kHz
data rate: 0.000000 Gb/s message rate: 0.000000 kHz
2) start send
./netio-next/send 127.0.0.1 12350
*Modified F/W: https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/FLX-1989_ITkPix or /users/mtrovato/Phase2/LpGBT/FLX-1676_ITkPixV1/felix/firmware
also bit file from https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/tree/FLX-1989_ITkPix works
* ANL YARR (updated): /users/mtrovato/Phase2/LpGBT/software/YARR/YARR_rebaseFeb14/Yarr or devel_rd53a_felixNetio_multichip_rebase_devel branch
* YARR devel slightly modified : https://gitlab.cern.ch/YARR/YARR/-/tree/devel_itkpix_felixNetio
* JIRA: https://its.cern.ch/jira/browse/FLX-1676, https://its.cern.ch/jira/browse/FLX-1989
* talk: https://indico.cern.ch/event/1192113/contributions/5027140/attachments/2501727/4297642/MarcoTrovato_ITKPixelReadoutMeeting_Sep22022.pdf
*Instructions
-YARR devel slightly modified
- source scl_source enable devtoolset-9
- bin/scanConsole -c configs/connectivity/example_rd53b_setup.json -s configs/scans/rd53b/std_digitalscan.json -r configs/controller/felix.json -p
- to get always perfect scans double sendWrReg here https://gitlab.cern.ch/YARR/YARR/-/blob/devel/src/libRd53b/Rd53b.cpp#L258
-source /users/mtrovato/setup_FELIX-4.0_MT_Aug2022_rm5.sh
cd RD53A_test ./config_CalTrigSeq.sh 2,3 (ScanType=3)
felixcore -d 2 --data-interface lo --monitoring-interface lo
* ItkPix V1.0
- From the received SCC we are in LDO powering mode since PWR_x = VINx (solder together) and VIN is open (see page 4 of chip)
- ItkPixV1.1 what to check before starting (from the manual). Done in green
> VIND/VINA = 1.46/1.41V
- voltage to 1.6V screw things up
> The VDDA and VDDD regulator outputs, which connect to
external decoupling capacitors, should produce approximately 1.2V, which is the default setting
(one should verify that this is the case when first testing a chip).
> both checked against GNDA_REF
> VDDA ~ 1.3 V (may depend on the trim from Timon)
> PLL lock with LVDS_3/DP2 (should be 1)
> GPO_CMS (should be 1)
- two chips received:
> 0x10AA5 (default): reasonable current consumption 0.85A/0.11A power up, 2.2A/0.72A digital scan for digital/analog
> 0x122A8: power consumption >7 A (coupled powers)
>- measure temperature via NTC (has to be below 40 degrees) and if not have a passive heatsink
- Chip ID in the data from ITkPix follows NS=1 in bits 62,61 if proper register (68) enabled
- Chip ID = 15 (internal pullups and header 4x2 has no jumpers on it. Opposite than Rd53A)
- need separated power for digital and analog side
- check voltage ripples at the power and analog voltage PS side
- activelanes reg: (counts #1’s and activate as many lanes as #1’s always in priority order lane3 last to be active)
1,2,4,8 data on lane0
3,6,12 data on lane0,1 (what about 5, 9?)
7, 14: lane0,1,2,3 (what about 13?)
15: all lanes
"DataMergeOutMux0": 3,
57 "DataMergeOutMux1": 2,
58 "DataMergeOutMux2": 1,
59 "DataMergeOutMux3": 0,
given the GTX0,1,2,3 are inverted on SCC this gives back what I had on RD53A (=> lane0 on GTX3 => (GTX* inverted on SCC) elink0 in FELIX. So test with elink 0 if it is connected in Ali’s board
- add sync at the beginning of the long command in yarr
* Expected Modification to firmware’ from reading the manual
**encoder
1) (page12, 48)
a) send PLLlock for 1 ms (for PLL) then
b) PllLock … sync Plllock… -> DONE
Can also send after a) and before b
a1) sync … sync for a while to ensure faster locking (this may be just fanciness)
2) reset with the idle (edge rate of 1 MHz) (page 12). In page 16 is below 10 MHz, so 1 MHz should be ok. Done already in sw 0.83 Mhz. But why repeated 400 times which means. ~500 us -> DONE via YARR
- in YARR SW decreased the length of such a pulse , other fifo in ENCRD53A will fill up. TO DO: should I generate a reset via f/w upon reception of a single FFF… 0000 pulse? I think it is better to stop writing when fifo is full (or expected to be full with the next command). Can have a register that count how many time we prevented the writing of such a fifo
3) cmds : not all the same as RD53A (page 45) -> UPDATED rd53a_package
4) calSeqEn now requires 1110 to start -> freq is only 5b rather than 6b
5) TO DO: waitbefore read state to be removed. It was implemented to accumulate all data in a burst before starting but it’s probably not needed anymore (TLP=64?). N.B: when valid data is received and this data is not in the rd53a_package (wrreg, etc) it will change state from waitbeforeread to readfromfifo. It’s not a problem but it is ugly.
6) WrReg broadcast not correctly handled in the FW
**decoder
6) NS=1 instead of 1E for tlast. Done but check split64vhd. Check also EOS marker (pag69, 71 )-> Partially done to be improved by a) tlast with tvalid=1 and tkeep and b) using EOS and 1E (SM to be implemented)
7) it’s ok to interrupt long commands (e.g: WrReg) with syncs as, stated in 8.2 (Frames are in-terpreted one at a time and short commands are executed immediately, while long (multi-frame) commands (Sec. 8.2.2) are executed after their last frame is received. Long commands have the 935 property that they can be interrupted by short commands without the need of restarting the inter- rupted command. )
* Performed tests with the modified F/W
1) RD53A: perfect digital scan (usinf ANL updated branch)
2) ItkPix V1.0:
- decent scan with SW seq at 500 Hz:
- perfect scans with FW seq at 5 kHz
- check skip triggers (134) at higher frequency, implement fast injection (but not as fast triggering) as Timon https://gitlab.cern.ch/YARR/YARR-FW/-/blob/master/rtl/tx-core/trigger_unit.vhd
- reported in https://indico.cern.ch/event/1192113/contributions/5027140/attachments/2501727/4297642/MarcoTrovato_ITKPixelReadoutMeeting_Sep22022.pdf
- with devel YARR branch slightly modified. With ANL updated branch doesn’t work. TO DO: understand why
Other TO DOs:
change default F/W injection for RD53B
WrRegister(1) to be implemented see https://indico.cern.ch/event/1179940/contributions/5042157/attachments/2507514/4308937/MarcoTrovato_ITKWeekITKTDaq_RD53B_Sep132022.pdf
implement extended tag monitoring to quickly pixels with slightly >100 <100 hits when I disable EoS checker in the SM
Test with isEoSEn=0 (https://gitlab.cern.ch/atlas-tdaq-felix/firmware/-/blob/186761215b94176070d79951dcc642d7557984bb/sources/64b66b/split64bword.vhd#L205, #177) to test mainly the logic which asserts tlast based NS (on Sep 21 ~working with 98, 101 hits. After that commit scans are empty) investige
***History of test performed***
Aug 26
last tested bit files FLX712_PIXEL_4CH_CLKSELECT_GIT_phase2-master_rm-5.0_2634_220816_08_06.bit
filtering out 1E00 to avoid warnings in rd53bDataprocessor in YARR. Check if that fixes problems and if help populates the plots. If does fix the warning and not populate put printouts in rd53bprocessor because I do see data in the handler
Aug29
last FLX712_PIXEL_4CH_CLKSELECT_GIT_phase2-master_rm-5.0_2634_220826_19_13.bit
1 mask stage produce correctplot
also swapp iw and iw+1 buffers in NetRxCore. Fixing the firmware
***NetioRxCore::readdata words=469***
00000000 00000000 00000000 81000000 00000000 81800000 00000000 82000000 00000000 82800000 00000000 83000000 200b0402 83800000 02329015 846400d5 076a2043 31201b22 14c4816c 5080cd24 6b420734 2a409608
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 0000000000000000000000000000000000000000000000000000000000000000. Skipping block...
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 000000000000000000000000000000001000 0001 000000000000000000000000. Skipping block...
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 000000000000000000000000000000001000 0001 100000000000000000000000. Skipping block...
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 000000000000000000000000000000001000 0010 000000000000000000000000. Skipping block...
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 000000000000000000000000000000001000 0010 100000000000000000000000. Skipping block...
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 0000000000000000000000000000000010000011000000000000000000000000. Skipping block...
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 0010 0000 0000 1011000001000000001010000011100000000000000000000000. Skipping block...
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 0000001000110010100100000001010110000100011001000000000011010101. Skipping block...
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 0000011101101010001000000100001100110001001000000001101100100010. Skipping block...
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 0001010011000100100000010110110001010000100000001100110100100100. Skipping block...
[12:43:40:796][ error ][Rd53bDataProcessor][28162]: Expect new stream while NS = 0: 0110 1011 0100 0010 0000 0111 0011 0100 0010 1010 0100 0000 1001 0110 0000 1000. Skipping
I see data when running yarr in ila and netiohandler and I see data after yarr when running calplustrigger
Aug 30
swap in iw and iw+1 buffers in NetRxCore in the fw. Latest bit file FLX712_PIXEL_4CH_CLKSELECT_GIT_phase2-master_rm-5.0_2634_220829_12_52.bit
disable totreset https://gitlab.cern.ch/YARR/YARR/-/blob/master/src/libRd53b/Rd53bTriggerLoop.cpp#L157-183 and decrease scan frequency to 500 Hz -> got decent occupancy map
Aug 31
Last tested FLX712_PIXEL_4CH_CLKSELECT_GIT_phase2-master_rm-5.0_2634_220830_15_05.bit
*****
Conservative:
1 hit = 32 bit
2400 pixels activated per mask stage (all core columns)
-> 76800 bits
+15 trigger with empty tags (16 triggers total) 1 trigger = 64bit
-> +1024 bit
= 77824 bit
1 lane, 1.28Gbps (this is a boundary condition, if the frequency is such to go above this will cause back pressure and data loss)
-> 16kHz
One would likely see issues before that because there is a sizeable delay from trigger to when the data is read out
And as we don't vary the tag in calibration scans, there would be very quickly an overlap in tags and the chip would skip it
In reality the above calculation is closer to the RD53A scheme. In ITkPix there is a compression mechanism which saves a lot of bandwidth
also note that digital scan the injection is in all cores in parallel to increase as much as possible #pixels (2400 per stage) and take advantage of the compression scheme. Comment: it doesn't look like that from the digital scan jso
LTI/TTC RX Interface implemented: https://its.cern.ch/jira/browse/FLX-1537
still missing tohost data to be routed to CR (*ToHost_Data*) in ltittc_wrapper (TO DO)
with data I will be able to perform the loopback test indicated in slides pointed in FLX-1537
simulation implemented in both Vivado simulator and modelsim
after 20usec start showing errors: check (TO DO)
errors appeared when swtiched to clk40 instead of ttc clock for wavegen
migrate to versal