Provide input data to FPGA using USB

2019-08-25 02:30发布

问题:

I am working on Xilinx Spartan 3E platform, using this development board:

http://www.xilinx.com/products/boards-and-kits/HW-SPAR3E-SK-US-G.htm

My program operates on certain data and then provides output. I wish to transfer the input signals externally. The input data is a stream of 8-bit signals.

So, how do I send the input signals from my laptop to the FPGA via USB? Does Xilinx support this or is there standard software to do this?

Thanks.

回答1:

It sounds like you are describing a uart more than a native USB interface. You can get a USB to logic level serial adapter that will let you easily transfer data to and from a Pc at up to 921.6k baud. A uart/serial port is easy to implement in the Fpga and PCs are easy to use with serial ports.

Here is the cable: http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm If you have a development card it is very possible this type of interface is present.

On the software side you can use your programming language of choice as if it was interfacing with a seal port or use a terminal program like hyper terminal or Download teraterm http://ttssh2.sourceforge.jp/

Updated response: 100Hz is not a hard interface to make. At that rate you should use the serial interface if at all possible. The board you referenced has 2 full RS-232 connections. At that point you only need a way to connect that to your computer. If you have a PC with RS-232 connectors you only need a cable if you have a newer computer without you need a RS-232 to USB translator cable (like this one: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=768-1014-ND or google rs232 usb). This will give you a virtual com port on the pc to interface with the previously mentioned terminal programs or your custom software.

Update 2: on the resource tab of the development board page you linked to there are several UART based fpga designs that you should be able to use as a starting point. i.e. the "PicoBlaze Processor SPI Flash Programmer".



回答2:

That board doesn't provide easy access to the USB interface from the FPGA as far as I can tell. It's just for configuration and debug.

Some of the newer boards and tools do allow something called hardware-in-the-loop testing where the simulator can upload data to the FPGA, wait it to calculate the results and then pull the data back. This is relatively common when using Xilinx's System Generator product as the simulations can be really long.

But I think with that board you'd be better off using the on board RS232 port to get data to and from the board. You will have to build the infrastructure to do it yourself though.

This may also give you some ideas:

http://www.1pin-interface.com/