A multi-channel GPS message reporting system based on FPGA
By designing a multi-channel GPS data processing module on FPGA, the parallel reception and analysis of multiple GPS messages is realized, which solves the problems of data frame loss and high CPU usage in the existing technology, and provides flexible message processing and Efficient data reporting solution.
Patent Information
- Application Number
- CN202211327412.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-10-27
AI Technical Summary
The existing technology cannot effectively receive and parse messages from multiple GPS modules in parallel, resulting in data frame loss and high CPU usage, and cannot meet the flexible needs of different upper-layer applications for messages.
Design a multi-channel GPS message reporting system based on FPGA, including multi-channel GPS data processing modules. Each module includes GPS reset, UART data reception, message parsing, data cache framing and interface data reporting modules. Through the state machine It implements validity checking and framing of messages with dual-port RAM, and reports the processed data to the CPU through FIFO.
It realizes the parallel reception and analysis of multiple GPS messages, reduces the CPU load, supports flexible configuration of message filtering, and improves the efficiency and reliability of data processing.
Smart Images

Figure CN115695591B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of aviation computer control and relates to a multi-channel GPS message reporting system based on FPGA. Background Art
[0002] The GPS system has the characteristics of high precision, all-weather, high efficiency, multi-function, easy operation and wide application. It was originally used in the military field, but now it has been widely used in many industries such as transportation and surveying and mapping. The application fields of GPS are mostly based on positioning, synchronization or related extensions, mainly including: timing synchronization, sports navigation, trajectory recording, geodetic measurement, surrounding information query, etc.
[0003] In the case of only one GPS report, data reception and message parsing can be achieved through the processor through the serial port software. However, if multiple modules are connected in parallel, messages are parsed in parallel, and transmitted concurrently, it cannot be achieved using DSP or industrial computer methods. The reasons include two aspects. On the one hand, general processors cannot provide a large number of hardware interfaces, such as 12 serial ports; on the other hand, software cannot process multiple channels of data in parallel. In the face of concurrent data, there may be invalid data or frame loss. In addition, different upper-layer applications require different messages, and the GPS module will continuously send multiple NEMA standard messages within 1S. The same message will be sent repeatedly within 1S depending on the GPS module. Therefore, using software to identify specific messages and discard unconcerned messages will undoubtedly greatly increase CPU usage and cause resource waste. Based on the above description, the use of hardware gate arrays to implement multi-channel GPS module data access, message parsing, and message filtering functions has higher efficiency and reliability.
[0004] Chinese invention patent CN202011116761.5 relates to an FPGA implementation method for generating millisecond radar time information based on GPS second pulses, and the present invention belongs to the field of radar signal processing. This method is carried out in four steps: calling the clock management module IP core of FPGA, dividing the frequency to generate a counting clock; generating a counter under the counting clock clock domain; cutting off the low bit of the counter, and performing arithmetic addition of 1 operation on the high bit remaining after the cutting bit, to obtain a new count value; cutting off the lowest bit of the new count value, and this value is the output of the millisecond radar time information. The present invention adopts the second pulse signal provided by GPS through the FPGA programming method, which can input accurate millisecond time information into the radar data signal stream, so as to facilitate the subsequent further tracking and analysis of the radar data information stream, so as to realize the accurate controllability of the radar data stream. The invention focuses on realizing accurate millisecond radar time through FPGA, and the method of realizing multi-channel GPS message reporting based on FPGA focuses on realizing the parallel reception, analysis, and framing reporting of multi-channel messages through FPGA.
[0005] Chinese invention patent CN201611126357.X discloses a GPS synchronization method for a distributed test system. This method is aimed at the application of the current mainstream distributed test system and solves the problem that the distributed test system is physically dispersed and isolated due to the independent operation of each measuring point in transient signal testing, which makes it difficult to synchronize with each other. This method can accurately measure the time difference between the PPS pulse signal generated by the designed GPS synchronization unit and the received measured signal. After each measuring point measures the time difference, it is uploaded to the computer together with the UTC time, and a time unification based on the PPS pulse is established on the computer. The GPS synchronization unit designed by the present invention includes a GPS timing module, a control chip FPGA and a high-precision clock source, an EEPROM memory, a USB interface, etc. This patent is suitable for the synchronization of distributed test systems in an open field environment. It solves the outstanding problems of low reliability and large engineering volume in wired synchronization by wireless synchronization. The method has high accuracy, simple operation, and is easy to implement in engineering. This method only uses one GPS timing to solve the synchronization problem, which is obviously different from the present invention that supports parallel analysis of multiple GPS modules and flexibly reports specified messages as needed. Summary of the invention
[0006] (I) Purpose of the invention
[0007] The purpose of the present invention is to provide a multi-channel GPS message reporting system based on FPGA, so as to realize the parallel reception, analysis and reporting of multi-channel GPS messages.
[0008] (II) Technical solution
[0009] In order to solve the above technical problems, the present invention provides a multi-channel GPS message reporting system based on FPGA, which comprises: a multi-channel GPS data processing module, each GPS data processing module realizes one channel of GPS message processing; each GPS data processing module comprises a GPS reset module, a UART data receiving module, a GPS message parsing module, a data cache framing module and an interface data reporting module; the GPS reset module comprises a power-on reset and an abnormal operation reset; the UART data receiving module receives data sent by the GPS module; the GPS message parsing module receives data of a specific frame header through a state machine and verifies the validity of the data, and stores the valid data in a dual-port RAM; the data cache framing module is responsible for reading the GPS message from the DPRAM, and caching the data frame to the FIFO after adding a frame header, a frame sequence number, a frame length and a frame check; the interface data reporting module indicates whether each FIFO has a data frame and is responsible for reporting the FIFO data to the CPU through a local bus.
[0010] (III) Beneficial effects
[0011] The FPGA-based multi-channel GPS message reporting system provided by the above technical solution can not only realize the parallel reception, analysis and reporting of multi-channel GPS messages through the gate array method, but also can flexibly configure the reception of specific messages according to software instructions, filter out unnecessary data frames and abnormal data, which can not only ensure the parallel reception of data, but also greatly reduce the processor load. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is a block diagram of multi-channel GPS parallel processing of the present invention
[0013] Figure 2 This is the single-channel GPS processing flow of the method described in the present invention. DETAILED DESCRIPTION
[0014] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.
[0015] like Figure 1 and Figure 2 As shown, the FPGA-based multi-channel GPS message reporting system of this embodiment is used to realize parallel data analysis and framing reporting of multi-channel GPS modules, including multiple GPS data processing modules, each GPS data processing module realizes one channel of GPS message processing; each GPS data processing module includes a GPS reset module, a UART data receiving module, a GPS message parsing module, a data cache framing module and an interface data reporting module; the GPS reset module includes a power-on reset and an abnormal operation reset; the UART data receiving module receives the data received in the GPS reset module; the GPS message parsing module receives data of a specific frame header through a state machine and verifies the validity of the data, and stores the valid data in a dual-port RAM; the data cache framing module is responsible for reading the GPS message from the DPRAM, and caching the data frame to the FIFO after adding a frame header, a frame sequence number, a frame length, and a frame check; the interface data reporting module indicates whether each FIFO has a data frame and is responsible for reporting the FIFO data to the CPU through a local bus.
[0016] The message reporting system of this embodiment can receive and parse multiple GPS messages in parallel, the message content can be flexibly specified according to the software, and all process processing is implemented by the underlying hardware, which greatly reduces the CPU load and facilitates unified processing by upper-layer applications.
[0017] FPGA hardware can realize parallel processing of multiple GPS data by instantiating multiple GPS data processing modules. The following article will introduce the data processing flow in detail using one of the GPS data processing modules.
[0018] The GPS reset module includes two modes: power-on reset and software-controlled GPS module reset pin reset. The power-on reset ensures that the hardware of the GPS module works reliably after power-on. The software-controlled reset is when an abnormality is detected in the module, such as no message is received or the UART interface data transmission timeout, etc. The processor sends a reset instruction, and after the FPGA logic is parsed, the GPS module is reset through the GPS hardware reset pin. The present invention corresponds to multi-channel GPS modules, so there are multiple physical addresses for GPS module reset management.
[0019] The UART data receiving module is used to receive data sent by the GPS module in the form of a serial port. The baud rate of the GPS module sending data can be set, generally including 9600bps, 115200bps, etc. The software can configure the baud rate of the GPS module through the UART function implemented by the FPGA gate array. The FPGA implements the UART receiving module, and the baud rate of the UART receiving module can be configured by software. The UART receiving data format includes a start bit, 8 bits of data, and an end bit. The present invention realizes data reception at different baud rates through an FPGA state machine, identifies the start bit, data bit and end bit of the data, and sends an end flag after each byte is received to notify the message parsing module to receive data.
[0020] The GPS message parsing module includes the following functions: filter out the specified message through the message frame header, count the message length, and perform CRC check on the data. This module is implemented in a state machine manner. After the CPU is powered on, the application software configures the message commands received by each GPS channel one by one, and the FPGA clinic recognizes them through decoding. For detailed procedures, please refer to the appendix. Figure 1 . FPGA first detects the message frame header to see if it is a GNRMC or GNGGA message. If it is inconsistent with the specified message, the message is automatically filtered out and the message is re-screened; if the received message is consistent with the specified message, the subsequent processing flow is entered. FPGA stores the received GPS message data byte by byte in the receiving order to DPRAM until the * is received, and then receives the CRC check data, and then stops receiving subsequent data. In the above data receiving process, FPGA starts the verification process, and performs an XOR check on the data between the $ character and the * character according to the NMEA0183 protocol. After the data reception is completed, the FPGA compares the calculated CRC result with the received verification result. If the verification results are consistent, the data frame is considered valid, and the data cache framing module is started for framing processing; if the verification results are inconsistent, the data frame is considered invalid, the data of this package is automatically discarded, and the frame header recognition state is returned. The DPRAM for storing messages is implemented by the present invention using an FPGA IP core. According to the message length, the current design of DPRAM read and write data width is 8 bits, and the data depth is 512 bytes. This space can ensure reliable caching of message data.
[0021] The cache framing module implements the framing of received messages, which is convenient for unified processing by the background software. The framing process includes adding a frame header, frame length, frame sequence number, frame data, and frame check, and counting the number of message frames cached in the FIFO through the FPGA gate array. The specific process is as follows: After the cache control module receives the data framing instruction sent by the GPS message parsing module, it starts the cache control state machine, first creates a frame header 0xaa55, 0x55aa, then the frame length and frame sequence number, and the frame sequence number starts from 1 to 0x7fff and then counts again. After the frame header is created, the cache control state machine is responsible for reading the GPS message data from the DPRAM and caching it in the created FIFO. The FIFO is implemented by the FPGA IP core according to the input and output data characteristics, the write data width is set to 8bit, the read data width is set to 16bit, and the data depth is set to 512 bytes. After the GPS message data is cached, all data except the frame header are XOR-checked, and the check result is filled into the FIFO as the frame tail, which is used for the application software to verify the data validity. An example of the FIFO frame format is shown in Table 1 below.
[0022] Table 1 FIFO frame format
[0023] Frame Header Frame length Frame number Frame data Frame Check Oxaa5555aa 0x40 0x0001 … 0x7a
[0024] The interface data reporting module is responsible for decoding the addresses of multiple FIFOs and reporting the number of FIFO frames to the processor. The interface data module provides each FIFO with a data frame flag and the number of frames. The processor queries the status of each GPS by polling, and then reads the GPS message in the FIFO. The FPGA logic is responsible for dynamically counting the number of frames. Since GPS messages are reported in bytes and the processor bus is generally 16 bits, the FIFO design write part is designed to be 8 bits wide and the read part is designed to be 16 bits.
[0025] The FPGA-based multi-channel GPS message reporting system of the present invention supports parallel data analysis and reporting of multi-channel GPS modules, supports 12-channel message reporting but is not limited to 12 channels; analyzes and reports specific messages according to software instructions, and discards non-specified messages without processing; supports reporting on local buses such as DSP's EMIFA interface, PCI interface, ISA interface, etc., but is not limited to the above interfaces.
[0026] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A multi-channel GPS message reporting system based on FPGA, characterized in that: include: Multiple GPS data processing modules, each GPS data processing module realizes one GPS message processing; each GPS data processing module includes a GPS reset module, a UART data receiving module, a GPS message parsing module, a data cache framing module and an interface data reporting module; the GPS reset module includes a power-on reset and an abnormal operation reset; the UART data receiving module receives the data sent by the GPS reset module in the form of a serial port; the GPS message parsing module receives the data of the set frame header through the state machine and verifies the data validity, and stores the valid data in the dual-port RAM; the data cache framing module is responsible for reading the GPS message from the dual-port RAM, and caching the data frame to the FIFO after adding the frame header, frame sequence number, frame length and frame check; the interface data reporting module indicates whether each FIFO has a data frame and is responsible for reporting the FIFO data to the CPU through the local bus; Set the frame header format to 0xaa55, 0x55aa; The cache framing module performs framing processing on the received message, and the framing process includes adding a frame header, a frame length, a frame sequence number, frame data, and a frame check, and counting the number of message frames cached in the FIFO through the FPGA gate array; When the cache framing module performs message framing processing, it first receives the data framing instruction sent by the GPS message parsing module, starts the cache control state machine, creates the frame header 0xaa55, 0x55aa, followed by the frame length and frame sequence number, and the frame sequence number starts from 1 to 0x7fff and then restarts. After the frame header is created, the cache control state machine is responsible for reading the GPS message data from the DPRAM and caching it into the created FIFO. After the GPS message data is cached, all data except the frame header are XOR-checked, and the check result is filled into the FIFO as the frame tail for the application software to verify the validity of the data.
2. The FPGA-based multi-channel GPS message reporting system as claimed in claim 1, characterized in that: The GPS reset module includes two modes: power-on reset and software-controlled GPS module reset pin reset.
3. The FPGA-based multi-channel GPS message reporting system as claimed in claim 2, characterized in that: The data format received by the UART data receiving module includes a start bit, 8 bits of data, and an end bit.
4. The FPGA-based multi-channel GPS message reporting system as claimed in claim 3, characterized in that: The GPS message analysis module selects corresponding messages through message frame headers, counts message lengths, and performs CRC check on data; the GPS message analysis module is implemented in a state machine manner.
5. The FPGA-based multi-channel GPS message reporting system as claimed in claim 4, characterized in that: The FIFO is implemented by an FPGA IP core, with a write data width of 8 bits, a read data width of 16 bits, and a data depth of 512 bytes according to the input and output data characteristics.
6. The FPGA-based multi-channel GPS message reporting system as claimed in claim 5, characterized in that: The interface data reporting module is responsible for decoding multiple FIFO addresses and counting the number of FIFO frames and reporting them to the processor; the interface data reporting module provides a data frame flag and the number of frames for each FIFO. The processor queries the status of each GPS by polling, and then reads the GPS message in the FIFO. The FPGA logic is responsible for dynamically counting the number of frames.
Citation Information
Patent Citations
GPS synchronization method of distributed testing system
CN106788843A
FPGA implementation method for generating millisecond(ms)-level radar time information based on GPS pulses per second
CN112255592A
FPGA-based intelligent transformer station network storm processing module and solution
CN104065587A
ADS-B multi-channel signal generating methods
CN109547161A
Data link protocol conversion system
CN112187789A
