CN115373648A - A2L file generation method, device, equipment and medium - Google Patents
A2L file generation method, device, equipment and medium Download PDFInfo
- Publication number
- CN115373648A CN115373648A CN202210836985.6A CN202210836985A CN115373648A CN 115373648 A CN115373648 A CN 115373648A CN 202210836985 A CN202210836985 A CN 202210836985A CN 115373648 A CN115373648 A CN 115373648A
- Authority
- CN
- China
- Prior art keywords
- file
- model
- target
- project
- generate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 74
- 238000005259 measurement Methods 0.000 claims abstract description 102
- 238000013507 mapping Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 abstract description 21
- 238000012545 processing Methods 0.000 abstract description 12
- 238000011161 development Methods 0.000 abstract description 11
- 238000012986 modification Methods 0.000 abstract description 11
- 230000004048 modification Effects 0.000 abstract description 11
- 239000000463 material Substances 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 12
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 102100026291 Arf-GAP with SH3 domain, ANK repeat and PH domain-containing protein 2 Human genes 0.000 description 1
- 101000785915 Homo sapiens Arf-GAP with SH3 domain, ANK repeat and PH domain-containing protein 2 Proteins 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000011217 control strategy Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000013179 statistical model Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/37—Compiler construction; Parser generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/447—Target code generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method, a device, equipment and a medium for generating an A2L file, wherein the method comprises the following steps: according to the configuration requirements of a target architecture, setting up N target models, generating a model A2L file containing the calibration quantity and the model measurement quantity of each target model according to the N target models, and extracting RTE measurement quantity mapped by the runtime environment; and combining the project A2L file and the RTE measurement quantity to generate a project A2L file. According to the method, the engineering A2L file is automatically generated, the generation efficiency of the A2L file in the development process of the vehicle-mounted controller software is improved, the reliability of the A2L file is improved, the labor cost in the processing process of the A2L file is greatly saved, and the software iteration of the development process, particularly the calibration process of the vehicle-mounted controller software is facilitated. The method can quickly and automatically generate the A2L file according to the existing file, the A2L file is generated quickly and efficiently, a large amount of manpower and material resources can be saved, the error rate is reduced compared with manual writing and modification, and the quality of software can be better ensured.
Description
Technical Field
The present invention relates to the field of controller technologies, and in particular, to a method, an apparatus, a device, and a medium for generating an A2L file.
Background
The A2L file includes device parameter information, interface data information, and ECU (Electronic Control Unit) parameter information. The device parameter information describes basic information of the ECU and some common attributes of the ECU data unit; the interface data information describes interface information required to be configured when the calibration system is communicated with the ECU; the ECU parameter information describes the details of the internal data unit. It can be seen that the A2L file is critical to the controller.
However, the related art has low A2L file generation efficiency, and cannot meet the requirement of the controller for the A2L file.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a medium for generating an A2L file, solves the technical problem that the generation efficiency of the A2L file is low in the prior art, and achieves the technical effect of improving the generation efficiency of the A2L file.
In a first aspect, the present application provides an A2L file generating method, including:
according to the configuration requirements of a target architecture, setting up N target models, wherein N is a positive integer;
generating a model A2L file containing the calibration quantity and the model measurement quantity of each target model according to the N target models, and extracting RTE measurement quantity mapped by the runtime environment;
and combining the project A2L file and the RTE measurement quantity to generate a project A2L file.
Further, according to the configuration requirements of the target architecture, setting up N target models, including:
and according to configuration requirements of the automobile open system architecture, setting up N target models, wherein the configuration requirements comprise interface configuration requirements.
Further, according to the N target models, a model A2L file containing the calibration quantity and the model measurement quantity of each target model is generated, including:
generating an ARXML file of each target model according to the N target models;
extracting a calibration quantity and a model measurement quantity from the ARXML file of each target model to generate a single model A2L file corresponding to each target model;
and combining the single model A2L files corresponding to the N target models respectively to generate a model A2L file.
Further, according to the N object models, generating an ARXML file for each object model, including:
and generating an ARXML file of each target model through an embedded encoder.
Further, extracting a calibration quantity and a model measurement quantity from the ARXML file of each target model, and generating a single model A2L file corresponding to each target model, wherein the method comprises the following steps:
and extracting a standard quantity and a model measurement quantity 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.
Further, merging the single model A2L files corresponding to the N target models, respectively, to generate a model A2L file, including:
and combining the single model A2L files corresponding to the N target models respectively by combining the script files to generate a model A2L file.
Further, merging the single model A2L files corresponding to the N target models, respectively, to generate a model A2L file, including:
and merging the single model A2L files corresponding to the N target models respectively through the target grammar to generate the model A2L files.
Further, extracting the RTE measurement quantity of the runtime environment mapping according to the N target models, comprising:
generating a model statistical file of the input and output variable names of the top layer aiming at each target model;
combining model statistical files corresponding to the N target models to generate a project statistical file;
and extracting RTE measurement quantity of the runtime environment mapping according to the engineering statistical file and the runtime environment file.
Further, generating a model statistical file of the top-level input/output variable name, including:
and generating a model statistical file of the top-level input and output variable name through the input and output script file.
Further, according to the project statistics file and the operation environment file, extracting RTE measurement quantity of the operation environment mapping, comprising:
and extracting RTE measurement quantity mapped by the running environment according to the engineering statistical file and the running environment file by browsing the mapping script file.
Further, combining the project A2L file and the RTE measurement quantity to generate a project A2L file, comprising:
combining the project A2L file and the RTE measurement quantity to generate an initial A2L file containing a virtual address;
and according to the ELF file generated by the compiler, replacing the virtual address in the initial A2L file with a physical address to obtain an engineering A2L file.
Further, combining the project A2L file and the RTE measurement quantity to generate a project A2L file, comprising:
and combining the project A2L file and the RTE measurement quantity through the address replacement script to generate the project A2L file.
Further, combining the project A2L file and the RTE measurement quantity to generate a project A2L file, comprising:
and merging the project A2L file and the RTE measurement quantity by adopting a regular expression to generate a project A2L file.
In a second aspect, the present application provides an A2L file generating apparatus, including:
the model building module is used for building N target models according to the configuration requirements of the target architecture, wherein N is a positive integer;
the file generation module is used for generating a model A2L file containing the calibration quantity and the model measurement quantity of each target model according to the N target models and extracting RTE measurement quantity mapped by the runtime environment;
and the merging module is used for merging the project A2L file and the RTE measurement quantity to generate the project A2L file.
In a third aspect, the present application provides an electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute to implement an A2L file generation method as provided in the first aspect.
In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform a method for implementing A2L file generation as provided in the first aspect.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
according to the configuration requirements of a target architecture, N target models are built, a model A2L file containing the calibration quantity and the model measurement quantity of each target model is generated according to the N target models, and RTE measurement quantity mapped by the runtime environment is extracted; and combining the project A2L file and the RTE measurement quantity to generate a project A2L file. Therefore, according to the embodiment, the engineering A2L file is automatically generated on the premise of low equipment cost, the generation efficiency of the A2L file in the development process of the software of the vehicle-mounted controller is improved, the reliability of the A2L file is improved, the labor cost in the processing process of the A2L file is greatly saved, and the software development, particularly the software iteration in the calibration process of the software of the vehicle-mounted controller is facilitated.
The embodiment of the application can rapidly and automatically generate the A2L file according to the existing file, the A2L file is generated fast and efficiently, a large amount of manpower and material resources can be saved, the error rate is reduced compared with manual writing and modification, and the quality of software can be guaranteed. In addition, the method of the embodiment has the advantages of simple steps, low calculation complexity, simple device structure and low requirement on hardware, and greatly reduces the generation cost of the A2L file.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a schematic flow chart of an A2L file generation method applied for providing;
FIG. 2 is an exemplary code for a format definition of a scalar quantity structure (CHARACTERISTIC);
FIG. 3 is exemplary code defined in a Measure Structure (MEASUREMENT) format;
FIG. 4 is exemplary code in the conversion formula (COMPU _ METHOD) format;
FIG. 5 is a diagram of an example of an input output variable name statistics at the top level of a single object model;
FIG. 6 is a top level input output variable name statistics example diagram of an entire project;
FIG. 7 is a schematic structural diagram of an A2L file generation apparatus applied for;
fig. 8 is a schematic structural diagram of an electronic device provided in the application.
Detailed Description
The embodiment of the application provides an A2L file generation method, and solves the technical problem that in the prior art, the A2L file generation efficiency is low.
In order to solve the technical problems, the general idea of the embodiment of the application is as follows:
a method for generating an A2L file comprises the following steps: according to the configuration requirements of a target architecture, setting up N target models, wherein N is a positive integer; generating a model A2L file containing the calibration quantity and the model measurement quantity of each target model according to the N target models, and extracting RTE measurement quantity mapped by the runtime environment; and combining the project A2L file and the RTE measurement quantity to generate a project A2L file.
According to the configuration requirements of a target architecture, N target models are built, a model A2L file containing the calibration quantity and the model measurement quantity of each target model is generated according to the N target models, and RTE measurement quantity mapped by the runtime environment is extracted; and combining the project A2L file and the RTE measurement quantity to generate a project A2L file. Therefore, according to the embodiment, the engineering A2L file is automatically generated on the premise of low equipment cost, the generation efficiency of the A2L file in the development process of the software of the vehicle-mounted controller is improved, the reliability of the A2L file is improved, the labor cost in the processing process of the A2L file is greatly saved, and the software development, particularly the software iteration in the calibration process of the software of the vehicle-mounted controller is facilitated.
According to the embodiment of the application, the A2L file can be rapidly and automatically generated according to the existing file, the A2L file is high in generation speed and high in efficiency, a large amount of manpower and material resources can be saved, the error rate is reduced compared with manual compiling and modification, and the quality of software can be guaranteed. In addition, the method of the embodiment has the advantages of simple steps, low calculation complexity, simple device structure and low requirement on hardware, and greatly reduces the generation cost of the A2L file.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
First, it is stated that the term "and/or" appearing herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
In the process of developing the software of the vehicle-mounted controller, the vehicle-mounted controller needs to be calibrated. The calibration work refers to a working link of continuously adjusting software parameters of the controller through software simulation or test verification of parts or the whole vehicle to enable the performance of the parts and the whole vehicle to reach the optimal state. Calibration is usually done by a calibration tool. The calibration tool can read the values of the measured parameters (marked as measured quantity or measured variable) and the calibration parameters (marked as calibration quantity or calibration variable) in the ECU according to the information provided by the A2L file, and calibrate the values of the measured parameters and the calibration parameters according to the requirements of users so as to optimize the control strategy. In the boarding debugging stage, the model code needs to be recompiled repeatedly depending on the A2L file, so the generation efficiency of the A2L file is very important.
The A2L file is a file for describing internal variables of the ECU and comprises two parts, namely a measurement variable and a calibration variable, and the A2L file corresponds to a program one by one. Through the A2L file, the calibration tool can identify information such as variable names, variable addresses, variable lengths and the like in the program.
In the prior art, the following three common methods for generating an A2L file are available:
(1) Manual writing and modification are adopted. When the method is used, if the source code file is changed, the related parts of the variables of a plurality of A2L files need to be changed manually one by one, so that the method is time-consuming and labor-consuming, is very easy to make mistakes, and easily influences the development cost and quality of the whole automobile product.
(2) The A2L files are generated by using commercialized software, most of the software has the functions of generating the A2L files and combining the A2L files, but the software is expensive, so that the software cost is high. Meanwhile, engineers spend a lot of time on researching the A2L file generation mode of the software and the integration method of the software and Simulink software, so that a lot of manpower and time are needed to generate the A2L file.
(3) At present, the design and development process based on MATLAB/Simulink model in the field of automobile electronic controller development is widely applied and accepted in the field of automobile electronics. And setting an MATLAB control model according to the control requirement, and automatically generating a C code and a source A2L File by using the MATLAB code (the ASAP2 File is selected in code generation configuration). However, the input and output quantities at the top layer of the model are not contained in the A2L file generated by the method, and the calibration quantity and the measurement quantity in the model are both defined as Autosar data classes, so that the calibration quantity and the measurement quantity cannot appear in the A2L file generated by the method.
In order to solve the above problem, the present embodiment provides an A2L file generation method as shown in fig. 1, and the method includes steps S11 to S13.
S11, according to configuration requirements of a target architecture, setting up N target models, wherein N is a positive integer;
step S12, generating a model A2L file containing the calibration quantity and the model measurement quantity of each target model according to the N target models, and extracting RTE measurement quantity mapped by the runtime environment;
and S13, combining the project A2L file and the RTE measurement quantity to generate a project A2L file.
Regarding step S11, according to the configuration requirement of the target architecture, N target models are built, where N is a positive integer.
The target architecture may be determined according to actual requirements. For example, the target Architecture may be an Autosar (automatic Open System Architecture). The Autosar is a cooperative development framework of an automobile electronic system, which is participated by various automobile manufacturers, part suppliers and various research and service organizations all around the world, and establishes an open automobile controller (ECU) standard software architecture.
If the target architecture is Autosar, N target models can be set up according to the configuration requirements of the automobile open system architecture, wherein the configuration requirements mainly comprise interface configuration requirements. In general, the value of N may be determined according to the number of function items related to the engineering project requirement, for example, if the current engineering project requirement relates to 3 function items, then N may be 3, that is, 3 object models are constructed.
For example, 3 target models can be constructed that conform to the Simulink Model of Autosar, and are respectively labeled as Model _1.slx, model 2_1.slx, and Model _3.slx.
With respect to step S12, from the N target models, a model A2L file containing the calibration quantity and the model measurement quantity of each target model is generated, and the RTE measurement quantity of the runtime environment map is extracted.
Step S12 may be decomposed into two parts, namely "generating a model A2L file containing the calibration quantity and the model measurement quantity of each target model according to N target models", and "extracting the RTE measurement quantity mapped to the runtime environment according to N target models".
Here, "generating a model A2L file containing the calibration amount and the model measurement amount of each target model from N target models" may be decomposed into steps S121 to S123, "extracting the RTE measurement amount of the runtime environment map from N target models" may be decomposed into steps S124 to S126.
[ Steps S121-S123 ]
And step S121, generating an ARXML file of each target model according to the N target models.
The auto sar specification defines a file format of transmission information as ARXML, which is an Architecture, based on an application scene of automotive electronics based on an XML file. The ARXML file is the same as the XML file, and ARXML is a common configuration/database file.
In actual operation, an ARXML file of each target model can be generated through an embedded encoder.
For example, when 3 target models conforming to the Simulink Model of Autosar are built and are respectively recorded as Model _1.Slx, model _2_ 1.Slx, and Model _3.Slx, an Embedded Coder (Embedded Coder) may be used to generate an ARXML file for each Model, which is respectively recorded as Model _1.ARXML, model _2.ARXML, and Model _3.ARXML. The Embedded Coder can analyze the Autosar conformance of the model, including Software Unit (Software Unit) modeling correctness analysis, such as data coupling check, global data storage check, global skip module check and the like, and generate a code file of the model.
And step S122, extracting a calibration quantity and a model measurement quantity from the ARXML file of each target model, and generating a single model A2L file corresponding to each target model.
And extracting the standard quantity and the model measurement quantity in the corresponding ARXML file in each target model, and generating a single model A2L file according to the standard quantity and the model measurement quantity (the single model A2L file refers to the A2L file corresponding to the single target model).
Specifically, the standard quantity and the model measurement quantity can be extracted from the ARXML file of each target model through the A2L script file, and the single model A2L file corresponding to each target model is generated. The A2L script file may be written according to a requirement, and the content of the A2L script file is not limited in this embodiment. For example, the present embodiment implements step S122 through the script Gen _ a2l.py written by the inventor in actual operation.
For example, information can be extracted from Model _1.arxml, model _2.arxml, and Model _3.arxml, respectively, by the script Gen _ A2l.py, to generate A2L files containing the calibration amount and the measurement amount, which are respectively denoted as Model _1.a2L, model _2.a2L, and Model _3.a2L.
In addition, the script Gen _ A2L. Py is mainly used to extract A2L configuration information from the ARXML file to generate a single model A2L file. Wherein, the format definition of the calibration quantity structure (CHARACTERISTIC) is shown in FIG. 2; the format definition of the MEASUREMENT quantity structure (MEASUREMENT) is shown as 3; the format definition of the conversion formula (COMPU _ METHOD) is shown in fig. 4.
And step S123, combining the single model A2L files corresponding to the N target models respectively to generate a model A2L file.
Each of the N target models corresponds to a single model A2L file, the N single model A2L files corresponding to the N target models are combined, and a model A2L file corresponding to the current whole engineering project can be obtained.
Specifically, the model A2L file may be generated by merging script files and merging single model A2L files corresponding to the N target models. The merged script file can be written according to the requirement, and the content of the merged script file is not limited in this embodiment. For example, in the present embodiment, step S123 is implemented by the script merge 2l.
The script MergeA2L.bat comprises grammar type "%% a" > > A2Lfile, and the aim of combining single model A2L files corresponding to N target models and generating model A2L files can be achieved by calling the target grammar.
For example, the script merge 2l.bat merges the single Model A2L files Model _1.a2L, model _2.a2L, and Model _3.a2L, which include the calibration amount and the measurement amount, corresponding to the single target Model, to generate the Model A2L file, which includes the calibration amount and the measurement amount, corresponding to the entire Project item, and is denoted as Project _ mc.a2L.
In addition, the script MergeA2L.bat is mainly used for merging A2L files, wherein the head-to-tail splicing of two A2L files is realized through type "%% a" > > A2Lfile syntax.
[ Steps S124-S126 ]
Step S124, generating a model statistical file of the top-level input/output variable name for each target model.
And generating a model statistical file of the top-level input and output variable name through the input and output script file. The model statistics file may be a CSV file type, an excel file type, or a file type in other forms, 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 of an excel file type, the input and output script file should be a script that can generate an excel form.
The input and output script file can be written according to requirements, and the content of the input and output script file is not limited in the embodiment. For example, in the present embodiment, step S124 is implemented by a script findiosignal.m written by the inventor during actual operation.
For example, in actual implementation, the inventor of this embodiment generates statistical tables of input and output variable names at the top level of each Model according to Model _1.Arxml, model _2.Arxml and Model _3.Arxml through the script findiosignal.m, and the statistical tables are respectively denoted as Model _1 \/iosignal list.csv, model _2 \/iosignal list.csv and Model _3 \/iosignal list.csv. Fig. 5 may be referred to as an example of an input/output variable name statistical table at the top level of a single object model.
In addition, the script findiisignal.m is mainly an input/output module name for the top layer of the statistical model, and finds Inport and output modules of the top layer of the model through find _ system ('ModelName', 'SearchDepth',1, 'blockatype', 'Inport') and find _ system ('ModelName', 'SearchDepth',1, 'blockatype', 'output'), and records the names of the respective modules; the Inport and Outport module information of the top layer is recorded into the CSV file through writetable (T, filename).
For example, the top-level I/O variable information for Model _1.Slx is recorded into Model _1_IOSignalList. Csv.
And step S125, combining the model statistical files corresponding to the N target models to generate a project statistical file.
And combining the model statistical files corresponding to each target model in the N target models to generate the engineering statistical files. The model statistical files corresponding to the N target models can be combined through combining the script files to generate the engineering statistical file. The merged script file can be written according to the requirement, and the content of the merged script file is not limited in this embodiment.
For example, the top-level input and output variable name statistics of all models, model _1_IOSignalList. Csv, model _2_IOSignalList. Csv, and Model _3_IOSignalList. Csv, are merged to generate the top-level input and output variable name statistics of the whole Project, project _ IOSignalList. Csv. Fig. 6 may be referred to as an example of a top-level input-output variable name statistics table of the entire project.
And step S126, extracting RTE measurement quantity mapped by the runtime environment according to the project statistical file and the runtime environment file.
The running environment file is an rte.c file (running time environment), and the rte.c file can be generated according to arxml files of all models by adopting an ISOLAR-AB tool.
The specific measurement parameters of the RTE measurement and the model measurement may be the same or different, but the two measurements are distinguished because the users who set the two measurements are different. Wherein RTE measurement is added by a basic software engineer, and model measurement is added by an application software engineer.
Specifically, the RTE measurement quantity of the runtime environment mapping can be extracted according to the engineering statistics file and the runtime environment file by browsing the mapping script file. The browsing mapping script file can be written according to requirements, and the content of the browsing mapping script file is not limited in the embodiment. Py, the script written by the inventor implements step S126 in actual operation.
For example, through a script scanrte, based on Project _ iosignallist.csv and rte.c files of an engineering top-level input-output variable name table, measuring quantities of RTE Mapping are extracted, and NEW _ RTE _ measurements.a2l is generated.
In step S13, the project A2L file and the RTE measurement amount are merged to generate a project A2L file.
Step S13 can be broken down into step S131 and step S132.
Step S131, combining the project A2L file and the RTE measurement quantity to generate an initial A2L file containing the virtual address.
For example, NEW _ RTE _ measures.a 2L and Project _ mc.a2L are merged to generate an initial A2L file Project _ vadr.a2L containing the virtual address.
The regular expression can be adopted to combine the project A2L file and the RTE measurement quantity to generate an initial A2L file containing the virtual address.
Step S132, according to the ELF file generated by the compiler, replacing the virtual address in the initial A2L file with a physical address to obtain an engineering A2L file.
ELF (Executable File Format) files are Executable File formats. After the compiler completes the compiling and linking process of the C code, a flash-writable file (s 19 or hex) is generated, and then a map file and an ELF file are generated.
And replacing the virtual address in the initial A2L file with a physical address based on the ELF file through an address replacement script to generate the project A2L file. The address replacement script file can be written according to the requirement, and the content of the address replacement script file is not limited in the embodiment. For example, the present embodiment implements step S132 through a script finala2l.
For example, the script finala2l.py replaces the virtual address in the Project _ vadr.a2L generated in step S7 with the actual physical address based on the ELF file project.elf, and generates the A2L file project.a2L required for the Project.
In addition, the script finala2l.py is mainly used for extracting a physical address from the ELF file and replacing a corresponding virtual address in the A2L file. Wherein, the regular expression' 0x0+ \ s \ s _ @ ECU _ Address _ (. \ w +.
In summary, according to the configuration requirements of the target architecture, the embodiment of the present invention builds N target models, generates a model A2L file including the calibration quantity and the model measurement quantity of each target model according to the N target models, and extracts the RTE measurement quantity mapped by the runtime environment; and combining the project A2L file and the RTE measurement quantity to generate a project A2L file. Therefore, according to the embodiment, the engineering A2L file is automatically generated, the generation efficiency of the A2L file in the development process of the vehicle-mounted controller software is improved, the reliability of the A2L file is improved, the labor cost in the processing process of the A2L file is greatly saved, and the software iteration of the development process, particularly the calibration process of the vehicle-mounted controller software is facilitated.
The embodiment can quickly and automatically generate the A2L file according to the existing file, the A2L file is high in generation speed and efficiency, a large amount of manpower and material resources can be saved, the error rate is reduced compared with manual writing and modification, and the quality of software can be better ensured. In addition, the method of the embodiment has the advantages of simple steps, low calculation complexity, simple device structure and low requirement on hardware, and greatly reduces the generation cost of the A2L file.
Based on the same inventive concept, the present embodiment provides an A2L file generating apparatus as shown in fig. 7, the apparatus including:
the model building module 71 is used for building N target models according to the configuration requirements of the target architecture, wherein N is a positive integer;
a file generating module 72, configured to generate a model A2L file 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 mapped by the runtime environment;
and the merging module 73 is used for merging the project A2L file and the RTE measurement quantity to generate a project A2L file.
Further, the model building module 71 includes:
and the model building submodule is used for building N target models according to the configuration requirements of the automobile open system architecture, wherein the configuration requirements comprise interface configuration requirements.
Further, the file generation module 72 includes:
the ARXML file generation submodule is used for generating an ARXML file of each target model according to the N target models;
the single model A2L file generation submodule is used for extracting a standard quantity and a model measurement quantity from the ARXML file of each target model and generating a single model A2L file corresponding to each target model;
and the model A2L file generation submodule is used for combining the single model A2L files corresponding to the N target models respectively to generate a model A2L file.
Further, the ARXML file generation submodule is specifically configured to:
and generating an ARXML file of each target model through an embedded encoder.
Further, the single model A2L file generation submodule is specifically configured to:
and extracting a standard quantity and a model measurement quantity 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.
Further, the model A2L file generation submodule is specifically configured to:
and combining the single model A2L files corresponding to the N target models respectively by combining the script files to generate a model A2L file.
Further, the model A2L file generation submodule is specifically configured to:
and combining the single model A2L files corresponding to the N target models respectively through the target grammar to generate the model A2L files.
Further, the file generation module 72 includes:
the model statistical file generation submodule is used for generating a model statistical file of the top-level input/output variable name aiming at each target model;
the engineering statistical file generation submodule is used for combining model statistical files corresponding to the N target models to generate an engineering statistical file;
and the RTE measurement quantity extraction submodule is used for extracting the RTE measurement quantity mapped by the runtime environment according to the engineering statistics file and the runtime environment file.
Further, the model statistics file generation submodule is specifically configured to:
and generating a model statistical file of the top-level input and output variable name through the input and output script file.
Further, the RTE measurement quantity extraction sub-module is specifically configured to:
and extracting RTE measurement quantity mapped by the operating environment according to the project statistical file and the operating environment file by browsing the mapping script file.
Further, the merging module 73 is specifically configured to:
combining the project A2L file and RTE measurement quantity to generate an initial A2L file containing a virtual address;
and according to the ELF file generated by the compiler, replacing the virtual address in the initial A2L file with a physical address to obtain the project A2L file.
Further, the merging module 73 is specifically configured to:
and combining the project A2L file and the RTE measurement quantity through the address replacement script to generate the project A2L file.
Further, the merging module 73 is specifically configured to:
and merging the engineering A2L file and the RTE measurement quantity by adopting a regular expression to generate the engineering A2L file.
Based on the same inventive concept, the present embodiment provides an electronic device as shown in fig. 8, including:
a processor 81;
a memory 82 for storing instructions executable by the processor 81;
wherein, the processor 81 is configured to execute to implement an A2L file generation method as provided in the foregoing.
Based on the same inventive concept, the present embodiment provides a non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor 81 of an electronic device, so that the electronic device can perform a method of implementing A2L file generation as provided in the foregoing.
Since the electronic device described in this embodiment is an electronic device used for implementing the method for processing information in this embodiment, a person skilled in the art can understand the specific implementation manner of the electronic device of this embodiment and various variations thereof based on the method for processing information described in this embodiment, and therefore, how to implement the method in this embodiment by the electronic device is not described in detail here. Electronic devices used by those skilled in the art to implement the method for processing information in the embodiments of the present application are all within the scope of the present application.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
according to the configuration requirements of a target architecture, N target models are built, a model A2L file containing the calibration quantity and the model measurement quantity of each target model is generated according to the N target models, and RTE measurement quantity mapped by the runtime environment is extracted; and combining the project A2L file and the RTE measurement quantity to generate a project A2L file. Therefore, according to the embodiment, the engineering A2L file is automatically generated, the generation efficiency of the A2L file in the development process of the software of the vehicle-mounted controller is improved, the reliability of the A2L file is improved, the labor cost in the processing process of the A2L file is greatly saved, and the software development, particularly the software iteration in the calibration process of the software of the vehicle-mounted controller is facilitated.
The embodiment can quickly and automatically generate the A2L file according to the existing file, the A2L file is high in generation speed and efficiency, a large amount of manpower and material resources can be saved, the error rate is reduced compared with manual writing and modification, and the quality of software can be better ensured. In addition, the method of the embodiment has the advantages of simple steps, low calculation complexity, simple device structure and low requirement on hardware, and greatly reduces the generation cost of the A2L file.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such 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 such modifications and variations.
Claims (16)
1.A2L file generation method, characterized in that the method comprises:
according to the configuration requirements of a target architecture, setting up N target models, wherein N is a positive integer;
generating a model A2L file containing the calibration quantity and the model measurement quantity of each target model according to the N target models, and extracting RTE measurement quantity mapped by the runtime environment;
and combining the project A2L file and the RTE measurement quantity to generate a project A2L file.
2. The method of claim 1, wherein building N target models according to configuration requirements of a target architecture comprises:
and constructing the N target models according to configuration requirements of an automobile open system architecture, wherein the configuration requirements comprise interface configuration requirements.
3. The method of claim 1, wherein generating a model A2L file containing the calibration quantities and model measurement quantities for each target model from the N target models comprises:
generating an ARXML file of each target model according to the N target models;
extracting a calibration quantity and a model measurement quantity from the ARXML file of each target model to generate a single model A2L file corresponding to each target model;
and combining the single model A2L files corresponding to the N target models to generate the model A2L file.
4. The method of claim 3, wherein generating an ARXML file for each object model from the N object models comprises:
and generating an ARXML file of each target model through an embedded encoder.
5. The method of claim 3, wherein the extracting the calibration quantity and the model measurement quantity from the ARXML file of each target model to generate a single model A2L file corresponding to each target model comprises:
and extracting a standard quantity and a model measurement quantity 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.
6. The method of claim 3, wherein said merging the single model A2L file corresponding to each of the N object models to generate the model A2L file comprises:
and combining the single model A2L files corresponding to the N target models respectively by combining the script files to generate the model A2L file.
7. The method of claim 3, wherein said merging the single model A2L file corresponding to each of the N object models to generate the model A2L file comprises:
and merging the single model A2L files corresponding to the N target models respectively through the target grammar to generate the model A2L files.
8. The method of claim 1, wherein extracting RTE measurements for a runtime environment map from the N target models comprises:
generating a model statistical file of the input and output variable name of the top layer aiming at each target model;
combining the model statistical files corresponding to the N target models to generate a project statistical file;
and extracting RTE measurement quantity of the runtime environment mapping according to the project statistical file and the runtime environment file.
9. The method of claim 8, wherein generating a model statistics file of top-level input-output variable names comprises:
and generating a model statistical file of the top-level input and output variable name through the input and output script file.
10. The method of claim 8, wherein extracting the RTE measurements of the runtime environment map from the project statistics file and the runtime environment file comprises:
and extracting RTE measurement quantity mapped by the running environment according to the project statistical file and the running environment file by browsing the mapping script file.
11. The method of claim 1, wherein the merging the engineering A2L file and the RTE measurements to generate an engineering A2L file comprises:
combining the project A2L file and the RTE measurement quantity to generate an initial A2L file containing a virtual address;
and according to the ELF file generated by the compiler, replacing the virtual address in the initial A2L file with a physical address to obtain the project A2L file.
12. The method of claim 1, wherein the merging the project A2L file and the RTE measurements to generate a project A2L file comprises:
and combining the project A2L file and the RTE measurement quantity through an address replacement script to generate a project A2L file.
13. The method of claim 1, wherein the merging the project A2L file and the RTE measurements to generate a project A2L file comprises:
and merging the engineering A2L file and the RTE measurement quantity by adopting a regular expression to generate an engineering A2L file.
14. An A2L file generating apparatus, characterized in that the apparatus comprises:
the model building module is used for building N target models according to the configuration requirements of the target architecture, wherein N is a positive integer;
the file generation module is used for generating a model A2L file containing the calibration quantity and the model measurement quantity of each target model according to the N target models and extracting RTE measurement quantity mapped by the runtime environment;
and the merging module is used for merging the project A2L file and the RTE measurement quantity to generate a project A2L file.
15. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute to implement an A2L file generation method as claimed in any one of claims 1 to 13.
16. A non-transitory computer readable storage medium, instructions in which, when executed by a processor of an electronic device, enable the electronic device to perform implementing an A2L file generation method as claimed in any one of claims 1 to 13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210836985.6A CN115373648A (en) | 2022-07-15 | 2022-07-15 | A2L file generation method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210836985.6A CN115373648A (en) | 2022-07-15 | 2022-07-15 | A2L file generation method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115373648A true CN115373648A (en) | 2022-11-22 |
Family
ID=84062687
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210836985.6A Pending CN115373648A (en) | 2022-07-15 | 2022-07-15 | A2L file generation method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115373648A (en) |
-
2022
- 2022-07-15 CN CN202210836985.6A patent/CN115373648A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3745256B1 (en) | External code integrations within a computing environment | |
CN108897724B (en) | Function completion progress determining method and device | |
JP7262818B2 (en) | Software environment for controlling engine debugging, testing, calibration and tuning | |
CN111176984A (en) | Signal-oriented automatic test implementation method | |
CN113568839A (en) | Method, device, equipment and medium for software testing and statistical test coverage rate | |
CN104298594A (en) | Automatic detection and positioning method for source code mid-value miscalculation | |
CN110196720A (en) | A kind of Simulink generates the optimization method of dynamic link library | |
CN117350205A (en) | Chip verification method and device, electronic equipment and storage medium | |
CN117850866A (en) | Data verification test method and system | |
CN114661615B (en) | FPGA software testing method and device | |
CN109508204B (en) | Front-end code quality detection method and device | |
CN115373648A (en) | A2L file generation method, device, equipment and medium | |
US20160085519A1 (en) | Determination of signals for readback from fpga | |
Haupt et al. | Near automatic translation of autonomie-based power train architectures for multi-physics simulations using high performance computing | |
CN109358855A (en) | A kind of front end analogue data agile development method and electronic equipment for programming | |
Hettig et al. | Toolchain for architecture development, modeling and simulation of battery electric vehicles | |
CN116521143B (en) | DID read-write service processing method and device for fault diagnosis | |
CN111752823A (en) | Method, device and equipment for testing vehicle-mounted power supply application software | |
Hlavsa et al. | Case Study: A tool for classification of system model parameters | |
Tomašić et al. | Parsers implementation within the test environment generator in automotive industry | |
CN116362060B (en) | Automatic generation method, device and equipment for system simulation model | |
CN113568662B (en) | Code change influence range analysis method and system based on calling relation | |
CN112445491B (en) | File sequence processing method, device, terminal equipment and storage medium | |
CN117973076B (en) | Simulation system and method based on virtual-real coupling | |
CN114448851B (en) | Automatic data testing method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |