summaryrefslogtreecommitdiffstats
path: root/tests/ipedma
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ipedma')
-rwxr-xr-xtests/ipedma/bench.sh40
-rwxr-xr-xtests/ipedma/ipecamera-frame.sh48
-rwxr-xr-xtests/ipedma/ipecamera-test.sh40
-rwxr-xr-xtests/ipedma/test.sh40
4 files changed, 168 insertions, 0 deletions
diff --git a/tests/ipedma/bench.sh b/tests/ipedma/bench.sh
new file mode 100755
index 0000000..aa7ec25
--- /dev/null
+++ b/tests/ipedma/bench.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+size=65536
+
+function pci {
+ PCILIB_PATH=`pwd`/../../..
+ LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci -m kapture $*
+}
+
+
+rm -f bench.out
+
+echo "Stopping DMA and skipping exiting data..."
+pci --stop-dma dma0r
+echo "Starting DMA..."
+pci --start-dma dma0r
+echo "Enabling data generation..."
+pci -w 0x4 0x1
+
+# Clean DMA buffers
+#while [ $? -eq 0 ]; do
+# pci -r dma0 -s 65536 &> /dev/null
+#done
+
+echo "Reading the data from DMA..."
+for i in `seq 1 100`; do
+ pci -r dma0 --multipacket -s $size -o bench.out
+ if [ $? -ne 0 ]; then
+ echo "Stopping DMA due to the error..."
+ pci --stop-dma dma0r
+ exit
+ fi
+done
+
+echo "Stopping DMA..."
+pci --stop-dma dma0r
+
+../../../apps/check_counter bench.out
+
+#pci -r 0 -s 32
diff --git a/tests/ipedma/ipecamera-frame.sh b/tests/ipedma/ipecamera-frame.sh
new file mode 100755
index 0000000..f34fe93
--- /dev/null
+++ b/tests/ipedma/ipecamera-frame.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+TESTS_PATH="`dirname \"$0\"`"
+TESTS_PATH="`( cd \"$TESTS_PATH\" && pwd )`"
+
+function pci {
+ PCILIB_PATH=$TESTS_PATH/../../..
+ LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci -m ipedma $*
+}
+
+
+rm bench.out
+
+pci --stop-dma dma0r
+#pci --reset
+
+echo "Set packet size 1024 .. "
+#pci -w cmosis_number_lines 1088
+#pci -w xrawdata_packet_length 4096
+pci --start-dma dma0r
+usleep 1000
+
+pci -w 0x90a8 0x0a
+pci -w 0x90a0 0x0a
+
+echo "Send frame request ... "
+# Single frame
+pci -w 0x9040 80000209
+# Stimuli
+#pci -w 0x9040 800002f1
+# Streaming
+#pci -w 0x9040 80000a01
+usleep 100000
+pci -w 0x9040 80000201
+usleep 100000
+
+echo "Enable Readout ... "
+#pci -w control 3e1
+pci -w 0x4 0x1
+
+usleep 100000
+
+pci -r dma0 -o bench.out --multipacket
+
+pci -w 0x9040 80000001
+
+pci --stop-dma dma0r
+
diff --git a/tests/ipedma/ipecamera-test.sh b/tests/ipedma/ipecamera-test.sh
new file mode 100755
index 0000000..e700884
--- /dev/null
+++ b/tests/ipedma/ipecamera-test.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+size=65536
+
+function pci {
+ PCILIB_PATH=`pwd`/../../..
+ LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci -m ipedma $*
+}
+
+
+rm -f bench.out
+
+pci --stop-dma dma0r
+
+
+# Configuring DDR
+pci -w 0x9100 0x00001000
+#pci -w 0x9040 0x88000201
+#usleep 90000
+pci -w 0x9040 0x88000201
+
+pci --start-dma dma0r
+
+
+# Clean DMA buffers
+#while [ $? -eq 0 ]; do
+# pci -r dma0 -s 65536 &> /dev/null
+#done
+
+for i in `seq 1 100`; do
+ pci -r dma0 --multipacket -s $size -o bench.out
+ if [ $? -ne 0 ]; then
+# pci --stop-dma dma0r
+ exit
+ fi
+done
+
+pci --stop-dma dma0r
+
+../../../apps/check_counter bench.out
diff --git a/tests/ipedma/test.sh b/tests/ipedma/test.sh
new file mode 100755
index 0000000..497e101
--- /dev/null
+++ b/tests/ipedma/test.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+size=65536
+
+function pci {
+ PCILIB_PATH=`pwd`/../../..
+ LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci -m ipedma $*
+}
+
+
+rm -f bench.out
+
+echo "Stopping DMA and skipping exiting data..."
+pci --stop-dma dma0r
+echo "Starting DMA..."
+pci --start-dma dma0r
+echo "Enabling data generation..."
+pci -w 0x4 0x1
+
+# Clean DMA buffers
+#while [ $? -eq 0 ]; do
+# pci -r dma0 -s 65536 &> /dev/null
+#done
+
+echo "Reading the data from DMA..."
+for i in `seq 1 100`; do
+ pci -r dma0 --multipacket -s $size -o bench.out
+ if [ $? -ne 0 ]; then
+ echo "Stopping DMA due to the error..."
+ pci --stop-dma dma0r
+ exit
+ fi
+done
+
+echo "Stopping DMA..."
+pci --stop-dma dma0r
+
+../../../apps/check_counter bench.out
+
+#pci -r 0 -s 32