CN113687814A - Automation realization method of model framework and interface file based on AUTOSAR (automotive open system architecture) - Google Patents
Automation realization method of model framework and interface file based on AUTOSAR (automotive open system architecture) Download PDFInfo
- Publication number
- CN113687814A CN113687814A CN202110895773.0A CN202110895773A CN113687814A CN 113687814 A CN113687814 A CN 113687814A CN 202110895773 A CN202110895773 A CN 202110895773A CN 113687814 A CN113687814 A CN 113687814A
- Authority
- CN
- China
- Prior art keywords
- autosar
- dictionary
- model
- data
- interface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 22
- 238000010276 construction Methods 0.000 claims abstract description 3
- 238000013461 design Methods 0.000 claims description 5
- 238000011161 development Methods 0.000 abstract description 16
- 238000010586 diagram Methods 0.000 description 11
- 230000008676 import Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification 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/20—Software design
-
- 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/31—Programming languages or programming paradigms
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides an automatic realization method of a model framework and an interface file based on an AUTOSAR (automotive open system architecture), which comprises the following steps: designing a template of a data form dictionary, wherein the data form dictionary comprises ports, port data types, port corresponding interfaces and interface definitions of a plurality of software control modules; establishing a data table dictionary for the model according to requirements; automatically generating a model frame according to the data table dictionary; the AUTOSAR configuration is automatically carried out according to the model frame and the data table dictionary, and codes and interface files are automatically generated; and performing internal logic construction based on the model framework, and simultaneously performing RTE generation based on the generated code and the interface file. The invention can reduce the workload of manually configuring the AUTOSAR information and improve the development efficiency; an application software engineer can continue a traditional module development mode and further ignore AUTOSAR; the basic software engineer can realize RTE at the initial stage of the project, so that the time is saved for later-stage integrated compilation; common Excel and MATLAB tools are adopted, so that the development cost is reduced.
Description
Technical Field
The invention belongs to the technical field of AUTOSAR, and particularly relates to an automatic implementation method of a model framework and an interface file based on an AUTOSAR framework.
Background
AUTOSAR (automotive open system architecture) is a development partnership with major original equipment manufacturers, suppliers, and tool and software service providers of the global automotive industry. AUTOSAR aims to simplify the joint development of automobile electronic software, reduce cost, accelerate product market time, improve software quality and provide a mechanism required by safety system design. The AUTOSAR redefines the writing mode of the embedded automobile software, thereby realizing the repeated use, exchange, upgrade and integration of software components, the process is very simple, and RTE (Run-time environment) is the core of the AUTOSAR framework. All communication between components in the AUTOSAR system is performed through component ports (ports) defined by AUTOSAR Interfaces (AUTOSAR Interfaces), and the RTE can implement communication Interfaces to provide communication services between components, so all communication between components is under the control of the RTE.
Under the AUTODSAR framework, two development modes are designed based on a model by using Simulink. The first is from bottom to top, that is, the SWC information is configured in the AUTOSAR tool, the configuration information is exported to the arxml file, and then imported into the Simulink for design. The second method is that from top to bottom, the function is firstly realized in Simulink, and then AUTOSAR information is configured.
The current common way to generate RTE module code is: an application software engineer manually configures the ports of the component instances and the interface information of the ports through professional software (such as Systemweaver), generates an xml file, and then imports the xml file into Simulink to generate a model framework. After the model is built by using Simulink, an arxml file is exported according to the module in the model and then is sent to A basic software engineer, the basic software engineer imports the arxml file into another business tool, the business tool (such as ISOLAR-A) is edited and set, and finally RTE module codes are generated
In the process, as the controller is more and more complex, more and more interface information needs to be manually configured by an application software engineer, the development period becomes longer and longer, and the development period is not longer without RTE, so that integrated compiling cannot be performed.
Therefore, an efficient method for automatically implementing the model framework and the interface file under the automotive open system architecture software architecture is needed.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides the automatic implementation method of the model framework and the interface file based on the AUTOSAR framework, which has strong logicality, good readability, simple and rapid development and high development efficiency.
The technical scheme adopted by the invention is as follows:
an automatic implementation method of a model framework and an interface file based on an AUTOSAR framework comprises the following steps:
s1, designing a template of a data form dictionary, wherein the data form dictionary comprises ports, port data types, port corresponding interfaces and interface definitions of a plurality of software control modules;
s2, establishing a data table dictionary for the model according to requirements;
s3, automatically generating a model frame according to the data table dictionary;
s4, automatically configuring AUTOSAR according to the model frame and the data table dictionary, and automatically generating codes and interface files;
and S5, performing internal logic construction based on the model framework, and simultaneously performing RTE generation based on the generated code and the interface file.
Further, the design and establishment of the data table dictionary are realized by using a table tool EXCEL.
Further, the generation of the model framework is realized by using a programming tool MATLAB.
Further, the generation of the code and interface files is realized by a programming tool MATLAB.
Further, the data table dictionary template includes preset sub-tables: ReceiverPorts, SenderPorts, ClientPorts, ServerPorts.
Further, fields of the ReceiverPort and SenderPort sub-tables include signals, data types, interfaces, data elements, and event types associated with the ports;
further, the fields of the ClientPort and ServerPort sub-tables include signals, interfaces, function prototypes, and their path and parameter information associated with the ports.
The invention has the beneficial effects that:
the invention can reduce the workload of manually configuring the AUTOSAR information by an application software engineer and improve the development efficiency; an application software engineer can continue a traditional module development mode and can ignore AUTOSAR; the basic software engineer can realize RTE at the initial stage of the project, so that the time is saved for later-stage integrated compilation; common Excel and MATLAB tools are adopted, so that the development cost is greatly reduced.
Drawings
FIG. 1 is a flow chart of a method for implementing automation of a model framework and an interface file based on AUTOSAR architecture;
FIG. 2 is a diagram of a data table dictionary template in an embodiment provided by the present invention;
FIG. 3 is an exemplary diagram of fields of a ReceiverPort sub-table in a data table dictionary in an embodiment provided by the present invention;
FIG. 4 is an exemplary diagram of fields of a SenderPorts sub-table in a data table dictionary in an embodiment provided by the present invention;
FIG. 5 is an exemplary diagram of fields of a ClientPort sub-table in a data table dictionary in an embodiment provided by the present invention;
FIG. 6 is an exemplary diagram of fields of a ServerPort sub-table in a data table dictionary in an embodiment provided by the present invention;
FIG. 7 is a schematic diagram of a model framework automatically generated in an embodiment provided by the present invention;
FIG. 8 is a diagram illustrating an interface file and associated code that is automatically generated according to an embodiment of the present invention.
Detailed Description
The invention will be further described with reference to the accompanying drawings in which:
the method for automatically implementing the model framework and the interface file based on the data dictionary under the UTOSAR software architecture, disclosed by the embodiment of the invention, comprises the following steps as shown in figure 1:
s1, designing a template of a data form dictionary, wherein the data form dictionary comprises fields such as ports of a plurality of software control modules, data definition information, port affiliated interface information and the like;
s2, the application software engineer establishes a data table dictionary Demo information.xlsx for the model Demo according to the requirement;
s3, generating a model frame Demo.slx from a data table dictionary Demo information.xlsx through a script excelToModelFramework.m;
s4, automatically configuring AUTOSAR according to the model frame Demo.slx obtained in the step S3 through a script model ToCodeGen.m, and automatically generating an interface file Demo.arxml and a related code;
s5, the application software engineer builds internal logic based on the model framework demo.slx, and the basic software engineer generates RTE based on the interface file demo.arxml and the related code.
In the present embodiment, as shown in fig. 2, the data table dictionary demoinformation. xlsx includes an import module table ReceiverPorts, an export module table SenderPorts, a Function Caller module table ClientPorts, and a Simulink Function module table ServerPorts. Fig. 3-6 are field example diagrams of an import module table receiveports, an export module table SenderPorts, a Function Caller module table ClientPorts, and a Simulink Function module table ServerPorts, respectively, in the data table dictionary demoinformation.
As shown in fig. 3, the import module table ReceiverPorts contains fields including PortName (port name), InterfaceName (interface name), Element name (Element name), DataType (data type of the signal), Dimension (Dimension of the signal), Runnable (event), Path (Path) of the import module in the model Demo;
as shown in fig. 4, the exportmodule table sendports contains fields including PortName, InterfaceName, Element name, DataType, Dimension, event, Path of the exportmodule in the model Demo;
as shown in fig. 5, the fields contained in the ClientPorts of the Function Caller module table include port name, interface name, operationamname, Parameter and direction of the Function in the model Demo, Input attribute specifications (Input Parameter data type), Output attribute specifications (Output Parameter data type), and Path;
as shown in fig. 6, the Simulink Function module table ServerPorts includes fields including DID (DID number, design for diagnosis DID) of the Simulink Function module in the model Demo, PortName (port name), InterfaceName (interface name), OperationName (Function prototype), Parameter and direction (Parameter and direction of the Function), Type (Parameter data Type), PortDimensions (dimension of the signal), Path (Path), and IsService attribute (whether called or not).
The script excelToModelFramework.m is mainly used for automatically generating a model frame from an Excel data dictionary, and firstly, the Excel data dictionary is read through xlsread (); secondly, ports and inter-port connecting lines are created through add _ block () and add _ line (), subsystems are created through Simulink.findBlocks () and Simulink.Block Diagram.createSubsystem (), and necessary parameter configuration is carried out on each component through set _ param (); finally, the model framework is saved by save system (). FIG. 7 is a schematic diagram of the model framework obtained by the present invention.
The script model to codegen.m is mainly used for automatically generating a code and an interface file from a model framework, wherein a method for performing AUTOSAR configuration on an import-export port comprises the following steps: completing the configuration of AUTOSAR and code generation through set _ param (); adding a Sender-Receiver interface for the model through addPackageableElement (); add data elements and create Sender-Receiver ports through add (); map Sender-Receiver port is accessed through mapInport (), mapOutport (). The AUTOSAR configuration method for the Function Caller module and the Simulink Function module is similar to the configuration method of the import-export port, and finally, the model is rebuilt through rtwbile () and save _ system (), so that the code is generated and saved. FIG. 8 is a diagram illustrating an interface file and associated code obtained by the present invention.
The invention utilizes the steps S1-S4 to reduce the workload of manually configuring AUTOSAR information by an application software engineer and improve the development efficiency; with step S3, the application engineer may continue the conventional module development mode, ignoring the AUTOSAR presence; by utilizing the step S4, a basic software engineer can realize RTE at the initial stage of the project, so that the time is saved for later-stage integrated compilation; common Excel and MATLAB tools are adopted in the steps S1-S2, so that the development cost is greatly reduced.
It will be understood by those skilled in the art that the foregoing is merely a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included within the scope of the present invention.
Claims (7)
1. An automatic implementation method of a model framework and an interface file based on an AUTOSAR framework is characterized by comprising the following steps:
s1, designing a template of a data form dictionary, wherein the data form dictionary comprises ports, port data types, port corresponding interfaces and interface definitions of a plurality of software control modules;
s2, establishing a data table dictionary for the model according to requirements;
s3, automatically generating a model frame according to the data table dictionary;
s4, according to the model frame and the data table dictionary, the AUTOSAR configuration is automatically carried out, and codes and interface files are automatically generated;
and S5, performing internal logic construction based on the model framework, and simultaneously performing RTE generation based on the generated code and the interface file.
2. The method for automatically implementing the automotive architecture-based model framework and the interface file as claimed in claim 1, wherein the design and the establishment of the data form dictionary are implemented by using a form tool EXCEL.
3. The method for automatically implementing the automotive architecture-based model framework and the interface file as claimed in claim 1, wherein the generation of the model framework is implemented by using a programming tool MATLAB.
4. The method for automatically implementing the automotive architecture-based model framework and the interface file as claimed in claim 1, wherein the generation of the code and the interface file is implemented by using a programming tool MATLAB.
5. The method of claim 1, wherein the spreadsheet dictionary template comprises predefined sub-tables: ReceiverPorts, SenderPorts, ClientPorts, ServerPorts.
6. The method of claim 5, wherein fields of the ReceiverPort and SenderPort sub-tables include signals, data types, interfaces, data elements, and event types associated with ports.
7. The method of claim 5, wherein fields of the ClientPort and ServerPort sub-tables include information about signals, interfaces, function prototypes, and their paths and parameters associated with the ports.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110895773.0A CN113687814A (en) | 2021-08-05 | 2021-08-05 | Automation realization method of model framework and interface file based on AUTOSAR (automotive open system architecture) |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110895773.0A CN113687814A (en) | 2021-08-05 | 2021-08-05 | Automation realization method of model framework and interface file based on AUTOSAR (automotive open system architecture) |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113687814A true CN113687814A (en) | 2021-11-23 |
Family
ID=78578924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110895773.0A Pending CN113687814A (en) | 2021-08-05 | 2021-08-05 | Automation realization method of model framework and interface file based on AUTOSAR (automotive open system architecture) |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113687814A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115657634A (en) * | 2022-09-30 | 2023-01-31 | 成都赛力斯科技有限公司 | Automobile software architecture, module association method, computer device and storage medium |
CN117112019A (en) * | 2023-09-05 | 2023-11-24 | 镁佳(北京)科技有限公司 | Carrier file automatic generation method, device, computer equipment and medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101755256A (en) * | 2007-07-20 | 2010-06-23 | 西门子公司 | Be used for the software component of software systems is carried out the method for transparent replication |
CN102073549A (en) * | 2011-01-18 | 2011-05-25 | 浙江大学 | Communication method between assemblies on basis of resource sharing |
CN102214099A (en) * | 2011-06-16 | 2011-10-12 | 浙江大学 | Automatic run-time environment (RTE) code generating method for automobile system architecture (AUTOSAR) |
US20120072198A1 (en) * | 2010-09-17 | 2012-03-22 | International Business Machines Corporation | Coupling architectural and implementation/behavioral models of a computer-based system |
CN107885500A (en) * | 2017-10-31 | 2018-04-06 | 惠州市蓝微新源技术有限公司 | A kind of runtime environment generation method towards AUTOSAR software architectures |
CN109117121A (en) * | 2018-05-08 | 2019-01-01 | 宁波央腾汽车电子有限公司 | A kind of AUTOSAR software architecture implementation method |
-
2021
- 2021-08-05 CN CN202110895773.0A patent/CN113687814A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101755256A (en) * | 2007-07-20 | 2010-06-23 | 西门子公司 | Be used for the software component of software systems is carried out the method for transparent replication |
US20120072198A1 (en) * | 2010-09-17 | 2012-03-22 | International Business Machines Corporation | Coupling architectural and implementation/behavioral models of a computer-based system |
CN102073549A (en) * | 2011-01-18 | 2011-05-25 | 浙江大学 | Communication method between assemblies on basis of resource sharing |
CN102214099A (en) * | 2011-06-16 | 2011-10-12 | 浙江大学 | Automatic run-time environment (RTE) code generating method for automobile system architecture (AUTOSAR) |
CN107885500A (en) * | 2017-10-31 | 2018-04-06 | 惠州市蓝微新源技术有限公司 | A kind of runtime environment generation method towards AUTOSAR software architectures |
CN109117121A (en) * | 2018-05-08 | 2019-01-01 | 宁波央腾汽车电子有限公司 | A kind of AUTOSAR software architecture implementation method |
Non-Patent Citations (2)
Title |
---|
冯江波;刘亚军;: "与AUTOSAR兼容的Matlab/Simulink自动代码生成技术", 佳木斯大学学报(自然科学版), no. 06, 15 November 2011 (2011-11-15) * |
吴习文;吴长水;: "基于AUTOSAR的天然气发动机应用层软件组件设计", 农业装备与车辆工程, no. 05, 10 May 2020 (2020-05-10) * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115657634A (en) * | 2022-09-30 | 2023-01-31 | 成都赛力斯科技有限公司 | Automobile software architecture, module association method, computer device and storage medium |
CN115657634B (en) * | 2022-09-30 | 2024-06-04 | 重庆赛力斯凤凰智创科技有限公司 | Automobile software architecture, module association method, computer equipment and storage medium |
CN117112019A (en) * | 2023-09-05 | 2023-11-24 | 镁佳(北京)科技有限公司 | Carrier file automatic generation method, device, computer equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110825369A (en) | Method for automatically generating codes based on java language | |
CN107341294B (en) | Modelica language-based spacecraft information system modeling simulation method | |
CN106293664A (en) | Code generating method and device | |
CN113687814A (en) | Automation realization method of model framework and interface file based on AUTOSAR (automotive open system architecture) | |
CN102087610A (en) | Method for performing model simulation and code generation on custom hardware by using Simulink | |
CN109117121A (en) | A kind of AUTOSAR software architecture implementation method | |
CN102306122A (en) | Automated testing method and equipment | |
CN109933521A (en) | Automated testing method, device, computer equipment and storage medium based on BDD | |
CN109783083A (en) | WEB application development approach and its system | |
CN105117215A (en) | Development method and device of automobile function | |
CN105912334A (en) | Internal behavior object code generation method of AUTOSAR software assembly | |
CN105512097A (en) | File analyzing method | |
CN105095568A (en) | Rapid modeling method for large draft fan | |
CN114117798A (en) | Automatic interface model generation method and system based on matlab | |
CN114460925B (en) | Automatic test method for CAN interface HIL of electric automobile controller | |
KR20130138468A (en) | Apparatus and method for connecting application software and autosar service | |
CN110989549B (en) | Software test general automation control method and device for train control system | |
CN104063231B (en) | Test resource rapid access method based on HIT-TENA | |
CN116737117A (en) | Model development method based on Autosar architecture | |
CN114047970A (en) | Configuration method and system of AUTOSAR (automotive open system architecture) architecture software | |
CN104503767A (en) | System and method for automatically generating codes based on LIN protocol | |
CN103049602B (en) | Based on model-driven engineering, AADL assembly is transformed into Interface Automata model method | |
CN116521217A (en) | Method, system and storage medium for rapidly configuring BSW based on AUTOSAR tool | |
CN102779036B (en) | For the Software tool of automatic technology | |
CN106354966B (en) | The method of the conversion of chip id E project file and rapid configuration artificial debugging environment |
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 |