Data transmission method and system based on arinc 659 bus, electronic equipment and storage medium
By dividing the ARINC659 bus window address space into two buffers, the problem of data errors caused by inconsistent read and write states between the sending and receiving ends was solved, thus achieving accurate data transmission and efficient resource utilization.
Patent Information
- Application Number
- CN202211320049.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-10-26
AI Technical Summary
During data transmission, the ARINC659 bus's window polling mechanism prevents the sending and receiving ends from obtaining the current read/write status, leading to data reading errors. This is especially true when the sending cycle is shorter than the receiving cycle, in which case the receiving end may read some old data and some new data, resulting in data loss or errors.
The ARINC659 bus window address space is divided into two buffers. The transmitting end and the receiving end use buffer A and buffer B respectively for data writing and reading. Read-write conflicts are avoided by updating the flags, thus ensuring the integrity of data transmission.
It effectively solves the ARINC659 bus read/write conflict problem, ensuring the accuracy of data transmission, while having low resource consumption and being easy to implement.
Smart Images

Figure CN115733707B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of airborne embedded computers, and in particular to a data transmission method and system based on an ARINC659 bus, an electronic device and a storage medium. BACKGROUND
[0002] The ARINC659 bus is a backplane bus with high fault tolerance and fixed partition in terms of bus transmission time and storage space. Its unique bus communication mechanism establishes a transmission path with multiple redundancies, strong isolation and high throughput between online replaceable modules (LRMs) in the rack, which is used to realize reliable, effective and universal data transmission in the avionics system.
[0003] The multiple redundancies are reflected in the "double-double" redundancy configuration of the ARINC659 bus interface. Each bus interface unit (BIU) is composed of an A bus and a B bus, and each LRM contains two bus interface units, BIUX and BIUY, i.e. there are four data buses, AX, AY, BX and BY. Each BIU receives all data from the four buses, thereby providing a complete redundancy fault tolerance mechanism. At the same time, the ARINC659 bus also cross-checks the data transmitted by the four data lines, further improving the fault tolerance of the bus.
[0004] The strong isolation is reflected in that the operation of the ARINC659 bus is divided into a series of windows by the table program inside the BIU, each window occupies an independent space for storing data to be sent and uses a polling method to execute the sending instruction in the fixed time of each bus cycle, so that the bus has the characteristics of "time sharing" and "partitioning". The program inside the BIU also specifies the sending LRM and receiving LRM of each window, as well as the corresponding sending and receiving start addresses and receiving addresses (the sending address and the receiving address are unique). All BIUs run the same program.
[0005] The high throughput is reflected in that the transmission time interval and the start address of each window have been set by the BIU internal program in advance, so that all the bandwidth of the bus is used to transmit valid data, improving the utilization and avoiding a series of complex procedures such as handshake between the sending and receiving ends.
[0006] In summary, as Figure 1As shown, a complete ARINC659 bus transmission process includes: the sending end fills the data to be updated into the corresponding address space of the designated window and starts the window sending instruction, the bus polls each window in turn according to the predetermined schedule, when polling the window to be updated (i.e. the window starting the sending instruction, if the instruction is not started, the window data transmission is not performed), the ARINC659 bus sends the data on the window to the designated address of the receiving end through 4 data lines, i.e. completes a transmission. For each message, the sending end and the receiving end actually operate on the same relative address space in the window, which is converted into the specific absolute address space in the sending end and the receiving end by the ARINC659 bus.
[0007] However, the above structure causes the following problems: since the ARINC659 bus adopts the window polling transmission mechanism, the sending end and the receiving end cannot obtain the current read-write state of both sides, and the window does not have read-write lock, so when the data update of the sending end is fast, there is a case that the receiving end is reading data while the ARINC659 bus writes the data of the next cycle in the window into the receiving address. If the current transmission data is packet data, if the sending period of the sending end is less than the receiving period of the receiving end, part of the data read by the receiving end is the packet data of the current cycle, and the other part is the packet data of the next cycle which has been updated, causing serious consequences of data reading error, as shown in the following table. Figure 2 SUMMARY
[0008] In view of the data reading error problem caused by the read-write conflict of the ARINC659 bus, the embodiment of the application provides a data transmission method, system, electronic equipment and storage medium based on the ARINC659 bus, by dividing double buffer areas in the address space of the ARINC659 bus window, so that the sending end and the receiving end can write or read data from the corresponding addresses of different buffer areas in the window according to the size of the buffer update target, thereby avoiding the read-write conflict of the ARINC659 bus.
[0009] The embodiment of the application provides the following technical scheme: a data transmission method based on an ARINC659 bus, comprising:
[0010] The sending end window and the receiving end window of the ARINC659 bus are each divided into buffer area A and buffer area B;
[0011] The addresses of the update targets of the corresponding buffer areas are respectively specified in the buffer area A and the buffer area B of the sending end window and the receiving end window, and the initial value of the update target is 0;
[0012] When the sending end sends the packet data, first read the update tags corresponding to the buffer A and the buffer B of the sending end window of the ARINC659 bus, write the packet data to be sent currently into the corresponding buffer with smaller update tag value, and add 1 to the value of the update tag of the corresponding buffer;
[0013] Transmit the written packet data and the update tag of the corresponding buffer of the packet data to the corresponding buffer in the receiving end window through the ARINC659 bus;
[0014] When the receiving end reads the received data, first read the update tags corresponding to the buffer A and the buffer B of the receiving end window, and read the packet data sent in the current cycle from the corresponding buffer with larger update tag value.
[0015] According to an embodiment, when the sending end sends the packet data, if the values of the update tags corresponding to the buffer A and the buffer B of the sending end window are the same, write the packet data to be sent currently into the buffer A preferentially;
[0016] When the receiving end reads the received data, if the values of the update tags corresponding to the buffer A and the buffer B of the receiving end window are the same, read the data in the buffer B preferentially.
[0017] According to an embodiment, the storage space sizes of the buffer A and the buffer B are the same.
[0018] According to an embodiment, the end addresses of the buffer A and the buffer B of the sending end window and the receiving end window are respectively designated as the addresses of the update tags of the buffers.
[0019] The application further provides a data transmission system based on the ARINC659 bus, comprising an interface management module and a main processor module, the interface management module transmits the data packet to the main processor module through the ARINC659 bus;
[0020] The sending end window and the receiving end window of the ARINC659 bus are respectively provided with a buffer A and a buffer B, and the buffer A and the buffer B are respectively provided with corresponding update tags, and the initial value of the update tag is 0;
[0021] The interface management module is used for reading the update tags corresponding to the buffer A and the buffer B of the sending end window, writing the packet data to be sent currently into the corresponding buffer with smaller update tag value, and adding 1 to the value of the update tag of the corresponding buffer;
[0022] The main processor module is used for reading the update tags corresponding to the buffer A and the buffer B of the receiving end window, and reading the packet data sent in the current cycle from the corresponding buffer with larger update tag value.
[0023] According to an embodiment, the update flag is set at the end address of the buffer A and the buffer B.
[0024] According to an embodiment, the interface management module receives a data packet transmitted by an external RS422 bus.
[0025] The application further provides an electronic device, comprising a processor and a memory, wherein the memory stores instructions executable by the processor, and the processor can execute the instructions to implement the ARINC659 bus-based data transmission method.
[0026] The application further provides a storage medium, which stores a program executable by a processor to implement the ARINC659 bus-based data transmission method.
[0027] Compared with the prior art, the above at least one technical solution adopted by the embodiments of the present application can achieve at least the following beneficial effects: by dividing double buffers in the address space of the ARINC659 bus window, the embodiments of the present application enable the sending end and the receiving end to write or read data from the corresponding addresses of different buffers in the window according to the size of the buffer update flag, effectively solving the read-write conflict problem of the ARINC659 bus, and the method occupies small resources and is easy to implement. BRIEF DESCRIPTION OF DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0029] Figure 1 is a schematic diagram of an ARINC659 bus communication mechanism;
[0030] Figure 2 is a schematic diagram of read-write conflict when transmitting a data packet by the ARINC659 bus;
[0031] Figure 3 is an ARINC659 bus transmission structure diagram based on a double buffer mechanism in the embodiments of the present application;
[0032] Figure 4 is a sending end data sending flowchart in the embodiments of the present application;
[0033] Figure 5 is a receiving end data receiving flowchart in the embodiments of the present application. DETAILED DESCRIPTION
[0034] The embodiments of the present application will be described in detail below with reference to the drawings.
[0035] It should be noted that the embodiments and features in the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and in combination with the embodiments, and the technical solutions of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0036] As shown in the figure, the embodiment of the present application provides a data transmission method based on ARINC659 bus, comprising: Figures 3-5
[0037] The sending end window and the receiving end window of the ARINC659 bus are both divided into buffer area A and buffer area B with the same storage space size;
[0038] The end address of the buffer area A and the buffer area B of the sending end window and the receiving end window is respectively designated as the address of the update target of the buffer area, and the initial value of the update target is 0;
[0039] When the sending end sends packet data, the update marks corresponding to the buffer area A and the buffer area B of the sending end window of the ARINC659 bus are first read, the packet data to be currently sent is written into the corresponding buffer area with a smaller update mark value, and the value of the update mark of the corresponding buffer area is added by 1; if the values of the update marks corresponding to the buffer area A and the buffer area B of the sending end window are the same, the packet data to be currently sent is preferentially written into the buffer area A;
[0040] The written packet data and the update mark of the corresponding buffer area of the packet data are transmitted to the corresponding buffer area in the receiving end window through the ARINC659 bus;
[0041] When the receiving end reads the received data, the update marks corresponding to the buffer area A and the buffer area B of the receiving end window are first read, and the packet data sent in the current period is read from the corresponding buffer area with a larger update mark value; if the values of the update marks corresponding to the buffer area A and the buffer area B of the receiving end window are the same, the data in the buffer area B is preferentially read.
[0042] The embodiment of the present application divides two spaces with the same size in the window of the ARINC659 bus as double buffer areas, and the sending end and the receiving end write or read data from different buffer area corresponding addresses according to the size of the buffer area update mark, so as to avoid the read-write conflict of the ARINC659 bus.
[0043] The application will be further described in detail below in connection with specific embodiments.
[0044] As shown in the figure, the embodiment takes an airborne flight control computer as an example. The flight control computer comprises a main processor module (CPU) and an interface management module (IOM), the IOM is responsible for receiving data packets transmitted by an external RS422 bus and transmitting the data packets to the CPU via an ARINC659 bus. In order to ensure that the CPU can correctly receive all data in each cycle data packet, the method described in the application comprises the following steps: Figure 3 Step 1: two address spaces of the same size are divided in an ARINC659 bus window transmitted by the IOM to the CPU as double buffers, which are respectively denoted as double buffer A and double buffer B. The length of the RS422 bus transmission data packet is L, and the length of each buffer should be L+1, which is used to store data and a buffer update tag;
[0045] Step 2: initialize the ARINC659 bus window, and clear all data in the window address;
[0046] Step 3: when the IOM receives the current cycle RS422 bus transmission data packet, first read the update tags corresponding to the two buffers in the window, write the current packet data to be sent into the buffer with the smaller update tag, and write the update tag of the corresponding buffer into the window address space after adding 1 to the update tag, if the update tag values are the same, preferentially update buffer A. At this time, since the update tags corresponding to the two buffers are both 0, the buffer A is updated, and the update tag of the buffer A is added by 1 and becomes 1;
[0047] Step 4: the IOM starts to send the window after writing the data. The CPU reads the data within a specified time in the working cycle. First, read the update tags corresponding to the two buffers, and read the packet data to be sent in the current cycle from the buffer with the larger update tag, if the update tag values are the same, preferentially read the data in buffer B. At this time, according to step 3, since the update tag of buffer A is greater than that of buffer B, the data in buffer A is read.
[0048] Step 5: if the CPU reads the data at the same time, the ARINC659 bus transmits the RS422 bus data packet received by the IOM in the next cycle to the CPU. Since the update tag of buffer A is greater than that of buffer B, the IOM writes the data into buffer B, so at this time the data in the next cycle will be transmitted to the address corresponding to buffer B in the CPU end buffer via the ARINC659 bus, and will not cause read-write conflict with buffer A currently operated by the CPU, thereby ensuring correct transmission of the data.
[0049]
[0050] The electronic device of the embodiment of the present application comprises a processor and a memory, the memory stores instructions executable by the processor, and the processor can execute the instructions to implement the ARINC659 bus-based data transmission method described above. The electronic device of the embodiment of the present application can be a server.
[0051] In addition, the embodiment of the present application further provides a machine readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the ARINC659 bus-based data transmission method described in the above embodiment.
[0052] The ARINC659 bus-based data transmission method, if implemented in the form of a software function module and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or parts of the technical solutions that make essential contributions to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium, includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.
[0053] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A data transmission method based on the ARINC659 bus, characterized in that, include: The transmit and receive windows of the ARINC659 bus are divided into buffer A and buffer B, respectively. The address of the update target is specified in buffer A and buffer B of the sending end window and the receiving end window respectively, and the initial value of the update target is 0. When the transmitting end sends packet data, it first reads the update flags corresponding to buffer A and buffer B of the transmitting end window of the ARINC659 bus, writes the packet data to be sent to the buffer with the smaller update flag value, and increments the update flag value of the corresponding buffer by 1. The written packet data and the update flag of the corresponding buffer of the packet data are transmitted to the corresponding buffer in the receiving window through the ARINC659 bus. When the receiving end reads the received data, it first reads the update flags corresponding to buffer A and buffer B of the receiving end window, and then reads the packet data sent in this cycle from the buffer with the larger update flag value. When the sending end sends packet data, if the update values of the corresponding update targets in buffer A and buffer B of the sending end window are the same, the packet data to be sent will be written into buffer A first. When the receiving end reads received data, if the update values of buffer A and buffer B in the receiving end window are the same, the data in buffer B is read first. The storage space size of buffer A and buffer B is the same; The end addresses of buffer A and buffer B of the sending end window and the receiving end window, respectively, are designated as the addresses of the update targets of the buffers.
2. A data transmission system based on the ARINC659 bus, used to implement the method of claim 1, characterized in that, include: The interface management module and the main processor module are provided. The interface management module transmits data packets to the main processor module via the ARINC659 bus. The ARINC659 bus's transmitting and receiving windows are each configured with buffer A and buffer B, respectively. Each buffer A and buffer B is configured with a corresponding update flag, and the initial value of the update flag is 0. The interface management module is used to read the update flags corresponding to buffer A and buffer B of the sending end window, write the packet data to be sent to the corresponding buffer with the smaller update flag value, and increment the update flag value of the corresponding buffer by 1; The main processor module is used to read the update labels corresponding to buffer A and buffer B of the receiving end window, and read the packet data sent in the current cycle from the buffer with the larger update label value.
3. The data transmission system based on the ARINC659 bus according to claim 2, characterized in that, The update flag is set at the end address of buffer A and buffer B.
4. The data transmission system based on the ARINC659 bus according to claim 2, characterized in that, The interface management module receives data packets transmitted via an external RS422 bus.
5. An electronic device, characterized in that, It includes a processor and a memory, the memory storing instructions that can be executed by the processor to implement the data transmission method based on the ARINC659 bus as described in claim 1.
6. A storage medium storing a program thereon, which, when executed by a processor, implements the data transmission method based on the ARINC659 bus as described in claim 1.
Citation Information
Patent Citations
Initial written address selection method and device
CN103425437A
Data transmission method and device, computer-readable storage medium and terminal equipment
CN107967225A