使用USB向FPGA提供输入数据
我正在 Xilinx Spartan 3E 平台上工作,使用此开发板:
http://www.xilinx.com/products/boards-and-kits/HW-SPAR3E-SK-US-G.htm
我的程序运行在某些数据,然后提供输出。我希望将输入信号传输到外部。输入数据是 8 位信号流。
那么,如何通过 USB 将笔记本电脑的输入信号发送到 FPGA 呢? Xilinx 是否支持此操作或者是否有标准软件可以执行此操作?
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来你描述的是一个 uart,而不是一个本机 USB 接口。您可以获得 USB 至逻辑级串行适配器,它可以让您以高达 921.6k 波特率轻松地与 PC 之间传输数据。 uart/串行端口很容易在 Fpga 中实现,并且 PC 很容易使用串行端口。
这是电缆:
http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm
如果您有开发卡,则很可能存在这种类型的接口。
在软件方面,您可以使用您选择的编程语言,就好像它与密封端口连接一样,或者使用超级终端等终端程序或下载 teraterm http://ttssh2.sourceforge.jp/
更新回复:
100Hz 并不是一个很难制作的接口。按照这个速率,如果可能的话,您应该使用串行接口。您引用的板有 2 个完整的 RS-232 连接。那时您只需要一种将其连接到计算机的方法。如果您的 PC 带有 RS-232 连接器,则只需一根电缆(如果您有一台较新的计算机,则无需 RS-232 转 USB 转换器电缆(如下所示:http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=768-1014-ND 或 google rs232 usb)。这将为您提供 PC 上的虚拟 com 端口,用于与前面提到的终端程序或自定义软件连接。
更新2:
在您链接到的开发板页面的资源选项卡上,有几种基于 UART 的 fpga 设计,您应该能够将其用作起点。
即“PicoBlaze 处理器 SPI 闪存编程器”。
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".
据我所知,该板无法从 FPGA 轻松访问 USB 接口。它仅用于配置和调试。
一些较新的板和工具确实允许进行硬件在环测试,其中模拟器可以将数据上传到 FPGA,等待其计算结果,然后将数据拉回。当使用 Xilinx 的 System Generator 产品时,这种情况相对常见,因为仿真可能非常长。
但我认为对于该板,您最好使用板载 RS232 端口从板上获取数据。不过,您必须自己构建基础设施才能做到这一点。
这也可能会给您一些想法:
http://www.1pin-interface.com/
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/