A multi-channel differential pressure real-time measurement method and system

By employing a closed-loop communication logic and independent address space design for collaborative interaction between the PS and PL terminals, high-frequency and high-accuracy data detection of multi-channel differential pressure real-time measurement equipment was achieved, solving the problems of large equipment size, few channels, and low sampling frequency.

CN122306301APending Publication Date: 2026-06-30中商民智科技工程集团有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
中商民智科技工程集团有限公司
Filing Date
2025-06-28
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing multi-channel differential pressure real-time measurement equipment is large in size, making it difficult to apply in confined spaces. Furthermore, it has a small number of channels and a low sampling frequency, which affects the accuracy of pressure detection.

Method used

A closed-loop communication logic is adopted, with the PS end and PL end cooperating and interacting. The PS end receives and recognizes the instructions from the host computer, while the PL end is responsible for executing the instructions, realizing parallel reading and writing. The two ports of the memory are controlled by the flag value to perform independent data reading and writing. The write priority mode and independent address space design are adopted to eliminate the risk of read and write conflicts and improve the number and frequency of concurrent detection channels.

Benefits of technology

It improves the accuracy and reliability of data, increases throughput, enhances detection frequency and number of channels, and solves the problems of slow speed and low accuracy in real-time multi-channel differential pressure measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122306301A_ABST
    Figure CN122306301A_ABST
Patent Text Reader

Abstract

This invention provides a multi-channel differential pressure real-time measurement method and system. Through collaborative interaction between the PS (Power Supply) and PL (Power Logic) terminals, the PS terminal receives and identifies commands from the host computer, while the PL terminal executes these commands, forming a corresponding closed-loop communication logic that improves data accuracy and reliability. Furthermore, parallel read / write operations are achieved. Switching between identifier values ​​controls independent data read / write operations on two memory ports, completely separating the read / write operations of the first and second ports, significantly increasing throughput. The two ports employ a write-first mode and independent address space design, eliminating the risk of read / write conflicts and increasing the number of concurrent detection channels and detection frequency.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This invention is a divisional application, with the national application number 202510882804.7, the application date being June 28, 2025, and the invention title being "A multi-channel differential pressure real-time measurement method and system". Technical Field

[0002] This invention relates to the field of pressure signal measurement technology, specifically to a multi-channel differential pressure real-time measurement method and system. Background Technology

[0003] Electronic pressure scanning valves are intelligent sensing devices that enable real-time measurement of multiple pressure signals. They are widely used in wind tunnel testing and propulsion trajectory testing. During the development of various aircraft, electronic pressure scanning valves can accurately acquire and verify the aerodynamic distribution and pressure of various engine components during flight. Existing gas pressure scanning valves are relatively large, making them difficult to use in confined spaces. Furthermore, miniaturized scanning valve designs suffer from interference from adjacent detection channels during pressure measurement, affecting the accuracy of the pressure readings. Moreover, current commercially available pressure scanning valves, using a time-division sampling principle, have 8-64 acquisition channels, with each channel sampling at a frequency of only 200Hz. Summary of the Invention

[0004] Therefore, embodiments of the present invention provide a multi-channel differential pressure real-time measurement method and system to solve the technical problems of slow speed, low accuracy and few channels in current multi-channel differential pressure real-time measurement.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] According to a first aspect of the present invention, this application provides a multi-channel differential pressure real-time measurement method, the method comprising: performing the following steps by a PS terminal:

[0007] Initialize the identifier value to the first state value and receive instructions from the host computer;

[0008] Determine whether the host computer instruction is the first instruction;

[0009] If the host computer instruction is the first instruction, then based on the control of the first state value, the first instruction is written into the memory as a PS terminal instruction via the first port;

[0010] Determine whether the first count value corresponding to the first port has reached the first maximum value;

[0011] If the first count value does not reach the first maximum value, then continue to execute writing the first instruction as a PS terminal instruction to memory via the first port;

[0012] If the first count value reaches the first maximum value, a first write-full signal is sent to the PL terminal, and the system waits for the PL terminal to return a first read-empty signal.

[0013] When the first read empty signal is received from the PL terminal, the identifier value is switched from the first state value to the second state value, and the system waits for the PL terminal to return the second write full signal.

[0014] When a second write-full signal is received from the PL terminal, the acquired data is read from the memory via the first port based on the control of the second state value.

[0015] Determine whether the second count value corresponding to the first port has reached the second maximum value;

[0016] If the second count value does not reach the second maximum value, the process continues to read the acquired data from the memory via the first port;

[0017] If the second count value reaches the second maximum value, then one data read is completed.

[0018] Furthermore, the multi-channel differential pressure real-time measurement method disclosed in this application embodiment further includes: the following steps being performed by the PL terminal:

[0019] The following steps are executed by the top level:

[0020] Receive the first write-full signal from the PS terminal;

[0021] Based on the control of the first state value, PS terminal instructions are read from the memory via the second port;

[0022] Determine whether the third count value corresponding to the second port has reached the third maximum value;

[0023] If the third count value does not reach the third maximum value, the instruction to read the PS terminal from the memory via the second port continues to be executed;

[0024] If the third count value reaches the third maximum value, a first read empty signal is returned to the PS terminal, and the PS terminal instruction is sent down to the bottom layer through the intermediate layer, and the collected data is waited for from the bottom layer.

[0025] When the merged acquisition data is received from the intermediate layer, the merged acquisition data is written to the memory via the second port based on the control of the second state value.

[0026] Determine whether the fourth count value corresponding to the second port has reached the fourth maximum value;

[0027] If the fourth count value does not reach the fourth maximum value, the process continues to write the merged acquisition data to the memory via the second port.

[0028] If the fourth count value reaches the fourth maximum value, a second write-full signal is sent to the PS terminal; and

[0029] The following steps are performed from the underlying layer:

[0030] Receive the PS terminal command sent from the terminal;

[0031] Initialize the data acquisition chips corresponding to each channel;

[0032] The received PS terminal command is read and the corresponding data acquisition chip of each channel executes the corresponding operation;

[0033] Monitor whether the data collected from each channel has been updated;

[0034] If the data collected by each channel has not been updated, the corresponding data acquisition chip for each channel will continue to perform the corresponding operation.

[0035] If the data collected from each channel is updated, the data collected from each channel is merged by the intermediate layer and sent to the top layer.

[0036] Furthermore, the multi-channel differential pressure real-time measurement method disclosed in this application embodiment further includes: the following steps being performed by the PS terminal:

[0037] After sending the first full signal to the PL terminal, initialize the fifth count value to 0;

[0038] Monitor whether an error code is received from the PL terminal;

[0039] If an error code is received from the PL terminal, the fifth counter value is incremented by 1.

[0040] Determine whether the fifth count value is greater than the first preset threshold;

[0041] If the fifth count value is greater than the first preset threshold, the first abnormal data is uploaded to the host computer, and the system waits to receive the next host computer instruction.

[0042] If the fifth count value is less than or equal to the first preset threshold, then continue to monitor whether an error code is received from the PL terminal;

[0043] If no error code is received from the PL terminal, wait for the PL terminal to return the first read empty signal and start recording the waiting time;

[0044] Determine whether the waiting time is greater than a second preset threshold;

[0045] If the waiting time exceeds the second preset threshold, the second abnormal data is uploaded to the host computer, and the system waits to receive the next host computer instruction.

[0046] If the waiting time is less than or equal to the second preset threshold, then continue waiting for the PL terminal to return the first read-empty signal, and continue recording the waiting time; and

[0047] And the following steps are executed by the PL:

[0048] After reading the PS terminal instruction from the memory via the second port, it is determined whether the PS terminal instruction conforms to the preset communication protocol;

[0049] If the PS terminal command does not conform to the preset communication protocol, an error code is returned to the PS terminal;

[0050] If the PS terminal instruction conforms to the preset communication protocol, then it is determined whether the third count value corresponding to the second port has reached the third maximum value.

[0051] Furthermore, the multi-channel differential pressure real-time measurement method disclosed in this application embodiment further includes: the following steps being performed by the PS terminal:

[0052] Obtain the number of times data is to be uploaded from the first instruction;

[0053] When a data read is completed, the read data is uploaded to the host computer, and the number of times the data has been uploaded is recorded.

[0054] Determine whether the number of times the current data has been uploaded is greater than or equal to the number of times the data is yet to be uploaded;

[0055] If the number of times the current data has been uploaded is less than the number of times the data is yet to be uploaded, then wait for the PL terminal to return the next second full write signal;

[0056] If the number of times the current data has been uploaded is greater than or equal to the number of times the data is to be uploaded, the identifier value is switched from the second state value to the first state value, and the system waits to receive the next instruction from the host computer.

[0057] Furthermore, the multi-channel differential pressure real-time measurement method disclosed in this application also includes: the following steps being performed by the PS terminal:

[0058] Obtain the number of times data needs to be uploaded and data calibration information from the first instruction;

[0059] Upon completion of a data read, the actual value is calculated using the original value, zero-point value, and overall measurement range. The formula for calculating the actual value is as follows:

[0060] adc_data= (raw_data-zero_value) / zero_value·range

[0061] Where, adc_data is the actual value, raw_data is the original value, zero_value is the zero point value, and range is the overall range;

[0062] Based on the data calibration information, determine whether the uploaded data needs temperature calibration;

[0063] If temperature calibration is not required for the uploaded data, the calculated actual value will be uploaded to the host computer, and the number of times the data has been uploaded will be recorded.

[0064] Furthermore, the multi-channel differential pressure real-time measurement method disclosed in this application also includes: the following steps being performed by the PS terminal:

[0065] If the uploaded data requires temperature calibration, the fitted value is calculated using the calculated actual value and the calibration coefficient. The formula for calculating the fitted value is as follows:

[0066] pressure_value=A·adc_data·adc_data+B·adc_data+C

[0067] Where pressure_value is the fitted value, A is the coefficient of the quadratic term, B is the coefficient of the linear term, C is the constant term, and A, B, and C are all calibration coefficients;

[0068] Upload the calculated fitted values ​​to the host computer and record the number of times the data has been uploaded;

[0069] Determine whether the number of times the current data has been uploaded is greater than or equal to the number of times the data is yet to be uploaded;

[0070] If the number of times the current data has been uploaded is less than the number of times the data is yet to be uploaded, then wait for the PL terminal to return the next second full write signal;

[0071] If the number of times the current data has been uploaded is greater than or equal to the number of times the data is to be uploaded, the identifier value is switched from the second state value to the first state value, and the system waits to receive the next instruction from the host computer.

[0072] Furthermore, the multi-channel differential pressure real-time measurement method disclosed in this application also includes:

[0073] The following steps are executed by the PS side:

[0074] If the host computer instruction is not the first instruction, then determine whether the host computer instruction is the second instruction;

[0075] If the host computer instruction is not the second instruction, then upload the third abnormal data to the host computer and wait to receive the next host computer instruction;

[0076] If the host computer instruction is the second instruction, then based on the control of the first status value, the second instruction is written into the memory as a PS terminal instruction via the first port;

[0077] Determine whether the first count value corresponding to the first port has reached the first maximum value;

[0078] If the first count value does not reach the first maximum value, then continue to execute writing the second instruction as a PS terminal instruction to memory via the first port;

[0079] If the first count value reaches the first maximum value, a third write-full signal is sent to the PL terminal, and the system waits for the PL terminal to return a second read-empty signal.

[0080] When the second read empty signal is received from the PL terminal, the identifier value is switched from the first state value to the second state value, and the system waits for the PL terminal to return the fourth write full signal.

[0081] When a fourth write-full signal is received from the PL terminal, the execution response information is read from the memory via the first port based on the control of the second state value.

[0082] Determine whether the second count value corresponding to the first port has reached the second maximum value;

[0083] If the second count value does not reach the second maximum value, the execution continues to read the execution response information from the memory via the first port;

[0084] If the second count value reaches the second maximum value, the identifier value is switched from the second state value to the first state value, and the system waits to receive the next instruction from the host computer; and

[0085] The following steps are executed by the PL:

[0086] The following steps are executed by the top level:

[0087] Receive the third write-full signal from the PS terminal;

[0088] Based on the control of the first state value, PS terminal instructions are read from the memory via the second port;

[0089] Determine whether the third count value corresponding to the second port has reached the third maximum value;

[0090] If the third count value does not reach the third maximum value, the instruction to read the PS terminal from the memory via the second port continues to be executed;

[0091] If the third count value reaches the third maximum value, a second read empty signal is returned to the PS terminal, and the PS terminal instruction is sent down to the bottom layer through the intermediate layer, and the execution response information is waited for from the bottom layer.

[0092] When the execution response information returned from the lower layer is received from the intermediate layer, the execution response information is written to the memory via the second port based on the control of the second status value.

[0093] Determine whether the fourth count value corresponding to the second port has reached the fourth maximum value;

[0094] If the fourth count value does not reach the fourth maximum value, execution continues and the execution response information is written to memory via the second port;

[0095] If the fourth count value reaches the fourth maximum value, a second write-full signal is sent to the PS terminal.

[0096] According to a second aspect of the present invention, this application provides a multi-channel differential pressure real-time measurement system, the system comprising: a PS terminal, a PL terminal, and a memory, wherein the PS terminal is connected to a first port of the memory via a first interface board Axi_periph, a second interface board Axi Gpio, and a third interface board Axi_bram_ctrl, and the PL terminal is connected to a second port of the memory;

[0097] The PS terminal is used to perform the following steps:

[0098] Initialize the identifier value to the first state value and receive instructions from the host computer;

[0099] Determine whether the host computer instruction is the first instruction;

[0100] If the host computer instruction is the first instruction, then based on the control of the first state value, the first instruction is written into the memory as a PS terminal instruction via the first port;

[0101] Determine whether the first count value corresponding to the first port has reached the first maximum value;

[0102] If the first count value does not reach the first maximum value, then continue to execute writing the first instruction as a PS terminal instruction to memory via the first port;

[0103] If the first count value reaches the first maximum value, a first write-full signal is sent to the PL terminal, and the system waits for the PL terminal to return a first read-empty signal.

[0104] When the first read empty signal is received from the PL terminal, the identifier value is switched from the first state value to the second state value, and the system waits for the PL terminal to return the second write full signal.

[0105] When a second write-full signal is received from the PL terminal, the acquired data is read from the memory via the first port based on the control of the second state value.

[0106] Determine whether the second count value corresponding to the first port has reached the second maximum value;

[0107] If the second count value does not reach the second maximum value, the process continues to read the acquired data from the memory via the first port;

[0108] If the second count value reaches the second maximum value, then one data read is completed.

[0109] Furthermore, the PS pin M_AXI_GP0 is connected to the first interface board Axi_periph pin S00_AXI, the PS pin IRQ_F2P is connected to the second interface board Axi Gpio pin Ip2intc_irpc, the PS pin FIXED_IO and pin GPIO_0_0 are connected to the PL pin FIXED_IO and pin GPIO_0_0 respectively, the second interface board Axi Gpio pin S_axi is connected to the first interface board Axi_periph pin M00_axi, the first interface board Axi_periph pin M01_axi is connected to the third interface board Axi_bram_ctrl pin S_axi, the second interface board AxiGpio pin GPIO is connected to the PL pin GPIO, the third interface board Axi_bram_ctrl pin BRAM_A is connected to the memory pin BRAM_A, and the memory pin BRAM_B is connected to the PL pin BRAM_B.

[0110] Furthermore, the PL terminal includes a top layer, a middle layer, and a bottom layer. The top layer pins Gpio_1, FCLK_CLK0, FCLK_RESET_N_0, Bram_addr_a, Bram_wrdata_a, addrb, dinb, enb, and web are respectively connected to the middle layer pins Gpio_1, Fpga_clk_i, rstn, bram_addr_a, bram_wrdata_a, addrb, dinb, enb, and web. The middle layer pins Fpga_clk_i, Adc_data_0, Ps_set_code, and Ps_set_data are respectively connected to the bottom layer pins Sys_clk, Adc_data, Ps_set_code, and Ps_set_data. The bottom layer pins SPI are connected to external hardware. The top layer pins Gpio_0 and Gpio_2 are respectively connected to external hardware.

[0111] Compared with existing technologies, the multi-channel differential pressure real-time measurement method and system provided in this application, through collaborative interaction between the PS and PL terminals, forms a corresponding closed-loop communication logic. The PS terminal receives and identifies instructions from the host computer, while the PL terminal is responsible for instruction execution. This improves the accuracy and reliability of the data. Furthermore, it achieves parallel read / write operations. By switching the identifier value, it controls the independent data read / write operations of the two ports of the memory. The read / write operations of the first and second ports are completely separated, greatly improving throughput. The two ports adopt a write-first mode and an independent address space design, eliminating the risk of read / write conflicts and increasing the number of concurrent detection channels and detection frequency. Attached Figure Description

[0112] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0113] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0114] Figure 1 This is a schematic diagram of the logic structure of a multi-channel differential pressure real-time measurement system provided in an embodiment of the present invention;

[0115] Figure 2 A schematic diagram of the logic structure of the PL terminal of a multi-channel differential pressure real-time measurement system provided in an embodiment of the present invention;

[0116] Figure 3 This is a flowchart illustrating a multi-channel differential pressure real-time measurement method according to an embodiment of the present invention.

[0117] Figure 4 A flowchart illustrating a multi-channel differential pressure real-time measurement method according to another embodiment of the present invention;

[0118] Figure 5 A flowchart illustrating a multi-channel differential pressure real-time measurement method according to another embodiment of the present invention;

[0119] Figure 6 A flowchart illustrating a multi-channel differential pressure real-time measurement method according to another embodiment of the present invention;

[0120] Figure 7 A flowchart illustrating a multi-channel differential pressure real-time measurement method according to another embodiment of the present invention;

[0121] Figure 8 A flowchart illustrating a multi-channel differential pressure real-time measurement method according to another embodiment of the present invention;

[0122] Figure 9 A flowchart illustrating a multi-channel differential pressure real-time measurement method according to another embodiment of the present invention;

[0123] Figure 10 A flowchart illustrating a multi-channel differential pressure real-time measurement method according to another embodiment of the present invention;

[0124] Figure 11 This is a flowchart illustrating a multi-channel differential pressure real-time measurement method according to another embodiment of the present invention. Detailed Implementation

[0125] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0126] The purpose of this invention is to address the current technical problems of slow speed, low accuracy, and limited channels in real-time multi-channel differential pressure measurement.

[0127] To address the aforementioned technical problems, this application provides a multi-channel differential pressure real-time measurement system, which is applied to an electronic pressure scanning valve.

[0128] Specifically, such as Figure 1 As shown in the figure, a multi-channel differential pressure real-time measurement system provided in this application includes: PS terminal 01, PL terminal 02 and memory 03. PS terminal 01 is connected to the first port BRAM_A1 of memory 03 via the first interface board Axi_periph, the second interface board Axi Gpio and the third interface board Axi_bram_ctrl. PL terminal 02 is connected to the second port BRAM_B1 of memory 03.

[0129] In this embodiment, PS terminal 01 is a lower-level ARM processor system, which integrates a memory controller and numerous peripherals. PL terminal 02 is a lower-level FPGA section. The first interface board, Axi_periph, is a series of peripheral interfaces in the AXI bus system, communicating with the processor or other system components via the AXI bus. The second interface board, Axi GPIO IP core, provides flexibility for system design, allowing designers to control GPIO (General-Purpose Input / Output) pins through the AXI interface to implement input / output functions, and the operating mode of the GPIO pins can be configured via software. The third interface board, Axi_bram_ctrl, is mainly used to implement data interaction between the AXI interface and memory 03.

[0130] In this embodiment, memory 03 is a BRAM (Block RAM) or Blockmemory, used as data storage space for data interaction between PL terminal 02 and PS terminal 01. The BRAM type selected is True Dual Port RAM, where one port is configured for read mode and the other for write mode, supporting independent read and write operations. The data bit width and depth match system requirements, avoiding resource waste.

[0131] Specifically, pin M_AXI_GP0 of PS terminal 01 is connected to pin S00_AXI of the first interface board Axi_periph; pin IRQ_F2P of PS terminal is connected to pin Ip2intc_irpc of the second interface board Axi Gpio; pins FIXED_IO and GPIO_0_0 of PS terminal are connected to pins FIXED_IO and GPIO_0_0 of PL terminal respectively; pin S_axi of the second interface board Axi Gpio is connected to pin M00_axi of the first interface board Axi_periph; pin M01_axi of the first interface board Axi_periph is connected to pin S_axi of the third interface board Axi_bram_ctrl; pin GPIO of the second interface board Axi Gpio is connected to pin GPIO of PL terminal; pin BRAM_A of the third interface board Axi_bram_ctrl is connected to pin BRAM_A of memory; and pin BRAM_B of memory is connected to pin BRAM_B of PL terminal.

[0132] PS terminal 01 provides a stable clock signal to the first interface board Axi_periph, the second interface board Axi GPIO, the third interface board Axi_bram_ctrl, memory 03, and PL terminal 02 by dividing the frequency of the PLL phase-locked loop to a 50MHz clock frequency. PS terminal 01 sends and reads relevant addresses and data to the second interface board Axi GPIO and the third interface board Axi_bram_ctrl via the AXI bus. The third interface board Axi_bram_ctrl performs read and write operations through the first port BRAM_A1, and PL terminal 02 performs read and write operations to memory 03 through the second port BRAM_B1. PL terminal 02 provides the corresponding interrupt signal to the PS terminal through the GPIO_0 pin, and PS terminal 01 receives and provides external interrupts through the irq_f2p pin.

[0133] Further, refer to Figure 2 The PL terminal 02 includes: a top-level System_i, a middle-level Ps_ddr_write, and a bottom-level Adc_0. The pins Gpio_1, FCLK_CLK0, FCLK_RESET_N_0, Bram_addr_a, Bram_wrdata_a, addrb, dinb, enb, and web of the top-level System_i are respectively connected to the pins Gpio_1, Fpga_clk_i, rstn, bram_addr_a, bram_wrdata_a, addrb, dinb, enb, and web of the middle-level Ps_ddr_write. In this embodiment, the bottom-level Adc_n can have multiple data acquisition chips, see reference... Figure 2 Taking two data acquisition chips, Adc_0 and Adc_1, as an example, we can illustrate the specific relationship between the intermediate layer Ps_ddr_write and the underlying layer Adc_0. The pins Fpga_clk_i, Adc_data_0, Ps_set_code, and Ps_set_data of the intermediate layer Ps_ddr_write are connected to the pins Sys_clk, Adc_data, Ps_set_code, and Ps_set_data of each data acquisition chip in the underlying layer Adc_n, respectively. The pins SPI of each data acquisition chip in the underlying layer Adc_n are connected to external hardware. The pins Gpio_0 and Gpio_2 of the top layer System_i are connected to external hardware, respectively.

[0134] Corresponding to the multi-channel differential pressure real-time measurement system disclosed above, this invention also discloses a multi-channel differential pressure real-time measurement method. The following details a multi-channel differential pressure real-time measurement method disclosed in this invention, in conjunction with the multi-channel differential pressure real-time measurement system described above.

[0135] The following is a detailed description of the specific steps of a multi-channel differential pressure real-time measurement method provided in the embodiments of this application.

[0136] In this embodiment, the PS terminal 01 and the PL terminal 02 cooperate and interact to form a corresponding closed-loop communication logic.

[0137] like Figure 3 As shown below, the execution steps of PS terminal 01 will be explained first.

[0138] The identifier value is initialized to the first state value, and the host computer instruction is received; it is determined whether the host computer instruction is the first instruction; if the host computer instruction is the first instruction, the first instruction is written as the PS terminal instruction to memory 03 via the first port BRAM_A1 based on the control of the first state value.

[0139] In this embodiment, the first instruction is a data acquisition instruction. The read / write mode setting for memory 03 adopts a write-first mode to prevent conflicts when read operations on the first port BRAM_A1 and write operations on the second port BRAM_B1, or vice versa, simultaneously access the same address. Furthermore, the wea (write enable) signal is configured via the AXI4-Lite interface. For example, setting the wea signal of the first port BRAM_A1 to 0 (disabling write operations) allows only reads; simultaneously, setting the wea signal of the second port BRAM_B1 to 1 (enabling write operations) allows only writes.

[0140] Furthermore, in this embodiment, sampling read / write separation and read / write state switching control logic are implemented. For example, in the initial state: the first port BRAM_A1 is a write buffer, and the second port BRAM_B1 is a read buffer. A flag value is used to control the read / write operations and switching between the first port BRAM_A1 and the second port BRAM_B1. The flag_reg value has a width of 1 bit, and its initial state value is 0. That is, when flag_reg=0, the first port BRAM_A1 is only allowed to write, while the second port BRAM_B1 is only allowed to read; when flag_reg=1, the first port BRAM_A1 is only allowed to read, while the second port BRAM_B1 is only allowed to write.

[0141] Determine whether the first count value corresponding to the first port BRAM_A1 has reached the first maximum value; if the first count value has not reached the first maximum value, continue to execute the first instruction written as a PS terminal instruction to memory 03 via the first port BRAM_A1; if the first count value has reached the first maximum value, send the first write full signal to the PL terminal and wait for the PL terminal 02 to return the first read empty signal.

[0142] In this embodiment, a first count value is set for the first port BRAM_A1. The first count value is used to count the number of bits written to the host computer instruction at the first port. Before performing a write operation on memory 03 through the first port BRAM_A1, the first count value is initialized to 0. For example, the first maximum value can be 1.

[0143] When the first read empty signal is received from PL terminal 02, the identifier value is switched from the first state value to the second state value, and the system waits for PL terminal 02 to return the second write full signal. When the second write full signal is received from PL terminal 02, the system reads the collected data from memory 03 via the first port BRAM_A1 based on the control of the second state value.

[0144] In this embodiment of the application, the second state value can be set to 1.

[0145] Determine whether the second count value corresponding to the first port BRAM_A1 has reached the second maximum value; if the second count value has not reached the second maximum value, continue to read the collected data from memory 03 via the first port BRAM_A1; if the second count value has reached the second maximum value, complete one data read.

[0146] In this embodiment, a second count value is set corresponding to the first port BRAM_A1. The second count value is used to count the number of read address bits of the acquired data at the second port. Before performing a read operation on memory 03 through the first port BRAM_A1, the second count value is initialized to 0. For example, the second maximum value can be 32.

[0147] This corresponds to the execution steps of PS terminal 01 described above. (See reference) Figure 4 and Figure 5 The following describes the execution steps of PL terminal 02.

[0148] refer to Figure 4 The top-level System_i performs the following steps: receiving a first write-full signal from PS terminal 01; and reading PS terminal instructions from memory 03 via the second port BRAM_B1 based on a status value control.

[0149] Determine whether the third count value corresponding to the second port BRAM_B1 has reached the third maximum value; if the third count value has not reached the third maximum value, continue to execute the instruction to read the PS terminal from memory 03 via the second port BRAM_B1; if the third count value has reached the third maximum value, return the first read empty signal to the PS terminal 01, and send the PS terminal instruction to the underlying Adc_n via the intermediate layer Ps_ddr_write, and wait for the collected data returned from the underlying Adc_n.

[0150] In this embodiment, a third count value is set for the second port BRAM_B1. The third count value is used to count the number of read address bits of the PS terminal instruction at the second port. Before performing a read operation on memory 03 through the second port BRAM_B1, the third count value is initialized to 0. For example, the third maximum value can be 1.

[0151] When the merged acquisition data is received from the intermediate layer Ps_ddr_write, based on the control of the second state value, the merged acquisition data is written to memory 03 via the second port BRAM_B1.

[0152] Determine whether the fourth count value corresponding to the second port BRAM_B1 has reached the fourth maximum value; if the fourth count value has not reached the fourth maximum value, continue to execute writing the merged acquisition data into the memory 03 via the second port BRAM_B1; if the fourth count value has reached the fourth maximum value, send the second write-full signal to the PS terminal 01.

[0153] In this embodiment, a fourth count value is set for the second port BRAM_B1. This fourth count value is used to count the number of bits written to the acquired data address on the second port. Before performing a write operation on memory 03 through the second port BRAM_B1, the fourth count value is initialized to 0. For example, the fourth maximum value can be 32.

[0154] In this embodiment, the write operation can be performed by the DMA controller writing raw data to the second port BRAM_B1 (address range 0x2000-0x3FFF) of memory 03 via the AXI4-Stream interface. In the above write operation, the address increments, the AXI4-Stream interface is configured in INCR burst mode, transmitting 512 data packets at a time, with a bandwidth of up to 1.6GB / s.

[0155] In this embodiment of the application, the read operation can be performed by a preprocessing module (such as a convolution operation unit) to read data (address range 0x0000-0x1FFF) from the first port BRAM_A1 of memory 03.

[0156] In this embodiment, a low-latency design is adopted, with independent clocks used for the read and write ports, and cross-clock domain data synchronization achieved through an asynchronous FIFO. The identifier value switching logic uses a combinational circuit with a latency of less than or equal to 5ns.

[0157] refer to Figure 5 The underlying Adc_n performs the following steps: receiving the PS terminal instructions; initializing the data acquisition chips corresponding to each channel; reading the received PS terminal instructions and having the data acquisition chips corresponding to each channel perform the corresponding operations.

[0158] The system monitors whether the acquired data of each channel has been updated. If the acquired data of each channel has not been updated, the corresponding data acquisition chip of each channel continues to perform the corresponding operation. If the acquired data of each channel has been updated, the acquired data of each channel is merged by the intermediate layer Ps_ddr_write and sent to the top layer System_i.

[0159] Further, refer to Figure 6 In another embodiment of this application, the multi-channel differential pressure real-time measurement method disclosed above further includes the following steps performed by the PS terminal 01.

[0160] After sending the first write-full signal to PL terminal 02, initialize the fifth count value to 0; monitor whether an error code is received from PL terminal 02.

[0161] If an error code is received from PL terminal 02, the fifth count value is incremented by 1; it is then determined whether the fifth count value is greater than the first preset threshold; if the fifth count value is greater than the first preset threshold, the first abnormal data is uploaded to the host computer, and the system waits to receive the next host computer instruction; if the fifth count value is less than or equal to the first preset threshold, the system continues to monitor whether an error code is received from PL terminal 02.

[0162] In this embodiment of the application, the first preset threshold can be 3.

[0163] If no error code is received from PL terminal 02, wait for PL terminal 02 to return the first read empty signal and start recording the waiting time; determine whether the waiting time is greater than the second preset threshold; if the waiting time is greater than the second preset threshold, upload the second abnormal data to the host computer and wait to receive the next host computer instruction; if the waiting time is less than or equal to the second preset threshold, continue to wait for PL terminal 02 to return the first read empty signal and continue to record the waiting time.

[0164] In this embodiment of the application, the second preset threshold can be 1 minute.

[0165] Further, refer to Figure 7 Corresponding to the execution steps of PS terminal 01, the multi-channel differential pressure real-time measurement method disclosed in the above embodiments of this application also includes the following steps executed by PL terminal 02.

[0166] After reading the PS instruction from memory 03 via the second port BRAM_B1, it is determined whether the PS instruction conforms to the preset communication protocol. If the PS instruction does not conform to the preset communication protocol, an error code is returned to PS port 01. If the PS instruction conforms to the preset communication protocol, it is determined whether the third count value corresponding to the second port BRAM_B1 has reached the third maximum value.

[0167] Further, refer to Figure 8 In another embodiment of this application, the multi-channel differential pressure real-time measurement method disclosed above further includes the following steps performed by the PS terminal 01.

[0168] The system retrieves the number of data to be uploaded from the first instruction; upon completion of a data read, it uploads the read data to the host computer and records the number of times the data has been uploaded; it determines whether the current number of data uploaded is greater than or equal to the number of data to be uploaded; if the current number of data uploaded is less than the number of data to be uploaded, it waits for the PL terminal 02 to return the next second write-full signal; if the current number of data uploaded is greater than or equal to the number of data to be uploaded, it switches the identifier value from the second state value to the first state value and waits to receive the next host computer instruction.

[0169] Further, refer to Figure 9 In another embodiment of this application, the multi-channel differential pressure real-time measurement method disclosed above further includes the following steps performed by the PS terminal 01.

[0170] The system retrieves the number of data uploads and data calibration information from the first instruction. When a data read is completed, it calculates the actual value using the read original value, zero point value, and overall range. Based on the data calibration information, it determines whether the uploaded data needs temperature calibration. If the uploaded data does not need temperature calibration, it uploads the calculated actual value to the host computer and records the number of times the data has been uploaded.

[0171] In this embodiment of the application, the formula for calculating the above-mentioned actual value is as follows:

[0172] adc_data= (raw_data-zero_value) / zero_value·range

[0173] Where adc_data is the actual value, raw_data is the original value, zero_value is the zero point value, and range is the overall range.

[0174] If temperature calibration is required for the uploaded data, the fitted value is calculated using the actual value and the calibration coefficient; the calculated fitted value is then uploaded to the host computer, and the number of times the data has been uploaded is recorded.

[0175] In this embodiment of the application, the formula for calculating the above-mentioned fitted value is:

[0176] pressure_value=A·adc_data·adc_data+B·adc_data+C

[0177] Where pressure_value is the fitted value, A is the coefficient of the quadratic term, B is the coefficient of the linear term, C is the constant term, and A, B, and C are all calibration coefficients;

[0178] Determine if the number of times the current data has been uploaded is greater than or equal to the number of times the data is yet to be uploaded; if the number of times the current data has been uploaded is less than the number of times the data is yet to be uploaded, wait for PL terminal 2 to return the next second write-full signal; if the number of times the current data has been uploaded is greater than or equal to the number of times the data is yet to be uploaded, switch the flag value from the second state value to the first state value, and wait to receive the next host computer instruction.

[0179] Further, refer to Figure 10 In another embodiment of this application, the multi-channel differential pressure real-time measurement method disclosed above further includes the following steps performed by the PS terminal 01.

[0180] If the host computer instruction is not the first instruction, then determine whether the host computer instruction is the second instruction; if the host computer instruction is not the second instruction, then upload the third abnormal data to the host computer and wait to receive the next host computer instruction.

[0181] In this embodiment of the application, the second instruction includes a stop acquisition instruction and a set acquisition frequency instruction.

[0182] If the host computer instruction is the second instruction, then based on the control of the first status value, the second instruction is written into memory 03 as a PS terminal instruction via the first port BRAM_A1; it is determined whether the first count value corresponding to the first port BRAM_A1 has reached the first maximum value; if the first count value has not reached the first maximum value, then the process of writing the second instruction into memory 03 as a PS terminal instruction via the first port continues; if the first count value has reached the first maximum value, then a third write-full signal is sent to the PL terminal, and the process waits for the PL terminal to return a second read-empty signal.

[0183] When the second read empty signal is received from PL terminal 02, the flag value is switched from the first state value to the second state value, and the system waits for the fourth write full signal to be returned from PL terminal 02. When the fourth write full signal is received from PL terminal 02, based on the control of the second state value, the system reads the execution response information from memory 03 via the first port BRAM_A1. The system determines whether the second count value corresponding to the first port BRAM_A1 has reached the second maximum value. If the second count value has not reached the second maximum value, the system continues to read the execution response information from memory 03 via the first port BRAM_A1. If the second count value has reached the second maximum value, the flag value is switched from the second state value to the first state value, and the system waits to receive the next host computer instruction.

[0184] Further, refer to Figure 11 Corresponding to the execution steps of PS terminal 01 mentioned above, the multi-channel differential pressure real-time measurement method disclosed in the above embodiment of this application also includes the following steps executed by the top-level System_i of PL terminal 02.

[0185] Receive the third write-full signal from PS terminal 01; based on the control of the first state value, read the PS terminal instruction from memory 03 via the second port BRAM_B1; determine whether the third count value corresponding to the second port BRAM_B1 has reached the third maximum value; if the third count value has not reached the third maximum value, continue to execute the reading of the PS terminal instruction from memory 03 via the second port BRAM_B1; if the third count value has reached the third maximum value, return the second read-empty signal to PS terminal 01, and send the PS terminal instruction to the underlying Adc_n via the intermediate layer Ps_ddr_write, and wait for the execution response information returned from the underlying Adc_n.

[0186] When the execution response information returned from the underlying Adc_n is received from the intermediate layer Ps_ddr_write, based on the control of the second status value, the execution response information is written to memory 03 via the second port BRAM_B1; it is determined whether the fourth count value corresponding to the second port BRAM_B1 has reached the fourth maximum value; if the fourth count value has not reached the fourth maximum value, the execution response information is written to memory 03 via the second port BRAM_B1; if the fourth count value has reached the fourth maximum value, a second write-full signal is sent to the PS terminal 01.

[0187] Compared with existing technologies, the multi-channel differential pressure real-time measurement method and system provided in this application, through collaborative interaction between the PS and PL terminals, forms a corresponding closed-loop communication logic. The PS terminal receives and identifies instructions from the host computer, while the PL terminal is responsible for instruction execution. This improves the accuracy and reliability of the data. Furthermore, it achieves parallel read / write operations. By switching the identifier value, it controls the independent data read / write operations of the two ports of the memory. The read / write operations of the first and second ports are completely separated, greatly improving throughput. The two ports adopt a write-first mode and an independent address space design, eliminating the risk of read / write conflicts and increasing the number of concurrent detection channels and detection frequency.

[0188] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A method for real-time measurement of multi-channel differential pressure, characterized in that, The method includes the following steps performed by the PS terminal: Initialize the identifier value to the first state value and receive instructions from the host computer; Determine whether the host computer instruction is the first instruction; If the host computer instruction is the first instruction, then based on the control of the first state value, the first instruction is written into the memory as a PS terminal instruction via the first port; Determine whether the first count value corresponding to the first port has reached the first maximum value; If the first count value does not reach the first maximum value, then continue to execute writing the first instruction as a PS terminal instruction to memory via the first port; If the first count value reaches the first maximum value, then send the first full signal to the PL terminal; Initialize the fifth counter value to 0; Monitor whether an error code is received from the PL terminal; If an error code is received from the PL terminal, the fifth counter value is incremented by 1. Determine whether the fifth count value is greater than the first preset threshold; If the fifth count value is greater than the first preset threshold, the first abnormal data is uploaded to the host computer, and the system waits to receive the next host computer instruction. If the fifth count value is less than or equal to the first preset threshold, then continue monitoring to see if an error code is received from the PL terminal.

2. The multi-channel differential pressure real-time measurement method as described in claim 1, characterized in that, The method further includes: If no error code is received from the PL terminal, wait for the PL terminal to return the first read empty signal and start recording the waiting time; Determine whether the waiting time is greater than a second preset threshold; If the waiting time exceeds the second preset threshold, the second abnormal data is uploaded to the host computer, and the system waits to receive the next host computer instruction. If the waiting time is less than or equal to the second preset threshold, then continue to wait for the PL terminal to return the first read empty signal, and continue to record the waiting time.

3. The multi-channel differential pressure real-time measurement method as described in claim 2, characterized in that, The method further includes: When the first read empty signal is received from the PL terminal, the identifier value is switched from the first state value to the second state value, and the system waits for the PL terminal to return the second write full signal. When a second write-full signal is received from the PL terminal, the acquired data is read from the memory via the first port based on the control of the second state value. Determine whether the second count value corresponding to the first port has reached the second maximum value; If the second count value does not reach the second maximum value, the process continues to read the acquired data from the memory via the first port; If the second count value reaches the second maximum value, then one data read is completed.

4. The multi-channel differential pressure real-time measurement method as described in claim 3, characterized in that, The method further includes: The following steps are executed by the PL: The following steps are executed by the top level: Receive the first write-full signal from the PS terminal; Based on the control of the first state value, PS terminal instructions are read from the memory via the second port; Determine whether the third count value corresponding to the second port has reached the third maximum value; If the third count value does not reach the third maximum value, the instruction to read the PS terminal from the memory via the second port continues to be executed; If the third count value reaches the third maximum value, a first read empty signal is returned to the PS terminal, and the PS terminal instruction is sent down to the bottom layer through the intermediate layer, and the collected data is waited for from the bottom layer. When the merged acquisition data is received from the intermediate layer, the merged acquisition data is written to the memory via the second port based on the control of the second state value. Determine whether the fourth count value corresponding to the second port has reached the fourth maximum value; If the fourth count value does not reach the fourth maximum value, the process continues to write the merged acquisition data to the memory via the second port. If the fourth count value reaches the fourth maximum value, a second write-full signal is sent to the PS terminal; and The following steps are performed from the underlying layer: Receive the PS terminal command sent from the terminal; Initialize the data acquisition chips corresponding to each channel; The received PS terminal command is read and the corresponding data acquisition chip of each channel executes the corresponding operation; Monitor whether the data collected from each channel has been updated; If the data collected by each channel has not been updated, the corresponding data acquisition chip for each channel will continue to perform the corresponding operation. If the data collected from each channel is updated, the data collected from each channel is merged by the intermediate layer and sent to the top layer.

5. The multi-channel differential pressure real-time measurement method as described in claim 4, characterized in that, The method further includes: the following steps being performed by the PL end: After reading the PS terminal instruction from the memory via the second port, it is determined whether the PS terminal instruction conforms to the preset communication protocol; If the PS terminal command does not conform to the preset communication protocol, an error code is returned to the PS terminal; If the PS terminal instruction conforms to the preset communication protocol, then it is determined whether the third count value corresponding to the second port has reached the third maximum value.

6. The multi-channel differential pressure real-time measurement method as described in claim 5, characterized in that, The method further includes: the following steps being performed by the PS terminal: Obtain the number of times data is to be uploaded from the first instruction; When a data read is completed, the read data is uploaded to the host computer, and the number of times the data has been uploaded is recorded. Determine whether the number of times the current data has been uploaded is greater than or equal to the number of times the data is yet to be uploaded; If the number of times the current data has been uploaded is less than the number of times the data is yet to be uploaded, then wait for the PL terminal to return the next second full write signal; If the number of times the current data has been uploaded is greater than or equal to the number of times the data is to be uploaded, the identifier value is switched from the second state value to the first state value, and the system waits to receive the next instruction from the host computer.

7. The multi-channel differential pressure real-time measurement method as described in claim 6, characterized in that, The method further includes: the following steps being performed by the PS terminal: Obtain the number of times data needs to be uploaded and data calibration information from the first instruction; Upon completion of a data read, the actual value is calculated using the original value, zero-point value, and overall measurement range. The formula for calculating the actual value is as follows: adc_data= (raw_data-zero_value) / zero_value·range Where, adc_data is the actual value, raw_data is the original value, zero_value is the zero point value, and range is the overall range; Based on the data calibration information, determine whether the uploaded data needs temperature calibration; If temperature calibration is not required for the uploaded data, the calculated actual value will be uploaded to the host computer, and the number of times the data has been uploaded will be recorded.

8. The multi-channel differential pressure real-time measurement method as described in claim 7, characterized in that, The method further includes: the following steps being performed by the PS terminal: If the uploaded data requires temperature calibration, the fitted value is calculated using the calculated actual value and the calibration coefficient. The formula for calculating the fitted value is as follows: pressure_value=A·adc_data·adc_data+B·adc_data+C Where pressure_value is the fitted value, A is the coefficient of the quadratic term, B is the coefficient of the linear term, C is the constant term, and A, B, and C are all calibration coefficients; Upload the calculated fitted values ​​to the host computer and record the number of times the data has been uploaded; Determine whether the number of times the current data has been uploaded is greater than or equal to the number of times the data is yet to be uploaded; If the number of times the current data has been uploaded is less than the number of times the data is yet to be uploaded, then wait for the PL terminal to return the next second full write signal; If the number of times the current data has been uploaded is greater than or equal to the number of times the data is to be uploaded, the identifier value is switched from the second state value to the first state value, and the system waits to receive the next instruction from the host computer.

9. A multi-channel differential pressure real-time measurement method as described in any one of claims 1 to 8, characterized in that, The method further includes: The following steps are executed by the PS side: If the host computer instruction is not the first instruction, then determine whether the host computer instruction is the second instruction; If the host computer instruction is not the second instruction, then upload the third abnormal data to the host computer and wait to receive the next host computer instruction; If the host computer instruction is the second instruction, then based on the control of the first status value, the second instruction is written into the memory as a PS terminal instruction via the first port; Determine whether the first count value corresponding to the first port has reached the first maximum value; If the first count value does not reach the first maximum value, then continue to execute writing the second instruction as a PS terminal instruction to memory via the first port; If the first count value reaches the first maximum value, a third write-full signal is sent to the PL terminal, and the system waits for the PL terminal to return a second read-empty signal. When the second read empty signal is received from the PL terminal, the identifier value is switched from the first state value to the second state value, and the system waits for the PL terminal to return the fourth write full signal. When a fourth write-full signal is received from the PL terminal, the execution response information is read from the memory via the first port based on the control of the second state value. Determine whether the second count value corresponding to the first port has reached the second maximum value; If the second count value does not reach the second maximum value, the execution continues to read the execution response information from the memory via the first port; If the second count value reaches the second maximum value, the identifier value is switched from the second state value to the first state value, and the system waits to receive the next instruction from the host computer; and The following steps are executed by the PL: The following steps are executed by the top level: Receive the third write-full signal from the PS terminal; Based on the control of the first state value, PS terminal instructions are read from the memory via the second port; Determine whether the third count value corresponding to the second port has reached the third maximum value; If the third count value does not reach the third maximum value, the instruction to read the PS terminal from the memory via the second port continues to be executed; If the third count value reaches the third maximum value, a second read empty signal is returned to the PS terminal, and the PS terminal instruction is sent down to the bottom layer through the intermediate layer, and the execution response information is waited for from the bottom layer. When the execution response information returned from the lower layer is received from the intermediate layer, the execution response information is written to the memory via the second port based on the control of the second status value. Determine whether the fourth count value corresponding to the second port has reached the fourth maximum value; If the fourth count value does not reach the fourth maximum value, execution continues and the execution response information is written to memory via the second port; If the fourth count value reaches the fourth maximum value, a second write-full signal is sent to the PS terminal.

10. A multi-channel differential pressure real-time measurement system, characterized in that, The system includes a PS terminal, a PL terminal, and a memory. The PS terminal is connected to the first port of the memory via a first interface board Axi_periph, a second interface board Axi Gpio, and a third interface board Axi_bram_ctrl. The PL terminal is connected to the second port of the memory. The PS terminal is used to perform the following steps: Initialize the identifier value to the first state value and receive instructions from the host computer; Determine whether the host computer instruction is the first instruction; If the host computer instruction is the first instruction, then based on the control of the first state value, the first instruction is written into the memory as a PS terminal instruction via the first port; Determine whether the first count value corresponding to the first port has reached the first maximum value; If the first count value does not reach the first maximum value, then continue to execute writing the first instruction as a PS terminal instruction to memory via the first port; If the first count value reaches the first maximum value, then send the first full signal to the PL terminal; Initialize the fifth counter value to 0; Monitor whether an error code is received from the PL terminal; If an error code is received from the PL terminal, the fifth counter value is incremented by 1. Determine whether the fifth count value is greater than the first preset threshold; If the fifth count value is greater than the first preset threshold, the first abnormal data is uploaded to the host computer, and the system waits to receive the next host computer instruction. If the fifth count value is less than or equal to the first preset threshold, then continue monitoring to see if an error code is received from the PL terminal.