SuperKEKB XRM system  Not logged in ELOG logo
Entry  Tue Jan 22 07:56:56 2019, M. Andrew, documentation, instructions for setup, compiling and data acquisition XRM.instructions.txt
    Reply  Fri Oct 4 08:55:23 2019, M. Andrew, documentation, instructions for pdu control 
    Reply  Fri Oct 4 10:04:12 2019, M. Andrew, documentation, instructions for programming boardstack 
    Reply  Fri Oct 4 10:18:44 2019, M. Andrew, documentation, instructions for checking boardstack status and temperature 
    Reply  Fri Oct 4 10:33:53 2019, M. Andrew, documentation, instructions for boardstack configuration 
    Reply  Tue Oct 29 09:27:14 2019, M. Andrew, documentation, instructions on taking a full revolution of waveforms 2019-10-30.062954.s17a.SCROD004.xrm.log2019-10-30.063506.waveforms.425events.png
       Reply  Wed Oct 30 15:23:57 2019, M. Andrew, documentation, sample waveform files 8x
          Reply  Mon Nov 18 13:30:44 2019, M. Andrew, documentation, first light! 
          Reply  Wed Nov 6 13:35:45 2024, M. Andrew, documentation, sample waveform files 2024-04-17.135507.zip2024-04-17.135507.waveforms.32windows.pngxrm.py
    Reply  Tue Nov 5 11:47:36 2019, M. Andrew, documentation, instructions on taking data around a desired RF bucket 2019-11-05.121045.waveforms.0099.png
Message ID: 22     Entry time: Fri Oct 4 10:33:53 2019     In reply to: 15
Author: M. Andrew 
Type: documentation 
Subject: instructions for boardstack configuration 
This is done from sixrmlaptop02 (a.k.a. balrog017).  These scripts are not in the $PATH, so you must cd to ~/build/uh-svn-repo/trunk/software/b2l/scripts_dev before running them.

To configure the ASICs, set desired modes in the PL/PS (programmable logic/processing system) for operation, and then acquire pedestals:
idlab@balrog017:~/build/uh-svn-repo/trunk/software/b2l/scripts_dev$ ../scripts_rel/configure_boardstack_then_acquire_and_check_pedestals.sh a
/home/idlab/build/uh-svn-repo/trunk/software/b2l/scripts_rel/../scripts_dev/.config
$hslb_list = " a"

running in _fast mode from /home/idlab/build/uh-svn-repo/trunk/software/b2l/scripts_dev

xrm trigger enabled (4ad) = 00000000
number of carriers detected = 4
set up all registers on hslb a (boardstack 0)...
Writing output from ./config1boardstack_fast.py to logfile: logs/2019-10-05.053059.s17a.SCROD004.config1boardstack_fast.log
reg24b2 = 00000000 CARRIER_AxiCommon_heapEnabled
reg44b2 = 00000000 CARRIER_AxiCommon_heapEnabled
reg64b2 = 00000000 CARRIER_AxiCommon_heapEnabled
reg84b2 = 00000000 CARRIER_AxiCommon_heapEnabled
[ 0.000] ##########################################################
[ 0.000] ## Starting configuration of BS 0 / carrier 0 
[ 0.002] Writing trigger thresholds to PS registers
[ 0.020] Writing sstFB values (110, 109, 110, 110) to PS registers
[ 0.022] Starting asic fast autoconfiguration on carrier PS
[ 0.000] ##########################################################
[ 0.000] ## Starting configuration of BS 0 / carrier 1 
[ 0.003] Writing trigger thresholds to PS registers
[ 0.021] Writing sstFB values (110, 110, 110, 109) to PS registers
[ 0.023] Starting asic fast autoconfiguration on carrier PS
[ 0.000] ##########################################################
[ 0.000] ## Starting configuration of BS 0 / carrier 2 
[ 0.005] Writing trigger thresholds to PS registers
[ 0.023] Writing sstFB values (110, 110, 109, 109) to PS registers
[ 0.026] Starting asic fast autoconfiguration on carrier PS
[ 0.000] ##########################################################
[ 0.000] ## Starting configuration of BS 0 / carrier 3 
[ 0.007] Writing trigger thresholds to PS registers
[ 0.026] Writing sstFB values (110, 110, 110, 110) to PS registers
[ 0.028] Starting asic fast autoconfiguration on carrier PS
Wait until all ASICs are configured...
00 0001[1] 0001[1] 0001[1] 0001[1] 
00 0001[7] 0001[7] 0001[7] 0001[7] 
01 0001[7] 0001[7] 0001[7] 0001[7] 
01 0001[7] 0001[7] 0001[7] 0001[7] 
02 0001[7] 0001[7] 0001[7] 0001[7] 
02 fff2[e] 0001[7] fff2[e] 0001[7] 
03 fff2[e] fff2[e] fff2[e] 0001[7] 
03 fff2[e] fff2[e] fff2[e] fff2[e] 
03 fff2[e] fff2[e] fff2[e] fff2[e] 
*****************************************************
carrier 0 configuration SUCCESS for all ASICS
carrier 1 configuration SUCCESS for all ASICS
carrier 2 configuration SUCCESS for all ASICS
carrier 3 configuration SUCCESS for all ASICS
*****************************************************
return value = 0
prepare boardstack to take data...
Writing output from ./prep1boardstack_data_trueROI.py to logfile: logs/2019-10-05.053103.s17a.SCROD004.prep1boardstack_data_trueROI.log
Found 4 carriers
BS 0, carrier 0, asic 0 [ phase: 1 0 ] ready for data
BS 0, carrier 0, asic 1 [ phase: 1 0 ] ready for data
BS 0, carrier 0, asic 2 [ phase: 0 ] ready for data
BS 0, carrier 0, asic 3 [ phase: 0 ] ready for data
BS 0, carrier 1, asic 0 [ phase: 1 1 0 ] ready for data
BS 0, carrier 1, asic 1 [ phase: 1 0 ] ready for data
BS 0, carrier 1, asic 2 [ phase: 0 ] ready for data
BS 0, carrier 1, asic 3 [ phase: 0 ] ready for data
BS 0, carrier 2, asic 0 [ phase: 0 ] ready for data
BS 0, carrier 2, asic 1 [ phase: 0 ] ready for data
BS 0, carrier 2, asic 2 [ phase: 0 ] ready for data
BS 0, carrier 2, asic 3 [ phase: 0 ] ready for data
BS 0, carrier 3, asic 0 [ phase: 1 0 ] ready for data
BS 0, carrier 3, asic 1 [ phase: 1 0 ] ready for data
BS 0, carrier 3, asic 2 [ phase: 1 0 ] ready for data
BS 0, carrier 3, asic 3 [ phase: 0 ] ready for data
return value = 0
ask PS to acquire pedestals...
Writing output from ./prep1boardstack_fe.py to logfile: logs/2019-10-05.053103.s17a.SCROD004.prep1boardstack_fe.log
Taking pedestals...
remaining triggers = 54785
remaining triggers = 54273
remaining triggers = 53505
remaining triggers = 52993
remaining triggers = 52481
remaining triggers = 51713
remaining triggers = 51201
remaining triggers = 50433
remaining triggers = 49921
remaining triggers = 49409
remaining triggers = 48641
remaining triggers = 48129
remaining triggers = 47361
remaining triggers = 46849
remaining triggers = 46337
remaining triggers = 45569
remaining triggers = 45057
remaining triggers = 44289
remaining triggers = 43777
remaining triggers = 43265
remaining triggers = 42497
remaining triggers = 41985
remaining triggers = 41217
remaining triggers = 40705
remaining triggers = 40193
remaining triggers = 39425
remaining triggers = 38913
remaining triggers = 38145
remaining triggers = 37633
remaining triggers = 36865
remaining triggers = 36353
remaining triggers = 35841
remaining triggers = 35073
remaining triggers = 34561
remaining triggers = 33793
remaining triggers = 33281
remaining triggers = 32769
remaining triggers = 32001
remaining triggers = 31489
remaining triggers = 30721
remaining triggers = 30209
remaining triggers = 29697
remaining triggers = 28929
remaining triggers = 28417
remaining triggers = 27649
remaining triggers = 27137
remaining triggers = 26625
remaining triggers = 25857
remaining triggers = 25345
remaining triggers = 24577
remaining triggers = 24065
remaining triggers = 23553
remaining triggers = 22785
remaining triggers = 22273
remaining triggers = 21505
remaining triggers = 20993
remaining triggers = 20481
remaining triggers = 19713
remaining triggers = 19201
remaining triggers = 18433
remaining triggers = 17921
remaining triggers = 17409
remaining triggers = 16641
remaining triggers = 16129
remaining triggers = 15361
remaining triggers = 14849
remaining triggers = 14337
remaining triggers = 13569
remaining triggers = 13057
remaining triggers = 12289
remaining triggers = 11777
remaining triggers = 11265
remaining triggers = 10497
remaining triggers = 9985
remaining triggers = 9217
remaining triggers = 8705
remaining triggers = 8193
remaining triggers = 7425
remaining triggers = 6913
remaining triggers = 6145
remaining triggers = 5633
remaining triggers = 4865
remaining triggers = 4353
remaining triggers = 3841
remaining triggers = 3073
remaining triggers = 2561
remaining triggers = 1793
remaining triggers = 1281
remaining triggers = 769
remaining triggers = 0
Pedestal Calc Success
Feature extraction mode = Passthru
write pedestals to disk...
collecting data in background thread (file peds/ped_hslb_s17a.dat)...
starting to collect data...
triggering readout of pedestals...
0/0
0/1
0/2
0/3
0/4
0/5
0/6
0/7
collected 8192 packets
-rw-r----- 1 idlab idlab 17072128 Oct  5 05:32 peds/ped_hslb_s17a.dat

Correctly read out 8192.0 packets

Splitting peds/ped_hslb_s17a.dat into peds/ped_hslb_s17a.ped.dat and peds/ped_hslb_s17a.RMS.dat
4096+0 records in
4096+0 records out
8536064 bytes (8.5 MB, 8.1 MiB) copied, 0.0356023 s, 240 MB/s
4096+0 records in
4096+0 records out
8536064 bytes (8.5 MB, 8.1 MiB) copied, 0.0414147 s, 206 MB/s
-rw-r----- 1 idlab idlab 8536064 Oct  5 05:32 peds/ped_hslb_s17a.ped.dat
-rw-r----- 1 idlab idlab 8536064 Oct  5 05:32 peds/ped_hslb_s17a.RMS.dat
use 'peddump' to read the files peds/ped_hslb_s17a.ped.dat and peds/ped_hslb_s17a.RMS.dat
convert pedestal/RMS files from dat to txt...
-rw-r----- 1 idlab idlab 17044537 Oct  5 05:32 peds/ped_hslb_s17a.ped.txt
-rw-r----- 1 idlab idlab 10069140 Oct  5 05:32 peds/ped_hslb_s17a.RMS.txt
generating pedestal/RMS png files...

run these commands on the appropriate machine:
root -l -b -q '../../fe/FEpedsSummary.C+("peds/ped_hslb_s17a")'
eog peds/ped_hslb_s17a*.png

-rw-r----- 1 idlab idlab 17072128 Oct  5 05:32 peds/ped_hslb_s17a.dat
-rw-r----- 1 idlab idlab  8536064 Oct  5 05:32 peds/ped_hslb_s17a.ped.dat
-rw-r----- 1 idlab idlab  8536064 Oct  5 05:32 peds/ped_hslb_s17a.RMS.dat
-rw-r----- 1 idlab idlab 17044537 Oct  5 05:32 peds/ped_hslb_s17a.ped.txt
-rw-r----- 1 idlab idlab 10069140 Oct  5 05:32 peds/ped_hslb_s17a.RMS.txt

[optional] Then to plot summaries of the pedestal data (frequently useful for diagnosing problems):
idlab@balrog017:~/build/uh-svn-repo/trunk/software/b2l/scripts_dev$ root -l -b -q '../../fe/FEpedsSummary.C+("peds/ped_hslb_s17a")'
root [0] 
Processing ../../fe/FEpedsSummary.C+("peds/ped_hslb_s17a")...
ch =   0   ped =  1792   RMS =   94
ch =   8   ped =  1163   RMS =   46
ch =  16   ped =  1128   RMS =   39
ch =  24   ped =  1086   RMS =   34
ch =  32   ped =   310   RMS =    6
ch =  40   ped =   356   RMS =    8
ch =  48   ped =   322   RMS =    6
ch =  56   ped =   280   RMS =    3
ch =  64   ped =  1075   RMS =   34
ch =  72   ped =  1096   RMS =   73
ch =  80   ped =  1138   RMS =   45
ch =  88   ped =  1052   RMS =   36
ch =  96   ped =   320   RMS =    7
ch = 104   ped =   329   RMS =    9
ch = 112   ped =   388   RMS =    9
ch = 120   ped =   325   RMS =    7
processed 4194304 entries

Info in <TCanvas::Print>: png file peds/ped_hslb_s17a.PedSummary.png has been created
Info in <TCanvas::Print>: png file peds/ped_hslb_s17a.PedSummary_Logy.png has been created
Info in <TCanvas::Print>: png file peds/ped_hslb_s17a.PedVsSample.png has been created
Info in <TCanvas::Print>: png file peds/ped_hslb_s17a.PedVsChannel.png has been created
 FCN=2.10161e+06 FROM MIGRAD    STATUS=CONVERGED     155 CALLS         156 TOTAL
                     EDM=2.30771e-08    STRATEGY= 1  ERROR MATRIX UNCERTAINTY   1.3 per cent
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  Constant     2.49118e+05   2.95976e+02  -1.60874e-01   1.32447e-06
   2  Mean         3.09614e+01   5.25673e-03  -1.14622e-06  -1.04896e-02
   3  Sigma        4.73722e+00   4.23697e-03  -6.36022e-08   2.33082e+00
Info in <TCanvas::Print>: png file peds/ped_hslb_s17a.RMS_Summary.png has been created
Info in <TCanvas::Print>: png file peds/ped_hslb_s17a.RMS_Summary_Logy.png has been created
Info in <TCanvas::Print>: png file peds/ped_hslb_s17a.PedRMSvsChannel.png has been created
Info in <TCanvas::Print>: png file peds/ped_hslb_s17a.PedRMSvsSample.png has been created
Info in <TCanvas::Print>: png file peds/ped_hslb_s17a.PedRMSvsReadOutPos.png has been created
Info in <TCanvas::Print>: png file peds/ped_hslb_s17a.RMS_ped_depend.png has been created

Note:  If you get a lot of messages like "ERROR:  wrong virtual channel number in data (packet1); DEBUG3:  01 00 00 00" during pedestal readout, it will try again a few times and as long as the script says "Correctly read out 8192.0 packets" before quitting, then all is okay.  It is unknown why this virtual channel problem occurs (it's a bug but I don't know where).

[optional] To view the pedestal summary plots:
eog peds/ped_hslb_s17a*.png

[optional] If you want to save the pedestals for future reference (because they mark the first or last time a particular situation is being exercised):
idlab@balrog017:~/build/uh-svn-repo/trunk/software/b2l/scripts_dev$ ./push_peds.sh 2019-10-04.these-look-nice.c0c2only
2019-10-05+05:32     10069140 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.RMS.txt
2019-10-05+05:32     17044537 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.ped.txt
2019-10-05+05:32     17072128 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.dat
2019-10-05+05:32      8536064 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.ped.dat
2019-10-05+05:32      8536064 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.RMS.dat
2019-10-05+05:35        16009 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.PedSummary.png
2019-10-05+05:35        16983 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.PedSummary_Logy.png
2019-10-05+05:35        19455 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.RMS_Summary_Logy.png
2019-10-05+05:35        21818 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.RMS_Summary.png
2019-10-05+05:35        25792 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.RMS_ped_depend.png
2019-10-05+05:35        31859 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.PedRMSvsChannel.png
2019-10-05+05:35        33339 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.PedRMSvsSample.png
2019-10-05+05:35        34725 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.PedVsChannel.png
2019-10-05+05:35        45609 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.PedRMSvsReadOutPos.png
2019-10-05+05:35        59214 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only/ped_hslb_s17a.PedVsSample.png
2019-10-05+05:37         4096 peds/2019-10-05.2019-10-04.these-look-nice.c0c2only

Note:  If you don't run push_peds.sh to archive the pedestal data and summary plots, the next pedestal acquisition will overwrite them.  Usually they are not needed, as pedestal subtraction is done online before data comes out.

[optional]  To check again on the boardstack temperatures and raw voltages:
idlab@balrog017:~/build/uh-svn-repo/trunk/software/b2l/scripts_dev$ ./get_status.py 0
Writing output from ./get_status.py to logfile: logs/2019-10-05.054118.s17a.SCROD004.get_status.log
SCROD #4 RawVoltages: 1.800 V 3.475 V 4.623 V
 WARNING: RAW2 voltage unnecessarily high (by 0.376 V)
         FPGA_ver ARM_ver  trigMask DieTemp WallTemp -----other------ ARM_stat
   SCROD 00010095 0000006e 00000000  58.0 C  38.8 C  34.5 C   9.4 %RH Running
carrier0 00000062 00000021 00000000  73.2 C  59.5 C  51.8 C  58.5 C   Running
carrier1 00000062 00000021 00000000  73.3 C  60.5 C  53.0 C  59.0 C   Running
carrier2 00000062 00000021 00000000  78.8 C  65.8 C  61.2 C  67.0 C   Running
carrier3 00000062 00000021 00000000  72.9 C  56.8 C  52.0 C  56.2 C   Running
readoutBitSlip (IRSX config?) = [3, 3, 3, 3]
readoutWindows (prep done?)   = [1, 1, 1, 1]
Feature extraction mode       = 2 Passthru
SCROD_AxiCommon_asicTimeoutMask: 0
ProcessPacketProblemCounter = 0
nSamplesWrongCounter = 0
SCROD_PS_EXTENDED_STATUS_ADDR = 0x1
SCROD_PS_pendingWaves = 0
SCROD_PS_procEventCnt = 0
SCROD_PS_totalWaves = 0
SCROD_AxiCommon_eventCnt = 54784
SCROD_AxiCommon_pendingEventCount = 255
SCROD_AxiCommon_maxPendingEventCount = 255
SCROD_PS_AXI_FAULT_STATUS_ADDR = 0x0
SCROD_PS_AXI_FAULT_ADDRESS_ADDR = 0x0
SCROD_PS_OFFENDING_ADDRESS0_ADDR = 0x0
SCROD_PS_OFFENDING_ADDRESS1_ADDR = 0x0

Note:  After configuration, the warnings about raw voltages being too *low* should be heeded (requires a tunnel access with a slotted screwdriver to fix).
ELOG V3.1.5-3a5f2f0