| With the development of my country’s rail transit technology,more and more foreign equipment that has been used up to now has been gradually replaced by domestically produced equipment.In the transition stage of the design and manufacture of subway trains from partial autonomy to full autonomy,it is inevitable that communication between different devices cannot be established due to different communication protocols.The application of protocol conversion technology in the communication connection between devices is very important to the integrity and stability of the train system.This paper proposes a feasible solution by designing a gateway from HDLC to TRDP.The main contents of the paper are as follows:(1)Aiming at the problem of different communication protocols of subway train equipment,the architecture design and underlying system construction of HDLC to TRDP protocol conversion device are completed.The ARM hard core in the ZYNQ platform is equipped with the QNX operating system to realize the protocol driver and protocol conversion functions;the FPGA part realizes the data link layer function of the protocol.The FPGA implementation mainly includes the HDLC IP soft core,the Ethernet controller soft core,etc.,as well as the AXI interface design between the soft core and the ZYNQ7000 processor.(2)Aiming at the realization of the HDLC protocol in the FPGA part,the IP soft core design of the data link layer is completed.The HDLC IP soft core is the core module in the gateway design,and it is also the key and difficult point of the design work in this paper.It mainly completes the functions of transparent transmission,encapsulation and framing,and error checking at the data link layer.Aiming at the transmission process of data packets,the process of data cross-clock domain processing and buffering is also designed.For other IP cores,module configuration and interface design are also completed according to application requirements.(3)Combined with the control registers and software interface provided by the FPGA system,the design of the protocol conversion software under the QNX operating system is completed.The software adopts multi-thread design to realize the communication function.The main functions to be realized in the process of protocol conversion are written as independent thread functions,including TRDP communication thread,HDLC communication thread and UART communication thread.Protocol conversion and communication error reporting functions are implemented.(4)A gateway test platform is built to test the gateway function.The test content includes the receiving and sending of TRDP data,the receiving and sending of HDLC data,the receiving and sending of UART data,and the test of protocol conversion function.The comprehensive test results show that the gateway realizes data forwarding between different protocols,and the data forwarding interval can meet the scanning period of the subsystem and meet the design requirements.The gateway designed in this paper has been applied to a certain type of subway vehicle renovation project,and the5000-kilometer operation test has been completed. |