/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool
220 by Suren A. Chilingaryan
Add HEB scripts and re-organize the structure
1
#! /bin/bash
2
240 by Suren A. Chilingaryan
More structural changes to get ready for stand-alone event engines
3
function pci {
4
    PCILIB_PATH=".."
5
    LD_LIBRARY_PATH="$PCILIB_PATH/pcilib" $PCILIB_PATH/pcitool/pci $*
6
}
7
220 by Suren A. Chilingaryan
Add HEB scripts and re-organize the structure
8
i=1
9
while [ 1 ]; do
10
    pci --start-dma dma1r
11
    for name in /sys/class/fpga/fpga0/kbuf*; do
12
	bus_addr=0x`cat $name | grep "bus addr" | cut -d ':' -f 2 | sed -e 's/\s\+//g'`
13
	if [ $((bus_addr % 4096)) -ne 0 ]; then
14
	    
15
	    echo "Failed at iteration $i, $name"
16
	    echo "----------------------"
17
	    cat $name
18
	    exit
19
	fi
20
21
    done
22
    pci  --stop-dma dma1r
23
    i=$((i + 1))
24
done