摘要
针对嵌入式领域中以太网传输速率以及实时性问题,文中提出了一种基于FPGA(Field Programmable Gate Array)的千兆以太网端口通信的设计方案。设计了千兆以太网交换机的转发功能,基于标签转发实现了端对端数据通信。CPU(Central Processing Unit)发出带有标签的数据报文,通过千兆网口输出数据报文,经过RGMII(Reduced Gigabit Media Independent Interface)接口将带标签的数据报文发送给FPGA,FPGA通过内部逻辑判断标签中的输出端口号域并去除标签,从相应千兆网口向连接设备输出数据报文。外设通过千兆网端口输入数据报文,通过SGMII(Serial Gigabit Media Independent Interface)协议将数据报文发送给FPGA,FPGA通过内部逻辑添加标签并轮询输出给CPU,从而实现多个千兆网口连接设备互通。实验结果验证了FPGA逻辑的可行性和有效性,传输速率达到1 Gbit·s-1,报文转发延时小于100μs,报文丢包率为0%,数据传输稳定性较高,满足现有项目的实际需求。
In view of the problem of Ethernet transmission rate and real-time in embedded field,a design of Gigabit Ethernet port communication based on FPGA(Field Programmable Gate Array)is proposed.This study designs the forwarding function of Gigabit Ethernet switch,and implements end-to-end data communication based on label forwarding.Datagrams with label are sent by CPU(Central Processing Unit),and are outputted through Gigabit Ethernet interface,and are sent to FPGA through RGMII(Reduced Gigabit Media Independent Interface)port.FPGA judges output port number field in label through internal logic and removes label,and outputs datagrams to connecting device from corresponding Gigabit Ethernet interface.Peripherals input datagrams through Gigabit Ethernet ports,and send datagrams to FPGA through SGMII(Serial Gigabit Media Independent Interface)protocol.FPGA adds labels through internal logic and outputs them to CPU through polling,so as to realize interworking of connecting devices of multiple Gigabit Ethernet interface.The experimental results reveal the feasibility and effectiveness of the FPGA logic.The transmission rate reaches 1 Gbit·s-1,the datagrams forwarding delay is less than 100μs,and the packet loss rate is 0%,which indicates that the data transmission stability is high,and the proposed design meets the actual needs of existing projects.
作者
兰唯
韩延喆
扈啸
LAN Wei;HAN Yanzhe;HU Xiao(School of Computer,National University of Defense Technology,Changsha 410073,China;Changsha Talent Group Co.,Ltd.,Changsha 410073,China)
出处
《电子科技》
2024年第1期48-54,共7页
Electronic Science and Technology
基金
国家科技重大专项(2017-V-0014-0066)。