APP下载

基于FPGA的TCP/IP网络通信系统的设计与实现

2018-04-13王文郑建生

现代电子技术 2018年8期

王文 郑建生

摘 要: 针对纯软件实现网络通信时必须依赖于操作系统,且易受攻击的缺点,基于FPGA技术,通过控制W5500协议栈芯片的方式设计并实现一个TCP/IP网络通信系统。该系统加入网络断线自动重连功能,并在系统中使用CRC冗余差错检验对数据进行甄别,实现对非法数据的滤除。介绍系统的设计方案,并对系统进行了测试,系统的评价指标为丢帧率、误码率和传输速度。测试结果表明,该系统能对数据进行准确无误的传输,且数据传输速率较高。

关键词: FPGA; TCP/IP网络通信; W5500协议栈; CRC校验; USB; 误码率

中图分类号: TN915?34; TN91 文献标识码: A 文章编号: 1004?373X(2018)08?0005?05

Abstract: In allusion to the disadvantage that the pure software must rely on the operating system for network communication implementation, and is prone to attack, a TCP/IP network communication system based on FPGA technology is designed and implemented by using the pattern of controlling the W5500 protocol stack chip. In the system, the network disconnection automatic reconnection function is added, and the CRC redundancy error check is used to discern the data and achieve the filtering of illegal data. The design scheme of the system is introduced, and the system is tested with the evaluation indexes of frame loss rate, bit error rate and transmission speed. The test results show that the system can transmit data accurately and the data transmission rate is high.

Keywords: FPGA; TCP/IP network communication; W5500 protocol stack; CRC check; USB; bit error rate

目前网络通信在各个领域应用广泛。网络通信使用的协议一般有TCP/IP协议和UDP协议两种。工程运用中,实现网络通信有两种形式,一种是通过纯软件实现,一种是通过硬件实现。纯软件必须依赖于操作系统,容易受到攻击。相对而言,硬件实现直接基于状态机对数据处理,安全性能更好,并且方便从最底层对数据进行甄别。本文设计并实现了一种基于FPGA的网络通信系统[1],该系统使用协议栈芯片W5500[2]实现TCP/IP网络连接,并对数据添加CRC冗余校验以去除非法数据,系统通过USB数据线与上位机進行通信。本文详细介绍了系统的设计和测试,并对测试结果进行了分析。

1 总体设计方案

本系统由USB模块、CRC校验模块、W5500网络模块组成,各大模块之间使用FIFO[3](First Input First Output)存储数据。在发送部分,上位机通过USB发送数据到FPGA,FPGA对数据进行CRC计算,将计算得到的CRC校验码添加在数据帧后面,然后通过W5500芯片数据发送到阿里云服务器。……

登录APP查看全文