Task and signal interface automatic mapping method and device and electronic equipment

By automatically mapping the relationship between software components and multi-core processors, scheduling functions and signal interface mapping source codes are generated, which solves the problems of cumbersome and low efficiency in the existing technology, and realizes efficient and reliable software development and integration.

CN119917078APending Publication Date: 2025-05-02CHONGQING CHANGAN TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510100433.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

In the process of software integration using the Autosar toolchain, a lot of tedious manual operations are required, resulting in low development efficiency, easy operation errors, and unable to meet the needs of rapid iterative development.

Method used

A method of automatic mapping of tasks and signal interfaces is proposed. The mapping relationship between software components and multi-core processors is obtained through configuration files, and task and interface information is automatically determined, scheduling functions and signal interface mapping source code are generated to realize automatic compilation.

Benefits of technology

Improve development efficiency, reduce human errors, ensure that software components operate and communicate correctly on multi-core processors, optimize system performance, and ensure system reliability and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917078A_ABST
    Figure CN119917078A_ABST
Patent Text Reader

Abstract

The invention discloses a task and signal interface automatic mapping method and device and electronic equipment, and the method comprises the steps: obtaining a first mapping relation between a software component and a multi-core processor based on a configuration file, and obtaining a second mapping relation between an interface of the software component and a signal; determining task information and interface information of the software component based on the target type file; determining a task list based on the first mapping relation and the task information, and determining an interface list based on the second mapping relation and the interface information; a scheduling function source code for each core system in the multi-core processor is generated based on the task list, and a signal interface mapping source code is generated based on the interface list to compile according to the scheduling function source code and the interface mapping source code. According to the method, the development efficiency can be improved, human errors are reduced, it is ensured that the software components correctly run and communicate on the multi-core processor, the system performance can be optimized, and the reliability and stability of the system are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method for automatic mapping of tasks and signal interfaces, an electronic device, a computer-readable storage medium, and a device for automatic mapping of tasks and signal interfaces. Background Art

[0002] The Autosar (AUTomotive Open System ARchitecture) software architecture is gradually becoming popular among domestic automakers and Tier 1 (suppliers that directly supply finished products or system-level components to automakers). For software integration based on this architecture, the first version will use the Autosar tool chain (hereinafter referred to as the third-party tool chain) that integrates BSW (Basic Software) development and software integration of software vendors. At present, the relevant technology uses the third-party tool chain for software integration. It is necessary to map each Runnable (executable file and task) information in the ARXML (eXtensibleMarkup Language, file format) defined by the AUTOSAR (AUTomotive OpenSystem ARchitecture, a global automotive industry cooperation organization) organization identified by the tool chain to the configured periodic tasks and initialization tasks bound to the core according to the actual project. The third-party tool chain will call the corresponding task in the generated code according to the mapping information. At the same time, some RP PORT function interfaces in the ARXML file are required to receive and send communication (CAN (Controller Area Network, serial communication protocol) / LIN (Local Area Network, local area network)) signals. For a project development, the sent and received signals are generally defined in an EXCEL table (hereinafter referred to as the Mapping table). When the software is integrated, the Mapping table is imported into the third-party tool chain. The tool chain will perform interface mapping according to the interface information of ARXML and the signals and interface information in the Mapping table, and corresponding code will be generated when the code is generated.

[0003] The disadvantages of the above manual operations are a large number of tedious and repetitive manual operations and low integration and development efficiency. During the development of a project, the tasks and receiving and sending signals of the software will change frequently. The use of third parties cannot meet the needs of rapid iterative development of the project, and the tedious manual operations are often accompanied by operational errors. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems in the related art to a certain extent. To this end, the first purpose of the present application is to propose a method for automatic mapping of tasks and signal interfaces, obtain a first mapping relationship between a software component and a multi-core processor based on a configuration file, and obtain a second mapping relationship between the interface of the software component and the signal, wherein the configuration file stores the path information of the target type file and the path information of the signal mapping table, and determines the task information and interface information of the software component based on the target type file; determines the task list based on the first mapping relationship and the task information, and determines the interface list based on the second mapping relationship and the interface information, generates the scheduling function source code of each core system in the multi-core processor based on the task list, and generates the signal interface mapping source code based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code, thereby improving development efficiency, reducing human errors, and ensuring that the software components run and communicate correctly on the multi-core processor, optimizing system performance, and ensuring the reliability and stability of the system.

[0005] The second objective of the present application is to provide an electronic device.

[0006] The third object of the present application is to provide a computer-readable storage medium.

[0007] The fourth objective of the present application is to provide a device for automatic mapping of tasks and signal interfaces.

[0008] To achieve the above-mentioned objectives, the first aspect of the present application proposes a method for automatic mapping of tasks and signal interfaces, the method comprising: obtaining a first mapping relationship between a software component and a multi-core processor based on a configuration file, and obtaining a second mapping relationship between the interface of the software component and the signal; wherein the configuration file stores path information of a target type file and path information of a signal mapping table; determining task information and interface information of the software component based on the target type file; determining a task list based on the first mapping relationship and the task information, and determining an interface list based on the second mapping relationship and the interface information; generating a scheduling function source code for each core system in a multi-core processor based on the task list, and generating a signal interface mapping source code based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code.

[0009] According to the method for automatic mapping of tasks and signal interfaces of the embodiment of the present application, a first mapping relationship between a software component and a multi-core processor is obtained based on a configuration file, and a second mapping relationship between an interface of the software component and a signal is obtained, wherein the path information of the target type file and the path information of the signal mapping table are stored in the configuration file, and the task information and interface information of the software component are determined based on the target type file; a task list is determined based on the first mapping relationship and the task information, and an interface list is determined based on the second mapping relationship and the interface information, and a scheduling function source code of each core system in the multi-core processor is generated based on the task list, and a signal interface mapping source code is generated based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code. Thus, the method can improve development efficiency, reduce human errors, and ensure that the software components run and communicate correctly on the multi-core processor, optimize system performance, and ensure system reliability and stability.

[0010] In addition, the method for automatic mapping of tasks and signal interfaces according to the above embodiment of the present application may also have the following additional technical features:

[0011] According to one embodiment of the present application, the task information includes periodic task information and initialization task information, and determining the task information of the software component based on the target type file includes: determining a first target tag and a second target tag based on the structural characteristics of the target type file; determining the periodic task information based on the first target tag, and determining the initialization task information based on the second target tag.

[0012] According to one embodiment of the present application, the generation of the scheduling function source code for each core system in the multi-core processor based on the task list includes: creating a corresponding empty source code file for each core system in the multi-core processor, the empty source code file including a system periodic task subfile and an initialization task subfile; traversing the task list, writing periodic tasks of the same period into the system periodic task subfile, and writing the initialization task corresponding to the core system into the initialization task subfile, until the corresponding periodic tasks and initialization tasks are written into the corresponding empty source code files of each core system.

[0013] According to one embodiment of the present application, the interface information includes an interface name and an interface parameter type, and determining the interface information of the software component based on the target type file includes: determining a third target tag and a fourth target tag based on the structural characteristics of the target type file; determining the interface name based on the third target tag, and determining the parameter type based on the fourth target tag.

[0014] According to one embodiment of the present application, the second mapping relationship includes an interface name, a signal name and a signal direction, and determining the interface list based on the second mapping relationship and the interface information includes: matching the interface name in the second mapping relationship with the interface name in the interface information, determining mutually matching interface names, and storing the interface names into an interface name list; determining a parameter information list based on the interface name list and the parameter type, determining a signal information list based on the interface name list and the signal name, and determining a direction information list based on the interface name list and the signal direction; determining the interface list based on the parameter information list, the signal information list and the direction information list.

[0015] According to one embodiment of the present application, the method further includes: acquiring communication source code; determining a macro definition list based on the communication source code, wherein the macro definition list includes signal names and signal directions of transceiver signals.

[0016] According to an embodiment of the present application, the method further includes: generating a signal interface mapping source code based on the macro definition list and the interface list.

[0017] According to one embodiment of the present application, generating a signal interface mapping source code based on the macro definition list and the interface list includes: when the signal name in the macro definition list and the signal name in the interface list have the same signal name, taking the signal corresponding to the signal name as the target signal; and determining the signal interface mapping source code based on the target signal and a preset signal interface code generation rule.

[0018] According to an embodiment of the present application, the method further includes: when there is no identical signal name between the signal name in the macro definition list and the signal name in the interface list, determining that there is no target signal.

[0019] To achieve the above-mentioned purpose, an electronic device proposed in the second aspect of the present application includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned method of automatic mapping of tasks and signal interfaces is implemented.

[0020] The electronic device according to the embodiment of the present application can improve development efficiency, reduce human errors, and ensure that software components run and communicate correctly on a multi-core processor by executing the above-mentioned tasks and the method of automatic mapping of signal interfaces, thereby optimizing system performance and ensuring system reliability and stability.

[0021] To achieve the above objectives, the third aspect of the present application proposes a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, the method for automatic mapping of tasks and signal interfaces is implemented.

[0022] According to the computer-readable storage medium of the embodiment of the present application, by implementing the above-mentioned method of automatic mapping of tasks and signal interfaces during execution, it is possible to improve development efficiency, reduce human errors, and ensure that software components run and communicate correctly on a multi-core processor, thereby optimizing system performance and ensuring system reliability and stability.

[0023] To achieve the above-mentioned purpose, the fourth aspect of the present application proposes a device for automatic mapping of tasks and signal interfaces, the device comprising: an acquisition module, used to acquire a first mapping relationship between a software component and a multi-core processor based on a configuration file, and acquire a second mapping relationship between the interface of the software component and the signal; wherein the configuration file stores path information of a target type file and path information of a signal mapping table; a first determination module, used to determine task information and interface information of the software component based on the target type file; a second determination module, used to determine a task list based on the first mapping relationship and the task information, and to determine an interface list based on the second mapping relationship and the interface information; a generation compilation module, used to generate a scheduling function source code for each core system in a multi-core processor based on the task list, and to generate a signal interface mapping source code based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code.

[0024] According to the device for automatic mapping of tasks and signal interfaces of the embodiment of the present application, the acquisition module is used to acquire the first mapping relationship between the software component and the multi-core processor based on the configuration file, and acquire the second mapping relationship between the interface of the software component and the signal, wherein the path information of the target type file and the path information of the signal mapping table are stored in the configuration file, the first determination module is used to determine the task information and interface information of the software component based on the target type file, the second determination module is used to determine the task list based on the first mapping relationship and the task information, and to determine the interface list based on the second mapping relationship and the interface information, and the generation and compilation module is used to generate the scheduling function source code of each core system in the multi-core processor based on the task list, and generate the signal interface mapping source code based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code. Thus, the device can improve development efficiency, reduce human errors, and ensure that the software components run and communicate correctly on the multi-core processor, optimize system performance, and ensure the reliability and stability of the system.

[0025] Beneficial effects of this application:

[0026] (1) This application automatically maps tasks to each core system in the corresponding multi-core processor based on the task information and interface information parsed from the target type file, and automatically performs interface mapping and generates corresponding codes, which can improve development efficiency, reduce human errors, and ensure that software components run and communicate correctly on the multi-core processor, thereby optimizing system performance and ensuring system reliability and stability.

[0027] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A flowchart of a method for automatic mapping of tasks and signal interfaces according to an embodiment of the present application;

[0029] Figure 2 A flowchart of a method for automatic mapping of tasks and signal interfaces according to a specific example of the present application;

[0030] Figure 3 is a block diagram of an electronic device according to an embodiment of the present application;

[0031] Figure 4 It is a block diagram of a device for automatic mapping of tasks and signal interfaces according to an embodiment of the present application.

[0032] Among them, 100 - a device for automatically mapping tasks and signal interfaces; 110 - an acquisition module; 120 - a first determination module; 130 - a second determination module; 140 - a generation and compilation module; 200 - an electronic device; 210 - a memory; and 220 - a processor. DETAILED DESCRIPTION

[0033] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0034] The following describes the method for automatic mapping of tasks and signal interfaces, electronic equipment, computer-readable storage medium, and apparatus for automatic mapping of tasks and signal interfaces proposed in the embodiments of the present application with reference to the accompanying drawings.

[0035] Figure 1 The present invention is a flowchart of a method for automatically mapping tasks and signal interfaces according to an embodiment of the present application.

[0036] like Figure 1 As shown, the method for automatic mapping of tasks and signal interfaces in the embodiment of the present application may include the following steps:

[0037] S1, obtaining a first mapping relationship between a software component and a multi-core processor based on a configuration file, and obtaining a second mapping relationship between an interface of the software component and a signal; wherein the configuration file stores path information of a target type file and path information of a signal mapping table;

[0038] S2, determining the task information and interface information of the software component based on the target type file;

[0039] S3, determining a task list based on the first mapping relationship and the task information, and determining an interface list based on the second mapping relationship and the interface information;

[0040] S4, generating a scheduling function source code for each core system in the multi-core processor based on the task list, and generating a signal interface mapping source code based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code.

[0041] Specifically, Python is a scripting language with fast running speed and wide library support, which can realize the parsing of ARXML, reading and writing of EXCEL files, reading and writing of TXT (Text File) files, etc. This application proposes a script (tool chain) written in Python language, which automatically maps the task to the system task of the corresponding core according to the task information and multi-core deployment (for multi-core ECU) in the parsed ARXML. According to the RP PORT information and Rtemapping table in the parsed ARXML, as well as the multi-core deployment (for multi-core ECU) where the interface corresponds to and the communication-related information in BSW (Basic Software), the interface mapping and the generation of corresponding code are automatically performed. Among them, the RP PORT information is the interface information, i.e., the information of the demand port (R port) and the provided port (P port). The R port is used to receive signals from other components, and the P port is used to send signals to other components. These ports are used to define the communication relationship between components in AUTOSAR. The Rtemapping table is an important input file for signal interface mapping. It contains the mapping relationship between signals and interfaces. This table helps the tool chain match the signals defined in the ARXML file with the actual communication interface so that the signal can be sent and received correctly during code generation.

[0042] The configuration file is a file that contains all the path information required in the project, such as the location of the target type file (such as ARXML file) and the signal mapping table (such as Rtemapping table). The configuration file contains the storage path of the target type file and the signal mapping table, so that the content of the target type file and the signal mapping table can be determined according to the storage path. In addition, in order to facilitate the general project migration, the file path needs to be defined as a relative path. The first mapping relationship between the software component and the multi-core processor can be obtained according to the configuration file, and the second mapping relationship between the interface and the signal of the software component can be obtained. In other words, the first mapping relationship refers to the mapping relationship between the software component and the multi-core processor core, which determines which software components run on which processor core. The second mapping relationship refers to the mapping relationship between the interface and the signal of the software component, which determines which interfaces correspond to which specific signals.

[0043] The task information and interface information of the software component can be determined according to the target type file. For example, the target type file is an ARXML file, which contains the detailed configuration of the software component in the Autosar software architecture. The task information and interface information of the software component can be obtained by reading the file. Among them, the task information may include the information of periodic tasks and initialization tasks, which define the execution time of Runnables in the software component. The interface information may include the interface name and parameter type defined in the software component, etc. These interfaces are used for communication between components.

[0044] After determining the task information of the software component and the first mapping relationship, the task list can be determined based on the task information and the first mapping relationship, that is, the task information of each software component can be parsed from the target type file, including the name, period, priority and execution requirements of the task, and then each task is assigned to the corresponding processor core according to the first mapping relationship to build a task list, which will contain detailed information of the task and each core system to which they are assigned. After determining the interface information and the second mapping relationship, the interface list can be determined based on the second mapping relationship and the interface information, that is, the interface information of each software component can be parsed from the target type file, including the name, parameter type and communication requirements of the interface, and each interface is mapped to a specific signal according to the second mapping relationship to build an interface list, which will contain detailed information of the interface and their corresponding signals, ensuring that each interface in the interface list can correctly interact with the corresponding signal, including the sending and receiving of signals.

[0045] Thus, the scheduling function source code of each core system in the multi-core processor can be generated according to the task list, and the signal interface mapping source code can be generated based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code. For example, a scheduling function template can be created for each core system, and these templates define the structure and format of task scheduling. According to the task list, the specific information of each task is filled into the corresponding scheduling function template. In addition, when generating the scheduling code, the priority of the task can be considered to ensure that the high-priority task can be executed first. Initialization code is generated for each core system to ensure that all tasks are initialized correctly when the system starts, and one or more source code files are generated for each core system, including the scheduling logic of all tasks. Templates can be created for signal interface mapping, and these templates define the structure and format of signal processing. According to the interface list, each interface and the corresponding signal information are filled into the signal interface template. When generating the signal interface code, the direction (sending or receiving) and data type of the signal are considered to ensure that the signal data is processed correctly. One or more source code files are generated for each interface, including the logic of signal sending and receiving. Therefore, the generated scheduling function source code and signal interface mapping source code can be integrated into the construction system of the project, and the generated source code can be compiled by the compiler to generate the target code that can run on the multi-core processor.

[0046] As a result, the entire process from configuration files to executable code is automated, which improves development efficiency, reduces human errors, and ensures that software components run and communicate correctly on multi-core processors. By precisely controlling the task scheduling and interface mapping of software components, system performance can be optimized and system reliability and stability can be ensured.

[0047] According to one embodiment of the present application, task information includes periodic task information and initialization task information. The task information of the software component is determined based on the target type file, including: determining a first target tag and a second target tag based on the structural characteristics of the target type file; determining the periodic task information based on the first target tag, and determining the initialization task information based on the second target tag.

[0048] Specifically, in the Autosar software architecture, task information is the key data that describes how software components are scheduled for execution. These task information include periodic task information and initialization task information, which define the execution timing and order of the Runnable in the software component. In Autosar, the target type file (ARXML file) contains the configuration information of the entire ECU (Electronic Control Unit) or system. The structure of this file is hierarchical and contains multiple tags and attributes, which are used to describe the configuration of software components, tasks, events, ports, interfaces, etc.

[0049] When determining the task information of the software component according to the target type file, the first target tag and the second target tag can be determined according to the structural characteristics of the target type file. Among them, the first target tag refers to a tag related to the periodic task, and the second target tag refers to a tag related to the initialization task. After determining the first target tag and the second target tag, the periodic task information can be determined according to the first target tag, and the initialization task information can be determined according to the second target tag. For example, the method related to the Python library "lxml" can be used, wherein the tree structure of the XML file can be easily traversed and queried using the lxml library to extract the required information, that is, according to the tree structure characteristics of ARXML, the tag named "EVENT_TIMING" is found, and the content under the tag is extracted to obtain a string named "TMT_XXms_SWC", wherein TMT is a prefix, XX represents the corresponding period of the task, and ms represents the time unit is milliseconds. SWC (SoftWare Cluster, software component) represents the name of the SWC, so that the periodic task information extraction is completed. In this way, the cycle time and the SWC to which each periodic task belongs can be identified. At the same time, find the "EVENT_INIT" tag in the ARXML file and extract the content under the tag to get the string "SWC_INIT", where INIT stands for initialization. This completes the information extraction of the initialization task.

[0050] Therefore, by analyzing specific tags in the ARXML file, the task information of the software components can be extracted, including periodic tasks and initialization tasks. The periodic task information determines the real-time requirements of the software components, while the initialization task information ensures that the system can correctly initialize all necessary components at startup, which is crucial for the software integration and deployment of the ECU.

[0051] According to one embodiment of the present application, a scheduling function source code for each core system in a multi-core processor is generated based on a task list, including: creating a corresponding empty source code file for each core system in the multi-core processor, the empty source code file including a system periodic task subfile and an initialization task subfile; traversing the task list, writing periodic tasks of the same period into the system periodic task subfile, and writing the initialization tasks corresponding to the core system into the initialization task subfile, until the corresponding periodic tasks and initialization tasks are written into the corresponding empty source code files of each core system.

[0052] Specifically, when generating the scheduling function source code for each core system in a multi-core processor based on the task list, it is necessary to create a corresponding empty source code file for each core system in the multi-core processor. The empty source code file includes a system periodic task sub-file, which contains all periodically executed tasks, and an initialization task sub-file, which contains the initialization tasks that need to be executed when the system starts. After determining the periodic task sub-file and the initialization task sub-file, the task list can be traversed to write the periodic tasks of the same period into the system periodic task sub-file, and the initialization tasks corresponding to the core system are written into the initialization task sub-file, until the corresponding periodic tasks and initialization tasks are written into the corresponding empty source code files of each core system. Among them, the task list contains all the tasks that need to be executed on the ECU. These tasks have different execution cycles and initialization requirements. The purpose of traversing this list is to assign tasks to the correct core and the correct file.

[0053] That is, the periodic properties of each task can be identified based on the information in the task list, and which tasks should be executed on which core can be determined based on the properties of the tasks and the configuration of the multi-core system. Then, the periodic tasks of the same period are written into the system periodic task subfile of the corresponding core, which involves grouping the tasks according to the execution period of the tasks (such as every 10ms, every 100ms, etc.), and creating corresponding function calls in the source code to execute these tasks. Identifying the tasks that need to be executed when the system is started, and writing these initialization tasks into the initialization task subfile of the corresponding core, involves creating an initialization function that contains all the calls of the tasks that need to be executed when the system is started. For the system periodic task subfile of each core, a function is generated, which calls the corresponding task according to the execution period of the task, and for the initialization task subfile of each core, a function is generated, which is called when the system is started to execute all the initialization tasks. The scheduling function source code of each core system is filled in until the scheduling function source code of each core system in the multi-core processor is fully written. Once all tasks are correctly written into the corresponding source code files, these files will be compiled into executable code and deployed to the corresponding cores.

[0054] This ensures that each core system has its own scheduling function source code, which defines the execution of periodic tasks and initialization tasks. This way of allocating and organizing tasks helps improve the manageability and performance of the system and ensures that each task can be executed within its specified time.

[0055] According to one embodiment of the present application, the interface information includes an interface name and a parameter type of the interface, and the interface information of the software component is determined based on the target type file, including: determining a third target tag and a fourth target tag based on the structural characteristics of the target type file; determining the interface name based on the third target tag, and determining the parameter type based on the fourth target tag.

[0056] Specifically, in the Autosar software architecture, interface information is the key data that defines how software components interact with other components or system modules. This interface information includes the interface name and the parameter type of the interface. In Autosar, the target type file (ARXML file) contains the configuration information of the entire ECU or system. The structure of this file is hierarchical and contains multiple tags and attributes to describe the configuration of software components, tasks, events, ports, interfaces, etc.

[0057] When determining the interface information of the software component according to the target type file, the third target tag and the fourth target tag can be determined according to the structural characteristics of the target type file. Among them, the third target tag refers to a tag related to the interface name, and the fourth target tag refers to a tag related to the interface parameter type. When determining the third target tag and the fourth target tag, the interface name can be determined according to the third target tag, and the parameter type can be determined according to the fourth target tag. For example, by using the lxml library file, according to the structural characteristics of the ARXML file, each tag named 'R-PORT-PROTOTYPE' or 'P-PORT-PROTOTYPE' can be found, and the content under the tag can be extracted, that is, the interface name. The interface name defines the unique identifier of the interface, which is essential for correctly identifying and calling the interface between software components. Among them, the R-PORT-PROTOTYPE tag is used to define the ports in the software component for receiving signals from other ECUs. These ports are usually associated with signal reception in the vehicle network, for example, receiving data from the CAN bus. The P-PORT-PROTOTYPE tag is used to define the ports in the software component for sending signals to other ECUs. These ports are usually associated with signal transmission in the vehicle network, for example, sending data through the CAN bus. Then, find the 'DATA-ELEMENTS' tag corresponding to the interface in the ARXML file, extract the content under the tag, and obtain the parameter information of the interface, that is, the parameter type. The parameter type defines the data type of each parameter in the interface, which is crucial to ensure the correct transmission and processing of data when the interface is called. These tags describe the specific data structure of the interface parameters, including basic data types (such as integers, floating-point numbers, etc.) and composite data types (such as structures, arrays, etc.).

[0058] Therefore, by analyzing specific tags in the ARXML file, the interface information of the software component can be extracted, including the interface name and parameter type. This information is crucial for the software integration and deployment of the ECU because it directly affects the communication and data exchange between software components. Correctly parsing and using this interface information can ensure that the software component can correctly interact with other components or system modules.

[0059] According to one embodiment of the present application, the second mapping relationship includes an interface name, a signal name and a signal direction, and an interface list is determined based on the second mapping relationship and the interface information, including: matching the interface name in the second mapping relationship with the interface name in the interface information, determining mutually matching interface names, and storing the interface names in the interface name list; determining a parameter information list based on the interface name list and the parameter type, determining a signal information list based on the interface name list and the signal name, and determining a direction information list based on the interface name list and the signal direction; determining the interface list based on the parameter information list, the signal information list and the direction information list.

[0060] Specifically, the second mapping relationship may include an interface name, a signal name, and a signal direction. The interface name is formed by combining "swcname_elementname_portname", where swcname is the name of the swc to be received or sent, and elementname and portname are keyword information that constitute the interface, which are generally the same and closely related to the signal name. Swcname, elementname, and portname are each in one column. When the Python tool chain reads, it combines the three columns in the same row to obtain all the interface names. The signal name is formed by combining "nodename_signalname_messagename". Nodemane is the network segment where the signal needs to be sent or received, signalname is the name of the signal to be received or sent, and messagename is the name of the node that sends the signal. For a network topology with multiple network segments, the above three pieces of information are each in one column. When Python parses, they are strictly combined by row. The combination of the above three pieces of information can completely locate the sending and receiving information of a signal. Signal direction, for an ECU, is whether the signal is received or sent by the ECU itself. This information determines whether an R type interface or a P type interface is generated when an RP type interface is generated later. Among them, R interface (Receiver interface): used to process the signal received by ECU. P interface (Provider interface): used to process the signal sent by ECU. The relationship between signal direction and interface type: If a signal is received by ECU, then when generating the interface, you need to create an R type interface to process the received signal. If a signal is sent by ECU, then you need to create a P type interface to process the sent signal.

[0061] When determining the interface list according to the second mapping relationship and the interface information, the interface information, including the interface name, is extracted from the target file, and the interface name in the second mapping relationship is compared with the interface name in the interface information to find the matching items between the two. All matching interface names are collected to form an interface name list. For each interface in the interface name list, the corresponding parameter type information is found, and a parameter information list is created, which contains the parameter type and order of each interface. For each interface in the interface name list, the corresponding signal name in the second mapping relationship is found, and a signal information list is created, which contains the signal name associated with each interface. For each interface in the interface name list, the corresponding signal direction in the second mapping relationship is found, and a direction information list is created, which contains the signal direction (such as input, output or bidirectional) associated with each interface. This list will be used to determine the communication behavior of the interface, such as whether it is necessary to generate a send or receive code.

[0062] Thus, the parameter information list, signal information list and direction information list can be combined to generate the final interface list, in which each entry contains the interface name, parameter information, signal name and signal direction. This list is the basis for generating the signal interface mapping source code. Through this process, it can be ensured that the interface of the software component is correctly connected with the signal in the vehicle communication system, so as to achieve effective data exchange and communication, which is crucial to ensure the reliability and performance of the automotive electronic system.

[0063] According to one embodiment of the present application, the method for automatic mapping of tasks and signal interfaces also includes: obtaining communication source code; determining a macro definition list based on the communication source code, wherein the macro definition list includes signal names and signal directions of transceiver signals.

[0064] Specifically, the communication source code is obtained, that is, the source code of the Com module in the BSW under the Autosar architecture is read out. The Com module is the core component responsible for communication in the Autosar architecture, which handles the sending and receiving of signals. The source code of this module contains the code to implement these functions. That is, the communication source code refers to the code that implements the communication function of the ECU, which usually includes the following parts: signal transceiver function: these functions are responsible for the actual signal sending and receiving operations, signal processing logic: including callback functions when the signal arrives and data processing before the signal is sent, and communication protocol stack: code to implement specific communication protocols (such as CAN, LIN). In the source code, the signals are arranged in order, and each signal will have a macro definition sequence number. In the macro definition, there will be signal-related information, such as signal name, node information, and receiving and sending directions. The macro definition list can be determined according to the communication source code, that is, after the source code of the macro definition is read out, a list will be formed. The members of the list are the macro definition set of all signals to be sent and received by the ECU, including the signal name and signal direction of the sending and receiving signals. Among them, the signal name defines the unique identifier of the signal, which is convenient for reference in the code, and the signal direction indicates whether the signal is sent or received.

[0065] According to an embodiment of the present application, the method for automatic mapping of tasks and signal interfaces further includes: generating a signal interface mapping source code based on the macro definition list and the interface list.

[0066] Further, according to an embodiment of the present application, a signal interface mapping source code is generated based on a macro definition list and an interface list, including: when the signal name in the macro definition list and the signal name in the interface list have the same signal name, the signal corresponding to the signal name is used as the target signal; based on the target signal and a preset signal interface code generation rule, the signal interface mapping source code is determined.

[0067] Specifically, when determining the signal interface mapping source code, it is also necessary to generate the signal interface mapping source code based on the macro definition list and the interface list to ensure that the communication interface defined in the software component is correctly connected to the actual communication signal. For example, the macro definition list contains macro definitions extracted from the communication source code. Each macro definition usually represents a signal, including a signal name and a possible direction (send or receive). The interface list contains all communication interfaces defined in the software component. Each interface may be associated with one or more signals. In the process of generating the signal interface mapping source code, it is first necessary to match the signal name in the macro definition list with the signal name in the interface list, that is, traverse each interface in the interface list and find the macro definition with the same signal name in the macro definition list. The purpose of this step is to find the correspondence between the interface definition and the actual signal.

[0068] When the signal name in the macro definition list matches the signal name in the interface list, the signal is considered to be the target signal, which means that a specific signal is found and needs to be processed in the interface of the software component. After determining the target signal, the signal interface mapping source code can be determined according to the preset signal interface code generation rules and the target signal, wherein the signal interface code generation rules define how to generate specific source code according to the information of the signal and the interface, and the rules may include code templates for operations such as encapsulation, decapsulation, sending, and receiving of the signal. For each target signal, the corresponding signal interface mapping source code is generated according to its attributes (such as data type, direction, etc.) and the preset code generation rules. For example, if the target signal is a sending signal, code is generated to package data and call the sending function. If the target signal is a receiving signal, code is generated to parse the received data and trigger the corresponding processing logic.

[0069] Therefore, by matching the signal names in the macro definition list and the interface list, and based on the preset signal interface code generation rules, the signal interface mapping source code can be automatically generated. This process improves development efficiency, reduces human errors, and makes the code easier to maintain and expand. By automating this process, it can be ensured that the implementation of the communication interface is always synchronized with the definition throughout the life cycle of the software component.

[0070] According to an embodiment of the present application, the method for automatic mapping of tasks and signal interfaces further includes: when there are no identical signal names in the macro definition list and the signal names in the interface list, determining that there is no target signal.

[0071] Specifically, the signals in the macro definition list and the signals in the interface list are matched. When the signal names in the macro definition list and the signal names in the interface list do not have the same signal names, it means that no matching signal is found during the automatic mapping process, so it is determined that the target signal does not exist. For example, the interface defines an expected signal, but the corresponding implementation is not found in the actual communication source code, or there is a signal in the communication source code, but it is not expected in the interface definition of the software component.

[0072] That is to say, in the automatic mapping process, the target signals are those signals that are defined in the interface list and implemented in the macro definition list. If the signal names do not match, it means that no such target signal is found. In the case where there is no target signal, error messages, warnings, or exceptions can be generated to prompt the developer or configurator that there is a problem.

[0073] For example, when generating the signal interface mapping source code, there will be a matching interface list and a corresponding parameter information list and signal information list. The three lists are equal in length and the members with the same sequence number are mapped one by one, that is, if the first element of the interface list is interface A, then the first element of the parameter list is the parameter type of interface A, and the first element of the signal list is the signal information associated with interface A. The Python tool chain creates a TXT format file and writes the corresponding function source code according to the Autosar signal interface code generation rules. When the source code is generated, the members in the parameter list are used as the formal parameters of the function interface, and the macro definition string is used as the actual parameter for calling the com signal transceiver function. When calling the sending and receiving functions of Com, the macro definition of the incoming signal is used as a parameter. When the signal name in the macro definition list and the signal name in the interface list have the same signal name, the signal corresponding to the signal name is used as the target signal, and the target signal is used as the incoming signal as a parameter. If the signal name in the macro definition list and the signal name in the interface list do not have the same signal name, it means that the signal is not a signal received or sent by the ECU. At this time, the signal transceiver function interface should not call the signal transceiver function of Com, but should generate an empty function interface.

[0074] Combine the following Figure 2 To describe the control method of the present application.

[0075] As a specific example, the task and signal interface automatic mapping method of the present application may include the following steps:

[0076] S101, obtaining a first mapping relationship between a software component and a multi-core processor based on a configuration file, and obtaining a second mapping relationship between an interface of the software component and a signal; wherein the configuration file stores path information of a target type file and path information of a signal mapping table.

[0077] S102, determining a first target tag, a second target tag, a third target tag, and a fourth target tag based on structural characteristics of the target type file.

[0078] S103, determine the periodic task information based on the first target tag, determine the initialization task information based on the second target tag, determine the interface name based on the third target tag, and determine the parameter type based on the fourth target tag, and enter step S104 and step S107.

[0079] S104: Determine a task list based on the first mapping relationship and task information, wherein the task information includes periodic task information and initialization task information.

[0080] S105, generating a scheduling function source code for each core system in the multi-core processor based on the task list.

[0081] S106, compiling according to the scheduling function source code.

[0082] S107, match the interface name in the second mapping relationship with the interface name in the interface information, determine the interface names that match each other, and store the interface names into an interface name list, wherein the interface information includes the interface name and the parameter type of the interface, and the second mapping relationship includes the interface name, signal name and signal direction.

[0083] S108, determining a parameter information list based on the interface name list and the parameter type, determining a signal information list based on the interface name list and the signal name, and determining a direction information list based on the interface name list and the signal direction.

[0084] S109, determining an interface list based on the parameter information list, the signal information list, and the direction information list.

[0085] S110, acquiring a communication source code, and determining a macro definition list based on the communication source code, wherein the macro definition list includes a signal name and a signal direction of a transmitting and receiving signal.

[0086] S111, determine whether the signal name in the macro definition list and the signal name in the interface list have the same signal name. If yes, execute step S112; if not, execute step S110.

[0087] S112, taking the signal corresponding to the signal name as the target signal.

[0088] S113, determining a signal interface mapping source code based on the target signal and a preset signal interface code generation rule.

[0089] S114, determining a signal interface mapping source code based on the target signal and a preset signal interface code generation rule.

[0090] S115, compiling according to the interface mapping source code.

[0091] In summary, according to the method for automatic mapping of tasks and signal interfaces of the embodiment of the present application, a first mapping relationship between a software component and a multi-core processor is obtained based on a configuration file, and a second mapping relationship between an interface of the software component and a signal is obtained, wherein the path information of the target type file and the path information of the signal mapping table are stored in the configuration file, and the task information and interface information of the software component are determined based on the target type file; a task list is determined based on the first mapping relationship and the task information, and an interface list is determined based on the second mapping relationship and the interface information, and a scheduling function source code for each core system in the multi-core processor is generated based on the task list, and a signal interface mapping source code is generated based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code. As a result, the method can improve development efficiency, reduce human errors, and ensure that the software components run and communicate correctly on the multi-core processor, optimize system performance, and ensure system reliability and stability.

[0092] Corresponding to the above embodiment, the present application also proposes an electronic device.

[0093] like Figure 3 As shown, the electronic device 200 of the embodiment of the present application may include: a memory 210, a processor 220, and a program stored in the memory 210 and executable on the processor 220. When the processor 220 executes the program, the above-mentioned method of automatic mapping of tasks and signal interfaces is implemented.

[0094] The electronic device according to the embodiment of the present application can improve development efficiency, reduce human errors, and ensure that software components run and communicate correctly on a multi-core processor by executing the above-mentioned tasks and the method of automatic mapping of signal interfaces, thereby optimizing system performance and ensuring system reliability and stability.

[0095] Corresponding to the above embodiments, the present application also proposes a computer-readable storage medium.

[0096] The computer-readable storage medium of the embodiment of the present application stores a program thereon, and when the program is executed by a processor, the method for automatically mapping the above-mentioned tasks and signal interfaces is implemented.

[0097] According to the computer-readable storage medium of the embodiment of the present application, by executing the above-mentioned tasks and the method of automatic mapping of signal interfaces, it is possible to improve development efficiency, reduce human errors, and ensure that software components run and communicate correctly on a multi-core processor, thereby optimizing system performance and ensuring system reliability and stability.

[0098] Corresponding to the above-mentioned embodiment, the present application also proposes a device for automatic mapping of tasks and signal interfaces.

[0099] like Figure 4 As shown, the apparatus 100 for automatic mapping of tasks and signal interfaces according to the embodiment of the present application includes: an acquisition module 110 , a first determination module 120 , a second determination module 130 and a generation and compilation module 140 .

[0100] Among them, the acquisition module 110 is used to obtain the first mapping relationship between the software component and the multi-core processor based on the configuration file, and obtain the second mapping relationship between the interface of the software component and the signal, wherein the configuration file stores the path information of the target type file and the path information of the signal mapping table. The first determination module 120 is used to determine the task information and interface information of the software component based on the target type file. The second determination module 130 is used to determine the task list based on the first mapping relationship and the task information, and to determine the interface list based on the second mapping relationship and the interface information. The generation compilation module 140 is used to generate the scheduling function source code of each core system in the multi-core processor based on the task list, and generate the signal interface mapping source code based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code.

[0101] According to one embodiment of the present application, task information includes periodic task information and initialization task information. The first determination module 120 determines the task information of the software component based on the target type file, and is specifically used to: determine the first target tag and the second target tag based on the structural characteristics of the target type file; determine the periodic task information based on the first target tag, and determine the initialization task information based on the second target tag.

[0102] According to one embodiment of the present application, the generation compilation module 140 generates the scheduling function source code for each core system in the multi-core processor based on the task list, and is specifically used for: creating a corresponding empty source code file for each core system in the multi-core processor, the empty source code file including a system periodic task subfile and an initialization task subfile; traversing the task list, writing periodic tasks of the same period into the system periodic task subfile, and writing the initialization task corresponding to the core system into the initialization task subfile, until the corresponding periodic tasks and initialization tasks are written into the corresponding empty source code files of each core system.

[0103] According to one embodiment of the present application, the interface information includes an interface name and a parameter type of the interface. The first determination module 120 determines the interface information of the software component based on the target type file, and is specifically used to: determine a third target tag and a fourth target tag based on the structural characteristics of the target type file; determine the interface name based on the third target tag, and determine the parameter type based on the fourth target tag.

[0104] According to one embodiment of the present application, the second mapping relationship includes an interface name, a signal name and a signal direction. The second determination module 130 determines the interface list based on the second mapping relationship and the interface information, and is specifically used to: match the interface name in the second mapping relationship with the interface name in the interface information, determine the mutually matching interface names, and store the interface names into the interface name list; determine the parameter information list based on the interface name list and the parameter type, determine the signal information list based on the interface name list and the signal name, and determine the direction information list based on the interface name list and the signal direction; determine the interface list based on the parameter information list, the signal information list and the direction information list.

[0105] According to an embodiment of the present application, the acquisition module 110 is further used to: acquire communication source code; determine a macro definition list based on the communication source code, wherein the macro definition list includes a signal name and a signal direction of a transceiver signal.

[0106] According to an embodiment of the present application, the generation and compilation module 140 is further used to generate a signal interface mapping source code based on the macro definition list and the interface list.

[0107] According to one embodiment of the present application, a compilation module 140 generates a signal interface mapping source code based on a macro definition list and an interface list, and is specifically used for: when the signal name in the macro definition list and the signal name in the interface list have the same signal name, the signal corresponding to the signal name is used as the target signal; based on the target signal and a preset signal interface code generation rule, the signal interface mapping source code is determined.

[0108] According to an embodiment of the present application, the generating and compiling module 140 is further used to: when the signal name in the macro definition list and the signal name in the interface list do not have the same signal name, determine that the target signal does not exist.

[0109] It should be noted that for details not disclosed in the device for automatic mapping of task and signal interfaces in the embodiment of the present application, please refer to the details disclosed in the method for automatic mapping of task and signal interfaces in the embodiment of the present application, and the details will not be repeated here.

[0110] According to the device for automatic mapping of tasks and signal interfaces of the embodiment of the present application, the acquisition module is used to acquire the first mapping relationship between the software component and the multi-core processor based on the configuration file, and acquire the second mapping relationship between the interface of the software component and the signal, wherein the path information of the target type file and the path information of the signal mapping table are stored in the configuration file, the first determination module is used to determine the task information and interface information of the software component based on the target type file, the second determination module is used to determine the task list based on the first mapping relationship and the task information, and to determine the interface list based on the second mapping relationship and the interface information, and the generation and compilation module is used to generate the scheduling function source code of each core system in the multi-core processor based on the task list, and generate the signal interface mapping source code based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code. Thus, the device can improve development efficiency, reduce human errors, and ensure that the software components run and communicate correctly on the multi-core processor, optimize system performance, and ensure the reliability and stability of the system.

[0111] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0112] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0113] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0114] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0115] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0116] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for automatic mapping of tasks and signal interfaces, characterized in that: The method comprises: Based on the configuration file, a first mapping relationship between the software component and the multi-core processor is obtained, and a second mapping relationship between the interface of the software component and the signal is obtained; wherein the configuration file stores path information of the target type file and path information of the signal mapping table; Determining task information and interface information of the software component based on the target type file; Determine a task list based on the first mapping relationship and the task information, and determine an interface list based on the second mapping relationship and the interface information; The scheduling function source code of each core system in the multi-core processor is generated based on the task list, and the signal interface mapping source code is generated based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code.

2. The method for automatic mapping of tasks and signal interfaces according to claim 1, characterized in that: The task information includes periodic task information and initialization task information, and the determining the task information of the software component based on the target type file includes: Determining a first target tag and a second target tag based on the structural characteristics of the target type file; The periodic task information is determined based on the first target tag, and the initialization task information is determined based on the second target tag.

3. The method for automatic mapping of tasks and signal interfaces according to claim 2, characterized in that: The generating of the scheduling function source code of each core system in the multi-core processor based on the task list includes: Creating a corresponding empty source code file for each core system in the multi-core processor, wherein the empty source code file includes a system periodic task sub-file and an initialization task sub-file; Traverse the task list, write the periodic tasks of the same period into the system periodic task subfile, and write the initialization tasks corresponding to the core system into the initialization task subfile, until the corresponding periodic tasks and initialization tasks are written into the corresponding empty source code files of each core system.

4. The method for automatic mapping of tasks and signal interfaces according to claim 1, characterized in that: The interface information includes an interface name and an interface parameter type, and the determining the interface information of the software component based on the target type file includes: Determining a third target tag and a fourth target tag based on the structural characteristics of the target type file; The interface name is determined based on the third target tag, and the parameter type is determined based on the fourth target tag.

5. The method for automatic mapping of tasks and signal interfaces according to claim 4, characterized in that: The second mapping relationship includes an interface name, a signal name, and a signal direction, and determining the interface list based on the second mapping relationship and the interface information includes: Matching the interface name in the second mapping relationship with the interface name in the interface information, determining mutually matching interface names, and storing the interface names in an interface name list; determining a parameter information list based on the interface name list and the parameter type, determining a signal information list based on the interface name list and the signal name, and determining a direction information list based on the interface name list and the signal direction; The interface list is determined based on the parameter information list, the signal information list, and the direction information list.

6. The method for automatic mapping of tasks and signal interfaces according to claim 5, characterized in that: The method further comprises: Get the communication source code; A macro definition list is determined based on the communication source code, wherein the macro definition list includes signal names and signal directions of transceiver signals.

7. The method for automatic mapping of tasks and signal interfaces according to claim 6, characterized in that: The method further comprises: A signal interface mapping source code is generated based on the macro definition list and the interface list.

8. The method for automatic mapping of tasks and signal interfaces according to claim 7, characterized in that: The generating of signal interface mapping source code based on the macro definition list and the interface list includes: When the signal name in the macro definition list and the signal name in the interface list have the same signal name, the signal corresponding to the signal name is used as the target signal; The signal interface mapping source code is determined based on the target signal and a preset signal interface code generation rule.

9. The method for automatic mapping of tasks and signal interfaces according to claim 8, characterized in that: The method further comprises: When there is no identical signal name between the signal name in the macro definition list and the signal name in the interface list, it is determined that there is no target signal.

10. An electronic device, characterized in that: include: A memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for automatic mapping of tasks and signal interfaces according to any one of claims 1 to 9 is implemented.

11. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, the method for automatic mapping of tasks and signal interfaces according to any one of claims 1 to 9 is implemented.

12. A device for automatic mapping of tasks and signal interfaces, characterized in that: The device comprises: An acquisition module, used to acquire a first mapping relationship between a software component and a multi-core processor based on a configuration file, and to acquire a second mapping relationship between an interface of the software component and a signal; wherein the configuration file stores path information of a target type file and path information of a signal mapping table; A first determination module, configured to determine task information and interface information of the software component based on the target type file; a second determining module, configured to determine a task list based on the first mapping relationship and the task information, and to determine an interface list based on the second mapping relationship and the interface information; Generate a compilation module, which is used to generate a scheduling function source code for each core system in a multi-core processor based on the task list, and generate a signal interface mapping source code based on the interface list, so as to compile according to the scheduling function source code and the interface mapping source code.

Citation Information

Cited By

  • CAN message sending method and device, electronic equipment and storage medium

    CN120811818A