During fxReadRegister, the VHDL FSM's STATE_WRITE writes bytes into the FX2's EP8IN FIFO, and decrements wcount (the remaining byte count) for each byte read. Unfortunately it doesn't take the FX2's FIFO full flag into account. In fact that pin on the FX2 is not even mapped to the FPGA. So not enough data is returned, and usb_bulk_read() times out.
During fxReadRegister, the VHDL FSM's STATE_WRITE writes bytes into the FX2's EP8IN FIFO, and decrements wcount (the remaining byte count) for each byte read. Unfortunately it doesn't take the FX2's FIFO full flag into account. In fact that pin on the FX2 is not even mapped to the FPGA. So not enough data is returned, and usb_bulk_read() times out.