summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-10-31 06:34:26 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-10-31 06:34:26 +0100
commitcd35dd6d3f1343b8ec2590cf9bfc9a1bc41c4960 (patch)
treeeed4e7b17ff4b87466cdb4376c2409d49d07d2f1 /tests
parent85a5de8ad86120a33e00cbb5d66bcfca0388111f (diff)
downloadipecamera-cd35dd6d3f1343b8ec2590cf9bfc9a1bc41c4960.tar.gz
ipecamera-cd35dd6d3f1343b8ec2590cf9bfc9a1bc41c4960.tar.bz2
ipecamera-cd35dd6d3f1343b8ec2590cf9bfc9a1bc41c4960.tar.xz
ipecamera-cd35dd6d3f1343b8ec2590cf9bfc9a1bc41c4960.zip
Update scripts
Diffstat (limited to 'tests')
-rwxr-xr-xtests/Frame_Req.sh50
-rwxr-xr-xtests/Reset_Init.sh24
-rwxr-xr-xtests/bench_ipecamera.sh (renamed from tests/bench3.sh)14
-rwxr-xr-xtests/bench_nwl.sh (renamed from tests/bench.sh)0
-rwxr-xr-xtests/frame.sh38
-rwxr-xr-xtests/frame_req.sh27
-rwxr-xr-xtests/grab.sh17
-rwxr-xr-xtests/tb_mic.sh11
8 files changed, 105 insertions, 76 deletions
diff --git a/tests/Frame_Req.sh b/tests/Frame_Req.sh
deleted file mode 100755
index 0988ee2..0000000
--- a/tests/Frame_Req.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-echo " Reset Readout and CMOSIS "
-pci -w 0xd2009040 1e5
-pci -r 0xd2009040 -s 10
-echo " Release Reset for CMOSIS"
-pci -w 0xd2009040 1e1
-pci -r 0xd2009040 -s 10
-
-sleep 1
-echo " Start CMOSIS Configuration .."
-pci -w 0xd2009000 f301
-pci -r 0xd2009000 -s 10
-
-usleep 1000
-pci -w 0xd2009000 d207
-pci -r 0xd2009000 -s 10
-usleep 1000
-echo " Number of rows set here "
-pci -w 0xd2009000 8102
-pci -r 0xd2009000 -s 10
-
-usleep 1000
-pci -w 0xd2009000 8200
-pci -r 0xd2009000 -s 10
-
-sleep 1
-echo "Set packet siye 1024 .. "
-pci -w xrawdata_packet_length 4096
-pci --start-dma dma1
-sleep 1
-
-echo "Send frame request ... "
-pci -w 0xd2009040 1e9
-pci -w 0xd2009040 1e1
-
-echo "Status ... "
-pci -r 0xd2009000 -s 100
-
-echo "Enable Readout ... "
-pci -w 0xd2009040 3e1
-pci -r 0xd2009000 -s 100
-
-for i in `seq 1 10`; do
-# pci -r dma1 -s 1024 -o bench.out
- pci -r dma1 -s 4096
-done
-
-pci --stop-dma dma1
-
diff --git a/tests/Reset_Init.sh b/tests/Reset_Init.sh
index 198cbfc..ebfc9f5 100755
--- a/tests/Reset_Init.sh
+++ b/tests/Reset_Init.sh
@@ -1,23 +1,23 @@
#!/bin/bash
echo " Reset Readout and CMOSIS "
-pci -w 0xd2009040 1e5
+pci -w 0x9040 1e5
echo " Release Reset for Readout"
-pci -w 0xd2009040 1e1
+pci -w 0x9040 1e1
echo " Start CMOSIS Configuration .."
-pci -w 0xd2009000 f301
-pci -r 0xd2009000 -s 4
+pci -w 0x9000 f301
+pci -r 0x9000 -s 4
-pci -w 0xd2009000 d207
-pci -r 0xd2009000 -s 4
+pci -w 0x9000 d207
+pci -r 0x9000 -s 4
-pci -w 0xd2009000 8101
-pci -r 0xd2009000 -s 4
+pci -w 0x9000 8101
+pci -r 0x9000 -s 4
-pci -w 0xd2009000 8200
-pci -r 0xd2009000 -s 4
+pci -w 0x9000 8200
+pci -r 0x9000 -s 4
echo " End CMOSIS Configuration .."
-pci -w 0xd2009040 3e1
+pci -w 0x9040 3e1
-pci -r 0xd2009000 -s 100
+pci -r 0x9000 -s 100
diff --git a/tests/bench3.sh b/tests/bench_ipecamera.sh
index 1108cd9..09edae9 100755
--- a/tests/bench3.sh
+++ b/tests/bench_ipecamera.sh
@@ -8,19 +8,27 @@ function pci {
size=16
bytes=`expr $size "*" 4`
-pci -w xrawdata_packet_length $bytes
+rm -f bench.out
+pci --stop-dma dma1
+pci --reset
+
+#pci -w xrawdata_packet_length $bytes
pci --start-dma dma1
pci -w control 0x1e5
sleep 1
pci -w control 0x1e1
+sleep 1
+pci -w control 0x3e1
for i in `seq 1 10`; do
- pci -w control 0x1e1
+# pci -w control 0x1e1
pci -w dma1 -s $size "*$i"
- pci -w control 0x3e1
+# pci -w control 0x3e1
+ usleep 100000
pci -r dma1 -s $size -o bench.out
done
+pci -w control 0x1e1
pci --stop-dma dma1
diff --git a/tests/bench.sh b/tests/bench_nwl.sh
index b36c251..b36c251 100755
--- a/tests/bench.sh
+++ b/tests/bench_nwl.sh
diff --git a/tests/frame.sh b/tests/frame.sh
new file mode 100755
index 0000000..e6f071d
--- /dev/null
+++ b/tests/frame.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+function pci {
+ PCILIB_PATH="/root/pcitool"
+ LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci $*
+}
+
+pci --stop-dma dma1
+pci --reset
+
+echo "Set packet size 1024 .. "
+pci -w number_lines 1088
+#pci -w xrawdata_packet_length 4096
+pci --start-dma dma1
+usleep 1000
+
+echo "Send frame request ... "
+pci -w control 1e9
+usleep 100000
+pci -w control 1e1
+usleep 100000
+
+echo "Enable Readout ... "
+pci -w control 3e1
+
+usleep 100000
+
+pci -r dma1 -o bench.out --multipacket
+
+#for i in `seq 1 1000`; do
+# pci -r dma1 -s 4096 -o bench.out
+# if [ $? -ne 0 ]; then break; fi
+#done
+
+pci -w control 1e1
+
+pci --stop-dma dma1
+
diff --git a/tests/frame_req.sh b/tests/frame_req.sh
new file mode 100755
index 0000000..8d14c38
--- /dev/null
+++ b/tests/frame_req.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+function pci {
+ PCILIB_PATH="/root/pcitool"
+ LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci $*
+}
+
+#pci --stop-dma dma1
+#pci --reset
+
+echo "Set packet size 1024 .. "
+pci -w number_lines 1088
+#pci -w xrawdata_packet_length 4096
+pci --start-dma dma1
+usleep 1000
+
+echo "Send frame request ... "
+pci -w control 1e9
+usleep 100000
+pci -w control 1e1
+usleep 100000
+
+echo "Enable Readout 3... "
+pci -w control 3e1
+usleep 1000000
+pci -w control 1e1
+
diff --git a/tests/grab.sh b/tests/grab.sh
new file mode 100755
index 0000000..3d2b03f
--- /dev/null
+++ b/tests/grab.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+function pci {
+ PCILIB_PATH="/root/pcitool"
+ LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci $*
+}
+
+rm image.raw
+
+echo "Reset..."
+pci --reset
+echo "Stop DMA..."
+pci --stop-dma
+echo "Start DMA..."
+pci --start-dma dma1
+echo "Request..."
+pci -g -o image.raw
diff --git a/tests/tb_mic.sh b/tests/tb_mic.sh
deleted file mode 100755
index 6b7269b..0000000
--- a/tests/tb_mic.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-
-pci --stop-dma dma1
-pci -w xrawdata_packet_length 4096
-pci --start-dma dma1
-pci -w 0xd2009040 1e9
-pci -w 0xd2009040 1e1
-pci -w 0xd2009040 3e1
-pci -r 0xd2009000 -s 100
-#pci -r dma1 -s 1024
-#LD_LIBRARY_PATH=/root/pcitool ./pci -g -o 1.image
-#pci --stop-dma dma1