2353 0x2600000a62e06428
2355 0x9500000a62dfe228
-
-
-
2360 0xfc00000942860428
2361 0xaf00000943073528
2362 0x5700000943073e28
2713 0x4200000bf30bbe28
2715 0x2200000bf30bc528
+=======
+>>>>>>> Stashed changes
+ 2101 0xbd00000a627d9228
+
+
+ 3301 0x19000005b7756328
+ 3311 0x72000005b7bc2928
+ 3321 0xa2000005b79f6728
+ 3331 0x08000005b7e7e928
+ 3341 0xb4000005b75b9428
+ 3351 0x6a0000070efb1928
+ 3361 0x04000005b79fdf28
+ 3371 0x72000005b6f3e028
+ 3381 0x060000070f046f28
+ 3391 0xfb000005b7443428
+ 3401 0x83000005b75b9528
+ 3411 0x56000005b7be1428
+ 3421 0xf2000005b7bd9428
+ 3431 0xbe000005b7bdac28
+ 3441 0x55000005b7bda928
+ 3451 0x64000005b7756f28
+ 3461 0x64000005b7bd9d28
+ 3471 0xb0000005b7bccc28
+ 3481 0x55000005b79f9028
+ 3491 0xe4000005b7bc2028
+ 3501 0xd5000005b7bc1428
+ 3511 0x5a000005b7443c28
+ 3521 0xc3000005b7bda028
+ 3531 0x44000005b79f8d28
+ 3541 0x43000005b7bc1d28
+ 3551 0x89000005b7e7c828
+ 3561 0x73000005b7bdb528
+ 3571 0x03000005b7a9bb28
+ 3581 0x3e000005b7bc1128
+ 3591 0xfd0000070efff128
+ 3601 0x63000005b79f1428
+ 3611 0x38000005b79f0428
+ 3621 0x39000005b7bdb828
+ 3631 0xe00000070f048528
+ 3641 0x8e0000070f048728
+ 3651 0x740000070f049f28
+
+ 3661 0x64000005b78e3428
+ 3671 0x9e000005b7e7e028
+ 3681 0xe1000005b7756828
+ 3691 0xf6000005b7b9d628
+ 3701 0xd80000070f056128
+ 3711 0x92000005b7a90228
+ 3721 0x0f000005b7be1728
+ 3731 0x920000070efb1228
<Module name="Combiner" class="hadaq::CombinerModule">
<!-- these parameters will force to create inputs/outputs of module -->
- <NumInputs value="3"/>
+ <NumInputs value="2"/>
<NumOutputs value="2"/>
- <InputPort name="Input0" url="hadaq://host:50084" urlopt1="" thread="inp2thrd"/>
- <InputPort name="Input1" url="hadaq://host:50061" urlopt1="" thread="inp1thrd"/>
+ <InputPort name="Input0" url="hadaq://host:50084" urlopt1="" thread="inp0thrd"/>
+ <InputPort name="Input1" url="hadaq://host:50113" urlopt1="" thread="inp1thrd"/>
+ <InputPort name="Input2" url="hadaq://host:50061" urlopt1="" thread="inp2thrd"/>
<!-- <InputPort name="Input1" url="hadaq://host:50113" urlopt1=""/> -->
- <InputPort name="Input2" url="hadaq://host:50113" urlopt1="" thread="inp3thrd"/>
+
<InputPort name="Input3" url="hadaq://host:50158" urlopt1="" thread="inp0thrd"/>
<InputPort name="Input4" url="hadaq://host:10104" urlopt1="trb=0x8030&tdc=[0x3030,0x3031,0x3032,0x3033]&dummy"/>
<InputPort name="Input5" url="hadaq://host:10105" urlopt1="trb=0x8040&tdc=[0x3040,0x3041,0x3042,0x3043]&dummy"/>
<!-- this is example of HLD file storage - local and RFIO -->
<OutputPort name="Output1" url="hld:///d/trashcan/pulser.hld?maxsize=2000"/>
+
<!--OutputPort name="Output1" url="hld:///linev/path/dabc.hld?maxsize=1900&rfio"/-->
<DoShmControl value="false"/>
# concentrator/combiner
0x8300 001 0
+
0x8300 002 0
0x8300 101 0
0x8300 103 0
0x8301 025 0
0x8302 033 0
0x8303 800 0
+
+#0x8302 002 0
+#0x8401 101 0
+#0x8403 103 0
+#0x8313 013 0
+#0x8410 110 0
+#0x8333 033 0
+
0x8132 132 5
+#slave
+0x1740 174 0
+0x1741 174 1
+0x1742 174 2
+0x1743 174 3
+0x8174 174 5
+
+#slave
+0x1780 178 0
+0x1781 178 1
+0x1782 178 2
+0x1783 178 3
+0x8178 178 5
+
+
+
+#slave
+0x1800 180 0
+0x1801 180 1
+0x1802 180 2
+0x1803 180 3
+0x8180 180 5
+
+#slave
+0x1810 181 0
+0x1811 181 1
+0x1812 181 2
+0x1813 181 3
+0x8181 181 5
+
+#slave
+0x1790 179 0
+0x1791 179 1
+0x1792 179 2
+0x1793 179 3
+0x8179 179 5
+
+#slave
+0x1760 176 0
+0x1761 176 1
+0x1762 176 2
+0x1763 176 3
+0x8176 176 5
+
+
+#slave
+0x1840 184 0
+0x1841 184 1
+0x1842 184 2
+0x1843 184 3
+0x8184 184 5
+
+#slave
+0x1820 182 0
+0x1821 182 1
+0x1822 182 2
+0x1823 182 3
+0x8182 182 5
+
+
+#slave
+0x1830 183 0
+0x1831 183 1
+0x1832 183 2
+0x1833 183 3
+0x8183 183 5
+
+
+#slave
+0x1980 198 0
+0x1981 198 1
+0x1982 198 2
+0x1983 198 3
+0x8983 198 5
+
+
+#slave
+0x1420 142 0
+0x1421 142 1
+0x1422 142 2
+0x1423 142 3
+0x8142 142 5
+
+
+#slave
+
+
+0x1110 200 0
+0x1111 200 1
+0x1112 200 2
+0x1113 200 3
+0xc004 200 5
+0x1110 201 0
+0x1111 201 1
+0x1112 201 2
+0x1113 201 3
+0xc004 201 5
+0x1110 202 0
+0x1111 202 1
+0x1112 202 2
+0x1113 202 3
+0xc004 202 5
+0x1110 203 0
+0x1111 203 1
+0x1112 203 2
+0x1113 203 3
+0xc004 203 5
+0x1110 204 0
+0x1111 204 1
+0x1112 204 2
+0x1113 204 3
+0xc004 204 5
+0x1110 205 0
+0x1111 205 1
+0x1112 205 2
+0x1113 205 3
+0xc004 205 5
+0x1110 206 0
+0x1111 206 1
+0x1112 206 2
+0x1113 206 3
+0xc004 206 5
+0x1110 207 0
+0x1111 207 1
+0x1112 207 2
+0x1113 207 3
+0xc004 207 5
+0x1110 208 0
+0x1111 208 1
+0x1112 208 2
+0x1113 208 3
+0xc004 208 5
+0x1110 209 0
+0x1111 209 1
+0x1112 209 2
+0x1113 209 3
+0xc004 209 5
+0x1110 210 0
+0x1111 210 1
+0x1112 210 2
+0x1113 210 3
+0xc004 210 5
+0x1110 211 0
+0x1111 211 1
+0x1112 211 2
+0x1113 211 3
+0xc004 211 5
+0x1110 212 0
+0x1111 212 1
+0x1112 212 2
+0x1113 212 3
+0xc004 212 5
+0x1110 213 0
+0x1111 213 1
+0x1112 213 2
+0x1113 213 3
+0xc004 213 5
+0x1110 214 0
+0x1111 214 1
+0x1112 214 2
+0x1113 214 3
+0xc004 214 5
+0x1110 215 0
+0x1111 215 1
+0x1112 215 2
+0x1113 215 3
+0xc004 215 5
+0x1110 216 0
+0x1111 216 1
+0x1112 216 2
+0x1113 216 3
+0xc004 216 5
+0x1110 217 0
+0x1111 217 1
+0x1112 217 2
+0x1113 217 3
+0xc004 217 5
+0x1110 218 0
+0x1111 218 1
+0x1112 218 2
+0x1113 218 3
+0xc004 218 5
+0x1110 219 0
+0x1111 219 1
+0x1112 219 2
+0x1113 219 3
+0xc004 219 5
+0x1110 220 0
+0x1111 220 1
+0x1112 220 2
+0x1113 220 3
+0xc004 220 5
+0x1110 221 0
+0x1111 221 1
+0x1112 221 2
+0x1113 221 3
+0xc004 221 5
+0x1110 222 0
+0x1111 222 1
+0x1112 222 2
+0x1113 222 3
+0xc004 222 5
+0x1110 223 0
+0x1111 223 1
+0x1112 223 2
+0x1113 223 3
+0xc004 223 5
+0x1110 224 0
+0x1111 224 1
+0x1112 224 2
+0x1113 224 3
+0xc004 224 5
+0x1110 225 0
+0x1111 225 1
+0x1112 225 2
+0x1113 225 3
+0xc004 225 5
+0x1110 226 0
+0x1111 226 1
+0x1112 226 2
+0x1113 226 3
+0xc004 226 5
+0x1110 227 0
+0x1111 227 1
+0x1112 227 2
+0x1113 227 3
+0xc004 227 5
+0x1110 228 0
+0x1111 228 1
+0x1112 228 2
+0x1113 228 3
+0xc004 228 5
+0x1110 229 0
+0x1111 229 1
+0x1112 229 2
+0x1113 229 3
+0xc004 229 5
+0x1110 230 0
+0x1111 230 1
+0x1112 230 2
+0x1113 230 3
+0xc004 230 5
+0x1110 231 0
+0x1111 231 1
+0x1112 231 2
+0x1113 231 3
+0xc004 231 5
+0x1110 232 0
+0x1111 232 1
+0x1112 232 2
+0x1113 232 3
+0xc004 232 5
+0x1110 233 0
+0x1111 233 1
+0x1112 233 2
+0x1113 233 3
+0xc004 233 5
+0x1110 234 0
+0x1111 234 1
+0x1112 234 2
+0x1113 234 3
+0xc004 234 5
+0x1110 235 0
+0x1111 235 1
+0x1112 235 2
+0x1113 235 3
+0xc004 235 5
+0x1110 236 0
+0x1111 236 1
+0x1112 236 2
+0x1113 236 3
+0xc004 236 5
+0x1110 237 0
+0x1111 237 1
+0x1112 237 2
+0x1113 237 3
+0xc004 237 5
+0x1110 238 0
+0x1111 238 1
+0x1112 238 2
+0x1113 238 3
+0xc004 238 5
+0x1110 239 0
+0x1111 239 1
+0x1112 239 2
+0x1113 239 3
+0xc004 239 5
+0x1110 240 0
+0x1111 240 1
+0x1112 240 2
+0x1113 240 3
+0xc004 240 5
+0x1110 241 0
+0x1111 241 1
+0x1112 241 2
+0x1113 241 3
+0xc004 241 5
+0x1110 242 0
+0x1111 242 1
+0x1112 242 2
+0x1113 242 3
+0xc004 242 5
+0x1110 243 0
+0x1111 243 1
+0x1112 243 2
+0x1113 243 3
+0xc004 243 5
+0x1110 244 0
+0x1111 244 1
+0x1112 244 2
+0x1113 244 3
+0xc004 244 5
+0x1110 245 0
+0x1111 245 1
+0x1112 245 2
+0x1113 245 3
+0xc004 245 5
+0x1110 246 0
+0x1111 246 1
+0x1112 246 2
+0x1113 246 3
+0xc004 246 5
!Register table
# Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # C9 # C10
###########################################################################################################
- 0 0x8300 0x8305 0x8307 0x8308 0x830b
- 1 0x8301 0x8302 0x8304 0x8309 0x830c 0x830e 0x830f 0x8310
+ 0 0x8300 0x8305 0x8307 0x8308 0x830b
+# 0 0x8300 0x8305 0x8307 0x8308 0x830b 0x830c
+# 1 0x8301 0x8302 0x8304 0x8309 0x830c 0x830e 0x830f 0x8310
!Value table
# Enable
-# SubEvtId UseGbE MultiQueue Trig. Num. InclTrgType
-# Hub # Type # C0 # C1 # C2 # C3 # C4
-##################################################################################
- 0xc001 0 0xc001 1 0 0xffffff 1
- 0x8610 0 0x8000 1 0 0xffffff 1
- 0x8113 0 0x8001 1 0 0xffffff 1
- 0x8158 0 0x8002 1 0 0xffffff 1
+# SubEvtId UseGbE MultiQueue Trig. Num. InclTrgType SuEvSize
+# Hub # Type # C0 # C1 # C2 # C3 # C4 C5
+#######################################################################################################
+# 0xc001 0 0xc001 1 0 0xffffff 1 0x2000
+ 0xc001 0 0xc001 1 0 0xffffff 1
+ 0x8610 0 0x8000 1 0 0xffffff 1
+ 0x8113 0 0x8001 1 0 0xffffff 1
+# 0x8158 0 0x8002 1 0 0xffffff 1
#14:dd:a9:d3:f4:b8 # hadesp39
#60:45:cb:9e:97:c5 # hadesp46
+
0xc001 0 0xcb9e97c5 0x6045 0xc0a80009 50084 0xc350
0x8610 0 0xcb9e97c5 0x6045 0xc0a80009 50061 0xc350
0x8113 0 0xcb9e97c5 0x6045 0xc0a80009 50113 0xc350
# TDC # Type # C0 # C1 # C2 # C3 # C4 # C5 #
#################################################################################################
-0xfe48 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
+0xfe48 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # 32PinAddon
#0xfe4a 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # gpin addon
0xfe4c 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # padiwa addon
#0xfe4e 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # ADA addon
#0xfe62 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # trb3sc
0xfe51 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # dirich
-0xfe48 0 0x50003000 0x80640064 0xffffffff 0xffffffff 0x0000007b 0x00000000
-#0xfe4a 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007b 0x00000000 # gpin addon
-0xfe4c 0 0x50003000 0x80640064 0xffffffff 0xffffffff 0x0000007b 0x00000000 # padiwa addon
-#0xfe4e 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007b 0x00000000 # ADA addon
-#0xfe50 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007b 0x00000000 # cbmtof
-#0xfe62 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007b 0x00000000 # trb3sc
-0xfe51 0 0x50003000 0x00640064 0xffffffff 0xffffffff 0x00000078 0x00000000 # dirich
+
+0xfe48 0 0x50003000 0x80640064 0xffffffff 0xffffffff 0x00009018 0x00000000 # 32PinAddOn
+#0xfe4a 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # gpin addon
+0xfe4c 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # padiwa addon
+#0xfe4e 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # ADA addon
+#0xfe50 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # cbmtof
+#0xfe62 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # trb3sc
+0xfe51 0 0x50003000 0x00640064 0x00000000 0x00000000 0x00000078 0x00000000 # dirich
+
+
+
// all new instances get this value
base::ProcMgr::instance()->SetHistFilling(4);
- // this limits used for liner calibrations when nothing else is available
- hadaq::TdcMessage::SetFineLimits(28, 350);
+ // configure bubbles
+ //hadaq::TdcProcessor::SetBubbleMode(3, 18);
+
+ // this limits used for linear calibrations when nothing else is available
+ hadaq::TdcMessage::SetFineLimits(19, 500);
// default channel numbers and edges mask
- // 1 - use only rising edge, falling edge is ignore
- // 2 - falling edge enabled and fully independent from rising edge
- // 3 - falling edge enabled and uses calibration from rising edge
- // 4 - falling edge enabled and common statistic is used for calibration
- hadaq::TrbProcessor::SetDefaults(33, 2);
+ // 1 - only rising edge
+ // 2 - falling edge fully independent
+ // 3 - falling uses calibration from rising edge
+ // 4 - use common statistic for both rising and falling edge
+ hadaq::TrbProcessor::SetDefaults(65, 2);
+
+ hadaq::TdcProcessor::SetTriggerDWindow(-5, 70);
+// hadaq::TdcProcessor::SetToTRange(30, 50, 80);
// [min..max] range for TDC ids
- hadaq::TrbProcessor::SetTDCRange(0x1600, 0x16FF);
+ hadaq::TrbProcessor::SetTDCRange(0x1100, 0x11FF);
+
// [min..max] range for HUB ids
hadaq::TrbProcessor::SetHUBRange(0x8800, 0x88FF);
+ // Histogramming for ToT: first: nr. of bins, 2nd: TOT range
+ hadaq::TdcProcessor::SetDefaults(600, 1000);
+
// when first argument true - TRB/TDC will be created on-the-fly
// second parameter is function name, called after elements are created
hadaq::HldProcessor* hld = new hadaq::HldProcessor(true, "after_create");
+
+ const char* calname = getenv("CALNAME");
+ if ((calname==0) || (*calname==0)) calname = "test_";
+ const char* calmode = getenv("CALMODE");
+ int cnt = (calmode && *calmode) ? atoi(calmode) : 100000;
+ //cnt=100000;
+ const char* caltrig = getenv("CALTRIG");
+ unsigned trig = (caltrig && *caltrig) ? atoi(caltrig) : 0xd;
+ const char* uset = getenv("USETEMP");
+ unsigned use_temp = 0; // 0x80000000;
+ if ((uset!=0) && (*uset!=0) && (strcmp(uset,"1")==0)) use_temp = 0x80000000;
+
+ printf("TDC CALIBRATION MODE %d, cal trigger: %x\n", cnt, trig);
+
+ //printf("HLD configure calibration calfile:%s cnt:%d trig:%X temp:%X\n", calname, cnt, trig, use_temp);
+
// first parameter if filename prefix for calibration files
// and calibration mode (empty string - no file I/O)
// second parameter is hits count for autocalibration
trb->SetPrintErrors(10);
}
+
for (unsigned k=0;k<hld->NumberOfTDC();k++) {
hadaq::TdcProcessor* tdc = hld->GetTDC(k);
printf("Configure %s!\n", tdc->GetName());
- //tdc->SetToTRange(12.8, 5., 60.);
-
- //tdc->SetUseLastHit(true);
- for (unsigned nch=2;nch<tdc->NumChannels();nch++)
- tdc->SetRefChannel(nch, 1, 0xffff, 20000, -50., 50.);
- //tdc->SetRefChannel(nch, 1, 0xffff, 20000, -50., 50.);
-
- //tdc->SetRefChannel(14, 12, 0xffff, 10000, -10., 10.);
- // tdc->SetRefChannel(5, 1, 0xffff, 10000, -100., 100.);
- //tdc->SetRefChannel(1, 2, 0xffff, 30000, -40., 40.);
-
- // select histogram 6: Window: -1e12 to 0, print max 100 events
- //tdc->EnableRefCondPrint(1, 0, 1e12, 100);
- //tdc->EnableRefCondPrint(1, -1e12, 0, 100);
+ // mark as 400 MHz
+ //tdc->Set400Mhz();
+ //tdc->SetCustomMhz(350);
+ //tdc->SetCustomMhz(200);
+
+ tdc->SetUseLastHit(false);
+
+ //tdc->SetStoreEnabled();
+ for (unsigned nch=1; nch<tdc->NumChannels(); nch++) {
+ //if(nch!=48) {
+ tdc->SetRefChannel(nch, nch-1, 0xffff, 18000, -5., 5.);
+ //}
+ }
+
+ //tdc->SetRefChannel(48, 39, 0xffff, 18000, -50., 50.);
+ // for (unsigned j=10; j<33; j++) {
+ // tdc->SetRefChannel(j, 1, 0xffff, 10000, -40., 40.);
+ //}
+
+ //tdc->SetRefChannel(6, 0, 0xffff, 10000, -100.,100.);
+ //tdc->SetRefChannel(0, 0, 0x1202, 10000, -20., 20.);
+ //tdc->SetRefChannel(0, 0, 0xffff, 10000, -20., 20.);
+ //tdc->SetRefChannel(5, 3, 0xffff, 10000, -20., 20.);
+ //tdc->SetRefChannel(4, 2, 0xffff, 10000, -20., 20.);
+ //tdc->SetRefChannel(6, 1, 0xffff, 10000, -20., 20.);
+ //tdc->SetRefChannel(1, tdc->NumChannels() -1 , 0xffff, 20000, -10., 10.);
}
}
new PrintProc("Print", "TDC_16EB");
}
+
#echo "disable port 6 on hub 0x8841"
-#trbcmd clearbit 0x8841 0xc0 0x40
-#trbcmd clearbit 0x8841 0xc1 0x40
-#trbcmd clearbit 0x8841 0xc3 0x40
+#trbcmd clearbit 0x8841 0xc0 0x60
+#trbcmd clearbit 0x8841 0xc1 0x60
+#trbcmd clearbit 0x8841 0xc3 0x60
+#trbcmd w 0xc001 0xc0 0xe2
+#trbcmd w 0xc001 0xc1 0xe2
+#trbcmd w 0xc001 0xc3 0xe2
+
+#echo "disable port 4 on hub 0x8841"
+#trbcmd clearbit 0x8841 0xc0 0x10
+#trbcmd clearbit 0x8841 0xc1 0x10
+#trbcmd clearbit 0x8841 0xc3 0x10
echo "GbE settings"
loadregisterdb.pl db/register_configtdc.db
echo "TDC settings end"
+
+
# setup central FPGA - enable peripherial signals
#switchport.pl 0x8841 6 off
#Dirich-Concentrator: enable reference time from RJ45
######trbcmd loadbit 0x8300 0xd580 0x6 0x6
+#trbcmd w 0x8300 0xd580 0x4
-echo "pulser"
-# pulser #0 to 10 kHz
-trbcmd w 0xc001 0xa156 0x0000270f
-#trbcmd w 0xc001 0xa150 0x0022270f
+
+#trbcmd loadbit 0xfe52 0xd580 0x6 0x2
+#trbcmd loadbit 0xfe52 0xd580 0x6 0x0
echo "trigger type"
# set trigger type to 0x1
-trbcmd setbit 0xc001 0xa15e 0x10
-
+trbcmd w 0xc001 0xa15e 0x11111d11
#trbcmd clearbit 0x1130 0xc801 0x80000000 # disable window
#trbcmd w 0x1130 0xc802 0xffff0000 # enable upper 16 channels for padiwa
trbcmd w 0xfe51 0xdf80 0xffffffff # enable monitor counters
-trbcmd w 0x1133 0xc804 0x7c # max number of words
+#trbcmd w 0x1133 0xc804 0x7c # max number of words
trbcmd clearbit 0x1133 0xc801 0x80000000 # disable window
+# turn off 4 dirich without ref-time
+#~/trbsoft/daqtools/tools/switchport.pl 0x8841 3 off 3
+#~/trbsoft/daqtools/tools/switchport.pl 0x8841 3 off 1
+#~/trbsoft/daqtools/tools/switchport.pl 0x8841 3 off 0
+
+
#trbcmd w 0x1133 0xc802 0x00000c03 # enable pulser
#trbcmd setbit 0xc001 0xa101 0x8 # enable external trigger in of CTS
+trbcmd w 0xfe51 0xc804 0xa
+
+echo "pulser"
+# pulser #0 to 10 kHz
+trbcmd w 0xc001 0xa156 0x00000270f
+trbcmd w 0xc001 0xa157 0x00002270f
+###trbcmd w 0xc001 0xa150 0x0022270f
+
echo "pulser enable"
-# pulser enable
-trbcmd setbit 0xc001 0xa101 0x2
+### pulser enable
+#trbcmd setbit 0xc001 0xa101 0x6
+
+#trbcmd setbit 0xc001 0xa101 0x16 # pulser, external + internal calibration
+trbcmd setbit 0xc001 0xa101 0x2 # pulser, external + internal calibration
+
+# sets for TDCv4 ringbuffer threshold etc.
+trbcmd w 0x1133 0xc804 0x11e18
+
+exit
+
+# setup for TRB3-Test
+trbcmd w 0xfe4c 0xc802 0xffffffff
+trbcmd w 0xfe4c 0xc803 0x0000ffff
+
+
+~/trbsoft/daqtools/padiwa.pl 0xfe4c 0 invert 0xffff
+~/trbsoft/daqtools/padiwa.pl 0xfe4c 1 invert 0xffff
+~/trbsoft/daqtools/padiwa.pl 0xfe4c 2 invert 0xffff