/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/bench.sh

  • Committer: Suren A. Chilingaryan
  • Date: 2011-07-17 21:22:21 UTC
  • Revision ID: csa@dside.dyndns.org-20110717212221-v11av0ds2cgsxihy
Provide few scripts to test DMA

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
function pci {
 
4
    PCILIB_PATH="/root/pcitool"
 
5
    LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci $*
 
6
}
 
7
 
 
8
size=16
 
9
bytes=`expr $size "*" 4`
 
10
 
 
11
pci -w xrawdata_packet_length $bytes
 
12
pci -w xrawdata_enable_loopback 0
 
13
pci -w xrawdata_enable_generator 0
 
14
 
 
15
pci --start-dma dma1
 
16
 
 
17
while [ $? -eq 0 ]; do
 
18
    pci -r dma1 -s 65536 &> /dev/null
 
19
done
 
20
 
 
21
pci -w xrawdata_enable_loopback 1
 
22
 
 
23
for i in `seq 1 10`; do
 
24
    pci -w dma1 -s $size "*$i"
 
25
    pci -r dma1 -s $size
 
26
done
 
27
 
 
28
pci --stop-dma dma1
 
29
 
 
30
pci -w xrawdata_enable_loopback 0