From b5648d328041b13f12f1b361cf9bdf142dea2a6b Mon Sep 17 00:00:00 2001 From: Cahit Ugur Date: Wed, 13 Aug 2014 16:37:17 +0200 Subject: [PATCH] sample setup config files --- .../sample_setup_config/register_configgbe.db | 17 +++++ .../register_configgbe_ip.db | 35 +++++++++ .../sample_setup_config/register_configtdc.db | 17 +++++ users/sample_setup_config/startup.sh | 72 +++++++++++++++++++ web/CtsConfig.pm | 2 +- web/htdocs/tools/pwr/pwr.conf | 12 +++- 6 files changed, 151 insertions(+), 4 deletions(-) create mode 100644 users/sample_setup_config/register_configgbe.db create mode 100644 users/sample_setup_config/register_configgbe_ip.db create mode 100644 users/sample_setup_config/register_configtdc.db create mode 100755 users/sample_setup_config/startup.sh diff --git a/users/sample_setup_config/register_configgbe.db b/users/sample_setup_config/register_configgbe.db new file mode 100644 index 0000000..0647e00 --- /dev/null +++ b/users/sample_setup_config/register_configgbe.db @@ -0,0 +1,17 @@ +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # C9 # C10 +########################################################################################################### + 0 0x8300 0x8301 0x8302 0x8303 0x8304 0x8305 0x8306 0x8307 0x8308 0x830b 0x830d + + +!Value table +# Enable +# SubEvtId SubEvtDec QueDec PackSize FrameSize UseGbE UseTrbNet MultiQueue Trig. Num. MinEvtSize Readout Bit +# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # C9 # C10 # +################################################################################################################################################################# + 0x8000 0 0x8000 0x00020001 0x00030062 0xEA60 0x578 1 0 0 0xffffff 0x7 0x1 + 0x8001 0 0x8001 0x00020001 0x00030062 0xEA60 0x578 1 0 0 0xffffff 0x7 0x1 +# 0x8200 0 0x8200 0x00020001 0x00030062 0xFDE8 0x578 1 0 0 0xffffff 0x7 0x1 +# 0x8820 0 0x8200 0x00020001 0x00030062 0xFDE8 0x578 1 0 0 0xffffff 0x7 0x1 + + diff --git a/users/sample_setup_config/register_configgbe_ip.db b/users/sample_setup_config/register_configgbe_ip.db new file mode 100644 index 0000000..ce33e6f --- /dev/null +++ b/users/sample_setup_config/register_configgbe_ip.db @@ -0,0 +1,35 @@ +########################################################################################### +#Eventbuilders: +# EB 0: kp1pc105 eth1 ports 50000 - 50099 + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # +########################################################################################### +#new memory locations + 0 0x8100 0x8101 0x8102 0x8103 0x8104 0x8105 0x8106 0x8107 0x8108 + 1 0x8110 0x8111 0x8112 0x8113 0x8114 0x8115 0x8116 0x8117 0x8118 + 2 0x8120 0x8121 0x8122 0x8123 0x8124 0x8125 0x8126 0x8127 0x8128 + 3 0x8130 0x8131 0x8132 0x8133 0x8134 0x8135 0x8136 0x8137 0x8138 + 4 0x8140 0x8141 0x8142 0x8143 0x8144 0x8145 0x8146 0x8147 0x8148 + 5 0x8150 0x8151 0x8152 0x8153 0x8154 0x8155 0x8156 0x8157 0x8158 + 6 0x8160 0x8161 0x8162 0x8163 0x8164 0x8165 0x8166 0x8167 0x8168 + 7 0x8170 0x8171 0x8172 0x8173 0x8174 0x8175 0x8176 0x8177 0x8178 + 8 0x8180 0x8181 0x8182 0x8183 0x8184 0x8185 0x8186 0x8187 0x8188 + 9 0x8190 0x8191 0x8192 0x8193 0x8194 0x8195 0x8196 0x8197 0x8198 + 10 0x81A0 0x81A1 0x81A2 0x81A3 0x81A4 0x81A5 0x81A6 0x81A7 0x81A8 + 11 0x81B0 0x81B1 0x81B2 0x81B3 0x81B4 0x81B5 0x81B6 0x81B7 0x81B8 + 12 0x81C0 0x81C1 0x81C2 0x81C3 0x81C4 0x81C5 0x81C6 0x81C7 0x81C8 + 13 0x81D0 0x81D1 0x81D2 0x81D3 0x81D4 0x81D5 0x81D6 0x81D7 0x81D8 + 14 0x81E0 0x81E1 0x81E2 0x81E3 0x81E4 0x81E5 0x81E6 0x81E7 0x81E8 + 15 0x81F0 0x81F1 0x81F2 0x81F3 0x81F4 0x81F5 0x81F6 0x81F7 0x81F8 + +!Value table +# Dest MAC Dest MAC Dest IP Dest Port Src MAC Src MAC Src IP Src Port Packet Size +# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # +######################################################################################################################################## + + 0x8000 0 0x214397EA 0x001b 0xc0a80002 0xc365 0xDEAD8000 0x001B 0xc0a80115 0xc350 0x0578 + 0x8001 0 0x214397EA 0x001b 0xc0a80002 0xc3bb 0xDEAD8001 0x001B 0xc0a8016b 0xc350 0x0578 +#0x8002 0 0x214397EA 0x001b 0xc0a80002 0xc3bc 0xDEAD8002 0x001B 0xc0a8006c 0xc350 0x0578 +#0x8820 0 0x214397EA 0x001b 0xc0a80002 0xc365 0xDEAD8820 0x001B 0xc0a8008a 0xc350 0x0578 + diff --git a/users/sample_setup_config/register_configtdc.db b/users/sample_setup_config/register_configtdc.db new file mode 100644 index 0000000..686d60f --- /dev/null +++ b/users/sample_setup_config/register_configtdc.db @@ -0,0 +1,17 @@ +# TDC config registers + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # +####################################################### + 0 0xc800 0xc801 0xc802 0xc803 0xc804 + +!Value table +# Gnl Conf Trg Window Ch En 1-32 Ch En 33-64 Data Limit +# TDC # Type # C0 # C1 # C2 # C3 # C4 # +#################################################################################### + +#0xfe48 0 0x00003000 0x80640064 0x00000000 0x00000000 0x00000080 +#0xfe4a 0 0x00003000 0x80640064 0x00000000 0x00000000 0x00000080 + 0xfe4c 0 0x00003000 0x80640064 0x00000000 0x00000000 0x00000080 # padiwa addon + 0xfe4e 0 0x00003000 0x80640064 0x00000000 0x00000000 0x00000080 # ADA addon + 0xfe50 0 0x00003000 0x80640064 0x00000000 0x00000000 0x00000080 # cbmtof diff --git a/users/sample_setup_config/startup.sh b/users/sample_setup_config/startup.sh new file mode 100755 index 0000000..fc8ca91 --- /dev/null +++ b/users/sample_setup_config/startup.sh @@ -0,0 +1,72 @@ +export DAQOPSERVER=kp1pc105:21 +export TRB3_SERVER=trb021 + +#merge_serial_address.pl ~hadaq/trb3/base/serials_trb3.db ~hadaq/trb3/base/addresses_trb3.db + +################################################## +## System Reset +################################################## +echo "reset" +trbcmd reset + +echo "addresses" +# set addresses for trb21 +trbcmd s 0x3d000002e2da7328 5 0x8000 +trbcmd s 0x5d000002e3194128 0 0xc001 +trbcmd s 0x2c000002e31f7128 1 0xc002 +trbcmd s 0x57000002e2f38d28 3 0xc004 +trbcmd s 0x6b000002e2e49028 2 0x8100 #hub + +# trb107 +trbcmd s 0x5d000004f9e50128 5 0x8001 +trbcmd s 0x26000004fa018528 0 0xc005 +trbcmd s 0x84000004fa011b28 1 0xc006 +trbcmd s 0xa4000004fa244428 2 0xc007 +trbcmd s 0x8c000004f9fae428 3 0xc008 + + +# cbmtof +trbcmd s 0xb80000050da05e28 0 0xc010 + +######################################### +# ## set addresses for trb30 +# trbcmd s 0x3700000337dfa228 5 0x8001 +# trbcmd s 0xd000000337e5b528 0 0xc005 +# trbcmd s 0x0100000337e02328 1 0xc006 +# trbcmd s 0xca00000337e00f28 2 0xc007 +# trbcmd s 0xa100000337dfab28 3 0xc008 +# +# # set addresses for trb35 +# trbcmd s 0x920000039053d928 5 0x8000 +# trbcmd s 0x7100000390255228 0 0xc001 +# trbcmd s 0x8c0000039025fa28 1 0xc002 +# trbcmd s 0xb00000039053e328 2 0x8002 +# trbcmd s 0x790000039053dc28 3 0xc004 +# +# trb108 +# trbcmd s 0xef000004fa0e3d28 5 0x8002 +# trbcmd s 0x3d000004fa143328 0 0xc009 +# trbcmd s 0xa3000004fa147628 1 0xc00a +# trbcmd s 0x50000004fa0dff28 2 0xc00b +# trbcmd s 0xd6000004f9ecae28 3 0xc00c +######################################### + +echo "GbE settings" +../../tools/loadregisterdb.pl register_configgbe.db +../../tools/loadregisterdb.pl register_configgbe_ip.db + +echo "TDC settings" +../../tools/loadregisterdb.pl register_configtdc.db + + +# Reset trigger logic +trbcmd w 0xffff 0x20 0x33 + +# timeouts +trbcmd w 0xfffe 0xc5 0x800050ff + +# sample trigger logic settings - trigger on TDC 0xc001 channel 1 +trbcmd setbit 0xc001 0xcf00 0x1 #direct TDC input to CTS +trbcmd setbit 0x8000 0xa14d 0x10000 #select F5_COMM input + +trbcmd w 0x8000 0xa156 1 # important CTS setting: turns of wating for data in external trigger module diff --git a/web/CtsConfig.pm b/web/CtsConfig.pm index 82f32aa..5863cc4 100644 --- a/web/CtsConfig.pm +++ b/web/CtsConfig.pm @@ -2,7 +2,7 @@ package CtsConfig; #default cts endpoint. can be overriden by a command line parameter sub getDefaultEndpoint { - return 0x7999; + return 0x8000; } 1; diff --git a/web/htdocs/tools/pwr/pwr.conf b/web/htdocs/tools/pwr/pwr.conf index 6ae274b..92d4063 100644 --- a/web/htdocs/tools/pwr/pwr.conf +++ b/web/htdocs/tools/pwr/pwr.conf @@ -1,6 +1,12 @@ +Content-type: text/html + +Content-type: text/html + +Content-type: text/html + //PWRSPLY:/path/to/device:speed:Name:Type:Channels //type can be HMP, PSP, PST -// PWRSPLY:/dev/ttyUSB0:9600:PST3202:PST:3 -PWRSPLY:/dev/ttyUSB0:115200:HMP4030:HMP:3 - +PWRSPLY:/dev/ttyUSB0:9600:PST3202:PST:3 +//PWRSPLY:/dev/ttyUSB0:115200:HMP4030:HMP:3 +//PWRSPLY:/dev/ttyUSB1:2400:PSP405:PSP:1 -- 2.43.0