完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,
我正在一个项目中,我想使用FPGA,Spartan 3A,就像转发器一样,我通过以太网(TCP)将PC连接到Spartan,然后通过其他通信系统连接到 FPGA到其他FPGA,这通过以太网到其他PC。 为此,我使用了示例echo1026,我修改了它。 我在2台计算机之间进行通信,因为我可以像FPGA一样将目标IP地址保存在FPGA中。 PC1(192.168.1.11)-------------> FPGA(192.168.1.10)===========> FPGA(192.168.1.10)------ --------> PC2(192.168.1.8) 以太网其他通信系统以太网 但问题是当网络中有多台计算机时,因为我需要在FPGA中选择目标IP地址。 当您尝试将PC1连接到FPGA时,您必须使用FPGA IP地址(如目标),因此,FPGA不知道哪个是目标PC。 PC1(192.168.1.11)------------------> FPGA(192.168.1.10)=======> FPGA(192.168.1.10)----- --------> PC2(192.168.1.8) 以太网=======> FPGA(192.168.1.10)-------------> PC3(192.168.1.9) 其他Comm以太网 系统 我的意思是,当您尝试在PC1和PC2之间进行通信时,例如,使用TCP,您必须连接它们,但首先我必须将PC1与FPGA连接。 为此,必须在FPGA中使用tcp_bind(port,ip)和tcp_listen()等指令。 但是,如果PC1选择目标PC2 IP地址,我不知道FPGA是否可以接受连接。 当您在PC1和FPGA之间建立连接时(选择目标FPGA IP地址),跳转功能“accept_callback”,但如果选择其他目标地址,则不是。 所以,我无法通过其他通信系统进行连接。 我尝试过不同的可能性,比如: #define IP_ADDR_ANY_VALUE 0x00000000UL #define IP_ADDR_BROADCAST_VALUE 0xffffffffUL err = tcp_bind(PCB,IP_ADDR_ANY_VALUE,port); //用这个只能连接到FPGA IP地址err = tcp_bind(pcb,IP_ADDR_BROADCAST_VALUEE,port); //有了这个,我无法连接到任何IP地址 谢谢 以上来自于谷歌翻译 以下为原文 Hi, I'm working in a project, where I want to use a FPGA, a Spartan 3A, like a repeater, for that, I connect a PC to the Spartan by Ethernet (TCP), and then, through other communication system I connect the FPGA to other FPGA, and this to other PC by Ethernet. For that, I've used the example echo1026, and I've modified it. I get a communication between 2 computers, because I can save the destination IP address in the FPGA like a constant. PC1(192.168.1.11) -------------> FPGA(192.168.1.10) ===========> FPGA(192.168.1.10) -------------->PC2(192.168.1.8) Ethernet Other Comm System Ethernet But the problem is when there is a network with more than one computer, because I'd need to choose the destination IP address in the FPGA. And when you try to connect the PC1 to the FPGA, you have to use the FPGA IP address like destination, so, then, the FPGA doesn't know which is the destination PC. PC1(192.168.1.11) ------------------> FPGA(192.168.1.10)=======> FPGA(192.168.1.10) -------------> PC2(192.168.1.8) Ethernet =======> FPGA(192.168.1.10) -------------> PC3(192.168.1.9) Other Comm Ethernet System I mean, when you try to communicate between PC1 and PC2, for example, with TCP, you have to connect them, but first I have to connect PC1 with FPGA. For that, is necesary some instruction like tcp_bind(port, ip) and tcp_listen() in the FPGA. But I don't know if the FPGA can accept the connection if PC1 choose like destination PC2 IP address. When you do a connection between PC1 and the FPGA (choose like destination FPGA IP address), jump the function "accept_callback", but if you choose other destination address, not. So, I couldn't do the connection through the other communication system. I've tried with differents posibilities, like: #define IP_ADDR_ANY_VALUE 0x00000000UL #define IP_ADDR_BROADCAST_VALUE 0xffffffffUL err = tcp_bind(pcb, IP_ADDR_ANY_VALUE, port); //with this only get to connect to the FPGA IP address err = tcp_bind(pcb,IP_ADDR_BROADCAST_VALUEE, port); //with this I don't get to connect to any IP address Thanks |
|
相关推荐
7个回答
|
|
混杂模式是MAC功能,不依赖于FPGA系列。
请检查您正在使用的MAC核心的UG。 例如,如果使用xps_ll_temac内核,则只需将TEMAC地址过滤器模式寄存器的第31位设置为1即可打开混杂模式(请参阅下面的快照)。 kintarz写道: 我需要的是让Spartan3A以promiscuos模式工作。 我找到了一些人们用Virtex-5做同样的线程,但不是Spartan。 干杯,吉姆 在原帖中查看解决方案 以上来自于谷歌翻译 以下为原文 Promiscuous mode is a MAC feature, not tied to a FPGA family. Please check the UG of the MAC core you're using. For example, if you use the xps_ll_temac core, you just need to set bit 31 of TEMAC address filter mode register to 1 to turn on the promiscuous mode (see snapshot below). kintarz wrote: Cheers, JimView solution in original post |
|
|
|
我不完全确定你要做什么,但如果你只是想建立某种桥接器或集线器(也就是说,如果你只是在PC1和PC2之间传输数据,并且只使用FPGA
为了通过系统中继数据),这样做会不会更容易? 如果您不需要向FPGA传输数据,则它们不需要IP地址。 只是让他们接收一端存在的任何数据,并将其传输到另一端? 以上来自于谷歌翻译 以下为原文 I'm not entirely sure of what you are trying to do, but if you are just trying to make a bridge or hub of some sort (that is, if you are only transmitting data between PC1 and PC2, and are only using the FPGAs for relaying the data through the system), wouldn't it be easier to just do exactly that? If you don't need to transmit data to the FPGAs, they do not need an IP address. Just let them receive whatever data is present at one end, and transmit it on to the other end? |
|
|
|
我希望FPGA的工作方式类似于网关,它可以传输所有接收的内容。
问题是我没有得到FPGA接收到具有不同目标IP地址的帧本身。 以上来自于谷歌翻译 以下为原文 I want that FPGA works like a gateway, which relay all what it receives. The problem is that I don't get that the FPGA receives frames with a different destination IP address at itself. |
|
|
|
那么,这一切都取决于你是否真的需要FPGA才能拥有IP地址。
如果您只需要在同一网络的两个部分之间中继数据,只需让每个FPGA接收它接收的任何内容并将其发送到另一个FPGA。 它们不需要IP地址,也不需要TCP / IP堆栈。 你应该只取原始数据包并发送它,基本上只是制作某种“分布式集线器”? 以上来自于谷歌翻译 以下为原文 Well, it all depends on whether you actually need the FPGAs to have an IP address or not. If you just need to relay data between two parts of the same network, just let each FPGA take whatever it receives and send it on to the other FPGA. No need for them have an IP address, and no need for a TCP/IP stack. You should just take the raw packet and send it on, essentially just making some sort of "distributed hub"? |
|
|
|
我需要的是让Spartan 3A以混杂模式运行。
我找到了一些人们用Virtex-5做同样的线程,但不是Spartan。 以上来自于谷歌翻译 以下为原文 What I need is to get that the Spartan3A works in promiscuos mode. I've found some thread where people do the same with Virtex-5, but not with Spartan. |
|
|
|
混杂模式是MAC功能,不依赖于FPGA系列。
请检查您正在使用的MAC核心的UG。 例如,如果使用xps_ll_temac内核,则只需将TEMAC地址过滤器模式寄存器的第31位设置为1即可打开混杂模式(请参阅下面的快照)。 kintarz写道: 我需要的是让Spartan3A以promiscuos模式工作。 我找到了一些人们用Virtex-5做同样的线程,但不是Spartan。 干杯,吉姆 以上来自于谷歌翻译 以下为原文 Promiscuous mode is a MAC feature, not tied to a FPGA family. Please check the UG of the MAC core you're using. For example, if you use the xps_ll_temac core, you just need to set bit 31 of TEMAC address filter mode register to 1 to turn on the promiscuous mode (see snapshot below). kintarz wrote: Cheers, Jim |
|
|
|
谢谢!
我已经读过这个了。 XPS Ethernet Lite不允许混杂模式。 我将不得不充满核心。 以上来自于谷歌翻译 以下为原文 Thanks! I had already read about this. XPS Ethernetlite doesn't allow promiscuos mode. I'll have to chage of core. |
|
|
|
只有小组成员才能发言,加入小组>>
2429 浏览 7 评论
2831 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2298 浏览 9 评论
3378 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2468 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
1313浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
595浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
456浏览 1评论
2011浏览 0评论
737浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-27 20:48 , Processed in 1.452947 second(s), Total 88, Slave 72 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号