A2L file generation method, device, equipment and medium

By building the target model and generating A2L files containing calibration and model measurement, and extracting the RTE measurement volume, merging and generating engineering A2L files, solving the problem of low efficiency of the A2L file, and achieved more efficient and reliable A2L file generation.

CN115373648BActive Publication Date: 2025-01-28DONGFENG MOTOR GRP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210836985.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-15
Publication Date
2025-01-28
Estimated Expiration
2042-07-15

AI Technical Summary

Technical Problem

In the prior art, the generation efficiency of A2L files is low and cannot meet the controller's needs for A2L files.

Method used

Build N target models according to the requirements of the target architecture, generate a model A2L file containing the calibration quantity and model measurement of each target model, and the RTE measurement volume of the environment mapping during running. , Generate engineering A2L file.

Benefits of technology

Improved the production efficiency of the A2L file, improved the reliability of the file, saved the cost of labor, and iterates for the software development of the vehicle controller software, especially the calibration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115373648B_ABST
    Figure CN115373648B_ABST
Patent Text Reader

Abstract

The present invention discloses an A2L file generation method, device, equipment and medium, including: building N target models according to the configuration requirements of the target architecture, generating a model A2L file containing the calibration quantity and model measurement quantity of each target model according to the N target models, and extracting the RTE measurement quantity of the runtime environment mapping; merging the engineering A2L file and the RTE measurement quantity to generate the engineering A2L file. The present invention improves the generation efficiency of the A2L file in the process of vehicle controller software development by automatically generating the engineering A2L file, which not only improves the reliability of the A2L file, but also greatly saves the manpower cost in the A2L file processing process, which is conducive to the vehicle controller software development, especially the software iteration of the calibration process. The present invention can quickly and automatically generate an A2L file based on the existing file, and the generation speed of the A2L file is fast and efficient, which can save a lot of manpower and material resources, and compared with manual writing and modification, the error rate is reduced, and the quality of the software can be better guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of controller technology, and in particular to an A2L file generation method, device, equipment and medium. Background Art

[0002] A2L files include device parameter information, interface data information, and ECU (Electronic Control Unit) parameter information. Device parameter information describes the basic information of the ECU and some common properties of the ECU data unit; interface data information describes the interface information required to be configured when the calibration system communicates with the ECU; and ECU parameter information describes the detailed content of the internal data unit. It can be seen that A2L files are crucial to the controller.

[0003] However, the generation efficiency of the A2L file in the related art is low and cannot meet the controller's demand for the A2L file. Summary of the invention

[0004] The embodiments of the present application solve the technical problem of low A2L file generation efficiency in the prior art by providing an A2L file generation method, apparatus, device and medium, and achieve the technical effect of improving the A2L file generation efficiency.

[0005] In a first aspect, the present application provides a method for generating an A2L file, the method comprising:

[0006] According to the configuration requirements of the target architecture, build N target models, where N is a positive integer;

[0007] According to N target models, a model A2L file including calibration quantities and model measurement quantities of each target model is generated, and RTE measurement quantities of runtime environment mapping are extracted;

[0008] Merge the project A2L file and RTE measurements to generate the project A2L file.

[0009] Furthermore, according to the configuration requirements of the target architecture, N target models are built, including:

[0010] According to the configuration requirements of the automotive open system architecture, N target models are built. The configuration requirements include interface configuration requirements.

[0011] Furthermore, according to the N target models, a model A2L file containing the calibration quantity and model measurement quantity of each target model is generated, including:

[0012] According to N target models, generate ARXML files for each target model;

[0013] Extract the calibration quantity and model measurement quantity from the ARXML file of each target model, and generate a single model A2L file corresponding to each target model;

[0014] Merge the single model A2L files corresponding to N target models to generate a model A2L file.

[0015] Furthermore, according to the N target models, an ARXML file of each target model is generated, including:

[0016] Generate an ARXML file for each target model using Embedded Coder.

[0017] Furthermore, the calibration quantity and model measurement quantity are extracted from the ARXML file of each target model to generate a single model A2L file corresponding to each target model, including:

[0018] Through the A2L script file, the calibration quantity and model measurement quantity are extracted from the ARXML file of each target model to generate a single model A2L file corresponding to each target model.

[0019] Furthermore, the single model A2L files corresponding to the N target models are merged to generate a model A2L file, including:

[0020] By merging script files, the single model A2L files corresponding to N target models are merged to generate a model A2L file.

[0021] Furthermore, the single model A2L files corresponding to the N target models are merged to generate a model A2L file, including:

[0022] The single model A2L files corresponding to N target models are merged through the target syntax to generate a model A2L file.

[0023] Furthermore, according to the N target models, RTE measurements of the runtime environment mapping are extracted, including:

[0024] For each target model, generate a model statistics file with the top-level input and output variable names;

[0025] Merge the model statistics files corresponding to N target models to generate engineering statistics files;

[0026] Extract RTE measurements of runtime environment mapping based on the engineering statistics file and the runtime environment file.

[0027] Furthermore, a model statistics file of top-level input and output variable names is generated, including:

[0028] Generate a model statistics file with the top-level input and output variable names through the input and output script files.

[0029] Furthermore, according to the engineering statistics file and the runtime environment file, the RTE measurement quantities of the runtime environment mapping are extracted, including:

[0030] By browsing the mapping script file, the RTE measurement quantities of the runtime environment mapping are extracted according to the engineering statistics file and the runtime environment file.

[0031] Furthermore, the engineering A2L file and the RTE measurement are combined to generate an engineering A2L file, including:

[0032] Merge the project A2L file and RTE measurements to generate an initial A2L file containing virtual addresses;

[0033] According to the ELF file generated by the compiler, the virtual address in the initial A2L file is replaced with the physical address to obtain the project A2L file.

[0034] Furthermore, the engineering A2L file and the RTE measurement are combined to generate an engineering A2L file, including:

[0035] The address replacement script is used to merge the project A2L file and the RTE measurement quantity to generate the project A2L file.

[0036] Furthermore, the engineering A2L file and the RTE measurement are combined to generate an engineering A2L file, including:

[0037] Use regular expressions to merge the engineering A2L file and RTE measurements to generate the engineering A2L file.

[0038] In a second aspect, the present application provides an A2L file generation device, the device comprising:

[0039] The model building module is used to build N target models according to the configuration requirements of the target architecture, where N is a positive integer;

[0040] A file generation module, used for generating a model A2L file including a calibration quantity and a model measurement quantity of each target model according to N target models, and extracting an RTE measurement quantity of a runtime environment mapping;

[0041] The merging module is used to merge the engineering A2L file and the RTE measurement quantity to generate the engineering A2L file.

[0042] In a third aspect, the present application provides an electronic device, including:

[0043] processor;

[0044] a memory for storing processor-executable instructions;

[0045] The processor is configured to execute to implement an A2L file generation method provided in the first aspect.

[0046] In a fourth aspect, the present application provides a non-temporary computer-readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to implement an A2L file generation method as provided in the first aspect.

[0047] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0048] The embodiment of the present application builds N target models according to the configuration requirements of the target architecture, generates a model A2L file containing the calibration quantity and model measurement quantity of each target model according to the N target models, and extracts the RTE measurement quantity of the runtime environment mapping; merges the engineering A2L file and the RTE measurement quantity to generate the engineering A2L file. It can be seen that this embodiment improves the generation efficiency of A2L files in the process of vehicle controller software development by automatically generating engineering A2L files under the premise of low equipment cost, which not only improves the reliability of A2L files, but also greatly saves the labor cost in the process of A2L file processing, which is beneficial to the software development of vehicle controllers, especially the software iteration of the calibration process.

[0049] The embodiment of the present application can quickly and automatically generate an A2L file based on an existing file. The generation speed of the A2L file is fast and efficient, which can save a lot of manpower and material resources, and compared with manual writing and modification, the error rate is reduced, and the quality of the software can be better guaranteed. In addition, the method steps of this embodiment are simple, the calculation complexity is low, the device structure is simple, and the hardware requirements are low, which greatly reduces the generation cost of the A2L file. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 A flowchart of a method for generating an A2L file provided for application;

[0052] Figure 2 Example codes defined for the format of the CHARACTERISTIC structure;

[0053] Figure 3 Example code defined for the measurement structure (MEASUREMENT) format;

[0054] Figure 4 Example code in the format of a conversion formula (COMPU_METHOD);

[0055] Figure 5 This is an example of a statistical table of input and output variable names at the top level of a single target model;

[0056] Figure 6 This is an example diagram of the statistical table of top-level input and output variable names for the entire project;

[0057] Figure 7 A schematic diagram of the structure of an A2L file generation device provided for the application;

[0058] Figure 8 A schematic diagram of the structure of an electronic device provided for application. DETAILED DESCRIPTION

[0059] The embodiment of the present application solves the technical problem of low efficiency in generating A2L files in the prior art by providing an A2L file generating method.

[0060] The technical solution of the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:

[0061] A method for generating an A2L file comprises: building N target models according to the configuration requirements of a target architecture, where N is a positive integer; generating a model A2L file including a calibration quantity and a model measurement quantity of each target model according to the N target models, and extracting an RTE measurement quantity of a runtime environment mapping; and merging an engineering A2L file and the RTE measurement quantity to generate an engineering A2L file.

[0062] The embodiment of the present application builds N target models according to the configuration requirements of the target architecture, generates a model A2L file containing the calibration quantity and model measurement quantity of each target model according to the N target models, and extracts the RTE measurement quantity of the runtime environment mapping; merges the engineering A2L file and the RTE measurement quantity to generate the engineering A2L file. It can be seen that this embodiment improves the generation efficiency of A2L files in the process of vehicle controller software development by automatically generating engineering A2L files under the premise of low equipment cost, which not only improves the reliability of A2L files, but also greatly saves the labor cost in the process of A2L file processing, which is beneficial to the software development of vehicle controllers, especially the software iteration of the calibration process.

[0063] The embodiment of the present application can quickly and automatically generate an A2L file based on an existing file. The generation speed of the A2L file is fast and efficient, which can save a lot of manpower and material resources, and compared with manual writing and modification, the error rate is reduced, and the quality of the software can be better guaranteed. In addition, the method steps of this embodiment are simple, the calculation complexity is low, the device structure is simple, and the hardware requirements are low, which greatly reduces the generation cost of the A2L file.

[0064] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0065] First of all, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0066] During the process of vehicle controller software development, the vehicle controller needs to be calibrated. Calibration refers to the process of continuously adjusting the software parameters of the controller through software simulation or through test verification of components or the whole vehicle to achieve the best performance of components and the whole vehicle. Calibration is usually completed by calibration tools. The calibration tool can read the values ​​of measurement parameters (recorded as measurement quantities or measurement variables) and calibration parameters (recorded as calibration quantities or calibration variables) in the ECU according to the messages provided by the A2L file, and calibrate the values ​​of measurement parameters and calibration parameters according to user requirements to optimize the control strategy. During the on-board debugging stage, it is necessary to rely on the A2L file to repeatedly recompile the model code, so the efficiency of A2L file generation is crucial.

[0067] Among them, the A2L file is a file that describes the internal variables of the ECU, including measurement variables and calibration variables. The A2L file corresponds to the program one by one. Through the A2L file, the calibration tool can identify the variable name, variable address, variable length and other information in the program.

[0068] In the prior art, there are three common methods for generating A2L files:

[0069] (1) Manual writing and modification. When this method is used, if the source code file is changed, the relevant parts of the variables of many A2L files need to be manually modified one by one, which is not only time-consuming and labor-intensive, but also very error-prone, which can easily affect the development cost and quality of the entire automotive product.

[0070] (2) Use commercial software to generate A2L files. Most of these software have the function of generating and merging A2L files. However, such software is expensive, resulting in high software costs. At the same time, engineers need to spend a lot of time to study the A2L file generation method of such software and the integration method with Simulink software, resulting in a lot of manpower and time required to achieve the generation of A2L files.

[0071] (3) At present, the design and development process based on MATLAB / Simulink model has been widely used and recognized in the field of automotive electronics. Set the MATLAB control model according to the control requirements, and use the MATLAB code to automatically generate C code and source A2L file (select ASAP2 File in the code generation configuration). However, the A2L file generated by this method does not contain the input and output quantities of the top level of the model, and the calibration quantities and measurement quantities in the model are defined as Autosar data classes, resulting in no calibration quantities and measurement quantities appearing in the A2L file generated using this method.

[0072] In order to solve the above problems, this embodiment provides Figure 1 An A2L file generation method is shown, the method comprising steps S11 to S13.

[0073] Step S11, building N target models according to the configuration requirements of the target architecture, where N is a positive integer;

[0074] Step S12, generating a model A2L file including calibration quantities and model measurement quantities of each target model according to the N target models, and extracting RTE measurement quantities of runtime environment mapping;

[0075] Step S13, merging the engineering A2L file and the RTE measurement quantity to generate an engineering A2L file.

[0076] Regarding step S11, N target models are built according to the configuration requirements of the target architecture, where N is a positive integer.

[0077] The target architecture can be determined according to actual needs. For example, the target architecture can be Autosar (Automotive Open System Architecture). Autosar is a cooperative development framework for automotive electronic systems jointly participated by global automobile manufacturers, parts suppliers, and various research and service institutions, and has established an open automotive control unit (ECU) standard software architecture.

[0078] If the target architecture is Autosar, then N target models can be built according to the configuration requirements of the automotive open system architecture. The configuration requirements mainly include interface configuration requirements. Usually, the value of N can be determined according to the number of functional items involved in the project requirements. For example, if the current project requirements involve 3 functional items, then N can be 3, that is, 3 target models are built.

[0079] For example, three target models that conform to the Simulink model of Autosar can be built, and they are recorded as Model_1.slx, Mode2_1.slx, and Model_3.slx respectively.

[0080] Regarding step S12, based on the N target models, a model A2L file including calibration quantities and model measurement quantities of each target model is generated, and RTE measurement quantities of runtime environment mapping are extracted.

[0081] Step S12 can be divided into two parts, namely "generating a model A2L file including calibration quantities and model measurement quantities of each target model according to N target models" and "extracting RTE measurement quantities of runtime environment mapping according to N target models".

[0082] Among them, "generating a model A2L file containing calibration quantities and model measurement quantities of each target model according to N target models" can be decomposed into steps S121-S123, and "extracting RTE measurement quantities of runtime environment mapping according to N target models" can be decomposed into steps S124-S126.

[0083] [Step S121-Step S123]

[0084] Step S121: Generate an ARXML file for each target model according to the N target models.

[0085] The ARXML file is actually an XML file. Based on the XML file, the AUTOSAR specification defines the file format for transmitting information as ARXML based on the application scenarios of automotive electronics. AR stands for Architecture. Like XML files, ARXML is a general configuration / database file.

[0086] In actual operation, the ARXML file of each target model can be generated through the embedded encoder.

[0087] For example, when three target models of Simulink models that conform to Autosar are built, recorded as Model_1.slx, Model2_1.slx, and Model_3.slx, respectively, the ARXML files of each model can be generated by Embedded Coder, recorded as Model_1.arxml, Model_2.arxml, and Model_3.arxml. Embedded Coder can analyze the Autosar compliance of the model, including the correctness analysis of the modeling of the software unit, such as data coupling check, global data storage check, global jump module check, etc., and generate the code file of the model.

[0088] Step S122: extract the calibration quantity and model measurement quantity from the ARXML file of each target model, and generate a single model A2L file corresponding to each target model.

[0089] The calibration quantity and model measurement quantity in the ARXML file corresponding to each target model are extracted, and a single model A2L file is generated according to the calibration quantity and the model measurement quantity (a single model A2L file refers to an A2L file corresponding to a single target model).

[0090] Specifically, the calibration quantity and model measurement quantity can be extracted from the ARXML file of each target model through the A2L script file to generate a single model A2L file corresponding to each target model. The A2L script file can be written according to the requirements, and the content of the A2L script file is not limited in this embodiment. For example, in actual operation, the script Gen_A2L.py written by the inventor is used to implement step S122 in this embodiment.

[0091] For example, the script Gen_A2L.py can be used to extract information from Model_1.arxml, Model_2.arxml, and Model_3.arxml to generate A2L files containing calibration quantities and measurement quantities, which are recorded as Model_1.a2l, Model_2.a2l, and Model_3.a2l, respectively.

[0092] In addition, the script Gen_A2L.py is mainly used to extract A2L configuration information from ARXML files to generate single-model A2L files. Among them, the CHARACTERISTIC format is defined as follows Figure 2 The format definition of the measurement structure (MEASUREMENT) is shown in 3; the format definition of the conversion formula (COMPU_METHOD) is shown in Figure 4 shown.

[0093] Step S123, merging the single model A2L files corresponding to the N target models to generate a model A2L file.

[0094] Each of the N target models corresponds to a single model A2L file. By merging the N single model A2L files corresponding to the N target models, the model A2L file corresponding to the current entire engineering project can be obtained.

[0095] Specifically, the single model A2L files corresponding to the N target models can be merged by merging the script file to generate the model A2L file. The merge script file can be written as required, and the present embodiment does not limit the content of the merge script file. For example, in the actual operation of the present embodiment, the script MergeA2L.bat written by the inventor is used to implement step S123.

[0096] The script MergeA2L.bat includes the syntax type "%% a">>A2Lfile", and the purpose of merging the single model A2L files corresponding to N target models and generating a model A2L file can be achieved by calling the target syntax.

[0097] For example, through the script MergeA2L.bat, the single model A2L files Model_1.a2l, Model_2.a2l, and Model_3.a2l containing calibration quantities and measurement quantities corresponding to a single target model are merged to generate a model A2L file containing calibration quantities and measurement quantities corresponding to the entire engineering project, which is recorded as Project_MC.a2l.

[0098] In addition, the script MergeA2L.bat is mainly used to merge A2L files, in which the type"%%a">>A2Lfile syntax is used to achieve the head and tail splicing of two A2L files.

[0099] [Step S124-Step S126]

[0100] Step S124: for each target model, generate a model statistics file of the top-level input and output variable names.

[0101] A model statistics file of the top-level input and output variable names can be generated through the input and output script file. The model statistics file can be a CSV file type, or an Excel file type, or of course, other file types, which is not limited in this embodiment. It should be noted that the file type of the model statistics file needs to correspond to the input and output script file. For example, when the model statistics file needs to be an Excel file type, the input and output script file should be a script that can generate an Excel table.

[0102] The input and output script files can be written according to the requirements, and the present embodiment does not limit the content of the input and output script files. For example, in the actual operation of the present embodiment, the script FindIOSignal.m written by the inventor is used to implement step S124.

[0103] For example, in actual implementation, the inventor of this embodiment uses the script FindIOSignal.m to generate the input and output variable name statistics table of each model top level according to Model_1.arxml, Model_2.arxml, and Model_3.arxml, respectively recorded as Model_1_IOSignalList.csv, Model_2_IOSignalList.csv, and Model_3_IOSignalList.csv. An example diagram of the input and output variable name statistics table of the top level of a single target model can be referred to Figure 5 .

[0104] In addition, the script FindIOSignal.m is mainly used to count the names of the top-level input and output modules of the model. It searches for the top-level Inport and Outport modules of the model through find_system('ModelName','SearchDepth',1,'BlockType','Inport') and find_system('ModelName','SearchDepth',1,'BlockType','Outport') and records the names of each module; and records the top-level Inport and Outport module information into a CSV file through writetable(T,filename).

[0105] For example, the top-level input and output variable information of the model Model_1.slx is recorded in Model_1_IOSignalList.csv.

[0106] Step S125, merging the model statistics files corresponding to the N target models to generate an engineering statistics file.

[0107] The model statistics files corresponding to each target model in the N target models are merged to generate an engineering statistics file. The model statistics files corresponding to the N target models can be merged by merging script files to generate an engineering statistics file. The merged script file can be written according to requirements, and this embodiment does not limit the content of the merged script file.

[0108] For example, merge the top-level input and output variable name statistics tables Model_1_IOSignalList.csv, Model_2_IOSignalList.csv, and Model_3_IOSignalList.csv of all models to generate the top-level input and output variable name statistics table Project_IOSignalList.csv of the entire project. For a sample diagram of the top-level input and output variable name statistics table of the entire project, please refer to Figure 6 .

[0109] Step S126: extracting RTE measurement quantities of runtime environment mapping according to the engineering statistics file and the runtime environment file.

[0110] The running environment file is the Rte.c file (run time environment). The Rte.c file can be generated by using the ISOLAR-AB tool according to the arxml files of all models.

[0111] The specific measurement parameters of the RTE measurement and the model measurement can be the same or different, but since the users who set the two measurement are different, the two measurement are distinguished. Among them, the RTE measurement is added by the basic software engineer, and the model measurement is added by the application software engineer.

[0112] Specifically, the RTE measurement quantity of the runtime environment mapping can be extracted by browsing the mapping script file according to the engineering statistics file and the runtime environment file. The browsing mapping script file can be written according to the requirements, and this embodiment does not limit the content of the browsing mapping script file. For example, in actual operation, this embodiment implements step S126 through the script ScanRTE.py written by the inventor.

[0113] For example, through the script ScanRTE.py, based on the project top-level input and output variable name table Project_IOSignalList.csv and Rte.c file, the measurement quantities of RTE Mapping are extracted to generate NEW_RTE_Measurements.a2l.

[0114] Regarding step S13, the project A2L file and the RTE measurement quantity are merged to generate the project A2L file.

[0115] Step S13 can be decomposed into step S131 and step S132.

[0116] Step S131 , merging the project A2L file and the RTE measurement quantity to generate an initial A2L file containing a virtual address.

[0117] For example, merge NEW_RTE_Measurements.a2l and Project_MC.a2l to generate the initial A2L file Project_VADR.a2l containing virtual addresses.

[0118] Regular expressions can be used to merge the project A2L file and RTE measurements to generate an initial A2L file containing virtual addresses.

[0119] Step S132, according to the ELF file generated by the compiler, the virtual address in the initial A2L file is replaced with a physical address to obtain the project A2L file.

[0120] ELF (Executable File Format) is an executable file format. After the compiler completes the C code compilation and linking process, it will generate a flashable file (.s19 or .hex), along with the map file and ELF file.

[0121] Through the address replacement script, the virtual address in the initial A2L file is replaced with the physical address based on the ELF file to generate the project A2L file. The address replacement script file can be written according to the requirements, and the content of the address replacement script file is not limited in this embodiment. For example, in actual operation, the script FinalA2L.py written by the inventor is used to implement step S132.

[0122] For example, through the script FinalA2L.py, based on the ELF file Project.elf, the virtual address in Project_VADR.a2l generated in step S7 is replaced with the actual physical address to generate the A2L file Project.a2l required for the project.

[0123] In addition, the script FinalA2L.py is mainly used to extract the physical address from the ELF file and replace the corresponding virtual address in the A2L file. The regular expression '0x0+\s* / \*\s*@ECU_Address@(.*\w+?)@\s*\* / ' is used to find and replace the address.

[0124] In summary, the embodiment of the present invention builds N target models according to the configuration requirements of the target architecture, generates a model A2L file containing the calibration quantity and model measurement quantity of each target model according to the N target models, and extracts the RTE measurement quantity of the runtime environment mapping; merges the engineering A2L file and the RTE measurement quantity to generate the engineering A2L file. It can be seen that this embodiment improves the generation efficiency of the A2L file in the process of vehicle controller software development by automatically generating the engineering A2L file, which not only improves the reliability of the A2L file, but also greatly saves the manpower cost in the process of A2L file processing, which is beneficial to the vehicle controller software development, especially the software iteration of the calibration process.

[0125] This embodiment can quickly and automatically generate an A2L file based on an existing file. The generation speed of the A2L file is fast and efficient, which can save a lot of manpower and material resources. Compared with manual writing and modification, the error rate is reduced, and the quality of the software can be better guaranteed. In addition, the method of this embodiment has simple steps, low calculation complexity, simple device structure, and low hardware requirements, which greatly reduces the cost of generating the A2L file.

[0126] Based on the same inventive concept, this embodiment provides Figure 7 An A2L file generation device is shown, the device comprising:

[0127] The model building module 71 is used to build N target models according to the configuration requirements of the target architecture, where N is a positive integer;

[0128] A file generation module 72, for generating a model A2L file including calibration quantities and model measurement quantities of each target model according to the N target models, and extracting RTE measurement quantities of runtime environment mapping;

[0129] The merging module 73 is used to merge the engineering A2L file and the RTE measurement quantity to generate the engineering A2L file.

[0130] Furthermore, the model building module 71 includes:

[0131] The model building submodule is used to build N target models according to the configuration requirements of the automotive open system architecture, and the configuration requirements include interface configuration requirements.

[0132] Furthermore, the file generation module 72 includes:

[0133] An ARXML file generation submodule is used to generate an ARXML file of each target model according to N target models;

[0134] A single model A2L file generation submodule is used to extract calibration quantities and model measurement quantities from the ARXML file of each target model and generate a single model A2L file corresponding to each target model;

[0135] The model A2L file generation submodule is used to merge the single model A2L files corresponding to N target models to generate a model A2L file.

[0136] Furthermore, the ARXML file generation submodule is specifically used for:

[0137] Generate an ARXML file for each target model using Embedded Coder.

[0138] Furthermore, the single model A2L file generation submodule is specifically used for:

[0139] Through the A2L script file, the calibration quantity and model measurement quantity are extracted from the ARXML file of each target model to generate a single model A2L file corresponding to each target model.

[0140] Furthermore, the model A2L file generation submodule is specifically used for:

[0141] By merging script files, the single model A2L files corresponding to N target models are merged to generate a model A2L file.

[0142] Furthermore, the model A2L file generation submodule is specifically used for:

[0143] The single model A2L files corresponding to N target models are merged through the target syntax to generate a model A2L file.

[0144] Furthermore, the file generation module 72 includes:

[0145] The model statistics file generation submodule is used to generate a model statistics file with the top-level input and output variable names for each target model;

[0146] The engineering statistics file generation submodule is used to merge the model statistics files corresponding to N target models to generate an engineering statistics file;

[0147] The RTE measurement quantity extraction submodule is used to extract the RTE measurement quantity mapped by the runtime environment according to the engineering statistics file and the runtime environment file.

[0148] Furthermore, the model statistics file generation submodule is specifically used to:

[0149] Generate a model statistics file with the top-level input and output variable names through the input and output script files.

[0150] Furthermore, the RTE measurement quantity extraction submodule is specifically used for:

[0151] By browsing the mapping script file, the RTE measurement quantities of the runtime environment mapping are extracted according to the engineering statistics file and the runtime environment file.

[0152] Furthermore, the merging module 73 is specifically used for:

[0153] Merge the project A2L file and RTE measurements to generate an initial A2L file containing virtual addresses;

[0154] According to the ELF file generated by the compiler, the virtual address in the initial A2L file is replaced with the physical address to obtain the project A2L file.

[0155] Furthermore, the merging module 73 is specifically used for:

[0156] The address replacement script is used to merge the project A2L file and the RTE measurement quantity to generate the project A2L file.

[0157] Furthermore, the merging module 73 is specifically used for:

[0158] Use regular expressions to merge the engineering A2L file and RTE measurements to generate the engineering A2L file.

[0159] Based on the same inventive concept, this embodiment provides Figure 8 An electronic device as shown includes:

[0160] Processor 81;

[0161] a memory 82 for storing instructions executable by the processor 81;

[0162] The processor 81 is configured to execute to implement an A2L file generation method as provided above.

[0163] Based on the same inventive concept, this embodiment provides a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by the processor 81 of the electronic device, the electronic device can implement an A2L file generation method as provided above.

[0164] Since the electronic device introduced in this embodiment is an electronic device used to implement the information processing method in the embodiment of the present application, based on the information processing method introduced in the embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements the electronic device used by the information processing method in the embodiment of the present application, it belongs to the scope of protection of this application.

[0165] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0166] According to the configuration requirements of the target architecture, the embodiment of the present invention builds N target models, generates a model A2L file containing the calibration quantity and model measurement quantity of each target model according to the N target models, and extracts the RTE measurement quantity of the runtime environment mapping; merges the engineering A2L file and the RTE measurement quantity to generate an engineering A2L file. It can be seen that this embodiment improves the generation efficiency of A2L files in the process of vehicle controller software development by automatically generating engineering A2L files, which not only improves the reliability of A2L files, but also greatly saves the labor cost in the process of A2L file processing, which is beneficial to the vehicle controller software development, especially the software iteration of the calibration process.

[0167] This embodiment can quickly and automatically generate an A2L file based on an existing file. The generation speed of the A2L file is fast and efficient, which can save a lot of manpower and material resources. Compared with manual writing and modification, the error rate is reduced, and the quality of the software can be better guaranteed. In addition, the method of this embodiment has simple steps, low calculation complexity, simple device structure, and low hardware requirements, which greatly reduces the cost of generating the A2L file.

[0168] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0169] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0170] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0172] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0173] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for generating an A2L file, characterized in that: The method comprises: According to the configuration requirements of the target architecture, build N target models, where N is a positive integer; Generate a model A2L file corresponding to the entire engineering project including calibration quantities and model measurement quantities of each target model according to the N target models, and extract RTE measurement quantities of runtime environment mapping; Merging the model A2L file and the RTE measurement corresponding to the entire engineering project to generate an engineering A2L file; The generating, according to the N target models, a model A2L file corresponding to the entire engineering project including the calibration quantity and model measurement quantity of each target model, and extracting the RTE measurement quantity of the runtime environment mapping includes: According to the N target models, an ARXML file of each target model is generated; the calibration quantity and the model measurement quantity are extracted from the ARXML file of each target model to generate a single model A2L file corresponding to each target model; the single model A2L files corresponding to each of the N target models are merged to generate the model A2L file corresponding to the entire engineering project; For each target model, generate a model statistics file of the top-level input and output variable names; merge the model statistics files corresponding to the N target models to generate an engineering statistics file; extract the RTE measurement quantity of the runtime environment mapping according to the engineering statistics file and the runtime environment file; The step of merging the model A2L file and the RTE measurement corresponding to the entire engineering project to generate an engineering A2L file includes: The model A2L file and the RTE measurement corresponding to the entire engineering project are merged to generate an initial A2L file containing virtual addresses; according to the ELF file generated by the compiler, the virtual addresses in the initial A2L file are replaced with physical addresses to obtain the engineering A2L file.

2. The method according to claim 1, characterized in that According to the configuration requirements of the target architecture, N target models are built, including: The N target models are constructed according to the configuration requirements of the automotive open system architecture, wherein the configuration requirements include interface configuration requirements.

3. The method according to claim 1, characterized in that Generating an ARXML file of each target model according to the N target models includes: Generate an ARXML file for each target model using Embedded Coder.

4. The method according to claim 1, characterized in that The step of extracting the calibration quantity and the model measurement quantity from the ARXML file of each target model and generating a single model A2L file corresponding to each target model includes: Through the A2L script file, the calibration quantity and model measurement quantity are extracted from the ARXML file of each target model to generate a single model A2L file corresponding to each target model.

5. The method according to claim 1, characterized in that The merging of the single model A2L files corresponding to the N target models to generate the model A2L file corresponding to the entire engineering project includes: By merging the script files, the single model A2L files corresponding to the N target models are merged to generate the model A2L file corresponding to the entire engineering project.

6. The method according to claim 1, characterized in that The merging of the single model A2L files corresponding to the N target models to generate the model A2L file corresponding to the entire engineering project includes: The single model A2L files corresponding to the N target models are merged respectively through the target syntax to generate the model A2L file corresponding to the entire engineering project.

7. The method according to claim 1, characterized in that The model statistics file for generating the top-level input and output variable names includes: Generate a model statistics file with the top-level input and output variable names through the input and output script files.

8. The method according to claim 1, characterized in that The step of extracting RTE measurement quantities of runtime environment mapping according to the engineering statistics file and the runtime environment file includes: By browsing the mapping script file, the RTE measurement quantity of the runtime environment mapping is extracted according to the engineering statistics file and the runtime environment file.

9. The method according to claim 1, characterized in that The step of merging the model A2L file and the RTE measurement corresponding to the entire engineering project to generate an engineering A2L file includes: The model A2L file and the RTE measurement quantity corresponding to the entire engineering project are merged through the address replacement script to generate an engineering A2L file.

10. The method according to claim 1, characterized in that The step of merging the model A2L file and the RTE measurement corresponding to the entire engineering project to generate an engineering A2L file includes: The model A2L file and the RTE measurement quantity corresponding to the entire engineering project are merged using a regular expression to generate an engineering A2L file.

11. An A2L file generation device, characterized in that: The device comprises: The model building module is used to build N target models according to the configuration requirements of the target architecture, where N is a positive integer; A file generation module, used to generate a model A2L file corresponding to the entire engineering project including a calibration quantity and a model measurement quantity of each target model according to the N target models, and extract an RTE measurement quantity of a runtime environment mapping; A merging module, used to merge the model A2L file and the RTE measurement corresponding to the entire engineering project to generate an engineering A2L file; File generation module, including: An ARXML file generation submodule is used to generate an ARXML file of each target model according to N target models; A single model A2L file generation submodule is used to extract calibration quantities and model measurement quantities from the ARXML file of each target model and generate a single model A2L file corresponding to each target model; The model A2L file generation submodule is used to merge the single model A2L files corresponding to N target models to generate the model A2L file corresponding to the entire project; The model statistics file generation submodule is used to generate a model statistics file with the top-level input and output variable names for each target model; The engineering statistics file generation submodule is used to merge the model statistics files corresponding to N target models to generate an engineering statistics file; The RTE measurement quantity extraction submodule is used to extract the RTE measurement quantity mapped by the runtime environment according to the engineering statistics file and the runtime environment file; The merge module is used to: Merge the model A2L file and RTE measurement corresponding to the entire project to generate an initial A2L file containing virtual addresses; According to the ELF file generated by the compiler, the virtual address in the initial A2L file is replaced with the physical address to obtain the project A2L file.

12. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute to implement an A2L file generation method as claimed in any one of claims 1 to 10.

13. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to implement an A2L file generation method as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • A2L file generation method and system

    CN104636351A

  • Method and system for automatically generating A2L file

    CN104850570A