# US 10,372,445 B2 · Method for porting a single-core control software to a multi-core control device or for optimizing a multi-core control software

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,372,445 B2
- Document ID: US10372445B2
- Status: Granted
- Kind: B2
- Application number: 15/790,320
- Filed: 2017-10-23
- Published: 2018-04-26
- Granted: 2019-08-06
- Earliest claimed: 2016-10-24
- Assignees: Denso Corporation
- Applicants: Denso Corporation
- Inventors: Bert Boeddeker; Dominik Langen; Sebastian Kehr
- Web page: https://patentgrep.com/patent/US10372445B2

## CPC

- G06F 9/52: Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F 5/06: for changing the speed of data flow, i.e. speed regularising {or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor (G06F7/78 takes precedence)}
- G06F 8/76: Adapting program code to run in a different environment; Porting
- G06F 9/5066: {Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs (mappping at compile time, see G06F8/451)}
- G06F 9/544: {Buffers; Shared memory; Pipes}
- G05B 19/0421: {Multiprocessor system}
- G06F 2209/5017: Task decomposition
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G05B: CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS (systems for controlling or regulating non-electric variables G05D; systems for regulating electric or magnetic variables G05F; control devices or systems insofar as characterised by mechanical features only G05G)

## Abstract

A method for porting an existing vehicle control software developed for a single-core control device into a modified multi-core control software or for converting an existing vehicle control software into an optimized multi-core control software is provided. The existing control software comprises numerous repeatedly executable runnables. Information is exchanged between the runnables through writing and reading of communication variables. A modified information exchange via time implicit communication is provided for parallelized runnables in the multi-core control software that is generated by the method. The method includes: analysis of the existing control software regarding a writer-to-reader cardinality of the information exchange with respect to a communication variable; and defining an implementation of the time implicit communication as a function of the determined writer-to-reader cardinality.

## Claims

### Claim 1

A method for porting an existing vehicle control software developed for a single-core control device into a modified multi-core control software that can be executed on a multi-core control device,
wherein the existing vehicle control software comprises numerous repeatedly executable runnables, and
wherein information is exchanged between the runnables through writing and reading of related communication variables, and
wherein a modified information exchange via time implicit communication is provided for parallelized runnables in the multi-core control software that is generated by the method, the method comprising:
analyzing the existing vehicle control software regarding a writer-to-reader cardinality of the information exchange with respect to a related communication variable; and
defining an implementation of the time implicit communication as a function of the determined writer-to-reader cardinality, wherein:
a parallelized execution of a writer-runnable and at least one reader-runnable in a 1-to-n writer-to-reader cardinality is established in the generated multi-core control software, and
the related communication variables in the 1-to-n writer-to-reader cardinality are respectively stored in ring buffers, which are separated from each other, each of the ring buffers being assigned to a respective writer-runnable.

### Claim 2 (depends on 1)

The method according to claim 1,
wherein a value of the related communication variable, together with an associated temporal rank, are stored in a ring buffer, and
wherein that value in the ring buffer that is to be used for a specific instance of a reader runnable is determined on a basis of the temporal rank, in particular through searching for a most current temporal rank.

### Claim 3 (depends on 2)

The method according to claim 2,
wherein the search for the value that is to be used is provided by a binary search.

### Claim 4 (depends on 1)

The method according to claim 1,
wherein each of the related communication variables is stored in a double buffer or in the ring buffer, which is assigned to the respective writer-runnable.

### Claim 5 (depends on 1)

The method according to claim 1,
wherein the related communication variables are stored in each double buffer, which are associated to a respective reader-runnable, in particular if the number n of reader-runnables is below a predefined threshold.

### Claim 6

A method for porting an existing vehicle control software developed for a single-core control device into a modified multi-core control software that can be executed on a multi-core control device,
wherein the existing vehicle control software comprises numerous repeatedly executable runnables, and
wherein information is exchanged between the runnables through writing and reading of related communication variables, and
wherein a modified information exchange via time implicit communication is provided for parallelized runnables in the multi-core control software that is generated by the method, the method comprising:
analyzing the existing vehicle control software regarding a writer-to-reader cardinality of the information exchange with respect to a related communication variable; and
defining an implementation of the time implicit communication as a function of the determined writer-to-reader cardinality,
wherein a parallelized execution of a writer-runnable and at least one reader-runnable in a 1-to-n writer-to-reader cardinality is established in the generated multi-core control software and the related communication variable is stored in a separate ring buffer, which is associated to the writer-runnable, and
wherein a sequential execution of numerous writer-runnables and one reader-runnable in an m-to-1 writer-to-reader cardinality is provided, and
wherein a separate ring buffer is provided for each of the writer runnables, for storing the related communication variable, and
wherein it is determined, according to a selection rule, from which of the ring buffers the value of the related communication variable is to be read for each reading access by the reader runnable.

### Claim 7 (depends on 6)

The method according to claim 6,
wherein the selection of the ring buffer that is to be used for a reading access is made as a function of a task ID, a periodicity of the participating runnables or a task priority.

### Claim 8

A method for porting an existing vehicle control software developed for a single-core control device into a modified multi-core control software that can be executed on a multi-core control device,
wherein the existing vehicle control software comprises numerous repeatedly executable runnables, and
wherein information is exchanged between the runnables through writing and reading of related communication variables, and
wherein a modified information exchange via time implicit communication is provided for parallelized runnables in the multi-core control software that is generated by the method, the method comprising:
analyzing the existing vehicle control software regarding a writer-to-reader cardinality of the information exchange with respect to a related communication variable; and
defining an implementation of the time implicit communication as a function of the determined writer-to-reader cardinality,
wherein a parallelized execution of a writer-runnable and at least one reader-runnable in a 1-to-n writer-to-reader cardinality is established in the generated multi-core control software, and the related communication variables in the 1-to-n writer-to-reader cardinality are respectively stored in ring buffers, which are separated from each other, each of the ring buffers being assigned to a respective writer-runnable,
wherein for each ring buffer, precisely one writer runnable is allowed to write the related communication variable and one or more reader runnables are allowed to read the related communication variable, and
wherein the method further comprises:
determining periodicities of the executions of the writer runnable and the at least one reader runnable;
determining ineffective writings, in which no reading can take place due to relationships of the periodicities; and
avoiding the ineffective writings.

### Claim 9

A method for porting an existing vehicle control software developed for a single-core control device into a modified multi-core control software that can be executed on a multi-core control device,
wherein the existing vehicle control software comprises numerous repeatedly executable runnables, and
wherein information is exchanged between the runnables through writing and reading of related communication variables, and
wherein a modified information exchange via time implicit communication is provided for parallelized runnables in the multi-core control software that is generated by the method, the method comprising:
analyzing the existing vehicle control software regarding a writer-to-reader cardinality of the information exchange with respect to a related communication variable; and
defining an implementation of the time implicit communication as a function of the determined writer-to-reader cardinality,
wherein a parallelized execution of a writer-runnable and at least one reader-runnable in a 1-to-n writer-to-reader cardinality is established in the generated multi-core control software, and the related communication variables in the 1-to-n writer-to-reader cardinality are respectively stored in ring buffers, which are separated from each other, each of the ring buffers being assigned to a respective writer-runnable, and
wherein a communication scheme is used for the writing and reading of the related communication variables, based on uniform communication cycles, and
in which:
a base interval is established, having a specific duration, and each communication cycle lasts as long as the base interval,
writing accesses can take place at an arbitrary point in time, in order to write a current value of the related communication variable into a field of a ring buffer, and
for each written value of the related communication variable a specific future communication cycle is established as a publication time and temporal rank,
wherein the written value is not made available for a reading access before reaching the publication time.

### Claim 10 (depends on 9)

The method according to claim 9,
wherein an execution scheme is used for the execution of runnables that exchange information regarding the related communication variables, which execution scheme is based on uniform execution cycles, and
wherein the length of the execution cycle is identical to the length of the communication cycle.

### Claim 11 (depends on 9)

The method according to claim 9,
wherein a recurring communication pattern is determined for the reading and writing accesses to the related communication variable, having a fixed pattern length, wherein the pattern length is the number of communication cycles after which the communication pattern repeats, and
wherein a running index is used as the temporal rank for storing a value of the related communication variable in a ring buffer, which is reset with each recurrence of the communication pattern, and
wherein a value in the ring buffer, which is to be used for a specific instance of a reader runnable, is determined on a basis of the running index and a fixed assignment rule.

### Claim 12 (depends on 11)

The method according to claim 11,
wherein the assignment rule is calculated based on a known pattern length and the periodicities of the participating runnables.

### Claim 13 (depends on 1)

The method according to claim 1,
wherein the number of storage spaces to be reserved in a ring buffer is calculated as a function of the number of instances of the writing runnable in a recurring communication pattern, minus the number of ineffective writings in the recurring communication pattern.

### Claim 14

A method for converting an existing vehicle control software, which is already developed for a multi core control device, into an optimized multi-core control software,
wherein the existing vehicle control software comprises numerous repeatedly executable runnables, and
wherein information is exchanged between the runnables through writing and reading of related communication variables, and
wherein a modified information exchange via time implicit communication is provided for parallelized runnables in the multi-core control software that is generated by the method, the method comprising:
analyzing the existing vehicle control software regarding a writer-to-reader cardinality of the information exchange with respect to a related communication variable; and
defining an implementation of the time implicit communication as a function of the determined writer-to-reader cardinality, wherein:
a parallelized execution of a writer-runnable and at least one reader-runnable in a 1-to-n writer-to-reader cardinality is established in the generated multi-core control software, and
the related communication variables in the 1-to-n writer-to-reader cardinality are respectively stored in ring buffers, which are separated from each other, each of the ring buffers being assigned to a respective writer-runnable.

### Claim 15

A method for porting an existing vehicle control software developed for a single-core control device into a modified multi-core control software that can be executed on a multi-core control device,
wherein the existing vehicle control software comprises numerous repeatedly executable runnables, and
wherein information is exchanged between the runnables through writing and reading of related communication variables, and
wherein a modified information exchange via time implicit communication is provided for parallelized runnables in the multi-core control software that is generated by the method, the method comprising:
analyzing the existing vehicle control software regarding a writer-to-reader cardinality of the information exchange with respect to a related communication variable; and
defining an implementation of the time implicit communication as a function of the determined writer-to-reader cardinality,
wherein a parallelized execution of a writer-runnable and at least one reader-runnable in a 1-to-n writer-to-reader cardinality is established in the generated multi-core control software and a related communication variable is stored in a separate ring buffer, which is associated to the writer-runnable, and
wherein a parallelized execution of the numerous writer runnables and the one reader runnable in an m-to-1 writer-to-reader cardinality are provided, and
wherein a separate ring buffer is provided for each writer runnable, for storing the related communication variable, and
wherein it is determined, according to a selection rule, from which of the ring buffers the value of the communication variable is to be read for each reading access by the reader runnable.

### Claim 16 (depends on 15)

The method according to claim 15,
wherein the selection of the ring buffer that is to be used for a reading access is made as a function of a task ID, a periodicity of the participating runnables or a task priority.
