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

  • Committer: Suren A. Chilingaryan
  • Date: 2012-11-14 04:39:28 UTC
  • Revision ID: csa@dside.dyndns.org-20121114043928-f4do26r8bn0llgle
Xilinx benchmark

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
    echo "Link: PCIe gen$link_speed x$link_width"
61
61
    if [ $link_speed -ne $dev_link_speed -o $link_width -ne $dev_link_width ]; then
62
 
        echo " * But device capable of gen$link_speed x$link_width"
 
62
        echo " * But device capable of gen$dev_link_speed x$dev_link_width"
63
63
    fi
64
64
    
65
65
    info=0x`read_cfg 40`
99
99
#Trigger
100
100
    pci -b $BAR -w 0x04 0x01
101
101
    pci --wait-irq
102
 
    pci -b $BAR -w 0x04 0x00
 
102
#    pci -b $BAR -w 0x04 0x00
 
103
 
 
104
    status=`pci -b $BAR -r 0x04 | awk '{print $2; }' | cut -c 5-8`
 
105
    if [ $status != "0101" ]; then
 
106
        echo "Read failed, invalid status: $status"
 
107
    fi
103
108
 
104
109
    dmaperf=$((dmaperf + 0x`pci -b $BAR -r 0x28 | awk '{print $2}'`))
105
110
    reset
110
115
pci --disable-irq
111
116
 
112
117
echo
113
 
echo "FPGA performance: $((4096 * BUFFERS * ITERATIONS * $speed / $dmaperf)) MB/s"
 
118
# Don't ask me about this formula
 
119
echo "Performance reported by FPGA: $((4096 * BUFFERS * ITERATIONS * $speed / $dmaperf / 8)) MB/s"
114
120
 
115
121
#pci -b $BAR  -r 0 -s 32