问题描述
我正在一个项目中,要求将数据从PC发送到FPGA,FPGA处理数据并将其发送回PC.我使用的板是Atlys™Spartan-6 FPGA开发板.数据将以1个字节的形式发送,因为在时钟的每个上升沿都会处理1个字节.您能建议我一些向FPGA发送数据的方法吗?谢谢
I am working on a project which requires data to be sent FROM PC TO FPGA,which processes the data and sends it BACK TO PC. The board I am using is Atlys™ Spartan-6 FPGA Development Board. The data is to be sent as 1 byte , because 1 byte is processed at each rising edge of the clock. Could you please suggest me ways of sending data to FPGA ?Thanks
推荐答案
选择一些您可以访问IP(知识产权)核心的通信方法.例如,如果您可以随时访问FPGA的UDP/IP内核,则可以使用它.如果您必须自己开发HDL,则串行协议(UART,I2C等)将是编写起来更简单的模块.通常,HDL需要花费更长的时间进行开发,调试和测试.
Pick some method of communication that you have access to IP (intellectual property) cores for. For example, if you can readily access a UDP/IP core for your FPGA, then use that. If you have to develop the HDL yourself, serial protocols (UART, I2C, etc) will be simpler blocks to write. In general, HDL takes longer to develop, debug, and test.
UDP具有一些优势,因为您可以使用诸如Wireshark之类的工具来捕获PC上的数据包(一旦您克服了实际将数据包发送至FPGA或从FPGA接收数据包的最初障碍).另外,许多人都熟悉各种编程语言(C,C ++)中的UDP.
UDP has some advantage because you can use tools like Wireshark to capture packets on the PC (once you get past the initial hurdle of actually getting packets to/from the FPGA). Plus, many people are familiar with UDP in various programming languages (C, C++).
无论如何,您可能会花一些时间在示波器和逻辑分析仪上,检查信号电平和何时将数据发送到FPGA或从FPGA发送数据的时序.
In any case, you'll probably spend time with an oscilloscope and logic analyzer checking out signal levels and timing when data is sent to/from the FPGA.
这篇关于发送数据到FPGA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!