/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to tests/ipedma/test.sh

  • Committer: Suren A. Chilingaryan
  • Date: 2015-04-20 20:01:04 UTC
  • Revision ID: csa@suren.me-20150420200104-b5xny65io8lvoz3w
Big redign of model structures

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
size=65536
 
4
 
 
5
function pci {
 
6
    PCILIB_PATH=`pwd`/../../..
 
7
    LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci -m ipedma $*
 
8
}
 
9
 
 
10
 
 
11
rm -f bench.out
 
12
 
 
13
echo "Stopping DMA and skipping exiting data..."
 
14
pci --stop-dma dma0r
 
15
echo "Starting DMA..."
 
16
pci --start-dma dma0r
 
17
echo "Enabling data generation..."
 
18
pci -w 0x4 0x1
 
19
 
 
20
# Clean DMA buffers
 
21
#while [ $? -eq 0 ]; do
 
22
#    pci -r dma0 -s 65536 &> /dev/null
 
23
#done
 
24
 
 
25
echo "Reading the data from DMA..."
 
26
for i in `seq 1 100`; do
 
27
    pci -r dma0 --multipacket -s $size -o bench.out
 
28
    if [ $? -ne 0 ]; then
 
29
        echo "Stopping DMA due to the error..."
 
30
        pci --stop-dma dma0r
 
31
        exit
 
32
    fi
 
33
done
 
34
 
 
35
echo "Stopping DMA..."
 
36
pci --stop-dma dma0r
 
37
 
 
38
../../../apps/check_counter bench.out
 
39
 
 
40
#pci -r 0 -s 32