From 022c5310d9b10ce73216da8b23f846972b7e463f Mon Sep 17 00:00:00 2001 From: "hadaq@xmatter" Date: Sun, 22 Dec 2024 14:09:27 +0100 Subject: [PATCH] update adc files --- users/frankfurt_adc/adcsettings.trbcmd | 12 +++--- users/frankfurt_adc/register_configgbe.db | 36 ++++++++++++++++++ users/frankfurt_adc/register_configgbe_ip.db | 38 +++++++++++++++++++ users/frankfurt_adc/start.sh | 20 +++++++++- users/frankfurt_test/register_configgbe.db | 1 + users/frankfurt_test/register_configgbe_ip.db | 2 + 6 files changed, 101 insertions(+), 8 deletions(-) create mode 100755 users/frankfurt_adc/register_configgbe.db create mode 100755 users/frankfurt_adc/register_configgbe_ip.db diff --git a/users/frankfurt_adc/adcsettings.trbcmd b/users/frankfurt_adc/adcsettings.trbcmd index 0f6604c..3ddfbd0 100644 --- a/users/frankfurt_adc/adcsettings.trbcmd +++ b/users/frankfurt_adc/adcsettings.trbcmd @@ -9,8 +9,8 @@ w 0xf586 0x9170 0x00000000 #BufferReg0.7, Bit 0..10: BufferDepth, Bit 16..26: S 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 @@ -42,10 +42,10 @@ w 0xf586 0x9173 0x00000000 #BufferReg3.7, Bit 0..19: ReadoutOffset, Bit 24..24: 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 diff --git a/users/frankfurt_adc/register_configgbe.db b/users/frankfurt_adc/register_configgbe.db new file mode 100755 index 0000000..eabb294 --- /dev/null +++ b/users/frankfurt_adc/register_configgbe.db @@ -0,0 +1,36 @@ + + + +!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 + + + + + diff --git a/users/frankfurt_adc/register_configgbe_ip.db b/users/frankfurt_adc/register_configgbe_ip.db new file mode 100755 index 0000000..7ecac49 --- /dev/null +++ b/users/frankfurt_adc/register_configgbe_ip.db @@ -0,0 +1,38 @@ +########################################################################################### +#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 + + + diff --git a/users/frankfurt_adc/start.sh b/users/frankfurt_adc/start.sh index 0b915bf..1007094 100755 --- a/users/frankfurt_adc/start.sh +++ b/users/frankfurt_adc/start.sh @@ -2,11 +2,27 @@ 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 diff --git a/users/frankfurt_test/register_configgbe.db b/users/frankfurt_test/register_configgbe.db index c0c925d..76b2510 100755 --- a/users/frankfurt_test/register_configgbe.db +++ b/users/frankfurt_test/register_configgbe.db @@ -35,6 +35,7 @@ 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 diff --git a/users/frankfurt_test/register_configgbe_ip.db b/users/frankfurt_test/register_configgbe_ip.db index e45c705..1d0b775 100755 --- a/users/frankfurt_test/register_configgbe_ip.db +++ b/users/frankfurt_test/register_configgbe_ip.db @@ -61,6 +61,8 @@ 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 -- 2.43.0