While we're discussing comms, it would be great to agree on a semi-standard serial protocol for all these opensource projects. If there are enough users, a driver for cgminer could be written. The current solution with the Icarus driver is not very reliable.
I've been trying this code with 4 DE2-115 boards attached to a BeagleBone using the 4 easily available UARTS. They tend to fall over after a day or so. I suspect at some point a byte is dropped on the serial interface sending the receive buffer out of sync.
I added a timeout on the serial_receive to improve recovery after invalid input is encountered. I figure 65535 cycles at 109MHz is around 7 bytes worth at 115200 baud.
https://github.com/tmackay/Open-Source-FPGA-Bitcoin-Miner/tree/cgminerSeems to be chugging along nicely at present. I can even echo gibberish to the serial ports and it recovers well.