diff options
| author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2012-11-14 05:39:28 +0100 | 
|---|---|---|
| committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2012-11-14 05:39:28 +0100 | 
| commit | 7f6ee41a4963b05494900d8392f82f318c476770 (patch) | |
| tree | 6fdc990fa93949310511f7f6e3026b21d0114c87 /tests | |
| parent | 8ae66e50aa659a45dc108433d63917b25cb08cbe (diff) | |
| download | pcitool-7f6ee41a4963b05494900d8392f82f318c476770.tar.gz pcitool-7f6ee41a4963b05494900d8392f82f318c476770.tar.bz2 pcitool-7f6ee41a4963b05494900d8392f82f318c476770.tar.xz pcitool-7f6ee41a4963b05494900d8392f82f318c476770.zip  | |
Xilinx benchmark
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/xilinx_dma.sh | 12 | 
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/xilinx_dma.sh b/tests/xilinx_dma.sh index 2a26865..6aada8b 100755 --- a/tests/xilinx_dma.sh +++ b/tests/xilinx_dma.sh @@ -59,7 +59,7 @@ function parse_config {      echo "Link: PCIe gen$link_speed x$link_width"      if [ $link_speed -ne $dev_link_speed -o $link_width -ne $dev_link_width ]; then -	echo " * But device capable of gen$link_speed x$link_width" +	echo " * But device capable of gen$dev_link_speed x$dev_link_width"      fi      info=0x`read_cfg 40` @@ -99,7 +99,12 @@ for i in `seq 1 $ITERATIONS`; do  #Trigger      pci -b $BAR -w 0x04 0x01      pci --wait-irq -    pci -b $BAR -w 0x04 0x00 +#    pci -b $BAR -w 0x04 0x00 + +    status=`pci -b $BAR -r 0x04 | awk '{print $2; }' | cut -c 5-8` +    if [ $status != "0101" ]; then +	echo "Read failed, invalid status: $status" +    fi      dmaperf=$((dmaperf + 0x`pci -b $BAR -r 0x28 | awk '{print $2}'`))      reset @@ -110,6 +115,7 @@ pci --free-kernel-memory $USE  pci --disable-irq  echo -echo "FPGA performance: $((4096 * BUFFERS * ITERATIONS * $speed / $dmaperf)) MB/s" +# Don't ask me about this formula +echo "Performance reported by FPGA: $((4096 * BUFFERS * ITERATIONS * $speed / $dmaperf / 8)) MB/s"  #pci -b $BAR  -r 0 -s 32  | 
