I'm no expert—I'm just getting started with FPGAs myself. I’ve been working with a NANDLAND Go Board and wanted to send data over USB to the FPGA, do some processing on it, and return the results. I was able to create a Verilog HDL file that does exactly that. It’s basically a simple state machine: it reads bytes from the UART/USB, stores them into memory, and once the expected number of bytes has been received, it triggers the processing stage. When processing is complete, it sends the results back over the UART, one byte at a time.
One issue I ran into was that on boot-up, some junk bytes were already sitting in the UART queue for reasons I haven’t figured out yet. To deal with that, I added logic to flush out any waiting bytes on startup to ensure the buffer is clear.
Eventually, I’d like to move up to using an FPGA with a PCI bus interface so my Java application can write directly to the FPGA for better speed and efficiency. I know some people use FPGA boards with Ethernet ports to send data via socket connections—that might be another interesting path to explore.