diff options
Diffstat (limited to 'tests/heb/cfg')
-rwxr-xr-x | tests/heb/cfg/BoardOFF.sh | 11 | ||||
-rwxr-xr-x | tests/heb/cfg/BoardOn.sh | 57 | ||||
-rw-r--r-- | tests/heb/cfg/README | 11 | ||||
-rwxr-xr-x | tests/heb/cfg/Set_ADC_1_Delay.sh | 10 | ||||
-rwxr-xr-x | tests/heb/cfg/Set_ADC_2_Delay.sh | 10 | ||||
-rwxr-xr-x | tests/heb/cfg/Set_ADC_3_Delay.sh | 10 | ||||
-rwxr-xr-x | tests/heb/cfg/Set_ADC_4_Delay.sh | 11 | ||||
-rwxr-xr-x | tests/heb/cfg/Set_Default.sh | 30 | ||||
-rwxr-xr-x | tests/heb/cfg/Set_Delay_chip.sh | 11 | ||||
-rwxr-xr-x | tests/heb/cfg/Set_FPGA_clock_delay.sh | 10 | ||||
-rwxr-xr-x | tests/heb/cfg/Set_TH_Delay.sh | 10 |
11 files changed, 181 insertions, 0 deletions
diff --git a/tests/heb/cfg/BoardOFF.sh b/tests/heb/cfg/BoardOFF.sh new file mode 100755 index 0000000..351bcb8 --- /dev/null +++ b/tests/heb/cfg/BoardOFF.sh @@ -0,0 +1,11 @@ +#!/bin/bash + + +echo " ************************************************************** " +echo " Board OFF" +echo " ************************************************************** " + +pci -w 0x9040 0x01 +sleep 0.5 + +pci --stop-dma dma1 diff --git a/tests/heb/cfg/BoardOn.sh b/tests/heb/cfg/BoardOn.sh new file mode 100755 index 0000000..b14c73b --- /dev/null +++ b/tests/heb/cfg/BoardOn.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +echo " ************************************************************** " +echo " Start DMA" +echo " ************************************************************** " + +pci --start-dma dma1 +sleep 0.5 +pci --list-dma-engines + + +echo " ************************************************************** " +echo " Board ON procedure" +echo " ************************************************************** " + +pci -w 0x9040 0x01 +sleep 1 + +echo "switch ON the power supply --> FIRST <--" +echo "Press a key to continue ...." +read -n 1 -s + +echo "Switch ON T/Hs" +pci -w 0x9040 0x3C1 +pci -r 0x9040 -s1 + +echo "switch ON the power supply --> SECOND <--" +echo "Press a key to continue ...." +read -n 1 -s + +echo "Switch ON ADCs" +pci -w 0x9040 0x3F1 +pci -r 0x9040 -s1 +sleep 0.1 + + +pci -w 0x9040 0x3F0 +pci -r 0x9040 -s1 +sleep 1 + +echo " Status ................... " +pci -r 0x9000 -s 40 + + + +./PLL_conf_calib_3001.sh + +echo " Status ................... " +pci -r 0x9000 -s 40 + + +echo " ************************************************************** " +echo " Board Ready" +echo " ************************************************************** " + + +echo " --> remember to run: ./Set_Default.sh" diff --git a/tests/heb/cfg/README b/tests/heb/cfg/README new file mode 100644 index 0000000..125bc0d --- /dev/null +++ b/tests/heb/cfg/README @@ -0,0 +1,11 @@ + - Initializing + ./BoardOn.sh + ./Set_Default.sh + + - Configuring the size + pci -w 9020 0x20 (linear scale) + + * Number of samples are determined by 0x9020 / 0x9028 (0x0e by default) + * For each sample is descibed by (184 / 2) * 128 bits + * Where most-significant bytes of 4 dwords (128 bit) are iterating + from 0x00 to 0xb8 with step 0x02 diff --git a/tests/heb/cfg/Set_ADC_1_Delay.sh b/tests/heb/cfg/Set_ADC_1_Delay.sh new file mode 100755 index 0000000..bd8f980 --- /dev/null +++ b/tests/heb/cfg/Set_ADC_1_Delay.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Set CH_4 clock ADC 1 delay... " + +upfix=000501 +fixed=4 + + hex_val=$(printf "%01x\n" $1) + echo "Set $hex_val --> Time value picosecond = `expr $1 "*" 150`." + pci -w 0x9060 $upfix$hex_val$fixed diff --git a/tests/heb/cfg/Set_ADC_2_Delay.sh b/tests/heb/cfg/Set_ADC_2_Delay.sh new file mode 100755 index 0000000..d6cdf75 --- /dev/null +++ b/tests/heb/cfg/Set_ADC_2_Delay.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Set CH_5 clock ADC 2 delay... " + +upfix=000501 +fixed=5 + + hex_val=$(printf "%01x\n" $1) + echo "Set $hex_val --> Time value picosecond = `expr $1 "*" 150`." + pci -w 0x9060 $upfix$hex_val$fixed diff --git a/tests/heb/cfg/Set_ADC_3_Delay.sh b/tests/heb/cfg/Set_ADC_3_Delay.sh new file mode 100755 index 0000000..567b977 --- /dev/null +++ b/tests/heb/cfg/Set_ADC_3_Delay.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Set CH_6 clock ADC 3 delay... " + +upfix=000501 +fixed=6 + + hex_val=$(printf "%01x\n" $1) + echo "Set $hex_val --> Time value picosecond = `expr $1 "*" 150`." + pci -w 0x9060 $upfix$hex_val$fixed diff --git a/tests/heb/cfg/Set_ADC_4_Delay.sh b/tests/heb/cfg/Set_ADC_4_Delay.sh new file mode 100755 index 0000000..d666595 --- /dev/null +++ b/tests/heb/cfg/Set_ADC_4_Delay.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "Set CH_7 clock ADC 4 delay... " + +upfix=000501 +fixed=7 + + hex_val=$(printf "%01x\n" $1) + echo "Set $hex_val --> Time value picosecond = `expr $1 "*" 150`." + pci -w 0x9060 $upfix$hex_val$fixed + diff --git a/tests/heb/cfg/Set_Default.sh b/tests/heb/cfg/Set_Default.sh new file mode 100755 index 0000000..0149bf0 --- /dev/null +++ b/tests/heb/cfg/Set_Default.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +echo "Set Defaults delay value in the board... " + +./Set_FPGA_clock_delay.sh 0 +sleep 0.1 + + ./Set_Delay_chip.sh 16 16 16 16 +sleep 0.1 + +./Set_TH_Delay.sh 12 +sleep 0.1 + +./Set_ADC_1_Delay.sh 5 +sleep 0.1 + +./Set_ADC_2_Delay.sh 5 +sleep 0.1 + +./Set_ADC_3_Delay.sh 5 +sleep 0.1 + +./Set_ADC_4_Delay.sh 5 + +#pci -w 0x9020 200b20 +pci -w 0x9020 20 +pci -w 0x9028 e + +echo " DONE ................ " + diff --git a/tests/heb/cfg/Set_Delay_chip.sh b/tests/heb/cfg/Set_Delay_chip.sh new file mode 100755 index 0000000..3d15cad --- /dev/null +++ b/tests/heb/cfg/Set_Delay_chip.sh @@ -0,0 +1,11 @@ +#!/bin/bash + + zero=0 + hex_val1=$(printf "%02x\n" $1) + hex_val2=$(printf "%02x\n" $2) + hex_val3=$(printf "%02x\n" $3) + hex_val4=$(printf "%02x\n" $4) + + pci -w 0x9080 $zero$hex_val4$hex_val3$hex_val2$hex_val1 + pci -r 0x9080 -s 1 + sleep 0.5 diff --git a/tests/heb/cfg/Set_FPGA_clock_delay.sh b/tests/heb/cfg/Set_FPGA_clock_delay.sh new file mode 100755 index 0000000..f4d0f46 --- /dev/null +++ b/tests/heb/cfg/Set_FPGA_clock_delay.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Set delay on T/Hs signals... " + +upfix=000501 +fixed=0 + + hex_val=$(printf "%01x\n" $1) + echo "Set $hex_val --> Time picosecond = `expr $1 "*" 150`." + pci -w 0x9060 $upfix$hex_val$fixed diff --git a/tests/heb/cfg/Set_TH_Delay.sh b/tests/heb/cfg/Set_TH_Delay.sh new file mode 100755 index 0000000..9a6e58f --- /dev/null +++ b/tests/heb/cfg/Set_TH_Delay.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Set delay on T/Hs signals... " + +upfix=000501 +fixed=3 + + hex_val=$(printf "%01x\n" $1) + echo "Set $hex_val --> Time picosecond = `expr $1 "*" 150`." + pci -w 0x9060 $upfix$hex_val$fixed |