From 7f6ee41a4963b05494900d8392f82f318c476770 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 14 Nov 2012 05:39:28 +0100 Subject: Xilinx benchmark --- tests/xilinx_dma.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3