CN115373648A - A method, device, equipment and medium for generating A2L files - Google Patents
A method, device, equipment and medium for generating A2L files 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
- generate
- rte
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 77
- 238000005259 measurement Methods 0.000 claims abstract description 105
- 238000013507 mapping Methods 0.000 claims description 33
- 239000000284 extract Substances 0.000 claims description 18
- 230000014509 gene expression Effects 0.000 claims description 5
- 230000008569 process Effects 0.000 abstract description 21
- 238000012545 processing Methods 0.000 abstract description 9
- 238000012986 modification Methods 0.000 abstract description 8
- 230000004048 modification Effects 0.000 abstract description 8
- 238000011161 development Methods 0.000 abstract description 5
- 239000000463 material Substances 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 11
- 238000004590 computer program Methods 0.000 description 7
- 230000009286 beneficial effect Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000010365 information processing Effects 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 238000006243 chemical reaction Methods 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
- 230000008859 change 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
- 230000007613 environmental effect Effects 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
Description
技术领域technical field
本发明涉及控制器技术领域,尤其涉及一种A2L文件生成方法、装置、设备和介质。The present invention relates to the technical field of controllers, in particular to an A2L file generation method, device, equipment and medium.
背景技术Background technique
A2L文件包括设备参数信息、接口数据信息和ECU(Electronic Control Unit,电子控制器)参数信息。设备参数信息描述了ECU的基本信息和ECU数据单元的一些公共属性;接口数据信息描述了标定系统与ECU通信时所需配置的接口信息;ECU参数信息描述了内部数据单元的详细内容。可见,A2L文件对于控制器至关重要。The A2L file includes device parameter information, interface data information and ECU (Electronic Control Unit, electronic controller) parameter information. The device parameter information describes the basic information of the ECU and some common attributes of the ECU data unit; the interface data information describes the interface information required for the calibration system to communicate with the ECU; the ECU parameter information describes the details of the internal data unit. It can be seen that the A2L file is very important for the controller.
然而,相关技术中A2L文件的生成效率较低,无法满足控制器对于A2L文件的需求。However, the generation efficiency of the A2L file in the related art is low, which cannot meet the requirement of the controller for the A2L file.
发明内容Contents of the invention
本申请实施例通过提供一种A2L文件生成方法、装置、设备和介质,解决了现有技术中A2L文件的生成效率较低的技术问题,实现了提高A2L文件的生成效率的技术效果。The embodiment of the present application provides an A2L file generation method, device, device and medium, which solves the technical problem of low A2L file generation efficiency in the prior art, and achieves the technical effect of improving the A2L file generation efficiency.
第一方面,本申请提供了一种A2L文件生成方法,方法包括:In a first aspect, the present application provides a method for generating an A2L file, the method comprising:
根据目标架构的配置需求,搭建N个目标模型,N为正整数;According to the configuration requirements of the target architecture, build N target models, where N is a positive integer;
根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,以及提取运行时环境映射的RTE测量量;According to N target models, generate a model A2L file containing the calibration quantity and model measurement quantity of each target model, and extract the RTE measurement quantity of the runtime environment mapping;
合并工程A2L文件和RTE测量量,生成工程A2L文件。Merge project A2L files and RTE measurements to generate project A2L files.
进一步地,根据目标架构的配置需求,搭建N个目标模型,包括:Further, according to the configuration requirements of the target architecture, build N target models, including:
根据汽车开放系统架构的配置需求,搭建N个目标模型,配置需求包括接口配置需求。According to the configuration requirements of the automotive open system architecture, build N target models, and the configuration requirements include interface configuration requirements.
进一步地,根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,包括:Further, 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:
根据N个目标模型,生成每个目标模型的ARXML文件;Generate an ARXML file for each target model based on N target models;
从每个目标模型的ARXML文件中提取标定量和模型测量量,生成每个目标模型对应的单模型A2L文件;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;
合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件。Merge the single-model A2L files corresponding to each of the N target models to generate a model A2L file.
进一步地,根据N个目标模型,生成每个目标模型的ARXML文件,包括:Further, according to the N target models, an ARXML file of each target model is generated, including:
通过嵌入式编码器,生成每个目标模型的ARXML文件。With the embedded coder, an ARXML file is generated for each target model.
进一步地,从每个目标模型的ARXML文件中提取标定量和模型测量量,生成每个目标模型对应的单模型A2L文件,包括:Further, the calibration quantity and model measurement quantity are extracted from the ARXML file of each target model, and a single-model A2L file corresponding to each target model is generated, including:
通过A2L脚本文件,从每个目标模型的ARXML文件中提取标定量和模型测量量,生成每个目标模型对应的单模型A2L文件。Through the A2L script file, the calibration quantity and model measurement quantity are extracted from the ARXML file of each target model, and a single-model A2L file corresponding to each target model is generated.
进一步地,合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件,包括:Further, merge the single-model A2L files corresponding to each of the N target models to generate a model A2L file, including:
通过合并脚本文件,合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件。By merging the script files and merging the single-model A2L files corresponding to each of the N target models, a model A2L file is generated.
进一步地,合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件,包括:Further, merge the single-model A2L files corresponding to each of the N target models to generate a model A2L file, including:
通过目标语法合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件。Merge the single-model A2L files corresponding to each of the N target models through target syntax to generate a model A2L file.
进一步地,根据N个目标模型,提取运行时环境映射的RTE测量量,包括:Further, according to the N target models, the RTE measurements of the runtime environment mapping are extracted, including:
针对每个目标模型,生成顶层的输入输出变量名称的模型统计文件;For each target model, generate a model statistics file of the top-level input and output variable names;
合并N个目标模型对应的模型统计文件,生成工程统计文件;Merge the model statistics files corresponding to N target models to generate engineering statistics files;
根据工程统计文件和运行环境文件,提取运行时环境映射的RTE测量量。According to the engineering statistics file and the running environment file, the RTE measurement quantity of the runtime environment mapping is extracted.
进一步地,生成顶层的输入输出变量名称的模型统计文件,包括:Further, generate the model statistics file of the top-level input and output variable names, including:
通过输入输出脚本文件,生成顶层的输入输出变量名称的模型统计文件。Through the input and output script file, the model statistics file of the input and output variable names of the top level is generated.
进一步地,根据工程统计文件和运行环境文件,提取运行时环境映射的RTE测量量,包括:Further, according to the engineering statistics file and the running environment file, the RTE measurement quantity of the runtime environment mapping is extracted, including:
通过浏览映射脚本文件,根据工程统计文件和运行环境文件,提取运行时环境映射的RTE测量量。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.
进一步地,合并工程A2L文件和RTE测量量,生成工程A2L文件,包括:Further, merge engineering A2L file and RTE measurement to generate engineering A2L file, including:
合并工程A2L文件和RTE测量量,生成含有虚拟地址的初始A2L文件;Merge engineering A2L files and RTE measurements to generate initial A2L files containing virtual addresses;
根据编译器生成的ELF文件,将初始A2L文件中的虚拟地址更换为物理地址,得到工程A2L文件。According to the ELF file generated by the compiler, replace the virtual address in the initial A2L file with the physical address to obtain the project A2L file.
进一步地,合并工程A2L文件和RTE测量量,生成工程A2L文件,包括:Further, merge engineering A2L file and RTE measurement to generate engineering A2L file, including:
通过地址替换脚本,合并工程A2L文件和RTE测量量,生成工程A2L文件。Through the address replacement script, merge the project A2L file and the RTE measurement to generate the project A2L file.
进一步地,合并工程A2L文件和RTE测量量,生成工程A2L文件,包括:Further, merge engineering A2L file and RTE measurement to generate engineering A2L file, including:
采用正则表达式合并工程A2L文件和RTE测量量,生成工程A2L文件。Use regular expressions to merge engineering A2L files and RTE measurements to generate engineering A2L files.
第二方面,本申请提供了一种A2L文件生成装置,装置包括:In a second aspect, the present application provides an A2L file generating device, the device comprising:
模型搭建模块,用于根据目标架构的配置需求,搭建N个目标模型,N为正整数;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;
文件生成模块,用于根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,以及提取运行时环境映射的RTE测量量;The file generating module is used to generate a model A2L file containing calibration quantities and model measurement quantities of each target model according to N target models, and extract the RTE measurement quantity of runtime environment mapping;
合并模块,用于合并工程A2L文件和RTE测量量,生成工程A2L文件。The merging module is used to merge engineering A2L files and RTE measurement quantities to generate engineering A2L files.
第三方面,本申请提供了一种电子设备,包括:In a third aspect, the present application provides an electronic device, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,处理器被配置为执行以实现如第一方面提供的一种A2L文件生成方法。Wherein, the processor is configured to execute to implement the method for generating an A2L file as provided in the first aspect.
第四方面,本申请提供了一种非临时性计算机可读存储介质,当存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行实现如第一方面提供的一种A2L文件生成方法。In the fourth aspect, the present application provides a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute an A2L file as provided in the first aspect. generate method.
本申请实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
本申请实施例根据目标架构的配置需求,搭建N个目标模型,根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,以及提取运行时环境映射的RTE测量量;合并工程A2L文件和RTE测量量,生成工程A2L文件。可见,本实施例通过在低设备成本的前提下自动生成工程A2L文件,提高了车载控制器软件开发过程中A2L文件的生成效率,不仅提高了A2L文件的可靠性,且极大地节省了A2L文件处理过程中的人力成本,有利于车载控制器软件开发尤其是标定过程的软件迭代。According to the configuration requirements of the target architecture, the embodiment of the present application builds N target models, generates model A2L files containing the calibration quantities and model measurement quantities of each target model according to the N target models, and extracts the RTE measurement of the runtime environment mapping Quantities; merge project A2L files and RTE measurement quantities to generate project A2L files. It can be seen that this embodiment automatically generates engineering A2L files under the premise of low equipment cost, which improves the generation efficiency of A2L files in the process of vehicle controller software development, not only improves the reliability of A2L files, but also greatly saves A2L files. The labor cost in the processing process is beneficial to the software development of the vehicle controller, especially the software iteration of the calibration process.
本申请实施例能够快速地根据现有文件自动生成A2L文件,A2L文件的生成速度快、效率高,这样可以节省大量的人力物力,而且相比于人工编写及修改减少了出错率,更能够保证软件的质量。另外,本实施例的方法步骤简单、计算复杂度低,装置结构简单、对硬件要求低,大大降低了A2L文件的生成成本。The embodiment of the present application can quickly and automatically generate A2L files according to existing files. The generation speed of A2L files is fast and the efficiency is high. The quality of the software. In addition, the method of this embodiment has simple steps, low computational complexity, simple device structure, and low hardware requirements, which greatly reduces the cost of generating A2L files.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.
图1为申请提供的一种A2L文件生成方法的流程示意图;Figure 1 is a schematic flow chart of an A2L file generation method provided by the application;
图2为标定量结构体(CHARACTERISTIC)的格式定义的示例性代码;Fig. 2 is the exemplary code of the format definition of the calibration quantity structure (CHARACTERISTIC);
图3为测量量结构体(MEASUREMENT)格式定义的示例性代码;Fig. 3 is the exemplary code defined in the format of the measurement quantity structure (MEASUREMENT);
图4为转化公式(COMPU_METHOD)格式的示例性代码;Fig. 4 is the exemplary code of conversion formula (COMPU_METHOD) format;
图5为单个目标模型顶层的输入输出变量名称统计表格示例图;Fig. 5 is an example figure of the input and output variable name statistics table of the top layer of a single target model;
图6为整个工程的顶层输入输出变量名称统计表格示例图;Figure 6 is an example diagram of the top-level input and output variable name statistics table of the entire project;
图7为申请提供的一种A2L文件生成装置的结构示意图;Fig. 7 is a schematic structural diagram of an A2L file generation device provided by the application;
图8为申请提供的一种电子设备的结构示意图。Fig. 8 is a schematic structural diagram of an electronic device provided in the application.
具体实施方式Detailed ways
本申请实施例通过提供一种A2L文件生成方法,解决了现有技术中A2L文件的生成效率较低的技术问题。The embodiment of the present application solves the technical problem of low A2L file generation efficiency in the prior art by providing an A2L file generation method.
本申请实施例的技术方案为解决上述技术问题,总体思路如下:The technical solution of the embodiment of the present application is to solve the above-mentioned technical problems, and the general idea is as follows:
一种A2L文件生成方法,方法包括:根据目标架构的配置需求,搭建N个目标模型,N为正整数;根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,以及提取运行时环境映射的RTE测量量;合并工程A2L文件和RTE测量量,生成工程A2L文件。A method for generating an A2L file, the method comprising: building N target models according to the configuration requirements of the target architecture, where N is a positive integer; generating a model A2L including calibration quantities and model measurement quantities of each target model according to the N target models file, and extract the RTE measurement of the runtime environment mapping; merge the project A2L file and the RTE measurement to generate the project A2L file.
本申请实施例根据目标架构的配置需求,搭建N个目标模型,根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,以及提取运行时环境映射的RTE测量量;合并工程A2L文件和RTE测量量,生成工程A2L文件。可见,本实施例通过在低设备成本的前提下自动生成工程A2L文件,提高了车载控制器软件开发过程中A2L文件的生成效率,不仅提高了A2L文件的可靠性,且极大地节省了A2L文件处理过程中的人力成本,有利于车载控制器软件开发尤其是标定过程的软件迭代。According to the configuration requirements of the target architecture, the embodiment of the present application builds N target models, generates model A2L files containing the calibration quantities and model measurement quantities of each target model according to the N target models, and extracts the RTE measurement of the runtime environment mapping Quantities; merge project A2L files and RTE measurement quantities to generate project A2L files. It can be seen that this embodiment automatically generates engineering A2L files under the premise of low equipment cost, which improves the generation efficiency of A2L files in the process of vehicle controller software development, not only improves the reliability of A2L files, but also greatly saves A2L files. The labor cost in the processing process is beneficial to the software development of the vehicle controller, especially the software iteration of the calibration process.
本申请实施例能够快速地根据现有文件自动生成A2L文件,A2L文件的生成速度快、效率高,这样可以节省大量的人力物力,而且相比于人工编写及修改减少了出错率,更能够保证软件的质量。另外,本实施例的方法步骤简单、计算复杂度低,装置结构简单、对硬件要求低,大大降低了A2L文件的生成成本。The embodiment of the present application can quickly and automatically generate A2L files according to existing files. The generation speed of A2L files is fast and the efficiency is high. The quality of the software. In addition, the method of this embodiment has simple steps, low computational complexity, simple device structure, and low hardware requirements, which greatly reduces the cost of generating A2L files.
为了更好的理解上述技术方案,下面将结合说明书附图以及具体的实施方式对上述技术方案进行详细的说明。In order to better understand the above-mentioned technical solution, the above-mentioned technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
首先说明,本文中出现的术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。First of all, the term "and/or" that appears in this article is just an association relationship that describes associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: there is A alone, and A exists at the same time and B, there are three cases of B alone. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.
在车载控制器软件开发的过程中,需要对车载控制器进行标定。标定工作是指通过软件仿真,或通过零部件或整车的测试验证,不断调整控制器的软件参数,使零部件及整车性能达到最佳状态的工作环节。标定工作通常由标定工具完成。标定工具可以根据A2L文件提供的消息,读取ECU中测量参数(记为测量量或测量变量)和标定参数(记为标定量或标定变量)的数值,并按用户的要求对测量参数和标定参数的数值进行标定以优化控制策略。在上车调试阶段,需要依赖于A2L文件对模型代码反复重新编译,因此A2L文件的生成效率至关重要。During the software development process of the on-board controller, the on-board controller needs to be calibrated. Calibration work refers to the process of continuously adjusting the software parameters of the controller through software simulation, or through the test and verification of parts or the whole vehicle, so that the performance of parts and the whole vehicle can reach the best state. Calibration work is usually done by calibration tools. The calibration tool can read the values of the measurement parameters (recorded as measured quantities or measured variables) and calibration parameters (recorded as calibrated quantities or calibrated variables) in the ECU according to the information provided by the A2L file, and adjust the measured parameters and calibration according to the user's requirements. The value of the parameter is calibrated to optimize the control strategy. In the debugging stage of the vehicle, it is necessary to rely on the A2L file to recompile the model code repeatedly, so the generation efficiency of the A2L file is very important.
其中,A2L文件是一个对ECU内部变量进行描述的文件,包含测量变量和标定变量两部分,A2L文件和程序一一对应。通过A2L文件,标定工具可以识别程序中变量名称、变量地址、变量长度等信息。Among them, the A2L file is a file describing the internal variables of the ECU, including two parts, the measured variable and the calibration variable, and 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.
现有技术中,常见的A2L文件生成方法有以下三种:In the prior art, there are three common A2L file generation methods as follows:
(1)采用人工编写及修改。使用该种方式时,如果源码文件被改动,将需要对许多A2L文件的变量的相关部分逐一手动更改,不仅费时费力,而且非常容易出错,容易影响到整个汽车产品的开发成本与质量。(1) It is written and modified manually. When using this method, if the source code file is changed, it will be necessary to manually change the relevant parts of the variables of many A2L files one by one.
(2)使用商业化软件生成A2L文件,这些软件大多都具有生成A2L文件和合并A2L文件的功能,但是该类软件价格昂贵,导致软件成本较高。同时还需要工程师花费大量时间去研究该类软件的A2L文件生成方式和与Simulink软件的集成方法,导致需要大量人力和时间才能实现A2L文件的生成。(2) Use commercial software to generate A2L files. Most of these software have the functions of generating A2L files and merging A2L files, but such software is expensive, resulting in higher software costs. At the same time, engineers need to spend a lot of time to study the A2L file generation method of this type of software and the integration method with Simulink software, resulting in the need for a lot of manpower and time to realize the generation of A2L files.
(3)目前汽车电子控制器开发领域,基于MATLAB/Simulink模型的设计开发流程,已在汽车电子领域得到广泛应用与认可。根据控制需求设置MATLAB控制模型,利用MATLAB代码自动生成C代码和源A2L文件(代码生成配置选中ASAP2 File)。然而,该方式生成的A2L文件里不包含模型顶层的输入输出量,并且模型中的标定量和测量量均定义为Autosar数据类,导致使用该方式生成A2L文件里也不会出现标定量和测量量。(3) At present, in the field of automotive electronic controller development, the design and development process based on the 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 files (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 layer of the model, and the calibration quantity and measurement quantity in the model are defined as Autosar data classes, so the calibration quantity and measurement quantity will not appear in the A2L file generated by this method quantity.
本实施例为了解决上述问题,提供了如图1所示的一种A2L文件生成方法,方法包括步骤S11-步骤S13。In order to solve the above problems, this embodiment provides a method for generating an A2L file as shown in FIG. 1 , the method includes step S11-step S13.
步骤S11,根据目标架构的配置需求,搭建N个目标模型,N为正整数;Step S11, according to the configuration requirements of the target architecture, build N target models, where N is a positive integer;
步骤S12,根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,以及提取运行时环境映射的RTE测量量;Step S12, according to the N target models, generate a model A2L file containing the calibration quantity and model measurement quantity of each target model, and extract the RTE measurement quantity of the runtime environment mapping;
步骤S13,合并工程A2L文件和RTE测量量,生成工程A2L文件。Step S13, merging the engineering A2L file and the RTE measurement to generate the engineering A2L file.
关于步骤S11,根据目标架构的配置需求,搭建N个目标模型,N为正整数。Regarding step S11, according to the configuration requirements of the target architecture, N target models are built, where N is a positive integer.
目标架构可以根据实际需求确定。比如目标架构可以是Autosar(AutomotiveOpen System Architecture,汽车开放系统架构)。Autosar是由全球各家汽车制造商、零部件供应商以及各种研究、服务机构共同参与的一种汽车电子系统的合作开发框架,并建立了一个开放的汽车控制器(ECU)标准软件架构。The target architecture can be determined according to actual needs. For example, the target architecture may be Autosar (AutomotiveOpen System Architecture, automotive open system architecture). Autosar is a collaborative development framework for automotive electronic systems that is jointly participated by various automakers, component suppliers, and various research and service organizations around the world, and has established an open automotive controller (ECU) standard software architecture.
如果目标架构是Autosar,那么可以根据汽车开放系统架构的配置需求,搭建N个目标模型,配置需求主要包括接口配置需求。通常情况下,可以根据工程项目需求中涉及的功能项数确定N的取值,比如当前工程项目需求涉及3个功能项目,那么N可以取3,即构建3个目标模型。If the target architecture is Autosar, then N target models can be built according to the configuration requirements of the automotive open system architecture, and the configuration requirements mainly include interface configuration requirements. Normally, the value of N can be determined according to the number of functional items involved in the engineering project requirements. For example, the current engineering project requirements involve 3 functional items, then N can be set to 3, that is, to build 3 target models.
例如,可以搭建好符合Autosar的Simulink模型的3个目标模型,分别记为Model_1.slx、Mode2_1.slx、Model_3.slx。For example, three target models that conform to Autosar's Simulink model can be built, which are respectively recorded as Model_1.slx, Mode2_1.slx, and Model_3.slx.
关于步骤S12,根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,以及提取运行时环境映射的RTE测量量。Regarding step S12, according to the N target models, a model A2L file containing calibration quantities and model measurement quantities of each target model is generated, and RTE measurement quantities of runtime environment mapping are extracted.
步骤S12可以分解为两部分,分别是“根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件”,以及“根据N个目标模型,提取运行时环境映射的RTE测量量”。Step S12 can be decomposed into two parts, which are "according to N target models, generate a model A2L file containing calibration quantities and model measurement quantities of each target model", and "according to N target models, extract the runtime environment mapping RTE measurements".
其中,“根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件”可以分解为步骤S121-步骤S123,“根据N个目标模型,提取运行时环境映射的RTE测量量”可以分解为步骤S124-步骤S126。Among them, "according to N target models, generate a model A2L file containing calibration quantities and model measurements of each target model" can be decomposed into steps S121-step S123, "according to N target models, extract the RTE of the runtime environment mapping "Measured quantity" can be decomposed into step S124-step S126.
【步骤S121-步骤S123】【Step S121-Step S123】
步骤S121,根据N个目标模型,生成每个目标模型的ARXML文件。Step S121, generating an ARXML file for each object model according to the N object models.
ARXML文件实质是一个XML文件,在XML文件的基础上,AUTOSAR规范基于汽车电子的应用场景,将传输信息的文件格式定义为ARXML,AR即Architecture。ARXML文件和XML文件一样,ARXML是一个通用的配置/数据库文件。The ARXML file is essentially an XML file. On the basis of the XML file, the AUTOSAR specification is based on the application scenarios of automotive electronics, and defines the file format of the transmission information as ARXML, and AR is Architecture. ARXML files Like XML files, ARXML is a generic configuration/database file.
在实际操作时,可以通过嵌入式编码器,生成每个目标模型的ARXML文件。In actual operation, the ARXML file of each target model can be generated through the embedded coder.
例如,当搭建好符合Autosar的Simulink模型的3个目标模型,分别记为Model_1.slx、Mode2_1.slx、Model_3.slx时,可以通过Embedded Coder(嵌入式编码器)分别生成每个模型的ARXML文件,分别记为Model_1.arxml、Model_2.arxml、Model_3.arxml。Embedded Coder可以分析模型的Autosar符合性,包括软件单元(Software Unit)建模正确性分析,比如数据的耦合性检查、全局数据存储检查、全局跳转模块检查等等,并生成模型的代码文件。For example, when three target models conforming to Autosar's Simulink model are built, respectively recorded as Model_1.slx, Mode2_1.slx, and Model_3.slx, the ARXML file of each model can be generated separately by Embedded Coder , respectively recorded as Model_1.arxml, Model_2.arxml, Model_3.arxml. Embedded Coder can analyze the Autosar compliance of the model, including software unit (Software Unit) modeling correctness analysis, such as data coupling check, global data storage check, global jump module check, etc., and generate the code file of the model.
步骤S122,从每个目标模型的ARXML文件中提取标定量和模型测量量,生成每个目标模型对应的单模型A2L文件。Step S122, extracting calibration quantities and model measurement quantities from the ARXML file of each target model, and generating a single-model A2L file corresponding to each target model.
将每个目标模型中对应的ARXML文件中标定量和模型测量量提取出来,并根据标定量和模型测量量生成单模型A2L文件(单模型A2L文件是指单个目标模型对应的A2L文件)。Extract the calibration quantity and model measurement quantity in the corresponding ARXML file of each target model, and generate a single-model A2L file according to the calibration quantity and model measurement quantity (single-model A2L file refers to the A2L file corresponding to a single target model).
具体地,可以通过A2L脚本文件,从每个目标模型的ARXML文件中提取标定量和模型测量量,生成每个目标模型对应的单模型A2L文件。A2L脚本文件可以根据需求进行编写,本实施例对A2L脚本文件的内容不做限制。比如本实施例在实际操作时是通过发明人编写的脚本Gen_A2L.py实施步骤S122。Specifically, the calibration quantity and model measurement quantity can be extracted from the ARXML file of each target model through the A2L script file, and a single-model A2L file corresponding to each target model can be generated. The A2L script file can be written according to requirements, and the content of the A2L script file is not limited in this embodiment. For example, in the actual operation of this embodiment, step S122 is implemented through the script Gen_A2L.py written by the inventor.
例如,可以通过脚本Gen_A2L.py,分别从Model_1.arxml、Model_2.arxml、Model_3.arxml中提取信息生成包含标定量和测量量的A2L文件,分别记为Model_1.a2l、Model_2.a2l、Model_3.a2l。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 respectively recorded as Model_1.a2l, Model_2.a2l, and Model_3.a2l .
另外,脚本Gen_A2L.py主要是用于从ARXML文件中提取A2L配置信息以生成单模型A2L文件。其中,标定量结构体(CHARACTERISTIC)格式定义如图2所示;测量量结构体(MEASUREMENT)格式定义如3所示;转化公式(COMPU_METHOD)格式定义如图4所示。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 format definition of the calibration quantity structure (CHARACTERISTIC) is shown in Figure 2; the format definition of the measurement quantity structure (MEASUREMENT) is shown in Figure 3; the format definition of the conversion formula (COMPU_METHOD) is shown in Figure 4.
步骤S123,合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件。Step S123, merging the single-model A2L files corresponding to each of the N target models to generate a model A2L file.
N个目标模型中的每个目标模型分别对应一个单模型A2L文件,将N个目标模型对应的N个单模型A2L文件进行合并,可以得到当前整个工程项目对应的模型A2L文件。Each of the N target models corresponds to a single-model A2L file, and the N single-model A2L files corresponding to the N target models are combined to obtain the model A2L file corresponding to the current entire engineering project.
具体地,可以通过合并脚本文件,合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件。合并脚本文件可以根据需求进行编写,本实施例对合并脚本文件的内容不做限制。比如本实施例在实际操作时是通过发明人编写的脚本MergeA2L.bat实施步骤S123。Specifically, the single-model A2L files corresponding to each of the N target models can be merged by merging script files to generate a model A2L file. The merging script file can be written according to requirements, and the content of the merging script file is not limited in this embodiment. For example, in the actual operation of this embodiment, the script MergeA2L.bat written by the inventor implements step S123.
其中,脚本MergeA2L.bat中包括语法type"%%a">>A2Lfile,可以通过调用该目标语法达到合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件的目的。Among them, the script MergeA2L.bat includes the syntax type "%%a">>A2Lfile, which can be used to merge the single-model A2L files corresponding to each of the N target models to generate a model A2L file by calling the target syntax.
例如,通过脚本MergeA2L.bat,合并单个目标模型对应的包含标定量、测量量的单模型A2L文件Model_1.a2l、Model_2.a2l、Model_3.a2l,生成整个工程项目对应的包含标定量、测量量的模型A2L文件,记为Project_MC.a2l。For example, through the script MergeA2L.bat, merge the single-model A2L files Model_1.a2l, Model_2.a2l, and Model_3.a2l corresponding to a single target model that contain calibration quantities and measurement quantities, and generate a single-model A2L file that contains calibration quantities and measurement quantities corresponding to the entire project. Model A2L file, recorded as Project_MC.a2l.
另外,脚本MergeA2L.bat主要是用于合并A2L文件,其中,通过type"%%a">>A2Lfile语法来实现两个A2L文件的首尾拼接。In addition, the script MergeA2L.bat is mainly used for merging A2L files, where the beginning and end of two A2L files are spliced through the type "%%a">>A2Lfile syntax.
【步骤S124-步骤S126】【Step S124-Step S126】
步骤S124,针对每个目标模型,生成顶层的输入输出变量名称的模型统计文件。Step S124, for each target model, generate a model statistics file of the top-level input and output variable names.
可以通过输入输出脚本文件,生成顶层的输入输出变量名称的模型统计文件。模型统计文件可以是CSV文件类型,也可以是excel文件类型,当然也可以是其他形式的文件类型,本实施例对此不做限制。需要注意的是,模型统计文件的文件类型需要与输入输出脚本文件对应。比如,当模型统计文件需要是excel文件类型,那么输入输出脚本文件应当是能生成excel表格的脚本。The 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 may be a CSV file type, an excel file type, or 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 files. For example, when the model statistics file needs to be an excel file type, then the input and output script file should be a script that can generate an excel table.
输入输出脚本文件可以根据需求进行编写,本实施例对输入输出脚本文件的内容不做限制。比如本实施例在实际操作时是通过发明人编写的脚本FindIOSignal.m实施步骤S124。The input and output script files can be written according to requirements, and the content of the input and output script files is not limited in this embodiment. For example, in the actual operation of this embodiment, step S124 is implemented through the script FindIOSignal.m written by the inventor.
例如,本实施例的发明人在实际实施时,是通过脚本FindIOSignal.m,根据Model_1.arxml、Model_2.arxml、Model_3.arxml,分别生成每个模型顶层的输入输出变量名称统计表格,分别记为Model_1_IOSignalList.csv、Model_2_IOSignalList.csv、Model_3_IOSignalList.csv。单个目标模型顶层的输入输出变量名称统计表格示例图可以参考图5。For example, the inventors of this embodiment used the script FindIOSignal.m to generate 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 during actual implementation, respectively recorded as Model_1_IOSignalList.csv, Model_2_IOSignalList.csv, Model_3_IOSignalList.csv. Refer to Figure 5 for an example diagram of the statistical table of input and output variable names at the top level of a single target model.
另外,脚本FindIOSignal.m主要是用于统计模型顶层的输入输出模块名称,通过find_system('ModelName','SearchDepth',1,'BlockType','Inport')和find_system('ModelName','SearchDepth',1,'BlockType','Outport')来搜索模型顶层的Inport和Outport模块,并记录各个模块的名称;通过writetable(T,filename)来将顶层的Inport和Outport模块信息记录到CSV文件中。In addition, the script FindIOSignal.m is mainly used for the input and output module name of the top layer of the statistical model, through find_system('ModelName','SearchDepth',1,'BlockType','Inport') and find_system('ModelName','SearchDepth' ,1,'BlockType','Outport') to search the top-level Inport and Outport modules of the model, and record the names of each module; use writetable(T, filename) to record the top-level Inport and Outport module information into the CSV file.
例如,模型Model_1.slx的顶层输入输出变量信息被记录到Model_1_IOSignalList.csv中。For example, the top-level input and output variable information of model Model_1.slx is recorded in Model_1_IOSignalList.csv.
步骤S125,合并N个目标模型对应的模型统计文件,生成工程统计文件。Step S125, merging the model statistics files corresponding to the N target models to generate engineering statistics files.
合并N个目标模型中每个目标模型分别对应的模型统计文件,生成工程统计文件。可以通过合并脚本文件,合并N个目标模型对应的模型统计文件,生成工程统计文件。合并脚本文件可以根据需求进行编写,本实施例对合并脚本文件的内容不做限制。Merge the model statistics files corresponding to each of the N target models to generate engineering statistics files. The project statistics file can be generated by merging script files and model statistics files corresponding to N target models. The merging script file can be written according to requirements, and the content of the merging script file is not limited in this embodiment.
例如,合并所有模型的顶层输入输出变量名称统计表格Model_1_IOSignalList.csv、Model_2_IOSignalList.csv、Model_3_IOSignalList.csv,生成整个工程的顶层输入输出变量名称统计表格Project_IOSignalList.csv。整个工程的顶层输入输出变量名称统计表格示例图可以参考图6。For example, merge the top-level input and output variable name statistical 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 statistical table Project_IOSignalList.csv of the entire project. Refer to Figure 6 for an example diagram of the top-level input and output variable name statistics table of the entire project.
步骤S126,根据工程统计文件和运行环境文件,提取运行时环境映射的RTE测量量。Step S126, according to the project statistics file and the running environment file, extract the RTE measurement quantity of the runtime environment mapping.
运行环境文件即为Rte.c文件(run time environment,运行环境),Rte.c文件可以采用ISOLAR-AB工具根据所有模型的arxml文件生成得到。The running environment file is the Rte.c file (run time environment, running environment), and the Rte.c file can be generated based on the arxml files of all models using the ISOLAR-AB tool.
RTE测量量和模型测量量的具体测量参数可以相同也可以不同,但是由于设定这两种测量量的用户不一样,因此将这两种测量量进行区分。其中,RTE测量量是基础软件工程师添加的,模型测量量是应用软件工程师添加的。The specific measurement parameters of the RTE measurement quantity and the model measurement quantity may be the same or different, but since the users who set the two measurement quantities are different, the two measurement quantities 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.
具体地,可以通过浏览映射脚本文件,根据工程统计文件和运行环境文件,提取运行时环境映射的RTE测量量。浏览映射脚本文件可以根据需求进行编写,本实施例对浏览映射脚本文件的内容不做限制。比如本实施例在实际操作时是通过发明人编写的脚本ScanRTE.py实施步骤S126。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 this embodiment does not limit the contents of the browsing mapping script file. For example, in the actual operation of this embodiment, the script ScanRTE.py written by the inventor implements step S126.
例如,通过脚本ScanRTE.py,基于工程顶层输入输出变量名称表Project_IOSignalList.csv和Rte.c文件,提取RTE Mapping的测量量,生成NEW_RTE_Measurements.a2l。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 files, extract the measurements of RTE Mapping and generate NEW_RTE_Measurements.a2l.
关于步骤S13,合并工程A2L文件和RTE测量量,生成工程A2L文件。Regarding step S13, the project A2L file and the RTE measurement are combined to generate the project A2L file.
步骤S13可以分解为步骤S131和步骤S132。Step S13 can be decomposed into step S131 and step S132.
步骤S131,合并工程A2L文件和RTE测量量,生成含有虚拟地址的初始A2L文件。Step S131, merging the project A2L file and the RTE measurement to generate an initial A2L file containing virtual addresses.
例如,合并NEW_RTE_Measurements.a2l和Project_MC.a2l,生成包含虚拟地址的初始A2L文件Project_VADR.a2l。For example, merging NEW_RTE_Measurements.a2l and Project_MC.a2l generates the initial A2L file Project_VADR.a2l containing virtual addresses.
可以采用正则表达式合并工程A2L文件和RTE测量量,生成含有虚拟地址的初始A2L文件。Regular expressions can be used to merge engineering A2L files and RTE measurements to generate initial A2L files containing virtual addresses.
步骤S132,根据编译器生成的ELF文件,将初始A2L文件中的虚拟地址更换为物理地址,得到工程A2L文件。In 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.
ELF(Executable File Format)文件是可执行文件格式。编译器在完成C代码的编译链接过程后会生成可刷写的文件(.s19或者.hex),随之一起生成还包括map文件以及ELF文件。ELF (Executable File Format) files are executable file formats. After the compiler completes the compiling and linking process of the C code, it will generate a flashable file (.s19 or .hex), and then generate a map file and an ELF file.
通过地址替换脚本,基于ELF文件将初始A2L文件中的虚拟地址替换为物理地址,生成工程A2L文件。地址替换脚本文件可以根据需求进行编写,本实施例对地址替换脚本文件的内容不做限制。比如本实施例在实际操作时是通过发明人编写的脚本FinalA2L.py实施步骤S132。Through the address replacement script, the virtual address in the initial A2L file is replaced with the physical address based on the ELF file, and the project A2L file is generated. The address replacement script file can be written according to requirements, and the content of the address replacement script file is not limited in this embodiment. For example, in the actual operation of this embodiment, the script FinalA2L.py written by the inventor implements step S132.
例如,通过脚本FinalA2L.py,基于ELF文件Project.elf,将步骤S7中生成的Project_VADR.a2l中的虚拟地址替换为实际的物理地址,生成工程所需的A2L文件Project.a2l。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 by the project.
另外,脚本FinalA2L.py主要是用于从ELF文件中提取物理地址,并替换掉A2L文件里对应的虚拟地址。其中,采用正则表达式'0x0+\s*/\*\s*@ECU_Address@(.*\w+?)@\s*\*/'来查找和替换地址。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. Among them, the regular expression '0x0+\s*/\*\s*@ECU_Address@(.*\w+?)@\s*\*/' is used to find and replace addresses.
综上所述,本发明实施例根据目标架构的配置需求,搭建N个目标模型,根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,以及提取运行时环境映射的RTE测量量;合并工程A2L文件和RTE测量量,生成工程A2L文件。可见,本实施例通过自动生成工程A2L文件,提高了车载控制器软件开发过程中A2L文件的生成效率,不仅提高了A2L文件的可靠性,且极大地节省了A2L文件处理过程中的人力成本,有利于车载控制器软件开发尤其是标定过程的软件迭代。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 containing the calibration quantity and model measurement quantity of each target model according to the N target models, and extracts the runtime RTE measurements for environmental mapping; merge project A2L files and RTE measurements to generate project A2L files. 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, not only improves the reliability of A2L files, but also greatly saves labor costs in the process of A2L file processing. It is beneficial to the software development of the vehicle controller, especially the software iteration of the calibration process.
本实施例能够快速地根据现有文件自动生成A2L文件,A2L文件的生成速度快、效率高,这样可以节省大量的人力物力,而且相比于人工编写及修改减少了出错率,更能够保证软件的质量。另外,本实施例的方法步骤简单、计算复杂度低,装置结构简单、对硬件要求低,大大降低了A2L文件的生成成本。This embodiment can quickly generate A2L files automatically according to existing files. The generation speed of A2L files is fast and the efficiency is high. This can save a lot of manpower and material resources, and compared with manual writing and modification, the error rate is reduced, and the software can be guaranteed. the quality of. In addition, the method of this embodiment has simple steps, low computational complexity, simple device structure, and low hardware requirements, which greatly reduces the cost of generating A2L files.
基于同一发明构思,本实施例提供了如图7所示的一种A2L文件生成装置,装置包括:Based on the same inventive concept, this embodiment provides an A2L file generation device as shown in Figure 7, the device includes:
模型搭建模块71,用于根据目标架构的配置需求,搭建N个目标模型,N为正整数;A
文件生成模块72,用于根据N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,以及提取运行时环境映射的RTE测量量;The
合并模块73,用于合并工程A2L文件和RTE测量量,生成工程A2L文件。The merging
进一步地,模型搭建模块71,包括:Further, the
模型搭建子模块,用于根据汽车开放系统架构的配置需求,搭建N个目标模型,配置需求包括接口配置需求。The model building sub-module 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.
进一步地,文件生成模块72,包括:Further, the
ARXML文件生成子模块,用于根据N个目标模型,生成每个目标模型的ARXML文件;The ARXML file generation sub-module is used to generate the ARXML file of each target model according to the N target models;
单模型A2L文件生成子模块,用于从每个目标模型的ARXML文件中提取标定量和模型测量量,生成每个目标模型对应的单模型A2L文件;The single-model A2L file generation sub-module is used to 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;
模型A2L文件生成子模块,用于合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件。The model A2L file generation submodule is used to merge the single-model A2L files corresponding to each of the N target models to generate a model A2L file.
进一步地,ARXML文件生成子模块具体用于:Further, the ARXML file generation sub-module is specifically used for:
通过嵌入式编码器,生成每个目标模型的ARXML文件。With the embedded coder, an ARXML file is generated for each target model.
进一步地,单模型A2L文件生成子模块具体用于:Further, the single-model A2L file generation sub-module is specifically used for:
通过A2L脚本文件,从每个目标模型的ARXML文件中提取标定量和模型测量量,生成每个目标模型对应的单模型A2L文件。Through the A2L script file, the calibration quantity and model measurement quantity are extracted from the ARXML file of each target model, and a single-model A2L file corresponding to each target model is generated.
进一步地,模型A2L文件生成子模块具体用于:Further, the model A2L file generation sub-module is specifically used for:
通过合并脚本文件,合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件。By merging the script files and merging the single-model A2L files corresponding to each of the N target models, a model A2L file is generated.
进一步地,模型A2L文件生成子模块具体用于:Further, the model A2L file generation sub-module is specifically used for:
通过目标语法合并N个目标模型各自对应的单模型A2L文件,生成模型A2L文件。Merge the single-model A2L files corresponding to each of the N target models through target syntax to generate a model A2L file.
进一步地,文件生成模块72,包括:Further, the
模型统计文件生成子模块,用于针对每个目标模型,生成顶层的输入输出变量名称的模型统计文件;The model statistical file generation sub-module is used to generate the model statistical file of the top-level input and output variable names for each target model;
工程统计文件生成子模块,用于合并N个目标模型对应的模型统计文件,生成工程统计文件;The engineering statistical file generation sub-module is used to merge the model statistical files corresponding to the N target models to generate the engineering statistical file;
RTE测量量提取子模块,用于根据工程统计文件和运行环境文件,提取运行时环境映射的RTE测量量。The RTE measurement quantity extraction sub-module is used to extract the RTE measurement quantity of the runtime environment mapping according to the engineering statistics file and the operation environment file.
进一步地,模型统计文件生成子模块,具体用于:Further, the model statistics file generates submodules, which are specifically used for:
通过输入输出脚本文件,生成顶层的输入输出变量名称的模型统计文件。Through the input and output script file, the model statistics file of the input and output variable names of the top level is generated.
进一步地,RTE测量量提取子模块,具体用于:Further, the RTE measurement quantity extraction sub-module is specifically used for:
通过浏览映射脚本文件,根据工程统计文件和运行环境文件,提取运行时环境映射的RTE测量量。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.
进一步地,合并模块73具体用于:Further, the merging
合并工程A2L文件和RTE测量量,生成含有虚拟地址的初始A2L文件;Merge engineering A2L files and RTE measurements to generate initial A2L files containing virtual addresses;
根据编译器生成的ELF文件,将初始A2L文件中的虚拟地址更换为物理地址,得到工程A2L文件。According to the ELF file generated by the compiler, replace the virtual address in the initial A2L file with the physical address to obtain the project A2L file.
进一步地,合并模块73具体用于:Further, the merging
通过地址替换脚本,合并工程A2L文件和RTE测量量,生成工程A2L文件。Through the address replacement script, merge the project A2L file and the RTE measurement to generate the project A2L file.
进一步地,合并模块73具体用于:Further, the merging
采用正则表达式合并工程A2L文件和RTE测量量,生成工程A2L文件。Use regular expressions to merge engineering A2L files and RTE measurements to generate engineering A2L files.
基于同一发明构思,本实施例提供了如图8所示的一种电子设备,包括:Based on the same inventive concept, this embodiment provides an electronic device as shown in Figure 8, including:
处理器81;
用于存储处理器81可执行指令的存储器82;A
其中,处理器81被配置为执行以实现如前述提供的一种A2L文件生成方法。Wherein, the
基于同一发明构思,本实施例提供了一种非临时性计算机可读存储介质,当存储介质中的指令由电子设备的处理器81执行时,使得电子设备能够执行实现如前述提供的一种A2L文件生成方法。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
由于本实施例所介绍的电子设备为实施本申请实施例中信息处理的方法所采用的电子设备,故而基于本申请实施例中所介绍的信息处理的方法,本领域所属技术人员能够了解本实施例的电子设备的具体实施方式以及其各种变化形式,所以在此对于该电子设备如何实现本申请实施例中的方法不再详细介绍。只要本领域所属技术人员实施本申请实施例中信息处理的方法所采用的电子设备,都属于本申请所欲保护的范围。Since the electronic equipment introduced in this embodiment is the electronic equipment used to implement the information processing method in the embodiment of the application, based on the information processing method introduced in the embodiment of the application, those skilled in the art can understand the implementation The specific implementation manner of the electronic device of the example and its various variations, so how the electronic device implements the method in the embodiment of the present application will not be 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 all falls within the scope of protection intended by the present application.
上述本申请实施例中的技术方案,至少具有如下的技术效果或优点:The above-mentioned technical solutions in the embodiments of the present application have at least the following technical effects or advantages:
本发明实施例根据目标架构的配置需求,搭建N个目标模型,根据所述N个目标模型,生成包含每个目标模型的标定量和模型测量量的模型A2L文件,以及提取运行时环境映射的RTE测量量;合并所述工程A2L文件和所述RTE测量量,生成工程A2L文件。可见,本实施例通过自动生成工程A2L文件,提高了车载控制器软件开发过程中A2L文件的生成效率,不仅提高了A2L文件的可靠性,且极大地节省了A2L文件处理过程中的人力成本,有利于车载控制器软件开发尤其是标定过程的软件迭代。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 runtime environment mapping RTE measurement quantity; combining the project A2L file and the RTE measurement quantity to generate the project 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, not only improves the reliability of A2L files, but also greatly saves labor costs in the process of A2L file processing. It is beneficial to the software development of the vehicle controller, especially the software iteration of the calibration process.
本实施例能够快速地根据现有文件自动生成A2L文件,A2L文件的生成速度快、效率高,这样可以节省大量的人力物力,而且相比于人工编写及修改减少了出错率,更能够保证软件的质量。另外,本实施例的方法步骤简单、计算复杂度低,装置结构简单、对硬件要求低,大大降低了A2L文件的生成成本。This embodiment can quickly generate A2L files automatically according to existing files. The generation speed of A2L files is fast and the efficiency is high. This can save a lot of manpower and material resources, and compared with manual writing and modification, the error rate is reduced, and the software can be guaranteed. the quality of. In addition, the method of this embodiment has simple steps, low computational complexity, simple device structure, and low hardware requirements, which greatly reduces the cost of generating A2L files.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can 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, etc.) 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 should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While preferred embodiments of the invention have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。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 equivalent technologies thereof, the present invention also intends to include these modifications and variations.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210836985.6A CN115373648B (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 CN115373648B (en) | 2022-07-15 | 2022-07-15 | A2L file generation method, device, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115373648A true CN115373648A (en) | 2022-11-22 |
CN115373648B CN115373648B (en) | 2025-01-28 |
Family
ID=84062687
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210836985.6A Active CN115373648B (en) | 2022-07-15 | 2022-07-15 | A2L file generation method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115373648B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104636351A (en) * | 2013-11-07 | 2015-05-20 | 北汽福田汽车股份有限公司 | A2L file generation method and system |
CN104850570A (en) * | 2014-08-29 | 2015-08-19 | 北汽福田汽车股份有限公司 | Method and system for automatically generating A2L file |
CN113591171A (en) * | 2021-08-13 | 2021-11-02 | 江苏爱玛车业科技有限公司 | Method and device for automatically generating A2L file |
-
2022
- 2022-07-15 CN CN202210836985.6A patent/CN115373648B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104636351A (en) * | 2013-11-07 | 2015-05-20 | 北汽福田汽车股份有限公司 | A2L file generation method and system |
CN104850570A (en) * | 2014-08-29 | 2015-08-19 | 北汽福田汽车股份有限公司 | Method and system for automatically generating A2L file |
CN113591171A (en) * | 2021-08-13 | 2021-11-02 | 江苏爱玛车业科技有限公司 | Method and device for automatically generating A2L file |
Non-Patent Citations (2)
Title |
---|
屌丝小蚂蚁: "VCU/BMS基于模型开发---A2L文件生成法则", pages 1 - 7, Retrieved from the Internet <URL:《https://zhuanlan.zhihu.com/p/156868448》> * |
纪淑玲等: "新能源整车控制软件自动化集成的实现", 《汽车实用技术》, no. 23, 31 December 2018 (2018-12-31), pages 8 - 11 * |
Also Published As
Publication number | Publication date |
---|---|
CN115373648B (en) | 2025-01-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3745256B1 (en) | External code integrations within a computing environment | |
US10261760B1 (en) | Systems and methods for tracing performance information from hardware realizations to models | |
CN111026670B (en) | Test case generation method, test case generation device and storage medium | |
CN110196720A (en) | A kind of Simulink generates the optimization method of dynamic link library | |
CN113672638B (en) | A method, system and electronic device for querying data | |
CN107797805B (en) | Code packaging method and device and computer readable storage medium | |
CN115686631B (en) | Method, device and storage medium for generating random instructions based on knowledge base | |
CN116737117A (en) | Model development method based on Autosar architecture | |
CN113157336A (en) | C # language-based gripper configuration system, method, device and storage medium | |
US11593076B2 (en) | Method for merging architecture data | |
CN115373648B (en) | A2L file generation method, device, equipment and medium | |
CN115033434B (en) | Method and device for calculating kernel performance theoretical value and storage medium | |
CN111506543A (en) | M file generation method and device | |
US20240135074A1 (en) | Adaptable framework for circuit design simulation verification | |
CN117892665A (en) | Modeling and simulation method, device, medium and equipment based on circuit system level model | |
CN115062571B (en) | Method, system, device and computer-readable storage medium for dynamic selection of data area applied to integrated circuit devices | |
Ziegler et al. | Extending the IPG CarMaker by FMI compliant units | |
CN115757174A (en) | Database difference detection method and device | |
CN115422035A (en) | Automatic development method and system of virtual ECU model | |
CN115542878A (en) | Simulation virtualization test method, system, equipment and medium based on controller | |
Haupt et al. | Near automatic translation of autonomie-based power train architectures for multi-physics simulations using high performance computing | |
CN116362060B (en) | Automatic generation method, device and equipment for system simulation model | |
CN117973076B (en) | Simulation system and method based on virtual-real coupling | |
CN110674179A (en) | Query interface generation method, device and medium | |
CN110795847A (en) | Modeling method and device and electronic equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |