diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-10-31 06:34:26 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-10-31 06:34:26 +0100 |
commit | cd35dd6d3f1343b8ec2590cf9bfc9a1bc41c4960 (patch) | |
tree | eed4e7b17ff4b87466cdb4376c2409d49d07d2f1 | |
parent | 85a5de8ad86120a33e00cbb5d66bcfca0388111f (diff) | |
download | ipecamera-cd35dd6d3f1343b8ec2590cf9bfc9a1bc41c4960.tar.gz ipecamera-cd35dd6d3f1343b8ec2590cf9bfc9a1bc41c4960.tar.bz2 ipecamera-cd35dd6d3f1343b8ec2590cf9bfc9a1bc41c4960.tar.xz ipecamera-cd35dd6d3f1343b8ec2590cf9bfc9a1bc41c4960.zip |
Update scripts
-rw-r--r-- | NOTES | 24 | ||||
-rwxr-xr-x | tests/Frame_Req.sh | 50 | ||||
-rwxr-xr-x | tests/Reset_Init.sh | 24 | ||||
-rwxr-xr-x | tests/bench_ipecamera.sh (renamed from tests/bench3.sh) | 14 | ||||
-rwxr-xr-x | tests/bench_nwl.sh (renamed from tests/bench.sh) | 0 | ||||
-rwxr-xr-x | tests/frame.sh | 38 | ||||
-rwxr-xr-x | tests/frame_req.sh | 27 | ||||
-rwxr-xr-x | tests/grab.sh | 17 | ||||
-rwxr-xr-x | tests/tb_mic.sh | 11 |
9 files changed, 129 insertions, 76 deletions
@@ -145,6 +145,30 @@ DMA Access Synchronization user to check their consistency and restart DMA engine.] IRQs are enabled and disabled at each call + +DMA Reads +========= +standard: default reading mode, reads a single full packet +multipacket: reads all available packets +waiting multipacket: reads all available packets, after finishing the + last one waiting if new data arrives +exact read: read exactly specified number of bytes (should be + only supported if it is multiple of packets, otherwise + error should be returned) +ignore packets: autoterminate each buffer, depends on engine + configuration +autogrow: automatic memory allocation, only through streaming + + first | new_pkt | bufer + -------------------------- +standard wait | term | wait +multiple packets wait | check | wait - DMA_READ_FLAG_MULTIPACKET +waiting multipacket wait | wait | wait - DMA_READ_FLAG_WAIT +exact wait | wait/term | wait - limited by size parameter +ignore packets wait | check | check - just autoterminated +autogrow + +Shall we do a special handling in case of overflow? Register Access Synchronization =============================== 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 |