CN106776633B - User-configurable apparatus and method for automatically generating a2l file - Google Patents

User-configurable apparatus and method for automatically generating a2l file Download PDF

Info

Publication number
CN106776633B
CN106776633B CN201510819619.XA CN201510819619A CN106776633B CN 106776633 B CN106776633 B CN 106776633B CN 201510819619 A CN201510819619 A CN 201510819619A CN 106776633 B CN106776633 B CN 106776633B
Authority
CN
China
Prior art keywords
file
address
user
data
variable
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.)
Active
Application number
CN201510819619.XA
Other languages
Chinese (zh)
Other versions
CN106776633A (en
Inventor
朱正礼
张磊
任国锋
徐俊伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SAIC Motor Corp Ltd
Shanghai Automotive Industry Corp Group
Original Assignee
SAIC Motor Corp Ltd
Shanghai Automotive Industry Corp Group
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SAIC Motor Corp Ltd, Shanghai Automotive Industry Corp Group filed Critical SAIC Motor Corp Ltd
Priority to CN201510819619.XA priority Critical patent/CN106776633B/en
Publication of CN106776633A publication Critical patent/CN106776633A/en
Application granted granted Critical
Publication of CN106776633B publication Critical patent/CN106776633B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a user-configurable device and a user-configurable method for automatically generating a2l files, which solve the problems generated in the process of configuring a calibration database. The technical proposal is as follows: the invention provides a man-machine configurable interface for carrying out universal predefined configuration on a2l file to be generated, and assigning configuration items to corresponding program data interfaces in the running process of a software device, wherein in the running process, software can automatically call the program interfaces so as to achieve the effect expected by user configuration.

Description

User-configurable apparatus and method for automatically generating a2l file
Technical Field
The invention relates to the technical field of automobile controllers, in particular to a method and a device for automatically generating an a2l variable database file by performing a user-configurable mode according to the characteristic differences of each controller chip platform and an integrated compiling environment.
Background
The a2l file is a calibration data base file, which includes information such as calibration variables, types of measured quantities, addresses, physical transformation modes, units and the like, and is used for establishing a variable data base file which needs to be imported before calibrating Database in a calibration tool such as INCA or CANape and the like, and the variable data base file conforms to ASAP2 protocol. The address mapping file (. Map) generated by each manufacturer is also different for each controller platform and its corresponding compiling environment, so that in the controller development engineering of the whole vehicle factory, the generation tool developed by each manufacturer needs to be used according to different controller platforms. In addition, the application layer software and the bottom layer software in the controller are required to be frequently changed in the product development process, so that the tool is also required to be frequently used for generating an a2l file for a calibration tool to create a variable database, and sometimes, some modifications to the a2l file are required to be made according to the actual calibration work requirement, and the change process becomes a very mechanized and labor-intensive work due to the fact that a plurality of variables are involved in the modification process. The main drawbacks of the current a2l generation approach are: the reliability of the a2l file is low, the expansibility is poor, and the portability is poor.
Disclosure of Invention
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
The invention aims to solve the problems, and provides a user-configurable device and a user-configurable method for automatically generating a2l files, which solve the problems generated in the process of configuring a calibration database.
The technical scheme of the invention is as follows: the invention discloses a user-configurable device for automatically generating a2l file, which comprises the following components:
the user configuration interface input module performs universality predefined configuration on the a2l file to be generated through a man-machine interface, assigns configuration items to corresponding program data interfaces, and comprises:
a source a2l file path input unit for inputting a path of an application layer variable database file (.a2l file) generated by matlab;
an address mapping file path input unit for inputting a path of an address mapping file of the memory data generated by the compiler;
the method comprises the steps that a calibration quantity data segment name and ROM address unit is configured according to different compiler environments and controllers, and a data segment definition of a working page and a reference page is identified in an a2l file;
the measurement data segment name unit is configured according to different compiler environments and is used for pointing a pointer to the head of the data segment position appointed by the character string in the program;
the automatic generator module is configured to generate a2l template according to the characteristic information of the data segment of the controller platform configured in the user configuration interface, and the automatic generator module further comprises:
the user configuration interface calling and instantiation unit acquires an address mapping file under a user configuration path, extracts the standard quantity and the measured quantity data in the address mapping file according to the standard sign and the initial address specified by the user, and stores the data in a program cache in a character string form for later retrieval of variable names and addresses;
a data type structure array instantiation unit for defining and instantiating a structure, defining the structure according to the format of variable attribute definition in an a2l file generated by matlab of each type of structure, and instantiating the structure in the form of a structure array;
the data acquisition unit of each data segment of the address mapping file acquires a source a2l file generated by matlab under a user-specified path, retrieves the data of the source a2l file by using keywords defined in ASAP2 protocol and distributes the data to four corresponding structural bodies, and fills the data into members of the corresponding structural bodies according to lines;
a2l file analysis unit, which uses the variable name member in the allocated structure variable to the data segment analyzed by the address mapping file to search the corresponding variable name and read the address;
the data segment information searching unit writes the address corresponding to the variable resolved in the corresponding data segment into the address member of the corresponding structural body variable;
and a2l file generating unit writes the head template and the tail template of the new a2l file, circularly writes the members of the structural variables into the definition of the appointed section of the pre-portable a2l file according to the standard format of the a2l file, and outputs the file to the path appointed by the user.
According to an embodiment of the user-configurable apparatus for automatically generating a2l files of the present invention, a data type structure array instantiation unit defines and instantiates a structure comprising: a calibration volume structure, a measurement volume structure, a Y-axis calibration volume structure, and an X-axis calibration volume structure.
According to one embodiment of the user-configurable device for automatically generating the a2l file, the data segment information searching unit judges the attribute of the structural body variable, if the attribute is the calibration quantity, the offset of the address is calculated according to the address of the structural body variable in the RAM and the mapping address of the calibration data segment in the flash/ROM, the offset is subtracted from the mapping address and then written in, and if the offset is the measurement quantity, the address is not required to be converted and then directly written in.
The invention also discloses a user-configurable method for automatically generating the a2l file, which comprises the following steps:
step 1: carrying out universality predefined configuration on an a2l file to be generated through a user configuration interface, and assigning configuration items to corresponding program data interfaces;
step 2: the automatic generator reads the address mapping file under the specified path according to the address mapping file label input by the user in the form of a stream file, and carries out character string processing and reading and writing so as to retrieve and acquire the needed data segment information;
step 3: the automatic generator reads a stream file of an a2l file generated by matlab under a user specified path and performs character string processing and retrieval, wherein keywords are distributed to corresponding structure members of specified elements in a corresponding type of structure array according to a definition form of a structure body after the keywords are in accordance with ASAP2 protocol;
step 4: the automatic generator searches the default part of the content through the processing of the structural member, searches the variable name member in the structural body from the data segment read from the corresponding address mapping file, and fills the corresponding address or related information into the structural body variable member with the corresponding attribute after the searching is completed;
step 5: and writing the head template and the tail template for the new a2l file, circularly writing the members of the structural variables into the appointed section definition of the pre-portable a2l file according to the standard format of the a2l file, and outputting the file to a path appointed by a user.
According to an embodiment of the method for automatically generating a2l file capable of being configured by a user, in step 1, a path of an application layer variable database file (. A2l file) generated by matlab and an address mapping file of memory data generated by a compiler is obtained through a user configuration interface, and a tag name in the address mapping file configured by the user is obtained as an interface.
According to an embodiment of the user configurable method of automatically generating a2l files of the present invention, the structure in step 3 comprises: a calibration volume structure, a measurement volume structure, a Y-axis calibration volume structure, and an X-axis calibration volume structure.
According to an embodiment of the user configurable method for automatically generating a2l files of the present invention, step 4 further comprises: judging the attribute of the structural body variable, if the attribute is the calibration quantity, calculating the offset of the address according to the address of the structural body variable in the RAM and the mapping address of the calibration data segment in the flash/ROM, subtracting the offset from the mapping address, writing the offset, and if the offset is the measurement quantity, directly writing the offset after the address conversion.
Compared with the prior art, the invention has the following beneficial effects: the invention provides a man-machine configurable interface for carrying out universal predefined configuration on a2l file to be generated, and assigning configuration items to corresponding program data interfaces in the running process of a software device, wherein in the running process, software can automatically call the program interfaces so as to achieve the effect expected by user configuration. Compared with the traditional method, the method has the advantages that the user-defined configuration (the characteristics include the label name of each data segment, the starting address of each data segment, the daq List length and the length of each memory data segment in the address mapping file) can be carried out on the device according to the characteristics in different controller platforms and integrated compiling environments, so that the universality of the generating device is greatly improved, and the risk of frequently replacing the generating software is reduced.
Drawings
FIG. 1 shows a schematic diagram of a preferred embodiment of the user-configurable apparatus of the present invention for automatically generating a2l files.
Fig. 2 shows a system operation diagram of an embodiment of the device of the present invention.
FIG. 3 shows a graphical interface schematic of a user configuration interface input module of an embodiment of the apparatus of the present invention.
Fig. 4 shows a functional implementation block diagram of an automatic generator module of an embodiment of the apparatus of the present invention.
Fig. 5 shows a program flow diagram of an automatic generator module of an embodiment of the apparatus of the present invention.
FIG. 6 is a flow chart of a preferred embodiment of the user configurable method of automatically generating a2l files of the present invention.
Detailed Description
The above features and advantages of the present invention will be better understood after reading the detailed description of embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily to scale and components having similar related features or characteristics may have the same or similar reference numerals.
FIG. 1 illustrates the principles of a preferred embodiment of the user-configurable apparatus of the present invention for automatically generating a2l files. Referring to fig. 1, the apparatus for automatically generating a2l file configured by a user in this embodiment includes: a user configures the interface input module 1 and the automatic generator module 2. The user configuration interface input module 1 performs universality predefined configuration on the a2l file to be generated through a man-machine interface, and assigns configuration items to corresponding program data interfaces. The automatic generator module 2 generates a2l template according to the characteristic information configuration of the data segment of the controller platform configured in the user configuration interface.
The user configuration interface input module 1 includes: a source a2l file path input unit 11, an address map file path input unit 12, a calibration volume data segment name unit 13, and a measurement volume data segment name unit 14.
Referring also to fig. 2, the source a2l file path input unit 11 inputs a path of an application layer variable database file (.a2l file) generated by matlab. The address map file path input unit 12 inputs a path of an address map file of the memory data generated by the compiler. The path of the address mapping file and the source a2l file is imported for the automatic generator module to construct instances of its stream file reads. The calibrated data segment name and ROM address unit 13 is configured according to different compiler environments and controllers, and identifies data segment (segment) definitions of a working page (working page) and a reference page (reference page) in an a2l file. The measurement volume data segment name unit 14 is configured according to different compiler environments for pointing a pointer to a header of a data segment position specified by a character string in a program.
The user may manually configure some feature options to ensure that the output a2l file may run on a different controller platform before generating the a2l file. The method comprises the steps of obtaining paths of an application layer variable database file (.a2l) generated by matlab and a memory data address mapping file (.map) generated by a compiler through a user configuration interface, obtaining tag names in the address mapping file configured by a user to serve as interfaces, wherein the conditions are used as input of an automatic generator module, and storing the conditions in a program cache in a data form of a character string. The address mapping file (. Map) path and the variable database file (. A2l) path generated by matlab are necessary configuration items, and the automatic generator needs to access the corresponding file according to the path and perform the read-write operation of the stream file on the file. The measurement data segment names and addresses and the calibration data segment names and addresses are optional configuration items, and if the user configuration items are empty, the generator generates according to default configuration (the default configuration is the link file definition of the mpc5604 singlechip of the POWERPC). The operation interface of the user configuration interface under the windows system is shown in fig. 3, and when the user has configured, the automatic variable database file (.a2l) is generated by clicking the generator button. Wherein the data segment labels and start addresses in each selectable configuration item are defined in a lcf link file in the engineering source file, and the user can modify the configurable items according to the determination of the data segments in the file by different controller platforms.
The automatic generator module 2 includes: the user configuration interface calling and instantiation unit 21, the data type structure array instantiation unit 22, the address mapping file data obtaining unit 23, the a2l file analysis unit 24, the data segment information searching unit 25 and the a2l file generating unit 26.
The user configuration interface calling and instantiating unit 21 obtains an address mapping file (i.e. a map file generated by compiling by a compiler) under a user configuration path, extracts the standard quantity and measurement quantity data therein according to the standard sign and the starting address specified by the user, and stores the data in a program cache in the form of character strings for later retrieval of variable names and addresses.
The data type structure array instantiation unit 22 defines and instantiates a structure, defines a structure according to a format in which various types of structures define variable attributes in an a2l file generated by matlab, and instantiates a structure in the form of a structure array. The structure here includes: a calibration volume structure, a measurement volume structure, a Y-axis calibration volume structure, and an X-axis calibration volume structure.
The address mapping file data obtaining unit 23 obtains a source a2l file (application layer variable database file) generated by matlab under the user specified path, retrieves the data by using the keywords defined in the ASAP2 protocol, distributes the retrieved data to the corresponding four types of structures, and fills the data into members of the corresponding structures according to lines.
The a2l file parsing unit 24 retrieves the corresponding variable name from the data segment parsed by the variable name member-to-address mapping file in the already assigned structure variables and reads the address thereof.
The data segment information search unit 25 writes the address corresponding to the variable parsed from the corresponding data segment into the address member of the corresponding structure variable. The data segment information searching unit 25 judges the attribute of the structural variable, if the attribute is the calibration quantity, calculates the offset of the address according to the address of the structural variable in the RAM and the mapping address of the calibration data segment in the flash/ROM, and writes the offset after subtracting the offset from the mapping address, if the attribute is the measurement quantity, the offset is directly written after the address conversion is not needed.
The a2l file generating unit 26 writes the head and tail templates of the new a2l file, circularly writes the members of the structure variables into the definition of the designated segment of the a2l file which is pre-portable according to the standard format of the a2l file, and outputs the file to the path designated by the user, and the default condition is consistent with the path of the map file). Wherein the head and tail templates comprise: macro definition, data segment name and address definition, daq list definition, and calculation method definition. The parameters of the memory space segment related to the controller can be obtained from the previous user configuration information and address mapping file.
Referring to fig. 4 and 5, the automatic generator module 2 performs the following steps.
And reading the address mapping file under the specified path in a stream file mode according to the address mapping file label input by the user, and carrying out character string processing and reading and writing so as to retrieve and acquire the needed data segment information.
And reading the stream file of the application variable database file (. A2l) generated by matlab under the specified path of the user, processing and searching the character string, wherein the main key word is ASAP2 protocol, and then distributing all information to the corresponding structural members in the specified elements in the corresponding type of structural array according to the definition form of the structural body.
The default part of the content of each member of the structure is searched by processing the members of the structure, and the variable name, namely the variable name member in the structure, is searched in the data segment read from the corresponding address mapping file, and the corresponding address or related information is filled into the variable member of the structure with the corresponding attribute after the search is completed.
In retrieving and writing address variables, it should be noted that if a nominal amount, its RAM should be written to the address that maps to its corresponding Flash/ROM. The address is required to be converted, the RAM address of the standard quantity is read out firstly, then the base address of the standard quantity data section in the RAM is subtracted to obtain the corresponding address offset of the standard quantity in the variable standard quantity data section, and the base address in the standard quantity data section hybrid ROM is added to the offset to obtain the address of the standard quantity in the actual ROM/Flash.
By means of the data management mode of using the structure body array and the structure body members thereof, parameters of various types of variables can be managed and distributed more effectively, so that the software is easier to maintain and respond to new requirements of users, such as parameters describing the variables for a computing METHOD COMPUTE METHOD, upper and lower limit values Upper Limit Lower Limit of the variables, a variable alias Long Identifier and the like.
In the structure body array allocation process, the allocation is mainly performed according to four major categories: a measurement volume structure, a y-axis number group standard volume structure, an x-axis number group standard volume structure and a common standard volume structure.
The member variables in each structure body are defined according to the data source file generated by matlab, and the data description structure is inherited in the generator, so that compared with the traditional data attribute description structure of the a2l file, the structure has the advantages of reasonable structure, strong readability of added comments, strong maintainability and universal identifier, and is convenient for batch data processing.
FIG. 6 illustrates a flow chart of an embodiment of a user configurable method of automatically generating a2l files of the present invention. Referring to fig. 6, the detailed steps of the method of the present embodiment are as follows.
Step S1: and carrying out universal predefined configuration on the a2l file to be generated through a user configuration interface, and assigning configuration items to corresponding program data interfaces.
And acquiring paths of an application layer variable database file (.a2l file) generated by matlab and an address mapping file of memory data generated by a compiler through a user configuration interface, and simultaneously acquiring a tag name in the address mapping file configured by a user as an interface.
Step S2: and the automatic generator reads the address mapping file under the specified path in the form of a stream file according to the address mapping file label input by the user, and performs character string processing and reading and writing so as to retrieve and acquire the needed data segment information.
Step S3: and the automatic generator reads the stream file of the a2l file generated by the matlab under the specified path of the user, processes and searches the character string, wherein the keywords are distributed to the corresponding structural members of the specified elements in the corresponding type of structural array according to the definition form of the structural body according to ASAP2 protocol. Wherein the structure body comprises: a calibration volume structure, a measurement volume structure, a Y-axis calibration volume structure, and an X-axis calibration volume structure.
Step S4: the automatic generator searches the default part of the content through the processing of the structural member, searches the variable name member in the structural member from the data segment read from the corresponding address mapping file, and fills the corresponding address or related information into the structural variable member with the corresponding attribute after the searching is completed.
The method further comprises the following steps: judging the attribute of the structural body variable, if the attribute is the calibration quantity, calculating the offset of the address according to the address of the structural body variable in the RAM and the mapping address of the calibration data segment in the flash/ROM, subtracting the offset from the mapping address, writing the offset, and if the offset is the measurement quantity, directly writing the offset after the address conversion.
Step S5: and writing the head template and the tail template for the new a2l file, circularly writing the members of the structural variables into the appointed section definition of the pre-portable a2l file according to the standard format of the a2l file, and outputting the file to a path appointed by a user.
Referring to fig. 4 and 5, the method of the present embodiment is as follows.
Before the user generates the variable database file (. A2 l), some feature options may be manually configured to ensure that the output a2l file can run on a different controller platform. The address mapping file (. Map) path and the variable database file (. A2l) path generated by matlab are necessary configuration items, and the automatic generator module needs to access the corresponding file according to the path and perform the read-write operation of the stream file on the file. The measurement data segment names and addresses and the calibration data segment names and addresses are optional configuration items, and if the user configuration items are empty, the generator generates according to default configuration (the default configuration is the link file definition of the mpc5604 singlechip of the POWERPC).
The operation interface of the user configuration interface under the Windows system is shown in FIG. 3, and when the user configuration is completed, the automatic variable database file (. A2l) is generated by clicking the generator key. Wherein the data segment labels and start addresses in each selectable configuration item are defined in a lcf link file in the engineering source file, and the user can modify the configurable items according to the determination of the data segments in the file by different controller platforms.
When the user clicks the Generate key in the configuration interface, the device will launch the auto generator module to perform the following steps.
Calling the data of each data section interface in the user configuration interface, namely the name of the calibrated data section, the name of the measured data section, the starting address of the calibrated memory and the starting address of the calibrated memory, and storing the data in a cache in a character string format for later program retrieval. The declaration of the data needs to be public, so that the user can modify the content configured in the text box, the initial values of the declaration are all default values applicable to POWERPC 5604B, and if the configuration item in the text box is empty, the program runs according to the default values.
Four structural body types are defined: the structure type of the standard quantity, the structure type of the measuring quantity, the structure type of the array type X-axis standard quantity and the structure type of the array type Y-axis standard quantity. The definition rules are defined in the format of the definition of variables by the matlab generated variable database file (.a2l). The members of the structure were measured in the general definition order of the structure: variable name, long id, type, conversion mode, resolution, precision, upper limit, lower limit, memory address. The members of the standard volume structure are: variable name, long id, calibration quantity type, memory address, record format, conversion mode, upper limit value and lower limit value.
Examples of creation stream files and read stream files of the user-defined file path construction address map file (.map) and variable database file (.a2l) are accessed.
And (3) address mapping file processing, wherein the read map file character string is searched according to a label name configured by a user, and the calibrated quantity data segment information and the measured quantity data segment information are obtained, and the content of the data segment information comprises: variable name, data type, memory start address, occupied space, belonging source file, etc. And acquiring key data segment information by a method of intercepting character strings, and storing the key data segment information according to an original file format of the key data segment information.
The source variable database file (. A2 l) generated by Matlab is processed, firstly, the read-in file is divided into a data definition block according to each/begin to/end according to definition keywords, and the content in/begin CHARACTERISTIC to/end CHARACTERISTIC is defined as the calibration quantity, wherein the calibration quantity is divided into two types: if the/begin AXIS_DESCR key is searched in the data block, the data block is judged to be the Y-AXIS standard quantity, and the rest is the general standard quantity. The key labels of the MEASUREMENT data blocks are/begin MEASUREMENT and/or end MEASUREMENT. The key labels of the array type X-AXIS calibration data block are/begin AXIS_PTS and/end AXIS_PTS. And allocating the elements in the corresponding structure body array to each data block according to the type of the data block.
After being allocated to the corresponding structure body array element corresponding to the data block type, the contents in the data block need to be filled into the members of the corresponding structure body array element according to the attribute type. The general format is to divide a data block by a line-break according to the line-break as a separator, and write the attributes describing this variable one by one into its members in the order of the circular division.
After filling in the structural members, the content in the structural members needs to be processed by character strings, and the annotation is added before the available data in the version generated by matlab, so the character strings need to be processed and the data which can be used directly finally is rewritten in the structural members of the type where the character strings are located. The variable database files (.a2l) generated here because of matlab all follow a column aligned format. Only one unified deletion of the content from index 0 to 40 characters is required here, with the remaining characters being written as valid data into the structural members.
And searching the corresponding address information in the corresponding type data segment acquired by the address mapping file by taking the variable name member of the structural member which has been written with the data as the key word of the index, and writing the address information into the corresponding structural member after intercepting the address information, wherein the operation of intercepting the address can also carry out a substring function on the character string according to the unified format of the address mapping file.
If the variable is the standard quantity, the address is processed, the obtained address in the memory is subtracted by the initial address in the memory to obtain the offset of the variable in the data segment, and the offset is added with the address of the standard segment in the FLASH/ROM, namely the address of the variable in the FLASH/ROM. Writing the converted address into the address member in the structure.
Constructing a new file instance and an instance of a write stream file under the address mapping file path specified by the user, writing the head and tail templates of the new variable database file (a 2 l), comprising: macro definition, data segment name and address definition, daq list definition, and calculation method definition. The parameter generator related to the memory space segment and the controller can be automatically obtained from the user configuration information and the address mapping file.
And traversing each structure body array and member, writing a newly generated variable database file (a 2 l), wherein the written position is before indexing of the search key word/end MODULE.
Finally, a statement for all the variable names of the standard quantity is required to be added, and the variable name members of all the standard quantity structures are inserted at the end of the file, namely between the keyword labels/begin REF_ CHARACTERISTIC and/end REF_ CHARACTERISTIC.
And resolving all the instances to release the memory, and calling a generated information window to prompt the user that the variable database file is generated completely. At this time, the file will be stored under the address mapping file (. Map) specified by the user, that is, it is generally convenient for the user to use and manage under the bin directory of the engineering original file.
The device summarizes and abstracts the differences and the particularities of each platform on the basis of the current general special variable database file (. A2 l) file generation tool (only aiming at a single controller platform), opens user configurable options as a borrow, and can support the generation of a2l files on different platforms. The universality and the portability of the tool are improved, and the risk of frequently replacing the tool is reduced. Meanwhile, the automatic generating tool saves a great amount of workload and error rate, and improves the reliability and consistency of the generated file.
The use of the form of the array of structures manages the data, making the program easier to maintain and manage. Since the variable database file (.a2l) typically requires some parameter changes in the calibration, modification and updating of the properties of the variables is facilitated.
While, for purposes of simplicity of explanation, the methodologies are shown and described as a series of acts, it is to be understood and appreciated that the methodologies are not limited by the order of acts, as some acts may, in accordance with one or more embodiments, occur in different orders and/or concurrently with other acts from that shown and described herein or not shown and described herein, as would be understood and appreciated by those skilled in the art.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk (disk) and disc (disk) as used herein include Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks (disk) usually reproduce data magnetically, while discs (disk) reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. A user-configurable apparatus for automatically generating a2l files, comprising:
the user configuration interface input module performs universality predefined configuration on the a2l file to be generated through a man-machine interface, assigns configuration items to corresponding program data interfaces, and comprises:
a source a2l file path input unit for inputting a path of an application layer variable database file generated by matlab, wherein the application layer variable database file is an a2l file;
an address mapping file path input unit for inputting a path of an address mapping file of the memory data generated by the compiler;
the method comprises the steps that a calibration quantity data segment name and ROM address unit is configured according to different compiler environments and controllers, and a data segment definition of a working page and a reference page is identified in an a2l file;
the measurement data segment name unit is configured according to different compiler environments and is used for pointing a pointer to the head of the data segment position appointed by the character string in the program;
the automatic generator module is configured to generate a2l template according to the characteristic information of the data segment of the controller platform configured in the user configuration interface, and the automatic generator module further comprises:
the user configuration interface calling and instantiation unit acquires an address mapping file under a user configuration path, extracts the standard quantity and the measured quantity data in the address mapping file according to the standard sign and the initial address specified by the user, and stores the data in a program cache in a character string form for later retrieval of variable names and addresses;
a data type structure array instantiation unit for defining and instantiating a structure, defining the structure according to the format of variable attribute definition in an a2l file generated by matlab of each type of structure, and instantiating the structure in the form of a structure array;
the data acquisition unit of each data segment of the address mapping file acquires a source a2l file generated by matlab under a user-specified path, retrieves the data of the source a2l file by using keywords defined in ASAP2 protocol and distributes the data to four corresponding structural bodies, and fills the data into members of the corresponding structural bodies according to lines;
a2l file analysis unit, which uses the variable name member in the allocated structure variable to the data segment analyzed by the address mapping file to search the corresponding variable name and read the address;
the data segment information searching unit writes the address corresponding to the variable resolved in the corresponding data segment into the address member of the corresponding structural body variable;
and a2l file generating unit writes the head template and the tail template of the new a2l file, circularly writes the members of the structural variables into the definition of the appointed section of the a2l file which is written in advance according to the standard format of the a2l file, and outputs the file to the path appointed by the user.
2. The apparatus for automatically generating a2l files according to claim 1, wherein the data type structure array instantiation unit defines and instantiates a structure comprising: a calibration volume structure, a measurement volume structure, a Y-axis calibration volume structure, and an X-axis calibration volume structure.
3. The apparatus for automatically generating a2l file according to claim 1, wherein the data segment information searching unit determines the attribute of the structure variable, calculates the offset of the address according to the address of the structure variable in the RAM thereof and the mapping address of the calibration data segment in the flash/ROM if the attribute is the calibration value, subtracts the offset from the mapping address, and writes the offset, and if the offset is the measurement value, directly writes the offset without performing address conversion.
4. A user configurable method of automatically generating a2l files, comprising:
step 1: carrying out universality predefined configuration on an a2l file to be generated through a user configuration interface, and assigning configuration items to corresponding program data interfaces;
step 2: the automatic generator reads the address mapping file under the specified path according to the address mapping file label input by the user in the form of a stream file, and carries out character string processing and reading and writing so as to retrieve and acquire the needed data segment information;
step 3: the automatic generator reads a stream file of an a2l file generated by matlab under a user specified path and performs character string processing and retrieval, wherein keywords are distributed to corresponding structure members of specified elements in a corresponding type of structure array according to a definition form of a structure body after the keywords are in accordance with ASAP2 protocol;
step 4: the automatic generator searches the default part of the content through the processing of the structural member, searches the variable name member in the structural body from the data segment read from the corresponding address mapping file, and fills the corresponding address or related information into the structural body variable member with the corresponding attribute after the searching is completed;
step 5: and writing the head template and the tail template for the new a2l file, circularly writing the members of the structural variables into the appointed section definition of the a2l file which is written in advance according to the standard format of the a2l file, and outputting the file to a path appointed by a user.
5. The method for automatically generating a2l file according to claim 4, wherein in step 1, a path of an application layer variable database file generated by matlab and an address mapping file of memory data generated by a compiler is acquired through a user configuration interface, and a tag name in the address mapping file configured by a user is acquired as an interface, wherein the application layer variable database file is the a2l file.
6. The method for automatically generating a2l files in a user-configurable manner as in claim 4 wherein the structure in step 3 comprises: a calibration volume structure, a measurement volume structure, a Y-axis calibration volume structure, and an X-axis calibration volume structure.
7. The method for automatically generating a2l files in a user-configurable manner as in claim 4, wherein step 4 further comprises: judging the attribute of the structural body variable, if the attribute is the calibration quantity, calculating the offset of the address according to the address of the structural body variable in the RAM and the mapping address of the calibration data segment in the flash/ROM, subtracting the offset from the mapping address, writing the offset, and if the offset is the measurement quantity, directly writing the offset after the address conversion.
CN201510819619.XA 2015-11-23 2015-11-23 User-configurable apparatus and method for automatically generating a2l file Active CN106776633B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510819619.XA CN106776633B (en) 2015-11-23 2015-11-23 User-configurable apparatus and method for automatically generating a2l file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510819619.XA CN106776633B (en) 2015-11-23 2015-11-23 User-configurable apparatus and method for automatically generating a2l file

Publications (2)

Publication Number Publication Date
CN106776633A CN106776633A (en) 2017-05-31
CN106776633B true CN106776633B (en) 2023-12-01

Family

ID=58963146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510819619.XA Active CN106776633B (en) 2015-11-23 2015-11-23 User-configurable apparatus and method for automatically generating a2l file

Country Status (1)

Country Link
CN (1) CN106776633B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168133B (en) * 2017-06-27 2019-10-11 重庆谱思机器人控制系统有限公司 The visual programming method and system of electric machine controller
CN108108183B (en) * 2017-12-29 2021-12-31 凯龙高科技股份有限公司 Data management system and method based on model embedded software development
CN109002033B (en) * 2018-08-14 2021-07-23 东风电子科技股份有限公司 Automatic calibration system and method based on UDS
CN109696904A (en) * 2018-12-24 2019-04-30 普华基础软件股份有限公司 A kind of the address replacement method and system of electronic control unit data description file
CN110262289B (en) * 2019-07-18 2022-04-26 潍柴动力股份有限公司 Method and device for processing variables in A2L file and storage medium
CN111241008B (en) * 2019-12-31 2022-09-23 潍柴动力股份有限公司 Method, device and controller for correcting EEPROM variable and address
CN113076092B (en) * 2020-01-06 2023-08-15 广汽埃安新能源汽车有限公司 Processing method and device for A2L file of vehicle-mounted controller
CN113254479B (en) * 2020-02-12 2024-03-19 彩虹无线(北京)新技术有限公司 Data measurement method and device for electronic control unit
CN112486925B (en) * 2020-12-28 2022-09-23 潍柴动力股份有限公司 A2L file processing method, device and storage medium
CN113591171A (en) * 2021-08-13 2021-11-02 江苏爱玛车业科技有限公司 Method and device for automatically generating A2L file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334662A (en) * 2008-07-25 2008-12-31 重庆邮电大学 Automobile electric control unit calibration system and method based on ASAP standard
CN101751028A (en) * 2009-12-01 2010-06-23 重庆邮电大学 General calibration system of automobile electronic control unit and realizing method thereof
CN103778153A (en) * 2012-10-23 2014-05-07 广州汽车集团股份有限公司 Method and system for generating calibration database based on ASAP standard
CN104850570A (en) * 2014-08-29 2015-08-19 北汽福田汽车股份有限公司 Method and system for automatically generating A2L file

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8578307B2 (en) * 2009-09-16 2013-11-05 Viasat, Inc. Control/monitor automation for ASICs and programmable logic

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334662A (en) * 2008-07-25 2008-12-31 重庆邮电大学 Automobile electric control unit calibration system and method based on ASAP standard
CN101751028A (en) * 2009-12-01 2010-06-23 重庆邮电大学 General calibration system of automobile electronic control unit and realizing method thereof
CN103778153A (en) * 2012-10-23 2014-05-07 广州汽车集团股份有限公司 Method and system for generating calibration database based on ASAP standard
CN104850570A (en) * 2014-08-29 2015-08-19 北汽福田汽车股份有限公司 Method and system for automatically generating A2L file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种可通用的参数编辑软件设计及实现;雷丽萍;吴卫平;何见坤;;工业控制计算机(第12期) *

Also Published As

Publication number Publication date
CN106776633A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106776633B (en) User-configurable apparatus and method for automatically generating a2l file
CN106598612B (en) Operation method and system for data table in database
CN107526777B (en) Method and equipment for processing file based on version number
US8108437B2 (en) Sortable hash table
CN109284323B (en) Management method and device for detection data
CN107391101B (en) Information processing method and device
CN106951228A (en) The treating method and apparatus of difference in version iteration
CN110502227B (en) Code complement method and device, storage medium and electronic equipment
CN105830417A (en) A method and a system for replacing and commissioning of a field device
JP2020123320A (en) Method, apparatus, device and storage medium for managing index
CN111488155A (en) Coloring language translation method
CN114138748A (en) Database mapping file generation method, device, equipment and storage medium
CN110209453B (en) Driver-based multi-object auto-refresh and display method and related product
JP7131119B2 (en) Systems and methods for merging source data from a source application with target data in a target application
CN109409037B (en) Method, device and equipment for generating data confusion rule
CN116028062A (en) Target code generation method, NPU instruction display method and device
CN108959454B (en) Prompting clause specifying method, device, equipment and storage medium
CN109254774A (en) The management method and device of code in software development system
CN114816364A (en) Method, device and application for dynamically generating template file based on Swagger
CN114329090A (en) Path reference searching method and device, electronic equipment and storage medium
CN115129598A (en) Risk detection method, device, system and medium for SQL (structured query language) statements
CN114138815A (en) Multi-database compatibility implementation method, device and medium for application program
CN103116622B (en) A kind of sequence value generation method for Ibatis scheme and device
CN113011145A (en) Data export method and device, terminal equipment and storage medium
CN111881220A (en) Data operation method and device under list storage, electronic equipment and storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190131

Address after: 201108 No. 18 Guangzhong Road, Zhuqiao Town, Minhang District, Shanghai

Applicant after: SHANGHAI SUNWIN BUS Corp.

Address before: 201108 24 Guangzhong Road, Minhang District, Shanghai

Applicant before: SHANGHAI JI'NENG CARRIAGE POWER SYSTEM CO.,LTD.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200731

Address after: 200041 No. 489, Weihai Road, Shanghai, Jingan District

Applicant after: Shanghai Automotive Industry Corporation (Group)

Applicant after: SAIC Motor Corp.,Ltd.

Address before: 201108 Shanghai city Minhang District town Light Road No. 18

Applicant before: SHANGHAI SUNWIN BUS Corp.

GR01 Patent grant
GR01 Patent grant