Method and device for implementing virtual 1553b bus simulation based on TCPIP
Patent Information
- Application Number
- CN202310051872.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-02
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2043-02-02
AI Technical Summary
The development process of the existing 1553B bus network system requires a high-cost hardware environment, resulting in excessive time and material costs, and the verification of communication functions also depends on the hardware environment.
Using a TCP/IP-based approach, a mesh TCP/IP Internet is constructed through a bus controller and remote terminals to simulate a virtual 1553B bus, including the initialization of data structures and message processing interfaces for both the server and client, thus detaching it from the actual 1553B board hardware and bus interface.
It enables the development and verification of 1553B communication functions in a completely virtual environment, saving on hardware system purchase and environment setup costs. Developers can focus solely on the development and verification of communication functions.
Smart Images

Figure CN116048899B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to computer simulation technology, and more particularly to 1553B bus simulation technology. Background Technology
[0002] The 1553B bus standard is a serial multiplexed data bus standard published by the United States. It adopts a command / response communication protocol and has three types of terminals: bus controller (BC), remote terminal (RT), and bus monitor (BM). Due to its strong real-time transmission capability and extremely high reliability, the 1553B bus is widely used in electronic networking systems in aviation, aerospace, military and other fields.
[0003] In software engineering, when using the 1553B bus data protocol for communication function testing, a 1553B hardware test environment needs to be set up. This includes interfaces and 1553B boards that support the 1553B bus protocol. It also requires separate design and environment setup for specific 1553B bus networks. When system or test requirements change, the entire hardware environment needs to be redesigned and rebuilt. Therefore, using a hardware environment for the development and testing of 1553B bus network systems incurs high time and material costs.
[0004] Therefore, there is an urgent need for a bus emulation method and device to overcome the shortcomings of existing technologies. Summary of the Invention
[0005] In view of the problem that the development process of 1553B bus network system in the prior art requires high costs, the main objective of the present invention is to provide a simulation method and apparatus for developing and verifying 1553B communication functions without relying on the 1553B hardware environment.
[0006] To achieve the above objectives, this invention provides a method for simulating a virtual 1553B bus based on TCP / IP. The method includes: constructing a mesh TCP / IP internet using a bus controller and multiple remote terminals. The bus controller creates a server, and the remote terminals create clients. Corresponding data structures for virtual bus communication are created on the server and clients, and the server and clients are initialized based on these data structures. Both the server and clients have their own message processing interface and initialization interface. The initialization interface is used to initialize their respective data structures, which include message structures and mode status word structures. The server initiates 1553B bus communication with the client, waiting for the client's response and the client's return of the corresponding status word. After receiving the message from the server, the client calls the corresponding communication processing interface to process the message. This communication processing interface marks the corresponding message with a corresponding message tag and returns the corresponding status word of the message to the server. The server calls the corresponding communication processing interface to process the client's returned message. Processing the client's returned message includes: the communication processing interface identifies the location of the message in memory through the tag, parses the status word while segmenting the returned message, and then extracts the message parsing result.
[0007] As a preferred method, when the bus controller sends a message to a remote terminal, the data sent by the bus controller is extracted from the message, and a success status response is sent to the bus controller. When a remote terminal sends a message to the bus controller, the data to be sent is sent to the bus controller again via a group message frame. When one remote terminal sends a message to another remote terminal, the sending remote terminal directly sends the data to be sent to the receiving remote terminal.
[0008] As a preferred method, parsing the status word while segmenting the return message includes: filtering the word type of the corresponding status word through the pattern status word structure, and determining whether the transmission of the corresponding return message has ended based on the word type.
[0009] As a preferred method, processing client-returned messages also includes: writing the message parsing result into a message structure; and sending the message parsing result to the client by calling the corresponding communication processing interface.
[0010] As a preferred approach, the mode state word structure is an attribute mapping table for the state word, which includes the word type, the associated message type, and the word value.
[0011] As a preferred method, the message parsing result includes message type, remote terminal address, remote terminal sub-address, and command data.
[0012] As a preferred approach, the message structure includes the message type and the number of its corresponding words, the message status, the message flag, and the message content.
[0013] As a preferred embodiment, the data structure also includes a bus controller structure, a terminal structure, a register address, a memory address, a bus controller descriptor structure, and a terminal descriptor structure.
[0014] As a preferred approach, the status word includes both control words and command words.
[0015] As a preferred embodiment, this invention provides an apparatus for simulating a virtual 1553B bus based on TCP / IP, comprising a bus controller and a mesh TCP / IP internet consisting of multiple remote terminals. The bus controller creates a server, and the remote terminals create clients. Corresponding data structures for virtual bus communication are created on the server and clients, and the server and clients are initialized according to the data structures. Both the server and clients have their own message processing interface and initialization interface. The initialization interface is used to initialize their respective data structures, which include message structures and mode status word structures. The server initiates 1553B bus communication to the client, waiting for the client's response and the client's return of the corresponding status word for the message. After receiving the message sent by the server, the client calls the corresponding communication processing interface to process the message. This communication processing interface marks the corresponding message with a corresponding message tag and returns the corresponding status word of the message to the server. The server calls the corresponding communication processing interface to process the client's returned message. Processing the client's returned message includes: the communication processing interface identifies the location of the message in memory through the tag, parses the status word while segmenting the returned message, and then extracts the message parsing result.
[0016] This invention provides a method and apparatus for simulating a virtual 1553B bus based on TCP / IP, realizing a 1553B bus network system in a completely virtual environment. This system features a virtual 1553B bus based on the TCP / IP protocol that allows for the development and verification of 1553B communication functions without relying on a physical 1553B hardware environment, and a simulation terminal that operates independently of real 1553B board hardware and bus interfaces. On one hand, this invention overcomes the problem of high costs associated with the development of existing 1553B bus network systems, significantly saving on the expenses of purchasing 1553B hardware and the time cost of setting up the system environment. On the other hand, this invention effectively overcomes the problem of existing technologies requiring a 1553B hardware environment for the development and verification of 1553B communication functions, allowing developers to focus solely on the development and verification of 1553B communication functions. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the method for simulating a virtual 1553B bus based on TCPIP according to the present invention.
[0018] Figure 2 This is a schematic diagram illustrating the principle of the present invention for simulating a virtual 1553B bus based on TCPIP. Detailed Implementation
[0019] In the following description, embodiments of the method and apparatus for implementing virtual 1553B bus emulation based on TCPIP according to the present invention will be described with reference to the accompanying drawings.
[0020] The embodiments described herein are specific implementations of the present invention, used to illustrate the concept of the invention, and are illustrative and exemplary, and should not be construed as limiting the embodiments or scope of the present invention. In addition to the embodiments described herein, those skilled in the art can employ other obvious technical solutions based on the content disclosed in the claims and specification of this application. These technical solutions include those that make any obvious substitutions and modifications to the embodiments described herein.
[0021] The accompanying drawings in this specification are schematic diagrams used to help illustrate the concept of the invention, and schematically show the shape of each part and their interrelationship.
[0022] In an embodiment of the method for implementing virtual 1553B bus emulation based on TCPIP of the present invention, such as Figure 1 The diagram illustrates a flowchart of a method for simulating a virtual 1553B bus based on TCP / IP. This method achieves seamless cloud communication and information parsing between the bus controller 1 and a remote terminal, enabling the development and verification of 1553B communication functions without relying on a physical 1553B hardware environment. It also provides a simulation terminal independent of the actual 1553B board hardware and bus interface. This invention enables the implementation of a 1553B bus network system in a completely virtual environment, allowing developers to focus solely on the development and verification of 1553B communication functions. The method for simulating a virtual 1553B bus based on TCP / IP may include the following steps:
[0023] Step 101, as follows Figure 2 As shown, the mesh TCP / IP Internet includes a bus controller 1 and multiple remote terminals, such as a first remote terminal 21, a second remote terminal 22, and a third remote terminal 23. The bus controller 1 creates a server, and the remote terminals create clients. Corresponding data structures for virtual simulation bus communication are created on the server and clients, and the server and clients are initialized based on these data structures. Both the server and clients have their own message processing interface and initialization interface. The initialization interface is used to initialize their respective data structures, which include message structures and mode status word structures.
[0024] Furthermore, both the virtual 1553B bus controller 1 and the remote terminal provide a universal memory read / write interface, which is used to simulate hardware register or memory address access.
[0025] Specifically, data structures related to bus communication for 1553B chip hardware simulation and virtual simulation are defined according to the message data format in the 1553B bus communication protocol. The data structure defines the communication-related data structures.
[0026] Bus Controller 1 is the controller and manager of the virtual 1553B bus. It is the initiator of all bus communication actions. At any given time, only Bus Controller 1 controls the bus system. It is mainly responsible for sending commands of different 1553B message types, participating in data transmission, and receiving status responses.
[0027] The remote terminal internally processes different message types sent by bus controller 1, and then sends the corresponding status words back to bus controller 1.
[0028] The message communication between bus controller 1 and the remote terminal uses the TCP / IP protocol, with bus controller 1 acting as the server and the remote terminal acting as the client.
[0029] Initialize the structures, that is, initialize the data structures related to virtual simulation bus communication. Data structures may include: bus controller structure, terminal structure, bus controller descriptor structure, terminal descriptor structure, memory address, register offset address, bus controller 1 memory address, terminal memory address, mode status word, message block structure, message type, word data structure, message status definition, and message data structure, etc. The data structures define the storage structure for each of the above data types. Word data structures are used for transmission in the virtual bus. Message block structures define different types of message block structures. Mode status words define different mode status words.
[0030] The data structure definition for the virtual simulation bus device module is as follows:
[0031]
[0032] In the virtual 1553B bus simulation, we define the message data required for bus communication in a unified way, which is the message data structure. This structure defines the basic data structure required for complete communication, as shown below:
[0033]
[0034] Message type is used to help the bus identify the type of the current message during message transmission, without having to scan the entire message every time to obtain its type. The definition of the 1553B bus message type is as follows:
[0035]
[0036]
[0037] Each message consists of several words, and each word has a specific meaning within a message. The model defines a type for each word in each type of message, allowing the bus to easily identify the type of a word in the current message during message transmission. One function of this is that the bus can determine whether the message transmission has ended by judging the type of the words in the message. The word data structure is defined as follows:
[0038]
[0039] The virtual bus controller 1 initiates virtual 1553B bus communication actions and controls and manages the bus system. The bus controller 1 includes a global variable for bus controller interrupt count flag, a bus controller register read / write access interface, and a memory read / write access interface.
[0040] Bus controller 1 includes a bus controller register read / write access interface, which is defined as follows:
[0041]
[0042] Bus controller 1 also includes a bus controller memory read / write access interface, which is defined as follows:
[0043]
[0044] Bus controller 1 also includes a bus controller initialization interface for creating server connections and waiting for remote terminal connections.
[0045] The definition of the bus controller 1 initialization interface is as follows:
[0046]
[0047] Bus controller 1 also includes a bus controller message processing interface, used to parse control words and command words to obtain information such as message type, terminal address, and terminal sub-address, and to fill relevant command information into the message structure. This information is then sent to the remote terminal via the bus controller communication interface bc_send_msg(). When the server receives a status word message from the remote terminal, it calls the bus communication processing interface process_bc_send_msg() to process the message based on the reported status word.
[0048]
[0049]
[0050] The controller of the remote terminal of the present invention includes a client socket descriptor and an interrupt count flag global variable, as well as a remote terminal register read / write access interface and a memory read / write access interface.
[0051] The definition of the remote terminal register read / write access interface is as follows:
[0052]
[0053] The definition of the remote terminal memory read / write access interface is as follows:
[0054]
[0055] The controller of the remote terminal of the present invention also includes a remote terminal initialization interface, which is used to create a client and connect to the server.
[0056] The definition of the remote terminal initialization interface is as follows:
[0057]
[0058] The controller of the remote terminal of the present invention also includes a remote terminal message processing interface. After receiving the 1553B message sent by the server, i.e. the bus controller 1, the interface calls the bus communication processing interface process_bc_send_msg() to process the message and sends the status word to the bus controller 1.
[0059] This invention allows for the selection of different message type test interfaces for simulation testing based on testing requirements.
[0060] Furthermore, the pattern state word structure is an attribute mapping table for state words, which includes word type, associated message type, and word value. The message structure includes message type, the number of corresponding words, message status, message flags, and message content.
[0061] Step 102: The server initiates 1553B bus communication with the client and waits for the client's response and the corresponding status word returned by the client.
[0062] Step 103: After receiving the message sent by the server, the client calls the corresponding communication processing interface to process the message. The communication processing interface marks the corresponding message with the corresponding message tag and returns the corresponding status word of the corresponding message to the server.
[0063] Step 104: The server calls the corresponding communication processing interface to process the message returned by the client. Processing the message returned by the client includes: the communication processing interface identifies the location of the message in memory by using a tag, segments the returned message while parsing the status word, and then extracts the message parsing result.
[0064] Furthermore, parsing the status word while segmenting the return message includes: filtering the word type of the corresponding status word through the pattern status word structure, and determining whether the corresponding return message has been transmitted based on the word type.
[0065] More specifically, status words include control words and command words.
[0066] Step 105: Write the message parsing result into the message structure. Send the message parsing result to the client by calling the corresponding communication processing interface.
[0067] More specifically, the message parsing results include message type, remote terminal address, remote terminal sub-address, and command data.
[0068] In a further preferred embodiment, when bus controller 1 sends a message to a remote terminal, the data sent by bus controller 1 is extracted from the message, and a success status response is given to bus controller 1. When a remote terminal sends a message to bus controller 1, the data to be sent is sent to bus controller 1 again via a group message frame. When one remote terminal sends a message to another remote terminal, the sending remote terminal directly sends the data to be sent to the receiving remote terminal.
[0069] This invention differs from the common 1553B bus system, such as Figure 2As shown, the system includes a bus controller (BC) 1 and multiple remote terminals (RTs), such as a first remote terminal 21, a second remote terminal 22, and a third remote terminal 23. The BC initiates the bus transmission; message commands are sent directly to the RTs via the network. The RTs process the received message type: if it's a BC->RT message, it extracts the data sent by the BC from the message and sends a success status response to the BC; if it's an RT->BC message, it reassembles the data to be sent into a message frame and sends it to the BC controller; if it's an RT->RT message, the sending RT directly sends the data to the receiving RT. This simplifies the process typically handled by a virtual bus protocol, making the communication method more concise and intuitive, and facilitating data flow observation and debugging for users.
[0070] Figure 2 This is an example diagram of bus simulation, in which bus controller 1 is the controller and manager of the virtual 1553B bus and the initiator of all bus communication actions.
[0071] In order for the registers and memory in the virtual bus controller 1 to be accessible to the CPU through the communication process of various registers and bus protocol, we need to initialize and configure the register module and memory module, and configure the message data to be tested. The transmission of bus messages is initiated by writing the BC_MT_START bit of the WR_START_RST_REG register.
[0072] For example, when bus controller 1 sends a message to a remote terminal, the message data structure is defined as shown below, and bus controller 1 sends the message through the bc_send_msg() interface.
[0073]
[0074] After receiving a message from bus controller 1, each remote terminal determines whether it is the current remote terminal based on the remote terminal address field of the control word in the message. If it is the current remote terminal, it determines the message type: if it is BC_TO_RT, it obtains the received data length from the data length field of the control word, reads the corresponding length of data from the data word, and returns a message reception success message to bus controller 1, thus completing one message transmission.
[0075] This invention provides a method and apparatus for simulating a virtual 1553B bus based on TCP / IP, realizing a 1553B bus network system in a completely virtual environment. This system features a virtual 1553B bus based on the TCP / IP protocol that allows for the development and verification of 1553B communication functions without relying on a physical 1553B hardware environment, and a simulation terminal that operates independently of real 1553B board hardware and bus interfaces. On one hand, this invention overcomes the problem of high costs associated with the development of existing 1553B bus network systems, significantly saving on the expenses of purchasing 1553B hardware and the time cost of setting up the system environment. On the other hand, this invention effectively overcomes the problem of existing technologies requiring a 1553B hardware environment for the development and verification of 1553B communication functions, allowing developers to focus solely on the development and verification of 1553B communication functions.
[0076] The apparatus for implementing virtual 1553B bus simulation based on TCPIP of the present invention corresponds to the method for implementing virtual 1553B bus simulation based on TCPIP of the present invention, such as... Figure 2 As shown, the mesh TCP / IP Internet includes a bus controller 1 and multiple remote terminals, such as a first remote terminal 21, a second remote terminal 22, and a third remote terminal 23. The bus controller 1 creates a server, and the remote terminals create clients. Corresponding data structures for virtual simulation bus communication are created on the server and clients, and the server and clients are initialized based on these data structures. Both the server and clients have their own message processing interfaces and initialization interfaces.
[0077] Each initialization interface is used to initialize its respective data structure, which includes a message structure and a mode status word structure. The server initiates 1553B bus communication to the client and waits for the client's response and the corresponding status word returned by the client.
[0078] After receiving a message from the server, the client calls the corresponding communication processing interface to process the message. This interface marks the message with the appropriate message tag and returns the corresponding status word to the server.
[0079] The server calls the corresponding communication processing interface to process the message returned by the client. The processing of the message returned by the client includes: the communication processing interface identifies the location of the message in memory by using a tag, parses the status word while segmenting the returned message, and then extracts the message parsing result.
[0080] Compared with existing technologies, this invention provides a method and apparatus for simulating a virtual 1553B bus based on TCP / IP through seamless cloud communication and information parsing between the bus controller 1 and the remote terminal, realizing a 1553B bus network system in a completely virtual environment. This system features a virtual 1553B bus based on the TCP / IP protocol that does not require a physical 1553B hardware environment for the development and verification of 1553B communication functions, and a simulation terminal that is independent of real 1553B board hardware and bus interfaces. On the one hand, this invention overcomes the problem of high costs associated with the development of 1553B bus network systems in existing technologies, significantly saving on the expenses of purchasing 1553B hardware systems and the time cost of setting up the system environment. On the other hand, this invention effectively overcomes the problem of existing technologies requiring a physical 1553B hardware environment for the development and verification of 1553B communication functions, allowing developers to focus solely on the development and verification of 1553B communication functions.
[0081] The foregoing has described the embodiments of the method and apparatus for implementing virtual 1553B bus simulation based on TCPIP of the present invention, the purpose of which is to explain the spirit of the present invention. Please note that those skilled in the art can modify and combine the features of the above embodiments without departing from the spirit of the present invention; therefore, the present invention is not limited to the above embodiments. Specific features of the apparatus for implementing virtual 1553B bus simulation based on TCPIP of the present invention, such as shape, size, and position, can be specifically designed based on the functions of the features disclosed above, and these designs are all achievable by those skilled in the art. Furthermore, the disclosed technical features are not limited to the combinations of the disclosed features with other features; those skilled in the art can also make other combinations between the technical features according to the purpose of the invention to achieve the purpose of the present invention.
Claims
1. A method for simulating a virtual 1553B bus based on TCP / IP, characterized in that, The method includes: A mesh TCP / IP Internet is constructed using a bus controller and multiple remote terminals; The bus controller creates a server, and the remote terminal creates a client; Create corresponding data structures for virtual simulation bus communication on the server and client, and initialize the server and client according to the data structures, wherein, Both the server and the client have their own message processing interface and initialization interface; and... The initialization interfaces are all used to initialize their respective data structures, which include message structures and pattern status word structures. The message structure includes message type and the number of its corresponding words, message status, message flag and message content. The pattern status word structure is an attribute mapping table of status words, which includes word type, message type and word value. The server initiates 1553B bus communication to the client and waits for the client's response and the client to return the corresponding status word of the corresponding message; After receiving the message sent by the server, the client calls the corresponding communication processing interface to process the message. The communication processing interface marks the corresponding message with the corresponding message tag and returns the corresponding status word of the corresponding message to the server. The server invokes the corresponding communication processing interface to process the client's returned message, wherein processing the client's returned message includes: This communication processing interface uses tags to identify the location of the message in memory, parses the status word while segmenting the returned message, and then extracts the message parsing result.
2. The method for simulating a virtual 1553B bus based on TCP / IP according to claim 1, characterized in that, When the bus controller sends a message to the remote terminal, the data sent by the bus controller is extracted from the message, and a success status response is given to the bus controller. When the remote terminal sends a message to the bus controller, it sends the data to be sent to the bus controller again through a group message frame. When one remote terminal sends a message to another remote terminal, the sending remote terminal directly sends the data to be sent to the receiving remote terminal.
3. The method for simulating a virtual 1553B bus based on TCP / IP according to claim 1, characterized in that, Parsing the status word while segmenting the returned message includes: The pattern status word structure is used to filter the word type of the corresponding status word, and the word type is used to determine whether the corresponding return message has been transmitted.
4. The method for simulating a virtual 1553B bus based on TCP / IP according to claim 1, characterized in that, Processing the client-returned message also includes: Write the message parsing result into the message structure; The message parsing result is sent to the client by calling the corresponding communication processing interface.
5. The method for simulating a virtual 1553B bus based on TCP / IP according to claim 1, characterized in that, The message parsing result includes message type, remote terminal address, remote terminal sub-address, and command data.
6. The method for simulating a virtual 1553B bus based on TCP / IP according to claim 1, characterized in that, The data structure also includes a bus controller structure, a terminal structure, a register address, a memory address, a bus controller descriptor structure, and a terminal descriptor structure.
7. The method for simulating a virtual 1553B bus based on TCP / IP according to claim 1, characterized in that, The status word includes control words and command words.
8. A device for simulating a virtual 1553B bus based on TCP / IP, characterized in that, It includes a mesh TCP / IP Internet consisting of a bus controller and multiple remote terminals; The bus controller creates a server, and the remote terminal creates a client; Create corresponding data structures for virtual simulation bus communication on the server and client, and initialize the server and client according to the data structures, wherein, Both the server and the client have their own message processing interface and initialization interface; and... The initialization interfaces are all used to initialize their respective data structures, which include message structures and pattern status word structures. The message structure includes message type and the number of its corresponding words, message status, message flag and message content. The pattern status word structure is an attribute mapping table of status words, which includes word type, message type and word value. The server initiates 1553B bus communication to the client and waits for the client's response and the client to return the corresponding status word of the corresponding message; After receiving the message sent by the server, the client calls the corresponding communication processing interface to process the message. The communication processing interface marks the corresponding message with the corresponding message tag and returns the corresponding status word of the corresponding message to the server. The server invokes the corresponding communication processing interface to process the client's returned message, wherein processing the client's returned message includes: This communication processing interface uses tags to identify the location of the message in memory, parses the status word while segmenting the returned message, and then extracts the message parsing result.
Citation Information
Patent Citations
Implementation method of virtual 1553B bus equipment
CN111209154A
1553B bus communication system and method based on DSP
CN114201429A
