w 0xf586 0x9180 0x00000000 #BufferReg0.8, Bit 0..10: BufferDepth, Bit 16..26: SamplesAfterTrg
w 0xf586 0x9190 0x00000000 #BufferReg0.9, Bit 0..10: BufferDepth, Bit 16..26: SamplesAfterTrg
-w 0xf586 0x9101 0x000b0001 #BufferReg1.0, Bit 0..1: ProcessBlocks, Bit 4..11: Downsampling, Bit 16..19: BaselineAvg
-w 0xf586 0x9111 0x000b0001 #BufferReg1.1, Bit 0..1: ProcessBlocks, Bit 4..11: Downsampling, Bit 16..19: BaselineAvg
+w 0xf586 0x9101 0x00000001 #BufferReg1.0, Bit 0..1: ProcessBlocks, Bit 4..11: Downsampling, Bit 16..19: BaselineAvg
+w 0xf586 0x9111 0x00000001 #BufferReg1.1, Bit 0..1: ProcessBlocks, Bit 4..11: Downsampling, Bit 16..19: BaselineAvg
w 0xf586 0x9121 0x00000000 #BufferReg1.2, Bit 0..1: ProcessBlocks, Bit 4..11: Downsampling, Bit 16..19: BaselineAvg
w 0xf586 0x9131 0x00000000 #BufferReg1.3, Bit 0..1: ProcessBlocks, Bit 4..11: Downsampling, Bit 16..19: BaselineAvg
w 0xf586 0x9141 0x00000000 #BufferReg1.4, Bit 0..1: ProcessBlocks, Bit 4..11: Downsampling, Bit 16..19: BaselineAvg
w 0xf586 0x9183 0x00000000 #BufferReg3.8, Bit 0..19: ReadoutOffset, Bit 24..24: ReadoutInvert
w 0xf586 0x9193 0x00000000 #BufferReg3.9, Bit 0..19: ReadoutOffset, Bit 24..24: ReadoutInvert
-w 0xf586 0x9104 0x20000000 #BufferReg4.0, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
-w 0xf586 0x9114 0x00000000 #BufferReg4.1, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
-w 0xf586 0x9124 0x00000000 #BufferReg4.2, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
-w 0xf586 0x9134 0x00000000 #BufferReg4.3, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
+w 0xf586 0x9104 0xa0002000 #BufferReg4.0, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
+w 0xf586 0x9114 0xa0002000 #BufferReg4.1, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
+w 0xf586 0x9124 0xa0002000 #BufferReg4.2, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
+w 0xf586 0x9134 0xa00002d0 #BufferReg4.3, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
w 0xf586 0x9144 0x00000000 #BufferReg4.4, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
w 0xf586 0x9154 0x00000000 #BufferReg4.5, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
w 0xf586 0x9164 0x00000000 #BufferReg4.6, Bit 31..31: BaselineFixed, Bit 30..30: BaselineEn, Bit 29..29: BaselineSubtract, Bit 0..23: BaselineValue
--- /dev/null
+
+
+
+!Register table
+# Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # C9 #
+###################################################################################################
+ 0 0x8300 0x8305 0x8307 0x8308 0x830b
+ 1 0x8301 0x8302 0x8304 0x8309 0x830c 0x830e 0x830f 0x8310
+ 100 0x8301 0x8302 0x8303 0x8304 0x8306 0x8308 0x830b 0x830d
+
+
+!Value table
+# SubEvtId UseGbE MultiQueue Trig. Num. InclTrgType
+# Hub # Type # C0 # C1 # C2 # C3 # C4 #
+##################################################################################
+ 0xf586 0 0xc300 1 1 0xffffff 1
+
+
+#These values to not need to be written - for completeness only
+# SubEvtDec QueDec FrameSize RX enable SubEvtSize Evt/Queue QueueClose MaxQueueSize
+# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 #
+##########################################################################################################################
+# 0xff7f 1 0x00020001 0x00030062 0x578 1 59800 200 32000 60000
+# 0x1000 1 0x00020009
+# 0xa000 1 0x00020009
+
+
+# SubEvtDec QueDec PackSize FrameSize UseTrbNet Trig. Num. MinEvtSize Frame Delay
+# Hub # Type # C1 # C2 # C3 # C4 # C6 # C8 # C9 # C9 #
+#########################################################################################################################
+# 0x80eb 100 0x00020001 0x00030062 0xea60 0x578 0 0xffffff 0x7 0x0
+
+
+
+
+
--- /dev/null
+###########################################################################################
+#Eventbuilders:
+# EB 0: hadespc001 eth1 ports 50000 - 50099
+
+!Register table
+# Type # C0 # C1 # C2 # C3 # C4 #
+#######################################################
+#new memory locations
+ 0 0x8100 0x8101 0x8102 0x8103 0x8107
+ 1 0x8110 0x8111 0x8112 0x8113 0x8117
+ 2 0x8120 0x8121 0x8122 0x8123 0x8127
+ 3 0x8130 0x8131 0x8132 0x8133 0x8137
+ 4 0x8140 0x8141 0x8142 0x8143 0x8147
+ 5 0x8150 0x8151 0x8152 0x8153 0x8157
+ 6 0x8160 0x8161 0x8162 0x8163 0x8167
+ 7 0x8170 0x8171 0x8172 0x8173 0x8177
+ 8 0x8180 0x8181 0x8182 0x8183 0x8187
+ 9 0x8190 0x8191 0x8192 0x8193 0x8197
+ 10 0x81A0 0x81A1 0x81A2 0x81A3 0x81A7
+ 11 0x81B0 0x81B1 0x81B2 0x81B3 0x81B7
+ 12 0x81C0 0x81C1 0x81C2 0x81C3 0x81C7
+ 13 0x81D0 0x81D1 0x81D2 0x81D3 0x81D7
+ 14 0x81E0 0x81E1 0x81E2 0x81E3 0x81E7
+ 15 0x81F0 0x81F1 0x81F2 0x81F3 0x81F7
+
+ 1100 0x8105 0x8108 0x8104 0x8106
+
+
+!Value table
+# Dest MAC Dest MAC Dest IP Dest Port Src Port
+# Hub # Type # C0 # C1 # C2 # C3 # C4 #
+####################################################################################
+
+
+ 0xf586 0 0x3b489c63 0xf8e4 0xc0a81401 51300 0xc350
+
+
+
trbcmd reset
-../../tools/loadregisterdb.pl ../frankfurt_test/register_configgbe.db
-../../tools/loadregisterdb.pl ../frankfurt_test/register_configgbe_ip.db
+../../tools/loadregisterdb.pl register_configgbe.db
+../../tools/loadregisterdb.pl register_configgbe_ip.db
trbcmd -f adcsettings.trbcmd
+../../xml-db/put.pl SPI 0xffff CSinvert 0
+
+../../xml-db/put.pl Digitizer 0xffff DelLoad 0
+../../xml-db/put.pl Digitizer 0xffff DelLoad 1
+
+for i in {0..10}
+do
+#../../xml-db/put.pl Digitizer 0xffff DelMove 1
+trbcmd w 0xffff 0x9000 0x8
+done
+
+../../xml-db/put.pl Digitizer 0xffff ResetAdcA 1
+
+
+
+../../xml-db/put.pl SPI 0xffff CSinvert 1
trbcmd w 0xf586 0xdf08 0x00000001 #TriggerEnable1.2
trbcmd w 0xf586 0xdf34 0x00000000 #OutputSelect.0, Bit 16..23: CoinOutput, Bit 8..15: MultOutput0, Bit 0..7: SimpleCoinOutput, Bit 24..31: EdgeDetectOutput
0x8143 0 0x8143 1 1 0xffffff 1
0xc010 0 0xc010 1 1 0xffffff 1
0xc300 0 0xc300 1 1 0xffffff 1
+ 0xf586 0 0xc300 1 1 0xffffff 1
#These values to not need to be written - for completeness only
0x1000 0 0xbacdb959 0x90e2 0xc0a80025 51002 0xc350
0xc300 0 0xbacdb959 0x90e2 0xc0a80025 51300 0xc350
+ 0xf586 0 0x3b489c63 0xf8e4 0xc0a81401 51300 0xc350
+
0x80eb 1100 0x0230 0x0578 0xdead80eb 0xc0a80080