summaryrefslogtreecommitdiffstats
path: root/tests/dma/ipe/bench.sh
blob: cc32971dc2f7ba87b85d629c2784fa9a9b0eac23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

size=65536

function pci {
    PCILIB_PATH=`pwd`/../../..
    LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci -m kapture $*
}


rm -f bench.out

pci --stop-dma dma0r
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