gpt4 book ai didi

linux - FPGA与PC以太网连接

转载 作者:太空宇宙 更新时间:2023-11-04 04:55:22 25 4
gpt4 key购买 nike

我想将fpga板的以太网直接连接到PC的以太网并进行双向数据传输。我对如何设置这个感到困惑。

  • Should I use Raw ethernet frames between FPGA and PC? But I could not find any windows application to send/capture raw frames. Can I do this in linux or something?
  • What would be the IP addresses and MAC addresses of PC and FPGA board in such a direct connection? How to find it? As there is no LAN or something involved here, I don't know how IP addresses get assigned to them.
  • Should I use TCP/IP or UDP in direct connection instead of raw frames? It seems to complicate FPGA side. I am not sure.
  • Is it better to have FPGA board and PC on same LAN, instead of direct connection. Again can I use raw frames or should I go for TCP/IP or UDP?
  • Is it necessary to implement ARP on FPGA, if I go for TCP/IP or UDP?

最佳答案

简短回答:

最好选择网络层协议(protocol)而不是原始帧。我认为最好的方法是UDP。与 TCP/IP 相比,它具有简单的 header 和较低的复杂性。它广泛用于 FPGA 和主机 PC 之间的通信。例子可以在互联网上找到。将 FPGA 连接到与 PC 相同的网络,以便 DHCP Server 为 FPGA 分配 IP 地址。如果您知道 FPGA 板的 MAC 地址,则不需要 ARP。通常它写在黑板上。还有一个例子:在Xilinx中,我们可以在代码本身中配置MAC。只要网络中没有其他设备使用相同的 MAC,它就是安全的。

关于linux - FPGA与PC以太网连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48024745/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com