A method for synchronizing simulation chips and simulation components in a desktop simulation environment
The method improves synchronization efficiency and correctness in aircraft engine control software simulations by using timed synchronization and unique identification numbers to manage task execution in a desktop environment.
Patent Information
- Application Number
- CN202210186980.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-02-28
AI Technical Summary
Existing synchronization methods for aircraft engine control software simulation in a desktop environment are inefficient and may compromise the correctness of joint simulations due to inadequate task scheduling.
A method involving unique identification numbers for simulation chips and components, timed synchronization instructions and results, and a synchronization result count value dictionary to ensure synchronized execution of tasks without a handshake protocol.
Enhances synchronization efficiency and ensures correctness of joint simulations by allowing simultaneous task execution with high precision.
Smart Images

Figure CN114706665B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to aeroengine control software simulation, in particular to a synchronization method for a simulation chip and a simulation component in a desktop simulation environment. Background Art
[0002] When aircraft engine control software is simulated on the desktop, it needs to form a closed-loop simulation system with an external model for joint simulation. The aircraft engine control software runs in the simulation chip in the form of instruction set simulation, and the external model runs independently as a simulation component. Multiple simulation chips communicate with multiple simulation components through the data bus. When performing joint simulation, the task scheduling software is used to make the simulation chip and simulation component execute a simulation task once in each task cycle. The synchronization method of the task scheduling software has a great impact on the correctness and execution efficiency of the joint simulation. Therefore, it is necessary to adopt a synchronization method to improve the execution efficiency while ensuring the correctness of the joint simulation. Summary of the invention
[0003] Purpose of the invention: The purpose of the present invention is to provide a method for synchronizing a simulation chip and a simulation component in a desktop simulation environment, thereby improving execution efficiency while ensuring the correctness of the joint simulation.
[0004] Technical solution: The method for synchronizing a simulation chip and a simulation component in a desktop simulation environment described in the present invention comprises the following steps:
[0005] (1) All simulation chips and simulation components are assigned unique simulation identification numbers;
[0006] (2) Configure the simulation identification numbers of all simulation chips and simulation components in the task scheduling software;
[0007] (3) Start the task scheduling software, simulation chip and simulation components;
[0008] (4) The task scheduling software sends synchronization instructions to the simulation chip and simulation components at a certain period, and the synchronization instructions include a synchronization instruction count value;
[0009] (5) The simulation chip or simulation component sends synchronization results to the task scheduling software at a certain period, and the synchronization results include the synchronization result count value and simulation identification number of the simulation chip or simulation component;
[0010] (6) The simulation chip or simulation component receives the synchronization instruction from the task scheduling software, and determines whether the synchronization instruction count value is equal to the synchronization result count value of the simulation chip or simulation component; if they are not equal, the simulation chip or simulation component executes a simulation task, and after the execution is completed, the synchronization result count value of the simulation chip or simulation component is updated to the synchronization instruction count value;
[0011] (7) The task scheduling software receives the synchronization results from the simulation chip or simulation component, and updates the synchronization result count value dictionary in the task scheduling software according to the simulation identification number and the synchronization result count value of the simulation chip or simulation component; the task scheduling software checks whether the synchronization result count values of all simulation chips and simulation components in the synchronization result count value dictionary are equal to the synchronization instruction count value. If they are equal, the synchronization instruction count value of the task scheduling software changes.
[0012] The step (1) is specifically:
[0013] (1.1) Configure the simulation identification number of the simulation chip in the configuration file, starting from 0 and up to 32767;
[0014] (1.2) Configure the simulation identification number of the simulation component in the configuration file, starting from 32768 and up to 65535.
[0015] The step (3) is specifically:
[0016] (3.1) The task scheduling software establishes a synchronization result count value dictionary according to the simulation identification number, and the synchronization result count values of all simulation chips and simulation components in the dictionary are set to 0;
[0017] (3.2) The synchronization instruction count value in the task scheduling software is set to 1;
[0018] (3.3) The synchronization result count values of all simulated chips are set to 0;
[0019] (3.4) The synchronization result count values of all simulation components are set to 0.
[0020] The step (4) is specifically:
[0021] (4.1) The task scheduling software sets a 1ms timing period and starts the timer;
[0022] (4.2) When the timer triggers a timing event, a synchronization instruction is constructed. The synchronization instruction includes a data header, a synchronization instruction count value, a checksum, and a data tail. The synchronization instruction is sent through the data bus.
[0023] The step (5) is specifically as follows:
[0024] (5.1) Set the simulation chip or simulation component to a 1ms timing period and start the timer;
[0025] (5.2) When the timer triggers a timing event, a synchronization result is constructed. The synchronization result includes a data header, a simulation identification number, a synchronization result count value, a checksum, and a data tail. The synchronization result is sent through the data bus.
[0026] The step (6) is specifically as follows:
[0027] (6.1) After receiving the synchronization instruction, the simulation chip or simulation component parses the synchronization instruction and obtains the synchronization instruction count value;
[0028] (6.2) The simulation chip or simulation component determines whether the synchronization instruction count value is equal to the synchronization result count value. If they are not equal, a simulation task is executed and the synchronization result count value is updated to the synchronization instruction count value.
[0029] The step (7) is specifically:
[0030] (7.1) After receiving the synchronization result, the task scheduling software parses the synchronization result and obtains the synchronization result count value and simulation identification number;
[0031] (7.2) The task scheduling software queries the synchronization result count value dictionary according to the simulation identification number and obtains the corresponding synchronization result count value in the dictionary;
[0032] (7.3) The task scheduling software determines whether the synchronization result count value in step S71 is equal to the synchronization result count value in step S72. If they are not equal, the synchronization result count value in step S72 is updated to the synchronization result count value in step S71;
[0033] (7.4) The task scheduling software determines whether all synchronization result count values in the synchronization result count value dictionary are equal to the synchronization instruction count value. If they are equal, the synchronization instruction count value is increased by 1.
[0034] A computer storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for synchronizing a simulation chip and a simulation component in a desktop simulation environment.
[0035] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for synchronizing a simulation chip and a simulation component in a desktop simulation environment is implemented.
[0036] Beneficial effects: Compared with the prior art, the present invention has the following advantages: 1. Timed communication is adopted between the task scheduling software and the simulation chip or simulation component, and no handshake protocol is required, and the synchronization efficiency is high; 2. The simulation chip or simulation component can execute simulation tasks at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a flow chart of the steps of the present invention;
[0038] Figure 2 Schematic diagram of the joint simulation environment. DETAILED DESCRIPTION
[0039] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0040] like Figure 1-2 A method for synchronizing a simulation chip and a simulation component in a desktop simulation environment, comprising the following steps:
[0041] (1) All simulation chips and simulation components are assigned unique simulation identification numbers;
[0042] (2) Configure the simulation identification numbers of all simulation chips and simulation components in the task scheduling software;
[0043] (3) Start the task scheduling software, simulation chip and simulation components;
[0044] (4) The task scheduling software sends synchronization instructions to the simulation chip and simulation components at a certain period, and the synchronization instructions include a synchronization instruction count value;
[0045] (5) The simulation chip or simulation component sends synchronization results to the task scheduling software at a certain period, and the synchronization results include the synchronization result count value and simulation identification number of the simulation chip or simulation component;
[0046] (6) The simulation chip or simulation component receives the synchronization instruction from the task scheduling software, and determines whether the synchronization instruction count value is equal to the synchronization result count value of the simulation chip or simulation component; if they are not equal, the simulation chip or simulation component executes a simulation task, and after the execution is completed, the synchronization result count value of the simulation chip or simulation component is updated to the synchronization instruction count value;
[0047] (7) The task scheduling software receives the synchronization results from the simulation chip or simulation component, and updates the synchronization result count value dictionary in the task scheduling software according to the simulation identification number and the synchronization result count value of the simulation chip or simulation component; the task scheduling software checks whether the synchronization result count values of all simulation chips and simulation components in the synchronization result count value dictionary are equal to the synchronization instruction count value. If they are equal, the synchronization instruction count value of the task scheduling software changes.
[0048] The step (1) is specifically:
[0049] (1.1) Configure the simulation identification number of the simulation chip in the configuration file, starting from 0 and up to 32767;
[0050] (1.2) Configure the simulation identification number of the simulation component in the configuration file, starting from 32768 and up to 65535.
[0051] The step (3) is specifically:
[0052] (3.1) The task scheduling software establishes a synchronization result count value dictionary according to the simulation identification number, and the synchronization result count values of all simulation chips and simulation components in the dictionary are set to 0;
[0053] (3.2) The synchronization instruction count value in the task scheduling software is set to 1;
[0054] (3.3) The synchronization result count values of all simulated chips are set to 0;
[0055] (3.4) The synchronization result count values of all simulation components are set to 0.
[0056] The step (4) is specifically:
[0057] (4.1) The task scheduling software sets a 1ms timing period and starts the timer;
[0058] (4.2) When the timer triggers a timing event, a synchronization instruction is constructed. The synchronization instruction includes a data header, a synchronization instruction count value, a checksum, and a data tail. The synchronization instruction is sent through the data bus.
[0059] The step (5) is specifically as follows:
[0060] (5.1) Set the simulation chip or simulation component to a 1ms timing period and start the timer;
[0061] (5.2) When the timer triggers a timing event, a synchronization result is constructed. The synchronization result includes a data header, a simulation identification number, a synchronization result count value, a checksum, and a data tail. The synchronization result is sent through the data bus.
[0062] The step (6) is specifically as follows:
[0063] (6.1) After receiving the synchronization instruction, the simulation chip or simulation component parses the synchronization instruction and obtains the synchronization instruction count value;
[0064] (6.2) The simulation chip or simulation component determines whether the synchronization instruction count value is equal to the synchronization result count value. If they are not equal, a simulation task is executed and the synchronization result count value is updated to the synchronization instruction count value.
[0065] The step (7) is specifically:
[0066] (7.1) After receiving the synchronization result, the task scheduling software parses the synchronization result and obtains the synchronization result count value and simulation identification number;
[0067] (7.2) The task scheduling software queries the synchronization result count value dictionary according to the simulation identification number and obtains the corresponding synchronization result count value in the dictionary;
[0068] (7.3) The task scheduling software determines whether the synchronization result count value in step S71 is equal to the synchronization result count value in step S72. If they are not equal, the synchronization result count value in step S72 is updated to the synchronization result count value in step S71;
[0069] (7.4) The task scheduling software determines whether all synchronization result count values in the synchronization result count value dictionary are equal to the synchronization instruction count value. If they are equal, the synchronization instruction count value is increased by 1.
[0070] A computer storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for synchronizing a simulation chip and a simulation component in a desktop simulation environment.
[0071] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for synchronizing a simulation chip and a simulation component in a desktop simulation environment is implemented.
Claims
1. A method for synchronizing a simulation chip and a simulation component in a desktop simulation environment, characterized in that: The following steps are involved: S1: All simulation chips and simulation components are set with unique simulation identification numbers; S2: configure the simulation identification numbers of all simulation chips and simulation components in the task scheduling software; S3: Start the task scheduling software, simulation chip and simulation component. Specifically: S3.1: The task scheduling software establishes a synchronization result count value dictionary according to the simulation identification number, and the synchronization result count values of all simulation chips and simulation components in the dictionary are set to 0; S3.2: The synchronization instruction count value in the task scheduling software is set to 1; S3.3: The synchronization result count values of all simulated chips are set to 0; S3.4: The synchronization result count values of all simulation components are set to 0; S4: The task scheduling software sends synchronization instructions to the simulation chip and the simulation component at a certain period, and the synchronization instructions include a synchronization instruction count value; S5: The simulation chip or simulation component sends the synchronization result to the task scheduling software at a certain period. The synchronization result includes the synchronization result count value and simulation identification number of the simulation chip or simulation component. Specifically: S5.1: The simulation chip or simulation component sets a 1ms timing period and starts the timer; S5.2: When the timer triggers a timing event, a synchronization result is constructed, the synchronization result includes a data header, a simulation identification number, a synchronization result count value, a checksum, and a data tail, and the synchronization result is sent through the data bus; S6: The simulation chip or simulation component receives the synchronization instruction from the task scheduling software, and determines whether the synchronization instruction count value is equal to the synchronization result count value of the simulation chip or simulation component; if they are not equal, the simulation chip or simulation component executes a simulation task, and after the execution is completed, the synchronization result count value of the simulation chip or simulation component is updated to the synchronization instruction count value; S7: The task scheduling software receives the synchronization result from the simulation chip or the simulation component, and updates the synchronization result count value dictionary in the task scheduling software according to the simulation identification number and the synchronization result count value of the simulation chip or the simulation component; The task scheduling software checks whether the synchronization result count values of all simulation chips and simulation components in the synchronization result count value dictionary are equal to the synchronization instruction count value. If they are equal, the synchronization instruction count value of the task scheduling software changes. Specifically: S7.1: After receiving the synchronization result, the task scheduling software parses the synchronization result and obtains the synchronization result count value and the simulation identification number; S7.2: The task scheduling software searches the synchronization result count value dictionary according to the simulation identification number, and obtains the corresponding synchronization result count value in the dictionary; S7.3: The task scheduling software determines whether the synchronization result count value in step S7.1 is equal to the synchronization result count value in step S7.
2. If they are not equal, the synchronization result count value in step S7.2 is updated to the synchronization result count value in step S7.1; S7.4: The task scheduling software determines whether all synchronization result count values in the synchronization result count value dictionary are equal to the synchronization instruction count value. If they are equal, the synchronization instruction count value is increased by 1.
2. The method for synchronizing a simulation chip and a simulation component in a desktop simulation environment according to claim 1, characterized in that: The S1 is specifically: S1.1: Configure the simulation identification number of the simulation chip in the configuration file, starting from 0 and up to 32767; S1.2: Configure the simulation identification number of the simulation component in the configuration file, starting from 32768 and up to 65535.
3. The method for synchronizing a simulation chip and a simulation component in a desktop simulation environment according to claim 1, characterized in that: The S4 is specifically: S4.1: The task scheduling software sets a 1ms timing period and starts the timer; S4.2: When the timer triggers a timing event, a synchronization instruction is constructed. The synchronization instruction includes a data header, a synchronization instruction count value, a checksum, and a data tail. The synchronization instruction is sent through the data bus.
4. The method for synchronizing a simulation chip and a simulation component in a desktop simulation environment according to claim 1, characterized in that: The S6 is specifically: S6.1: After receiving the synchronization instruction, the simulation chip or simulation component parses the synchronization instruction and obtains the synchronization instruction count value; S6.2: The simulation chip or simulation component determines whether the synchronization instruction count value is equal to the synchronization result count value. If they are not equal, a simulation task is executed and the synchronization result count value is updated to the synchronization instruction count value.
5. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for synchronizing a simulation chip and a simulation component in a desktop simulation environment as described in any one of claims 1 to 4 is implemented.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for synchronizing a simulation chip and a simulation component in a desktop simulation environment as described in any one of claims 1-4 is implemented.
