From 65ae83e331b1c322052ed576816892aa89eec291 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Tue, 2 Sep 2014 16:26:46 +0200 Subject: [PATCH] removing redundant code (BANK B,C,D) --- s-curves/scurve.sh | 132 --------------------------------------------- 1 file changed, 132 deletions(-) diff --git a/s-curves/scurve.sh b/s-curves/scurve.sh index b4b1d59..4757756 100755 --- a/s-curves/scurve.sh +++ b/s-curves/scurve.sh @@ -112,135 +112,3 @@ do done done - -echo Bank B -for i in `seq 0 $stepsize 255` -do - trbcmd w $trbaddr 0x8005 0x1 # set soft reset to 1 (skip run 0) - echo Iteration $i - printf -v hex '%04x' $i - printf -v param '%04x' 0 - trbcmd w $trbaddr 0x8007 0x$hex$param # write external info to FPGA (ROC) which is the pair "threshold - run" - # so I know the scanning parameters for every frame - # TEST DISCRI A ONLY: echo "DAC_BIAS/IVDREF1A=$i;DAC_BIAS/IVDREF1B=255;DAC_BIAS/IVDREF1C=255;DAC_BIAS/IVDREF1D=255" | ./changeConfigVal.pl -c /local.1/htdocs/mvdconfig/config/sensorE0scurve2.xml - #echo "DAC_BIAS/IVDREF1A=$i;DAC_BIAS/IVDREF1B=$i;DAC_BIAS/IVDREF1C=$i;DAC_BIAS/IVDREF1D=$i;DIS_DISCRI/DisDiscri=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000" | ./changeConfigVal.pl -c /local.1/htdocs/mvdconfig/config/sensorE0scurve2.xml - echo "DAC_BIAS/IVDREF1A=255;DAC_BIAS/IVDREF1B=$i;DAC_BIAS/IVDREF1C=255;DAC_BIAS/IVDREF1D=255" | ./changeConfigVal.pl -c /local.1/htdocs/mvdconfig/config/sensorE0scurve2.xml - # change sensor settings, i.e. thresholds to $i - - if [ $1 == 'Vacuum' ] - then -# ./init_setup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup.xml # program the JTAG parameters to the sensor and start once - ./startup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup.xml # program the JTAG parameters to the sensor and start once - elif [ $1 == 'ELab' ] - then -# ./init_setup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup_ELab2.xml # program the JTAG parameters to the sensor and start once - ./startup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup_ELab2.xml # program the JTAG parameters to the sensor and start once - fi - sleep 0.3 # wait until the run is finished (throw away data, because dirty) - - for j in `seq 1 1 $numruns` # for all runs, to gather statistics - do - echo "run $j" - printf -v run '%04x' $j - check="0" - while [ "$check" -eq "0" ]; do - trbcmd w $trbaddr 0x8005 0x1 # reset the FPGA buffers - result=$(trbcmd r $trbaddr 0x8005) - check=${result:17:1} - echo "attempting soft-reset..." - done - trbcmd w $trbaddr 0x8005 0x0 # clear the previous reset - trbcmd w $trbaddr 0x8007 0x$hex$run # write current scan parameters to FPGA (later in data) - trbcmd w $trbaddr 0xb00b 0x1 # start the next run in the s-curve mode - sleep 0.3 # wait until run is finished - done - -done - -echo Bank C -for i in `seq 0 $stepsize 255` -do - trbcmd w $trbaddr 0x8005 0x1 # set soft reset to 1 (skip run 0) - echo Iteration $i - printf -v hex '%04x' $i - printf -v param '%04x' 0 - trbcmd w $trbaddr 0x8007 0x$hex$param # write external info to FPGA (ROC) which is the pair "threshold - run" - # so I know the scanning parameters for every frame - # TEST DISCRI A ONLY: echo "DAC_BIAS/IVDREF1A=$i;DAC_BIAS/IVDREF1B=255;DAC_BIAS/IVDREF1C=255;DAC_BIAS/IVDREF1D=255" | ./changeConfigVal.pl -c /local.1/htdocs/mvdconfig/config/sensorE0scurve2.xml - #echo "DAC_BIAS/IVDREF1A=$i;DAC_BIAS/IVDREF1B=$i;DAC_BIAS/IVDREF1C=$i;DAC_BIAS/IVDREF1D=$i;DIS_DISCRI/DisDiscri=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000" | ./changeConfigVal.pl -c /local.1/htdocs/mvdconfig/config/sensorE0scurve2.xml - echo "DAC_BIAS/IVDREF1A=255;DAC_BIAS/IVDREF1B=255;DAC_BIAS/IVDREF1C=$i;DAC_BIAS/IVDREF1D=255" | ./changeConfigVal.pl -c /local.1/htdocs/mvdconfig/config/sensorE0scurve2.xml - # change sensor settings, i.e. thresholds to $i - - if [ $1 == 'Vacuum' ] - then -# ./init_setup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup.xml # program the JTAG parameters to the sensor and start once - ./startup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup.xml # program the JTAG parameters to the sensor and start once - elif [ $1 == 'ELab' ] - then -# ./init_setup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup_ELab2.xml # program the JTAG parameters to the sensor and start once - ./startup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup_ELab2.xml # program the JTAG parameters to the sensor and start once - fi - sleep 0.3 # wait until the run is finished (throw away data, because dirty) - - for j in `seq 1 1 $numruns` # for all runs, to gather statistics - do - echo "run $j" - printf -v run '%04x' $j - check="0" - while [ "$check" -eq "0" ]; do - trbcmd w $trbaddr 0x8005 0x1 # reset the FPGA buffers - result=$(trbcmd r $trbaddr 0x8005) - check=${result:17:1} - echo "attempting soft-reset..." - done - trbcmd w $trbaddr 0x8005 0x0 # clear the previous reset - trbcmd w $trbaddr 0x8007 0x$hex$run # write current scan parameters to FPGA (later in data) - trbcmd w $trbaddr 0xb00b 0x1 # start the next run in the s-curve mode - sleep 0.3 # wait until run is finished - done - -done - -echo Bank D -for i in `seq 0 $stepsize 255` -do - trbcmd w $trbaddr 0x8005 0x1 # set soft reset to 1 (skip run 0) - echo Iteration $i - printf -v hex '%04x' $i - printf -v param '%04x' 0 - trbcmd w $trbaddr 0x8007 0x$hex$param # write external info to FPGA (ROC) which is the pair "threshold - run" - # so I know the scanning parameters for every frame - # TEST DISCRI A ONLY: echo "DAC_BIAS/IVDREF1A=$i;DAC_BIAS/IVDREF1B=255;DAC_BIAS/IVDREF1C=255;DAC_BIAS/IVDREF1D=255" | ./changeConfigVal.pl -c /local.1/htdocs/mvdconfig/config/sensorE0scurve2.xml - #echo "DAC_BIAS/IVDREF1A=$i;DAC_BIAS/IVDREF1B=$i;DAC_BIAS/IVDREF1C=$i;DAC_BIAS/IVDREF1D=$i;DIS_DISCRI/DisDiscri=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000" | ./changeConfigVal.pl -c /local.1/htdocs/mvdconfig/config/sensorE0scurve2.xml - echo "DAC_BIAS/IVDREF1A=255;DAC_BIAS/IVDREF1B=255;DAC_BIAS/IVDREF1C=255;DAC_BIAS/IVDREF1D=$i" | ./changeConfigVal.pl -c /local.1/htdocs/mvdconfig/config/sensorE0scurve2.xml - # change sensor settings, i.e. thresholds to $i - - if [ $1 == 'Vacuum' ] - then -# ./init_setup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup.xml # program the JTAG parameters to the sensor and start once - ./startup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup.xml # program the JTAG parameters to the sensor and start once - elif [ $1 == 'ELab' ] - then -# ./init_setup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup_ELab2.xml # program the JTAG parameters to the sensor and start once - ./startup.pl /local.1/htdocs/mvdconfig/setup/scurve2_setup_ELab2.xml # program the JTAG parameters to the sensor and start once - fi - sleep 0.3 # wait until the run is finished (throw away data, because dirty) - - for j in `seq 1 1 $numruns` # for all runs, to gather statistics - do - echo "run $j" - printf -v run '%04x' $j - check="0" - while [ "$check" -eq "0" ]; do - trbcmd w $trbaddr 0x8005 0x1 # reset the FPGA buffers - result=$(trbcmd r $trbaddr 0x8005) - check=${result:17:1} - echo "attempting soft-reset..." - done - trbcmd w $trbaddr 0x8005 0x0 # clear the previous reset - trbcmd w $trbaddr 0x8007 0x$hex$run # write current scan parameters to FPGA (later in data) - trbcmd w $trbaddr 0xb00b 0x1 # start the next run in the s-curve mode - sleep 0.3 # wait until run is finished - done - -done -- 2.43.0