Simulink-based A2L file integration method and system and computer storage medium
By extracting and integrating data variables of multiple A2L files in automotive embedded software development in Simulink environment, and automatically generating complete A2L files, the problem of cumbersome and error-prone manual integration process is solved, and development efficiency and product quality are improved.
Patent Information
- Application Number
- CN202411727954.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-21
AI Technical Summary
During the automotive embedded software development process, the integration and merging of multiple A2L files requires manual operation, resulting in cumbersome operations, increasing the workload of developers, and possible data omissions or errors, reducing development efficiency.
By extracting all data variables in the Simulink data dictionary file corresponding to multiple application models in the Simulink environment, and creating a new model containing all data variables, an A2L file including all data variables is automatically generated.
The generation process of A2L files is simplified, the tedious operation of manual sorting and merging is avoided, the integrity and consistency of data is ensured, the possibility of human error is reduced, and the development efficiency and product quality are improved.
Smart Images

Figure CN119668617A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile embedded software development, and in particular to a Simulink-based A2L file integration method, system and computer storage medium. Background Art
[0002] In the process of automotive embedded software development, vehicle debugging and verification is an important part of ensuring system stability and reliability. The functions of the application layer usually involve the observation and calibration of a large number of key data, and these data variables are usually recorded in A2L files. A2L files are a standard file format commonly used in the automotive industry to describe the relationship between calibration data and measurement data and ECU (electronic control unit) variables.
[0003] However, due to the complexity of application layer functions, multiple A2L files are usually required to record data variables of different functional modules. During the debugging and verification process, multiple A2L files need to be manually sorted and merged into one A2L file to facilitate debugging and verification of the entire vehicle, which makes the operation cumbersome, greatly increases the workload of developers, and is prone to data omissions or errors, reducing development efficiency. Summary of the invention
[0004] The purpose of the present invention is to provide a Simulink-based A2L file integration method, system and computer storage medium to simplify the A2L file generation process and improve development efficiency in view of the defects of the above-mentioned prior art.
[0005] In an embodiment of the present invention, a method for integrating A2L files based on Simulink is provided, which includes:
[0006] Extract all data variables in Simulink data dictionary files corresponding to multiple application models;
[0007] Build a new model that includes all data variables;
[0008] While generating the code corresponding to the new model, an A2L file including all data variables is automatically generated.
[0009] In the embodiment of the present invention, the data variables include observed quantities and calibrated quantities.
[0010] In an embodiment of the present invention, the A2L file integration method based on Simulink, wherein all data variables in the Simulink data dictionary files corresponding to the multiple application models are extracted, further comprises:
[0011] When developing the multiple application models, a Simulink data dictionary file is created respectively to store the data variables of the application models.
[0012] In the embodiment of the present invention, a new model including all data variables is established, including:
[0013] Build a new model in which
[0014] Create a corresponding Constant module for each calibration quantity, and connect the Constant module to a Terminator module with a signal line;
[0015] A corresponding signal line is created for each observation, and the source of the signal line is connected to a Constant module, and the end of the signal line is connected to a Terminator module.
[0016] In an embodiment of the present invention, a Simulink-based A2L file integration system is also provided, which includes:
[0017] A data variable extraction module is used to extract all data variables in Simulink data dictionary files corresponding to multiple application models;
[0018] Model creation module, used to build a new model including all data variables;
[0019] The file generation module is used to automatically generate an A2L file including all data variables while generating the code corresponding to the new model.
[0020] In the embodiment of the present invention, the data variables include observed quantities and calibrated quantities.
[0021] In the embodiment of the present invention, the A2L file integration system based on Simulink also includes
[0022] The data variable storage module is used to create a Simulink data dictionary file to store the data variables of the application models when developing the multiple application models.
[0023] In the embodiment of the present invention, the model creation module establishes a new model including all data variables, and the process includes:
[0024] Build a new model in which
[0025] Create a corresponding Constant module for each calibration quantity, and connect the Constant module to a Terminator module with a signal line;
[0026] A corresponding signal line is created for each observation, and the source of the signal line is connected to a Constant module, and the end of the signal line is connected to a Terminator module.
[0027] In an embodiment of the present invention, a computer storage medium is further provided, wherein a computer program is stored in the computer storage medium, and when the computer program is executed, the A2L file integration method based on Simulink as claimed in claim 1 is implemented.
[0028] Compared with the prior art, the Simulink-based A2L file integration method and system of the present invention, when developing an application model in a Simulink environment, stores data variables corresponding to the application model in a Simulink data dictionary file, then extracts all data variables from multiple Simulink data dictionary files, and creates a new model containing all data variables; subsequently, through the Simulink code generation process, an A2L file containing all data variables is automatically generated, thereby quickly generating a complete A2L file, simplifying the A2L file generation process, avoiding the tedious operations of manually arranging and merging multiple A2L files, and ensuring the integrity and consistency of the data; in addition, through the intervention of automated programs, the possibility of human errors is reduced, and development efficiency and product quality are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart of the A2L file integration method based on Simulink according to an embodiment of the present invention.
[0030] Figure 2 It is a structural schematic diagram of an A2L file integration system based on Simulink according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In an embodiment of the present invention, a method for integrating A2L files based on Simulink is provided, which includes steps S1 to S3, which are described below respectively.
[0032] Step S1: extract all data variables in Simulink data dictionary files corresponding to multiple application models.
[0033] It should be noted that due to the complexity of the application layer functions of the vehicle-mounted system, multiple application models are usually required to simulate different functions. The functions of the application layer usually involve the observation and calibration of a large amount of key data. Therefore, when developing the application model of the vehicle-mounted system, these data variables need to be defined. These data variables include calibration variables and observation variables, where calibration variables are data variables that need to be set during the debugging process, and observation variables are data variables that need to be observed during the debugging process.
[0034] In the embodiment of the present invention, when multiple application models are developed in the Simulink environment, an sldd file is created to store the data variables of the application model, so as to facilitate extraction during subsequent integration. The sldd file is a Simulink data dictionary file, which is used to put all data variables in the model in one place for unified management, and can conveniently manage and store data in the model.
[0035] When the data variables of multiple application models are to be integrated, all data variables in the Simulink data dictionary files corresponding to the multiple application models are extracted, and all the extracted data variables are stored in a newly created sldd file.
[0036] Step S2: Build a new model including all data variables.
[0037] It should be noted that, in the process of implementing coding, a model can simultaneously generate an A2L file including all data variables in the model. Therefore, the embodiment of the present invention creates a new model including all data variables in multiple application models. After extracting all data variables in the sldd files corresponding to multiple application models, a new model can be established. The role of this new model is to generate the corresponding A2L file, and it does not need to participate in actual debugging. Therefore, this new model can be the simplest model, which only needs to contain all data variables.
[0038] Specifically, in the embodiment of the present invention, a new model including all data variables is established, which includes:
[0039] Build a new model in which
[0040] Create a corresponding Constant module for each calibration quantity, and connect the Constant module to a Terminator module with a signal line;
[0041] A corresponding signal line is created for each observation. The name of the signal line adopts the name of the observation. The source of the signal line is connected to a Constant module, and the end of the signal line is connected to a Terminator module.
[0042] In this new model, there is no need to consider the corresponding connection relationship between the Constant module and the signal line. You only need to ensure that each created Constant module is connected to the Terminator module through a signal line, and each created signal line is connected between the Constant module and the Terminator module.
[0043] Step S3: while generating the code corresponding to the new model, automatically generate an A2L file including all data variables.
[0044] In the Simulink environment, after the new model is established, the build function can be executed to realize the coding of the new model, and the code corresponding to the new model and its corresponding A2L file are output, and the A2L file includes all data variables.
[0045] It should be noted that in the implementation of the present invention, the above steps S1 and S2 can be implemented by writing Simulink program code, and step S3 can be implemented by triggering the Simulink build function through the written Simulink program code, or by manually executing the Simulink build function, and the present invention is not limited to this.
[0046] It can be seen from the above-mentioned A2L file integration method based on Simulink that when generating the A2L file for automobile debugging and verification, all data variables in the Simulink data dictionary file corresponding to multiple application models of the automobile are extracted, and a new model containing all data variables is created. Then, through the process of Simulink code generation, an A2L file containing all data variables is automatically generated, thereby quickly generating a complete A2L file and simplifying the A2L file generation process.
[0047] like Figure 2 As shown, corresponding to the above-mentioned A2L file integration method based on Simulink, in an embodiment of the present invention, there is also provided an A2L file integration system based on Simulink, which includes a data variable storage module 1, a data variable extraction module 2, a model creation module 3 and a file generation module 4. They are described below respectively.
[0048] The data variable storage module 1 is used to create a Simulink data dictionary file to store the data variables of the application models when developing multiple application models. The data variables include calibration variables and observation variables.
[0049] The data variable extraction module 2 is used to extract all data variables in the Simulink data dictionary files corresponding to the multiple application models, and store them in a newly created Simulink data dictionary file.
[0050] The model creation module 3 is used to establish a new model including all data variables.
[0051] The file generation module 4 is used to automatically generate an A2L file including all data variables while generating the code corresponding to the new model.
[0052] In the embodiment of the present invention, the model creation module 3 establishes a new model including all data variables, and the process includes:
[0053] Build a new model in which
[0054] Create a corresponding Constant module for each calibration quantity, and connect the Constant module to a Terminator module with a signal line;
[0055] Create a corresponding signal line for each observation, connect the source of the signal line to a Constant module, and connect the end of the signal line to a Terminator module.
[0056] Furthermore, in an embodiment of the present invention, a computer storage medium is provided, in which a computer program is stored. When the computer program is executed, the above-mentioned A2L file integration method based on Simulink is implemented.
[0057] In summary, the Simulink-based A2L file integration method and system of the present invention, when developing an application model in a Simulink environment, stores data variables corresponding to the application model in a Simulink data dictionary file, then extracts all data variables from multiple Simulink data dictionary files, and creates a new model containing all data variables; subsequently, through the Simulink code generation process, an A2L file containing all data variables is automatically generated, thereby quickly generating a complete A2L file, simplifying the A2L file generation process, avoiding the tedious operations of manually arranging and merging multiple A2L files, and ensuring the integrity and consistency of the data; in addition, through the intervention of automated programs, the possibility of human errors is reduced, and development efficiency and product quality are improved.
[0058] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for integrating A2L files based on Simulink, characterized in that: include: Extract all data variables in Simulink data dictionary files corresponding to multiple application models; Build a new model that includes all data variables; While generating the code corresponding to the new model, an A2L file including all data variables is automatically generated.
2. The A2L file integration method based on Simulink as claimed in claim 1, characterized in that: The data variables include observed quantities and calibrated quantities.
3. The A2L file integration method based on Simulink as claimed in claim 1, characterized in that: The method of extracting all data variables in the Simulink data dictionary files corresponding to the multiple application models also includes: When developing the multiple application models, a Simulink data dictionary file is created respectively to store the data variables of the application models.
4. The A2L file integration method based on Simulink as claimed in claim 2, characterized in that: Build a new model that includes all data variables, including: Build a new model in which Create a corresponding Constant module for each calibration quantity, and connect the Constant module to a Terminator module with a signal line; A corresponding signal line is created for each observation, and the source of the signal line is connected to a Constant module, and the end of the signal line is connected to a Terminator module.
5. An A2L file integration system based on Simulink, characterized in that: include: A data variable extraction module is used to extract all data variables in Simulink data dictionary files corresponding to multiple application models; Model creation module, used to build a new model including all data variables; The file generation module is used to automatically generate an A2L file including all data variables while generating the code corresponding to the new model.
6. The A2L file integration system based on Simulink as claimed in claim 5, characterized in that: The data variables include observed quantities and calibrated quantities.
7. The A2L file integration system based on Simulink as claimed in claim 5, characterized in that: Also includes The data variable storage module is used to create a Simulink data dictionary file to store the data variables of the application models when developing the multiple application models.
8. The A2L file integration system based on Simulink as claimed in claim 6, characterized in that: The model creation module builds a new model including all data variables, including: Build a new model in which Create a corresponding Constant module for each calibration quantity, and connect the Constant module to a Terminator module with a signal line; A corresponding signal line is created for each observation, and the source of the signal line is connected to a Constant module, and the end of the signal line is connected to a Terminator module.
9. A computer storage medium, characterized in that The computer storage medium stores a computer program, and when the computer program is executed, the A2L file integration method based on Simulink as described in any one of claims 1 to 4 is implemented.