Method for executing a program component on a controller, computer readable storage medium, controller, and system
By generating agent definitions and compiling program components, different computing cores on the vehicle controller can execute different program components, solving the problem of increased compilation and testing time caused by frequent updates of general controllers, improving update efficiency and reducing costs.
Patent Information
- Application Number
- CN201980073896.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-01-31
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2039-01-31
AI Technical Summary
In modern vehicles, universal controllers need to update multiple functions, resulting in the frequent need to recompile all components, increasing driving test time and economic costs, and accommodating multiple controllers in a limited structural space reduces vehicle design flexibility. .
By generating proxy definitions and compiling program components, different computing cores are allowed to execute different program components, and interfaces between components are implemented through proxy components to avoid recompiling unchanged components when updating, and dynamically or statically assign program components to computing Kernel.
The number of drive tests is reduced, updates are faster, computing power requirements during compilation are reduced, and cost and time are saved.
Smart Images

Figure CN112969999B
Abstract
Description
Technical Field
[0001] The present invention relates to a method for executing a program component on a controller, a computer-readable storage medium, a controller and a system. Background Art
[0002] Vehicles, such as passenger cars, include control units for controlling vehicle functions. Conventionally, a separate control unit is used for each control unit. Thus, separate control units are used for the transverse dynamics of the vehicle or for individual driver assistance systems.
[0003] A disadvantage here is that a plurality of controllers must be accommodated in the limited installation space of the vehicle. This is disadvantageous because the flexibility of the vehicle design is therefore reduced. Another major disadvantage is that the controllers are designed accordingly precisely for the functions to be performed, i.e. in terms of the available memory and computing power. This is disadvantageous because functions can therefore only be retrofitted by software updates within the framework of the existing hardware limitations.
[0004] Therefore, in modern vehicles, universal controllers are increasingly used, which are responsible for controlling a variety of vehicle functions. For this purpose, the universal controller has multiple computing cores, one or more of which can be assigned different functions. Memory areas can also be assigned to different functional units.
[0005] Since several functions are bundled on one (universal) controller, it is more frequent to update the controller, i.e. the software. Universal controllers have different partitions, on one of which the operating system (e.g. based on Autosar OS) is stored, which controls the execution of other applications. The corresponding applications for the control functions of the controller are stored on the other partitions.
[0006] For example, the Autosar OS operating system can be stored on the first partition. Software for controlling the lateral power system can be stored on the second partition, and software for controlling the driver assistance function can be stored on the third partition.
[0007] Before updating a function, it is necessary to check whether the function to be updated is critical for safety. If this is the case, a driving test must be carried out using a test vehicle after the update. This is time-consuming and uneconomical.
[0008] This disadvantage is exacerbated by the fact that the programming languages used in general controllers usually require recompiling all components even if only one component is changed. This means that unchanged program sections are frequently recompiled. This results in a series of unnecessary driving tests and waiting times. Summary of the invention
[0009] Starting from this prior art, the object of the present invention is therefore to reduce the number of driving tests required after updating a controller. In particular, another object of the present invention is to speed up the updating of the controller. Another particular object of the present invention is to reduce the computing power required during compilation.
[0010] The object is achieved in particular by a method for executing a program component on a control unit, in particular on a control unit of a vehicle, preferably a passenger car, the method comprising the following steps:
[0011] - receiving at least one first program unit and at least one second program unit;
[0012] - generating a first and a second proxy definition, the proxy definitions specifying access to at least one function and / or a memory area of a program unit, the first proxy definition being assigned to the first program unit and the second proxy definition being assigned to the second program unit;
[0013] - compiling the first program unit and the second program unit to generate a first program component, a second program component, and compiling the first and second proxy definitions to generate a first and second proxy components;
[0014] A first program component and a second program component are executed on a controller, the first program component using the first and second proxy components to call and / or use at least one function of the second program component.
[0015] The core of the present invention is to generate proxy definitions for program units, which are compiled into proxy components. The first program component and the second program component can use these proxy components to call the functions of the other program component respectively. That is, the interface between the first and second program components is formed by the first and second proxy components. Therefore, when only one program component is changed but the interface is not changed, the compilation of the unchanged component can be abandoned.
[0016] In one specific embodiment, the first and second program components can be designed as binary files which can each be executed by a computing core of the controller.
[0017] Therefore, the first and second program components can constitute respective binary files, which can be stored as images on respective partitions of a controller, for example, and can therefore be executed by the computing core of the controller. Within the scope of the present application, the computing core of the controller can also include the processor core of the processor of the controller.
[0018] In one embodiment, the executing may include: executing a first program component and / or a first agent component on a first computing core of the controller, and executing a second program component and / or a second agent component on a second computing core of the controller.
[0019] This means that different computing cores can execute different program components. The assignment of program components to computing cores can be specified dynamically or statically.
[0020] In one embodiment, the first and / or second program unit may include source code of a programming language, in particular an embedded C language.
[0021] The embedded C language has been proven to be reliable in hardware-related programming of controllers, thereby providing an implementation method that is easy to convert.
[0022] In one embodiment, the first and / or second proxy definition may give an address of a function of the first or second program component.
[0023] It is particularly advantageous for implementing the invention that the proxy definition contains a description of the memory addresses by which the functions of the program component can be called. It is also advantageous that the proxy definition contains a description of the shared memory area. The described embodiment provides a simple way to define the interface between the first and second program components.
[0024] In one embodiment, the method may include the following steps:
[0025] - receiving a third program unit which is identical to said second program unit in terms of its interface;
[0026] - compiling only the third program unit to generate a third program component;
[0027] - executing a first program component and a third program component on the controller, the third program component using the first and second proxy components to call and / or use at least one function of the first program component.
[0028] The third program unit can be, for example, an updated version of the second program unit, in which the interface has not been changed. There is no need to recompile the first program unit. The third program component can use the first and second proxy components to access the functions and storage areas of the first program component, so that these functions and storage areas do not need to be regenerated.
[0029] In one embodiment, the compilation of the third program unit may be performed using a rule set, which may include at least one rule that may indicate whether the first program unit needs to be compiled in order to compile the third program unit.
[0030] A rule may specify the following conditions, i.e., when each program component is recompiled in the event of a change. Thus, in one embodiment, a rule may specify that when a program component changes the function definition of its function, the program component must be recompiled. In one embodiment, another possible rule may specify that when the size of a shared memory area (Shared Memory) changes, the program component must be recompiled.
[0031] In one embodiment, the first program component may include an operating system for the controller, and / or the first component may be configured to control lateral dynamics of the vehicle, and / or the third program component may be configured to control at least one driver assistance system of the vehicle.
[0032] In a preferred specific embodiment, the communication between the control of the transverse dynamics system and the control of at least one driver assistance system can be performed by a proxy component.
[0033] The above advantages are particularly important in case of frequent updates of components, since otherwise frequent updates would lead to a compilation of all components, which would take a lot of time and require further drive tests in the vehicle.
[0034] The object is in particular also solved by a computer-readable storage medium comprising instructions which, when executed by at least one processor, cause the at least one processor to carry out the above-mentioned method.
[0035] There are similar or identical advantages as already described in connection with the method.
[0036] The object is also achieved in particular by a control unit which is configured to control a function of a connected vehicle using a first program component, a second program component and a proxy component generated according to the method.
[0037] There are similar or identical advantages as already described in connection with the method.
[0038] The object is also achieved in particular by a system comprising:
[0039] - a vehicle having a controller;
[0040] - a computer unit, the computer unit being configured to:
[0041] o receiving at least one first program unit and at least one second program unit;
[0042] o generating a first and a second proxy definition, the proxy definitions specifying access to at least one function and / or memory area of a program unit, the first proxy definition being assigned to the first program unit and the second proxy definition being assigned to the second program unit;
[0043] o compile the first program unit and the second program unit to generate a first program component, a second program component, and first and second proxy components;
[0044] The controller is configured to execute first and second program components, the first program component using the first and the second proxy components to call and / or use at least one function of the second program component.
[0045] The system may include the above-mentioned storage unit.
[0046] There are similar or identical advantages as already described in connection with the method.
[0047] The system may implement several or all of the aforementioned method steps. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The present invention is further explained below with the aid of embodiments.
[0049] Figure 1 A schematic diagram showing a vehicle;
[0050] Figure 2 A schematic diagram showing three computing cores of a controller;
[0051] Figure 3 A schematic diagram showing three program components and the communication between them;
[0052] Figure 4 A schematic diagram showing the use of a rule set to generate three program components; and
[0053] Figure 5 Schematic diagram showing program component updates. DETAILED DESCRIPTION
[0054] In the following, the same reference numerals are used for identical or identically acting components.
[0055] Figure 1 A vehicle 1 is shown with a controller 2 as well as a driver assistance system 3 and a lateral dynamics system 4. In the present embodiment, the driver assistance system 3 is an automatic braking system which stops the vehicle 1 when a vehicle travelling ahead brakes suddenly. The driver assistance system 3 is therefore a safety-critical system.
[0056] The lateral dynamic system 4 controls functions that are essentially related to lateral forces of the vehicle 1 , such as steering.
[0057] The driver assistance system 3 and the transverse dynamic system 4 are communicatively connected to the controller 2. For example, the controller 2, the driver assistance system 3 and the transverse dynamic system 4 may be connected to each other via a vehicle bus, such as a CAN bus.
[0058] In the embodiment shown, the controller 2 is a universal controller 2 having a plurality of processors and a memory device. Three partitions are provided in the memory device, wherein an operating system partition stores an operating system based on Autosar OS. A driver assistance partition stores program components for implementing the desired driver assistance functions. In this embodiment, this is an automatic braking system. A lateral dynamics partition stores program components for implementing lateral dynamics.
[0059] When a new version of a program component to be executed on the controller 2 is to be installed, the controller is connected by wire or wirelessly to the development computer 5. The development computer 5 can also be a so-called tester or other device with which program components can be loaded onto the controller 2. In one embodiment, the development computer 5 is designed as a mobile terminal which is wirelessly connected to the controller 2.
[0060] The control unit may also have a mobile radio module or a wireless local area network (WLAN) module which is designed to be communicatively connected to the development computer 5 .
[0061] Figure 2 The logical structure of the controller 2 is shown in detail. The controller 2 includes three virtual execution environments 10, 20, 30 for executing program components. The computing cores of the processor of the controller 2 are respectively assigned to each of the execution environments 10, 20, 30. Therefore, the first virtual execution environment 10 has a first computing core 11 and a second computing core 12. The second virtual execution environment 20 has a third computing core 21 and a fourth computing core 22. The third virtual execution environment 30 has a fifth computing core 31 and a sixth computing core 32.
[0062] Program components executed by the respective computing cores 11, 12, 21, 22, 31, 32 can communicate with each other via hardware layer 7. This means that hardware layer 7 provides means that allow a program component executed by first computing core 11 to call functions of a program component executed by third computing core 21.
[0063] Figure 3 The communication between the various program components executed by different computing cores is shown. Figure 3 A first, second and third virtual execution environments 10, 20, 30 are shown. Figure 3In the embodiment of the present invention, the operating system of the controller 2 can be executed in the first virtual execution environment 10. In this embodiment, the second virtual execution environment 20 can execute the driver assistance system through program components 23 and 24. In this embodiment, the third virtual execution environment 30 can control the lateral power system of the vehicle 1 through program components 33 and 34.
[0064] As mentioned above, the driver assistance system can be, for example, an automated automatic braking system. When braking by the automatic braking system, it may also be necessary for the automatic braking system to control the lateral dynamics system. This means that the automatic braking system must access the functions of the lateral dynamics system. For example, the automatic braking system can call the functions provided by the program component 34.
[0065] For such a function call, the computing component 23 of the first virtual execution environment 10 sends a signal S, which is forwarded to another proxy interface 13 of the first virtual execution environment 10 to the internal communication unit 14 via the proxy interface 25. The signal S is transmitted from the internal communication unit 14 to the proxy interface 15, which is in turn communicatively connected to the proxy interface 35 of the third virtual execution environment 30. The proxy interface 35 then uses the signal S to initiate a function call in the program component 34.
[0066] Figure 4 and Figure 5 The first compilation of the components just described is shown as well as the updating of individual program components.
[0067] Figure 4 Two program units 8, 9 are shown, which in the illustrated embodiment are embedded C language source code files. In order to create executable program components, the source code must be compiled and the different program components must be linked. For this purpose, a linker-compiler unit 40 is used. The linker-compiler unit 40 comprises an agent generation unit 41 and a linker 42. The agent generation unit 41 is configured to identify function calls and accesses between the various program units 8, 9. The agent generation unit 41 generates agent components 13, 25 from this information. In addition, program components 23, 24 that can be executed by the controller 2 are generated.
[0068] Figure 5 The situation of updating a program unit 9 is shown. For this purpose, the linker-compiler unit 40 receives an updated program unit 9' in which the implementation of the individual functions has been optimized. The interfaces and the access to the other functions remain unchanged. The linker-compiler unit 40, in particular the linker 42 here, analyzes the program unit 9' and compares it with the existing program unit 9.
[0069] The rule storage unit 50 stores rules R1 - R4 which specify under what conditions it is sufficient to compile only the program unit 9 ′ or whether all program units 8 , 9 ′ must be recompiled.
[0070] Thus, rule R1 states, for example, that when a program unit 9 ′ changes the size of a shared storage area (the so-called shared memory), all program units 8 , 9 ′ must be compiled.
[0071] Using rules R1-R4 and / or already existing program components 23, 24 and / or already existing proxy components 25, 13, linker-compiler unit 40 analyzes whether only program unit 9' needs to be compiled. In the embodiment shown, linker-compiler unit 40 determines that only program unit 9' needs to be compiled, thereby generating a new program component 24', which replaces the previous program component 24. Here, program component 24' is configured to use proxy component 25 to access functions and storage areas of program component 23.
[0072] All in all, only one single program unit has to be recompiled. This reduces the computing power to be available, so that the program can be updated more quickly. Furthermore, if the recompiled component is not safety-critical, it is not necessary to carry out new driving tests with the test vehicle. This can save considerable costs.
[0073] List of reference numerals:
[0074] 1 Vehicle
[0075] 2 Controller
[0076] 3 Driver Assistance Systems
[0077] 4 Transverse power system
[0078] 5 Development Computer
[0079] 6 Assembly / Binary Files
[0080] 7 Hardware Layer
[0081] 8, 9, 9' Program unit
[0082] 10 First Virtual Execution Environment
[0083] 11. The First Computing Core
[0084] 12 Second computing core
[0085] 13, 15, 25, 35 Proxy interface
[0086] 14 Internal communication unit
[0087] 20 Second Virtual Execution Environment
[0088] 21 Third computing core
[0089] 22 Fourth computing core
[0090] 23, 24, 24', 33, 34 Program components
[0091] 30 Third Virtual Execution Environment
[0092] 31 Fifth computing core
[0093] 32 Sixth computing core
[0094] 40 Linker-Compiler Unit
[0095] 41 Agent Generation Unit
[0096] 42 Linker
[0097] 50 Rule storage unit
[0098] R1-R4 Rules
[0099] S signal
Claims
1. A method for executing a program component on a controller (2), the method The following steps are involved: receiving at least one first program unit and at least one second program unit; generating a first proxy definition and a second proxy definition, the proxy definitions specifying access to at least one function and / or a memory area of a program unit, the first proxy definition being assigned to the first program unit and the second proxy definition being assigned to the second program unit; compiling the first program unit and the second program unit to generate the first program component and the second program component, and compiling the first proxy definition and the second proxy definition to generate the first proxy component and the second proxy component; A first program component and a second program component are executed on a controller (2), and the first program component uses a first proxy component and a second proxy component to call and / or use at least one function of the second program component in the following manner: the first program component sends a signal, which is forwarded by the first proxy component to the second proxy component, and the second proxy component uses the signal to initiate a function call in the second program component.
2. The method according to claim 1, It is characterized in that The first program component and the second program component are designed as binary files which can each be executed by a computing core (11, 12, 21, 22, 31, 32) of the controller (2).
3. The method according to claim 1 or 2, It is characterized in that The execution includes executing a first program component and / or a first agent component on a first computing core of the controller (2), and includes executing a second program component and / or a second agent component on a second computing core of the controller.
4. The method according to claim 1 or 2, It is characterized in that The first program element and / or the second program element comprises source code of a programming language.
5. The method according to claim 1 or 2, It is characterized in that The first proxy definition and / or the second proxy definition specifies the address of a function of the first program component or of the second program component.
6. The method according to claim 1 or 2, It is characterized in that The first proxy definition and / or the second proxy definition specifies a shared memory area of the first program component or the second program component.
7. The method according to claim 1 or 2, It is characterized in that receiving a third program unit, which is identical to the second program unit in terms of its interface; compiling only the third program unit to generate a third program component; A first program component and a third program component are executed on a controller (2), and the third program component uses the first proxy component and the second proxy component to call and / or use at least one function of the first program component.
8. The method according to claim 7, It is characterized in that Compilation of the third program unit is performed using a rule set, which includes at least one rule (R1, R2, R3, R4) which specifies whether compilation of the first program unit is necessary in order to compile the third program unit.
9. The method according to claim 1 or 2, It is characterized in that The first program component comprises an operating system for a controller and / or the first program component is configured to control a lateral dynamics system of the vehicle (1).
10. The method according to claim 7, It is characterized in that The second program component and / or the third program component is configured to control at least one driver assistance system of the vehicle (1).
11. The method according to claim 1 or 2, It is characterized in that The controller (2) is a controller of the vehicle (1).
12. The method according to claim 11, It is characterized in that The vehicle (1) is a sedan.
13. The method according to claim 4, It is characterized in that The programming language is embedded C language.
14. A computer-readable storage medium comprising instructions which, when executed by at least one processor, cause the at least one processor to implement the method according to any one of claims 1 to 13.
15. A controller (2) configured to control a function of a connected vehicle (1) using a first program component, a second program component and at least one proxy component generated using the method according to claim 1.
16. System, include: A vehicle (1) having a controller (2); A computer unit, the computer unit being configured to: receiving at least one first program unit and at least one second program unit; generating a first proxy definition and a second proxy definition, the proxy definitions specifying access to at least one function and / or a memory area of a program unit, the first proxy definition being assigned to the first program unit and the second proxy definition being assigned to the second program unit; compiling the first program unit and the second program unit to generate the first program component and the second program component, and compiling the first proxy definition and the second proxy definition to generate the first proxy component and the second proxy component; The controller (2) is configured to execute a first program component and a second program component, wherein the first program component uses a first proxy component and a second proxy component to call and / or use at least one function of the second program component, in the following manner: the first program component sends a signal, which is forwarded by the first proxy component to the second proxy component, and the second proxy component uses the signal to initiate a function call in the second program component.
