FPGA-USB-Device icon indicating copy to clipboard operation
FPGA-USB-Device copied to clipboard

Great code, one question

Open rjacobs1969 opened this issue 1 year ago • 2 comments

Thanks for making this repo, I'm interested in using the usb_serial(2) port in my homebrew 8 bit retro computer project I've one doubt though:

While the serial code can signal to can accept the byte I want to send from the device to the host ( send_ready ) I don't see any way to signal whether the device can accept received bytes, as my 8 bit computer is slower than the USB connection and is not always polling the port, if there a way to implement a input wire to flag the host it's allowed to send?

rjacobs1969 avatar Feb 12 '24 10:02 rjacobs1969

Maybe https://github.com/ulixxe/usb_cdc is what you are looking for. It has data control flow for both IN and OUT. Furthermore you can choose how many channels to use.

mauriliomauri avatar Feb 20 '24 21:02 mauriliomauri

A simple way is to add the backpressure signal around line 239 of usbfs_transaction.v. If your SOC side is unable to accept the data, return PID_NAK instead of PID_ACK.

churchmice avatar May 29 '24 07:05 churchmice