summaryrefslogtreecommitdiffstats
path: root/tests/heb
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-04-20 22:01:04 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-04-20 22:01:04 +0200
commit77c4d6e67debf0e729734d882df033c4c0f5b0c3 (patch)
tree4a59e86332d6cc78fc5c97110ecba281b0f67bc9 /tests/heb
parent0002c0cc260a6a8e2b6c53f19ae99a625eca4355 (diff)
downloadpcitool-77c4d6e67debf0e729734d882df033c4c0f5b0c3.tar.gz
pcitool-77c4d6e67debf0e729734d882df033c4c0f5b0c3.tar.bz2
pcitool-77c4d6e67debf0e729734d882df033c4c0f5b0c3.tar.xz
pcitool-77c4d6e67debf0e729734d882df033c4c0f5b0c3.zip
Big redign of model structures
Diffstat (limited to 'tests/heb')
-rwxr-xr-xtests/heb/DataTaking.sh96
-rwxr-xr-xtests/heb/cfg/BoardOFF.sh11
-rwxr-xr-xtests/heb/cfg/BoardOn.sh57
-rw-r--r--tests/heb/cfg/README11
-rwxr-xr-xtests/heb/cfg/Set_ADC_1_Delay.sh10
-rwxr-xr-xtests/heb/cfg/Set_ADC_2_Delay.sh10
-rwxr-xr-xtests/heb/cfg/Set_ADC_3_Delay.sh10
-rwxr-xr-xtests/heb/cfg/Set_ADC_4_Delay.sh11
-rwxr-xr-xtests/heb/cfg/Set_Default.sh30
-rwxr-xr-xtests/heb/cfg/Set_Delay_chip.sh11
-rwxr-xr-xtests/heb/cfg/Set_FPGA_clock_delay.sh10
-rwxr-xr-xtests/heb/cfg/Set_TH_Delay.sh10
-rwxr-xr-xtests/heb/debug/debug.sh45
-rwxr-xr-xtests/heb/debug/request_data.sh27
14 files changed, 0 insertions, 349 deletions
diff --git a/tests/heb/DataTaking.sh b/tests/heb/DataTaking.sh
deleted file mode 100755
index b6046d7..0000000
--- a/tests/heb/DataTaking.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/bash
-
-#Channel 1 --> 05
-#Channel 2 --> 0B
-#Channel 1&2 --> 0F
-#Channel 3 --> 13
-#Channel 4 --> 23
-#Channel 3&4 --> 33
-#ALL --> 3F
-
-#rm *.out
-pci -r dma1 --multipacket -o /dev/null
-
-echo "Start DMA ..... "
-#pci --start-dma dma1
-sleep 0.2
-
-echo "Data Reset ... "
-pci -w 0x9040 000003f1
-sleep 0.1
-pci -w 0x9040 000003f0
-
-sleep 0.1
-#echo "Pilot bunch emulator ..... "
-#pci -w 0x9040 400003f0
-sleep 0.2
-pci -w 0x9040 03f0
-#pci -r 0x9000 -s 40
-#sleep 0.2
-echo "Start data pci. ..... "
-pci -w 0x9040 00bf0
-
-sleep 2
-
-echo "Stop data acquis...... "
-pci -w 0x9040 003f0
-pci -r 0x9000 -s 40
-sleep 0.1
-echo "Enable data transfer.... "
-pci -w 0x9040 007f0
-exit
-sleep 2
-pci -r dma1 -o run_num_$1.out --multipacket
-sleep 2
-
-pci -w 0x9040 003f0
-#echo "Status ... "
-
-
-
-pci -r 0x9000 -s 40
-
- status=`pci -r 0x9050 -s 1 | awk '{print $2$3$4}'`
- if [ "$status" != "85000021" ]; then
- echo "--------------------------------->>>> ERROR! ... "
- error=1
- exit
- else
- echo " Status 1 -> OK "
- fi
-
- status=`pci -r 0x9000 -s 1 | awk '{print $2$3$4}'`
- if [ "$status" != "01000021" ]; then
- echo "--------------------------------->>>> ERROR! ... "
- error=1
- exit
- else
- echo " Status 1 Readout -> OK "
- fi
-
-status=`pci -r 0x9008 -s 1 | awk '{print $2$3$4}'`
- if [ "$status" != "01000021" ]; then
- echo "--------------------------------->>>> ERROR! ... "
- error=1
- exit
- else
- echo " Status 2 Readout -> OK "
- fi
-
-status=`pci -r 0x9010 -s 1 | awk '{print $2$3$4}'`
- if [ "$status" != "01000021" ]; then
- echo "--------------------------------->>>> ERROR! ... "
- error=1
- exit
- else
- echo " Status 3 Readout -> OK "
- fi
-
-status=`pci -r 0x9018 -s 1 | awk '{print $2$3$4}'`
- if [ "$status" != "01000021" ]; then
- echo "--------------------------------->>>> ERROR! ... "
- error=1
- exit
- else
- echo " Status 4 Readout -> OK "
- fi
diff --git a/tests/heb/cfg/BoardOFF.sh b/tests/heb/cfg/BoardOFF.sh
deleted file mode 100755
index 351bcb8..0000000
--- a/tests/heb/cfg/BoardOFF.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/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
deleted file mode 100755
index b14c73b..0000000
--- a/tests/heb/cfg/BoardOn.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/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
deleted file mode 100644
index 125bc0d..0000000
--- a/tests/heb/cfg/README
+++ /dev/null
@@ -1,11 +0,0 @@
- - 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
deleted file mode 100755
index bd8f980..0000000
--- a/tests/heb/cfg/Set_ADC_1_Delay.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/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
deleted file mode 100755
index d6cdf75..0000000
--- a/tests/heb/cfg/Set_ADC_2_Delay.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/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
deleted file mode 100755
index 567b977..0000000
--- a/tests/heb/cfg/Set_ADC_3_Delay.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/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
deleted file mode 100755
index d666595..0000000
--- a/tests/heb/cfg/Set_ADC_4_Delay.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/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
deleted file mode 100755
index 0149bf0..0000000
--- a/tests/heb/cfg/Set_Default.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/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
deleted file mode 100755
index 3d15cad..0000000
--- a/tests/heb/cfg/Set_Delay_chip.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/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
deleted file mode 100755
index f4d0f46..0000000
--- a/tests/heb/cfg/Set_FPGA_clock_delay.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/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
deleted file mode 100755
index 9a6e58f..0000000
--- a/tests/heb/cfg/Set_TH_Delay.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/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
diff --git a/tests/heb/debug/debug.sh b/tests/heb/debug/debug.sh
deleted file mode 100755
index 2db21d4..0000000
--- a/tests/heb/debug/debug.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/bash
-
-SCRIPT_PATH="`dirname \"$0\"`"
-SCRIPT_PATH="`( cd \"$TESTS_PATH\" && pwd )`"
-PCILIB_PATH=${SCRIPT_PATH%/tests/*}
-
-function pci {
- LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci $*
-}
-
-function strip_bad_values {
- LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/apps/heb_strip_bad_values $*
-}
-
-function request_data {
- $PCILIB_PATH/tests/heb/debug/request_data.sh $*
-}
-
-while [ 1 ]; do
- from=`pci --list-dma-engines | grep C2S | sed -s 's/\s\+/ /g' | cut -d ' ' -f 6`
- to=`pci --list-dma-engines | grep C2S | sed -s 's/\s\+/ /g' | cut -d ' ' -f 8`
-
- if [ $from -gt $to ]; then
- buffers="`seq $from 255` `seq 0 $to`"
- else
- buffers=`seq $from $to`
- fi
-
- echo $buffers
-
- rm data.out
- for i in $buffers; do
- pci --read-dma-buffer dma1r:$i -o data.out
- done
-
-
- error=`strip_bad_values data.out | head -n 1 | cut -f 1 -d ':'`
- if [ $error != "0x1140" ]; then
- echo "Problems found"
- exit
- else
- echo "Fine"
- request_data
- fi
-done
diff --git a/tests/heb/debug/request_data.sh b/tests/heb/debug/request_data.sh
deleted file mode 100755
index b751f5d..0000000
--- a/tests/heb/debug/request_data.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-pci -r dma1 --multipacket -o /dev/null
-
-#echo "Data Reset ... "
-pci -w 0x9040 000003f1
-sleep 0.1
-pci -w 0x9040 000003f0
-
-sleep 0.1
-#echo "Pilot bunch emulator ..... "
-#pci -w 0x9040 400003f0
-sleep 0.2
-pci -w 0x9040 03f0
-#pci -r 0x9000 -s 40
-#sleep 0.2
-#echo "Start data pci. ..... "
-pci -w 0x9040 00bf0
-
-sleep 2
-
-#echo "Stop data acquis...... "
-pci -w 0x9040 003f0
-pci -r 0x9000 -s 40
-sleep 0.1
-#echo "Enable data transfer.... "
-pci -w 0x9040 007f0