| With the continuous progress of chip design and manufacturing technology and the continuous improvement of development tools,the function of FPGA has gradually developed from glue logic,auxiliary control,signal preprocessing to the whole system programmable stage,and its application in various electronic and signal processing fields will be more widespread.However,with the increasing demand of data acquisition,communication and signal processing,a large amount of data and processing results in FPGA often need to be transmitted to the upper computer or other equipment at a high speed and reliably.Ethernet communication is usually the first choice for data transmission due to its standardization and popularity.Compared with UDP protocol,which is fast but unreliable,TCP protocol is usually more widely used in underwater acoustic network communication due to its reliability.In view of the above situation,this paper builds TCP hardware protocol stack based on FPGA and uses Verilog language to implement TCP/IP protocol.However,considering the characteristic of the agreement to its entire function implementation,this article through the choice,finally left to keep the normal data transmission of the basic protocol and TCP protocol to ensure the reliability of the necessary mechanism,on the basis of hierarchical processing,divided into small modules,huge logic to simplify the complex process of data transmission for the data "encapsulation-flow-decapsulation" process,Realized the normal communication function based on TCP protocol.On this basis,the research and design of TCP/IP protocol congestion control,timeout retransmission recovery and other key technologies,so that FPGA in the process of controlling the correct and stable transmission of data flow has more powerful flow control ability.Finally,based on the ISE development tool,the corresponding code is completed,and the design timing report is given,and the resource comparison with previous designs verifies the effectiveness of the optimization design in this paper.Secondly,this paper writes incentive test files based on TCP client communication data,carries out comprehensive simulation and detailed analysis on the functions of each module of TCP communication protocol,and ensures the correctness of logic design.Finally,a hardware test platform was built for board-level debugging.Combined with Wireshark packet capture software and network port debugging assistant,the functions of ARP request response,UDP data transmission,TCP three-way handshake connection establishment,data communication,four-time wave disconnection,timeout retransmission and reply,and congestion control were successfully realized.And focus on the TCP transmission rate test,data stable transmission,the fastest transmission rate up to246Mb/s.Compared with other methods,this paper shows the advantages of the design.The network transmission requirements of underwater acoustic equipment are basically satisfied. |