1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#! /bin/bash i=1 while [ 1 ]; do pci --start-dma dma1r for name in /sys/class/fpga/fpga0/kbuf*; do bus_addr=0x`cat $name | grep "bus addr" | cut -d ':' -f 2 | sed -e 's/\s\+//g'` if [ $((bus_addr % 4096)) -ne 0 ]; then echo "Failed at iteration $i, $name" echo "----------------------" cat $name exit fi done pci --stop-dma dma1r i=$((i + 1)) done