Method and system with a multi-core microcontroller with chained tasks and load shedding logic

By dynamically reallocating task portions based on latency estimation and load shedding, the method addresses execution time overruns in multi-core microcontrollers, improving reliability in motor vehicle control units.

FR3142578B1Active Publication Date: 2024-10-11VITESCO TECHNOLOGIES GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
FR2022012415
Authority / Receiving Office
FR · FR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-11-28
Publication Date
2024-10-11
Estimated Expiration
2042-11-28

AI Technical Summary

Technical Problem

In multi-core microcontrollers used in motor vehicle control units, particularly for internal combustion engines or hybrid engines, chained tasks can experience execution times exceeding their recurrence periods, leading to erroneous results or resets due to delayed execution on subsequent cores when higher priority tasks intervene.

Method used

A method is implemented to manage chained tasks by estimating latency delays across cores, activating a load shedding mode when thresholds are exceeded, reallocating task portions to other cores to maintain timely execution, and reverting to nominal mode when delays become reasonable.

Benefits of technology

This approach reduces the risk of execution time overruns and resets, enhancing the reliability of control software by optimizing load distribution across multiple cores.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000016_0000
    Figure 00000016_0000
  • Figure 00000017_0000
    Figure 00000017_0000
  • Figure 00000018_0000
    Figure 00000018_0000
Patent Text Reader

Abstract

A method implemented in a multi-core microcontroller with a first core and a second core, the method comprising: - defining a recurring chained task executable in parts on the first and second cores, with a nominal implementation associated with a reference distribution of parts across the different cores, the second core requiring a second latency delay (DL2) to handle a second part (TK2) of the chained task, - estimating a current value of the second latency delay, - if the current value of the second latency delay is greater than a first threshold value (DS2a), then activating a load shedding mode for the second core in which a portion of the head of the second part is executed on the first core and disabled on the second core, - if the value of the second latency delay is less than a second threshold value, then reverting to the nominal implementation. Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

Title of the invention: Method and system with a multi-core microcontroller with chained task and load shedding logic Technical field

[0001] The present invention relates to methods implemented in a multi-core microcontroller in a control unit in a motor vehicle. In particular, the target is a control unit in a motor vehicle, in particular an internal combustion engine control unit, or a torque distribution unit in a hybrid engine. State of the art

[0002] Multi-core microcontrollers are increasingly being used in electronic control units in motor vehicles. This architecture allows significant flexibility in managing and executing the multiplicity of tasks that must be performed by the electronic control unit.

[0003] In certain software configurations, among the tasks to be executed periodically, there is a category of particular interest in the context of the present invention, these are so-called "chained" tasks. A chained task is executed in parts on several cores. The parts in question are executed sequentially, by each respective core involved. In practice, for a chained task of interest, a first part of the task is performed by a first core of the microcontroller, a second part of the task is performed by a second core of the microcontroller, and so on. The first part of the task gives a result which is used by the second part of the task, and so on.

[0004] In a control unit as mentioned in the introduction, the recurrence period of certain chained tasks is linked to the rotation speed of the motor and, in addition, certain additional tasks are triggered on rotation speed thresholds. Under these conditions, it is possible that the chained task of interest, in its nominal implementation, has an execution time which becomes greater than the recurrence period of the task. When this phenomenon sets in and amplifies, this can lead to erroneous task results, or even a reset of the microcontroller.

[0005] In addition, when the execution of a chained task is completed on a given core, its execution on the next core starts when the operating system of this core allows it, depending on its priority and the potentially higher priority tasks waiting to be executed. Therefore, if the chained task is not executed immediately on the next core because other higher priority tasks are, this chained task will be executed with a delay.

[0006] The inventors sought to improve the situation. Statement of the invention

[0007] For this purpose, according to the present disclosure, there is proposed a method implemented in a multi-core microcontroller in a control unit in a motor vehicle, the microcontroller comprising a first core, a second core and possibly at least a third core, the method comprising the following steps: a- defining a chained task executable in parts on at least the first and second cores, with a so-called nominal implementation of the chained task associated with a reference distribution of the parts on the different cores, and the chained task being executed in a recurrent manner, the first core requiring a first latency delay (DL1) to take charge of a first part of the chained task, the second core requiring a second latency delay (DL2) to take charge of a second part of the chained task, b2- estimate a current value of the second latency delay (DL2), from one or more previous execution(s) of the chained task, c2- if the current estimated value of the second latency delay (DL2) is greater than a first predetermined threshold value (DS2a), then activate a load shedding mode of the second core for which a head portion of the second part is executed on the first core and deactivated on the second core, d2- if the current estimated value of the second latency delay (DL2) is less than a second predetermined threshold value (DS2b), then return to the nominal implementation, with the head portion of the second part executed again on the second core, and disabled on the first core.

[0008] The first part of the chained task is the part of the chained task executed by the first core, the second part of the chained task is the part of the chained task executed by the second core, etc. The content of the first part, respectively the second part, can change from one execution of the chained task to another.

[0009] We denote DS2a the first predetermined threshold value. We denote DS2b the second predetermined threshold value. We denote DL2 the second latency delay. We denote DL1 the first latency delay.

[0010] When DL2 > DS2a, this means that the second core is used intensively and is mobilized by other tasks which leads to a longer than normal support delay.

[0011] Note that the thresholds DS2a and DS2b may be identical or different as will be seen later.

[0012] In the offloading mode, the head portion of the second part of the chained task is no longer executed on the second core but on the first core, so we offload the second core of a part of his work. The load shedding is reversible and the load shedding mode is momentary.

[0013] In cases of low or moderate core load, the latency delays are small and the total execution time of the chained task is less than the recurrence period of the chained task.

[0014] In a control unit as mentioned in the introduction, under conditions of high recurrence of certain tasks linked to the rotation speed of the engine, the invention makes it possible to avoid or at least reduce the phenomenon of timeout mentioned in the introductory part.

[0015] Thanks to the proposed load shedding mechanism, the risks of such an overflow and of a possible reset of the microcontroller are reduced, and the reliability of control software associated with said chained task is thus improved.

[0016] In various embodiments of the invention, one and / or the other of the following arrangements may optionally be used, taken individually or in combination.

[0017] According to one aspect of the invention, it may be provided that: - when the third core is present, and under the conditions of the second core's load shedding mode, a tail portion of the second part is executed on the third core and disabled on the second core, and - to return to the nominal implementation, the tail portion is executed again on the second core and disabled on the third core.

[0018] This makes it possible to organize a significant load shedding of the second core, with a portion shedding on the first core and another portion shedding on the third core. The shedding load is thus distributed over two other cores, which represents an optimization.

[0019] According to one aspect of the invention, the method may further comprise the following steps: bl- estimate a current value of the first latency delay (DL1), from one or more previous execution(s) of the chained task, cl- if the current estimated value of the first latency delay (DL1) is greater than a third predetermined threshold value (DSla), then activate a first core offloading mode for which a tail portion of the first part is executed on the second core and deactivated on the first core, dl- if the current estimated value of the first latency delay (DL1) is less than a fourth predetermined threshold value (DSlb), then fall back to the nominal implementation, with the tail portion of the first part executed again on the first core and disabled on the second core.

[0020] We can thus unload the first core Al if it is too loaded. We note that the first latency delay is defined between the launch of an iteration of the chained task by a sequencer (the launch time being noted LTK(i)) and the start of execution (noted tbl) on the first core Al.

[0021] According to one aspect of the invention, it may be provided that, the third core being present, the third core requiring a third latency delay (DL3) to support a third part of the chained task, and the method further comprises the following steps: b3- estimate a current value of the third latency delay (DL3), from one or more previous execution(s) of the chained task, c3- if the current estimated value of the third latency delay (DL3) is greater than a fifth predetermined threshold value (DS3a), then activate a third core offload mode for which a head portion of the third part is executed on the second core and deactivated on the third core, d3- if the current estimated value of the third latency delay (DL3) is less than a sixth predetermined threshold value (DS3b), then fall back to the nominal implementation, with the head portion of the third part executed again on the third core and disabled on the second core.

[0022] This allows the third core A3 to be relieved if it is too loaded.

[0023] According to one aspect of the invention, with regard to the predetermined threshold for triggering the load shedding mode of the second core, it may be provided that the first predetermined threshold value (DS2a) is strictly greater than the second predetermined threshold value (DS2b).

[0024] In other words, the return to normal, or nominal, operation is triggered on a latency threshold lower than the threshold that triggered the load shedding mode. This provides a hysteresis function that makes it possible to avoid unnecessary frequent switches between the load shedding mode and the nominal mode. It is noted that the values ​​of the thresholds in question are a few microseconds, for example between 700 and 2500 microseconds for a chained task that has a recurrence period of 10 ms.

[0025] It is noted that in an alternative embodiment, the predetermined thresholds DS2a and DS2b can be equal and with low-pass filtering this also works correctly. The values ​​measured successively for the second latency delay DL2 can in particular be introduced into a low-pass digital filter or into a windowed average filter, which avoids triggering load shedding on a single value above the threshold, and in the opposite direction of return to the nominal, on a single value below the threshold.

[0026] According to one aspect of the invention, with regard to the predetermined threshold for triggering the load shedding mode of the first core, it may be provided that the third predetermined threshold value (DSla) is strictly greater than the fourth predetermined threshold value. (DSlb).

[0027] In other words, the return to nominal operation is triggered on a latency threshold lower than the threshold that triggered the load shedding mode. As previously, this provides a hysteresis function which makes it possible to avoid unnecessary frequent switching.

[0028] According to one aspect of the invention, the current value of the second latency delay DL2 can be calculated as an average over the last M executions of the chained task. Similarly, the current value of the first latency delay DL1 can be calculated as an average over the last M executions of the chained task. Similarly, if the third core is present, the third latency delay DL3 can also be calculated as an average over the last M executions of the chained task.

[0029] According to a particular aspect, the chained task can be executed in an asynchronous periodic manner, the period being dependent on the rotation speed of the vehicle engine. In particular, when the recurrence frequency is proportional to the engine rotation speed, the risk of overshoot mentioned in the introductory part increases, and the load shedding as presented above is all the more relevant.

[0030] According to a particular aspect, the chained task is launched by a sequencer of the operating system.

[0031] The chained task is a grouping of functions executed sequentially. Said functions are high-level functions, and not simple mathematical functions. Rather, they are entities, or procedures, which group together (in other words encapsulate) code defining logical processes, calculations, library function calls, etc. Alternatively, the chained task directly includes the code defining said logical processes, calculations, library function calls, etc.

[0032] According to one aspect of the invention, it may be provided that: - the first part of the chained task includes, in a nominal execution, a base portion followed by a tail portion, - the second part of the chained task comprises, in a nominal execution, a basic portion preceded by a head portion and followed by a tail portion, the basic portions being derived from a predefined division.

[0033] According to one aspect of the invention, the load shedding mode of the first core is exclusive of the load shedding mode of the second core. In view of the mechanism presented, the core in charge difficulty is relayed by the neighboring cores (previous and / or following), which are not unloaded but on the contrary loaded a little more.

[0034] According to one aspect of the invention, it is possible to choose to preferentially offload the core which is in the most difficulty, in other words the one which has the greatest latency delay. long.

[0035] The present invention also relates to a multi-core microcontroller configured to implement the method described above, the microcontroller in question preferably being used in a control unit in a motor vehicle.

[0036] The present invention also relates to an electronic control unit comprising the microcontroller as characterized above. Description of figures

[0037] Other aspects, aims and advantages of the invention will appear on reading the following description of an embodiment of the invention, given by way of non-limiting example. The invention will also be better understood with reference to the attached drawings in which:

[0038] [Fig-1] [Fig.l] illustrates a very simplified block diagram of an example system engine control,

[0039] [Fig.2] [Fig.2] represents an illustrative example of a timing diagram concerning the execution of a chained task in a nominal configuration,

[0040] [Fig.3] [Fig.3] is analogous to [Fig.2] and illustrates a case of load shedding of the second core,

[0041] [Fig.4] [Fig.4] is analogous to [Fig.2] and illustrates a case of load shedding of the first core,

[0042] [Fig.5] [Fig.5] is analogous to [Fig.2] and illustrates a case of load shedding of the third core,

[0043] [Fig.6] [Fig.6] schematically represents a flowchart of the operation of the load shedding of the second core.

[0044] Detailed description of at least one embodiment

[0045] In the various figures, the same references designate identical or similar elements. For reasons of clarity of the description, certain elements are not necessarily represented to scale, in particular the times and durations represented in the chronogram figures are not necessarily represented to scale.

[0046] The invention is illustrated in the context of an internal combustion engine control system. The invention can be used generally for intelligent controllers on board motor vehicles, which manage a high level of computational complexity, such as, for example, but not exclusively, torque distributors on hybrid engines.

[0047] With reference to [Fig.l], said motor marked 60 is equipped with actuators and sensors connected to a control unit marked 50.

[0048] The information sent back by the sensors passes through conductors which are connected as inputs 56 of the electronic control unit 50.

[0049] The control unit comprises a microcontroller marked 51. Said microcontroller comprises a first computing core A1, a second computing core A2 and a third computing core A3 in the illustrated example. The third core is optional and it is also noted that there could be a fourth core or a greater number of cores.

[0050] The microcontroller 51 interfaces an output interface marked 52, for example with power switches. The control unit provides output commands 58 intended to control the actuators arranged on the motor or generally in the motorization function.

[0051] Furthermore, the microcontroller 51 comprises a memory area 53, which can be accessed by the various computing cores.

[0052] The microcontroller 51 is equipped with an operating system. The operating system includes a task sequencer, intended to schedule and sequence the various tasks that are the responsibility of the microcontroller.

[0053] Some tasks are executed on a particular core. But here we are interested in tasks that are executed on several cores, and in particular tasks that are not executed in parallel on several cores, but in series. We call this type of task "chained tasks".

[0054] For a chained task, a division is defined in advance, i.e. a distribution of the different parts of the task to be executed, on different computing cores, with optional sub-parts where appropriate, i.e. sub-parts executed or not depending on the operational conditions of the moment, as will be seen below, e.g. with load shedding or not.

[0055] In practice, the parts in question are executed sequentially by each respective core involved. For a chained task of interest, a first part of the task is performed by the first core of the microcontroller and a second part of the task is performed by the second core of the microcontroller. In the illustrated example, we also have a third core executing a third part of the chained task. In variants not shown, more than three cores are involved, each executing a respective task part.

[0056] The first part of the chained task is the part of the chained task executed by the first core, the second part of the chained task is the part of the chained task executed by the second core, etc. As we will see later, the content of the first part, respectively the second part, can change from one execution of the chained task to another.

[0057] The first part TK1 comprises, in a nominal execution (denoted TK1-n) illustrated in [Fig.2], a base portion T10 followed by a tail portion T12.

[0058] The second part TK2 comprises, in a nominal execution (denoted TK2-n), a base portion T20 preceded by a head portion T21 and followed by a tail portion T23.

[0059] The third part TK3 comprises, in a nominal execution (denoted TK3-n), a base portion T30 preceded by a head portion T32.

[0060] The respective basic portions T10, T20, T30 come from a predefined division. They are always executed on their respective core.

[0061] On the other hand, the head portions and the tail portions can be the subject of a reallocation decision making it possible to offload one core among the two or three cores.

[0062] A preliminary step of the method according to the invention consists in defining a chained task TK executable in parts on at least the first and second cores (A1, A2), with a so-called nominal implementation of the chained task associated with a reference distribution of the parts on the different cores.

[0063] As illustrated in Figures 2 to 5, the first core A1 requires a first latency delay DL1 to support the first part TK1 of the chained task, the second core A2 requires a second latency delay DL2 to support the second part TK2 of the chained task. In addition, when the third core is present as in the illustrated example, the third core A3 requires a third latency delay DL3 to support a third part TK3 of the chained task.

[0064] The chained task TK is executed recurrently. In a simple example, the recurrence frequency is fixed. In another fairly common example, the recurrence frequency is proportional to the rotation speed of the vehicle's engine. The faster the engine rotates, the higher the recurrence frequency of the chained task, and therefore the smaller the repetition period of said task. For example, for an engine rotating at 6000 rpm, the recurrence frequency of one engine revolution is 100 Hz, and therefore a task performed at each revolution has a period of 10 ms. If several tasks, chained or not, are triggered on the engine tooth signal or on the camshaft signal, the load on the different cores of the microcontroller can be very high.Under these conditions, the division into parts and portions of tasks can give a result that is difficult to predict because the latency times can become very significant, the cores being occupied by potentially higher priority tasks. It is under these conditions that the timeout mentioned in the introductory part can occur, especially since hardware interrupts take over with high priority the executions of tasks in progress and make the load forecast of the different cores random.

[0065] The first, second, and third latency delays DL1, DL2, DL3 occur for each execution of the chained task with possibly an evolution for each in ascending or descending direction.

[0066] The proposed method includes the step: b2- estimate the second latency delay DL2, from one or more previous execution(s) of the chained task.

[0067] Optionally, the proposed method may include the step: bl- estimate the first latency delay DL1, from one or more previous execution(s) of the chained task.

[0068] Optionally, the proposed method may include the step b3- estimate the third latency delay DL3, from one or more previous execution(s) of the chained task.

[0069] In the configuration illustrated by [Fig.3], the second latency delay DL2 has exceeded a first predefined threshold noted DS2a, and a mode of offloading the second core is then implemented.

[0070] In this offloading mode denoted MD2, the first part of the task, executed on the first core A1, comprises a base portion T10 followed by the tail portion T12, and followed by the head portion T21 which was normally executed on the second core but which is now executed on the first core. The first part of the task, in this offloading mode MD2, is denoted TK1-MD2.

[0071] In the illustrated example, the second core simply performs the basic portion T20 of the second task part. The second task part, in this MD2 load shedding mode, is denoted TK2-MD2.

[0072] Indeed, according to this optional configuration with a third core, the tail portion T23 is no longer executed on the second core A2, but instead it is executed on the third core A3.

[0073] The third task part, executed on the third core A3, thus comprises, in the MD2 mode, the tail portion T23 of the second task as defined in the nominal mode, the head portion T32, and the base portion T30. The third task part, in this MD2 offloading mode, is denoted TK3-MD2.

[0074] Of course, if the second latency delay DL2 becomes reasonable and nominal again, (in practice if it meets the criterion DL2 < DS2b, where DS2b is a second predefined threshold), then the load shedding mode is abandoned and we return to the nominal operating mode as illustrated by [Fig.2].

[0075] In the configuration illustrated by [Fig.4], the first latency delay DL1 has exceeded a third predefined threshold noted DS1a, and a load shedding mode of the first core noted MD1 is then implemented.

[0076] The tail portion T12 of the first part as defined in the nominal mode, is then executed on the second core A2 and deactivated on the first core AL

[0077] The operation of the second core A2 is modified by the addition at the beginning of the tail portion T12. The second part of the task, in this MD1 load shedding mode, is denoted TK2-MD1.

[0078] In the MD1 mode, the first core Al only performs the basic portion T10. The first part of the task, in this MD1 offloading mode, is noted TK1-MD1.

[0079] The operation of the third core A3 remains nominal here.

[0080] Of course, if the DL1 latency delay becomes reasonable and nominal again, (in practice if it meets the DL1 criterion <DSlb, où DSlb est un quatrième seuil prédéterminé), alors le mode de délestage MD1 est abandonné et on revient au mode de fonctionnement nominal tel qu’illustré par la [Fig.2].

[0081] In the configuration illustrated by [Fig.5], the third latency delay DL3 has exceeded a fifth predefined threshold noted DS3a, a mode of offloading the third core noted MD3 is implemented.

[0082] The head portion T32 of the third part as defined in the nominal mode, is then executed on the second core A2 and deactivated on the third core A3. The third part of the task, in this MD3 offloading mode, is denoted TK3-MD3.

[0083] The operation of the second core A2 is modified by the addition at the end of the head portion T32 of the third task. The second part of the task, in this MD3 load shedding mode, is denoted TK2-MD3.

[0084] The operation of the first core Al remains nominal here.

[0085] According to the same logic as previously, if the third latency delay DL3 becomes reasonable and nominal again, (in practice if it meets the DL3 criterion <DS3b, où DS3b est un sixième seuil prédéterminé), alors le mode de délestage MD3 est abandonné et on revient au mode de fonctionnement nominal tel qu’illustré par la [Fig.2],

[0086] Each task portion comprises a set of functions.

[0087] The first task part begins to be executed at time Tbl. The first task part is completed at time Tel. The second task part begins to be executed at time Tb2. The second task part is completed at time Te2. The third task part begins to be executed at time Tb3. The third task part is completed at time Te3.

[0088] Latency times are defined by: DL2 = Tb2-Tel DL1 = Tbl - LTK(i), the index i representing the call recurrence of the chained task TK, DL3 = Tb3 - Te2

[0089] The second latency delay DL2 can be calculated as an average over the last M executions of the chained task TK. The same applies to the first latency delay DL1 latency and the third DL3 latency. For example, we can choose M= 3.

[0090] The current value of the third latency delay DL3 is advantageously an average value calculated over the last M executions of the chained task TK.

[0091] It is understood from the mechanism as set out above that the load shedding mode of a core is often exclusive of the load shedding mode of its chain neighbors (previous and following). However, it is noted that cores A1 and A3 can be simultaneously unloaded on core A2. The possibilities of simultaneous unloading increase if the microcontroller comprises four or more cores.

[0092] We also note that in the case where two latency delays increase at the same time, we will favor the offloading of the core which presents the greatest latency delay. Thus, it is the core in the greatest difficulty which will be offloaded.

[0093] [Fig.6] shows in the form of a flowchart the logic for triggering the load shedding mode of the second core and the use of a tag, or flag, noted FMD2.

[0094] The box on the left represents the operation in the first core AL. At the beginning, the sequencer or the first core timestamps the system time and stores it in the variable LTK(i). Furthermore, the first core executes the basic portion T10 regardless. In the illustrated example of the offloading of the second core, the first core also executes the tail portion of the first task, namely the portion T12. The rest then depends on the value of the flag FMD2 which represents the offloading mode of the second core when it is set to the value 1.

[0095] In the nominal case where this flag FMD2 is at 0, the first core has completed its mission concerning the first part of task TK1. Otherwise, when FMD2 is at 1, then the first core Al also executes the head portion T21 of the second task.

[0096] At the end of the execution incumbent on the first core Al, the first core timestamps the system time and stores it in the variable Tel. At this point in the process, the results of the first part of the task are made available to the second core A2.

[0097] At the beginning of the process carried out by the second core A2, illustrated by the central block of [Fig.6], the second core timestamps the system time and stores it in the variable Tb2.

[0098] In the nominal case where the FMD2 flag is at 0, the second core executes the head portion T21 then the base portion T20 then the tail portion T23.

[0099] Otherwise, when FMD2 is 1, then the second core executes only the basic portion T20.

[0100] It is noted here that load shedding in the third core is an option which is implemented only when this third core is present in the configuration of the microcontroller.

[0101] At the end of the execution which is the responsibility of the second core A2, the results of the second part of the task is made available to the third core A3.

[0102] In the nominal case where the FMD2 flag is at 0, the third core executes the head portion T32 then the base portion T30.

[0103] Otherwise, when FMD2 is 1, then third core executes tail portion T23, then head portion T32, then base portion T30.

[0104] Finally, we calculate the current value of the latency delay DL2, by calculating DL2 = Tb2 - Tel, this calculation being used for the following execution of the task TK.

[0105] The presented logic diagram can be completed with the management of the FMD1 load shedding flag of the first core and optionally the FMD3 load shedding flag of the third core. The logics applied are then identical or similar, mutatis mutandis, to those explained in detail for the FMD2 Flag.

[0106] Advantageously, the sequencer only takes care of launching the task at the instants LTK(i). The rest of the process, in particular the activation of a load shedding mode or the return to nominal operation is carried out at a logical level of the computing cores thanks to the management of the flags FMD2, FMD1, and optionally FMD3.

[0107] Typical values ​​for the latency delays, in particular the first, second and third latency delays DL1, DL2 and DL3, are between 100 ps and 1 ms, more particularly between 300 ps and 700 ps. Typical values ​​for threshold values ​​DSa (first threshold value DS2a, respectively third threshold value DS1a, respectively fifth threshold value DS3a) are approximately 2 ms, for example between 1.8 ms and 2.2 ms. Typical values ​​for threshold values ​​DSb (second threshold value DS2b, respectively fourth threshold value DS1b, respectively sixth threshold value DS3b) are approximately 1.2 ms, for example between 1.0 ms and 1.4 ms.

[0108] Miscellaneous:

[0109] In the illustrated example, it is noted that the computing power of one of the cores A1, A2, A3 is less than a computing power of a single-core microcontroller of equivalent power, but the sum of the computing powers of the cores A1 A2 A3 is greater than the computing power of a single-core microcontroller of equivalent power.

[0110] It should be noted that the proposed method can be used not only on internal combustion engine vehicles but also on hybrid vehicles and 100% electric vehicles in the context of torque and speed control of electric motors.

Claims

Claims

1. Method implemented in a multi-core microcontroller (51) in a control unit (50) in a motor vehicle, the microcontroller comprising a first core (A1), a second core (A2) and possibly at least a third core (A3), the method comprising the following steps: a- defining a chained task (TK) executable in parts on at least the first and second cores (A1, A2), with a so-called nominal implementation of the chained task associated with a reference distribution of the parts on the different cores, and the chained task (TK) being executed recurrently, the first core (A1) requiring a first latency delay, DL1, to take charge of a first part (TK1) of the chained task, the second core (A2) requiring a second latency delay, DL2, to take charge of a second part (TK2) of the chained task, b2- estimating a current value of the second latency delay DL2,from one or more previous execution(s) of the chained task, c2- if the estimated current value of the second latency delay DL2 is greater than a first predetermined threshold value, DS2a, then activate a load shedding mode of the second core for which a head portion (T21) of the second part is executed on the first core (A1) and deactivated on the second core (A2), d2- if the estimated current value of the second latency delay DL2 is less than a second predetermined threshold value, DS2b, then return to the nominal implementation, with the head portion (T21) of the second part executed again on the second core (A2), and deactivated on the first core (A1).,

2. Method according to claim 1, the third core being present, wherein it is provided that: for the offload mode of the second core (A2), a tail portion (T23) of the second part is executed on the third core (A3) and deactivated on the second core (A2), and for the return to the nominal implementation, the tail portion (T23) is executed again on the second core (A2) and deactivated on the third core (A3).

3. Method according to one of claims 1 to 2, further comprising the following steps: bl- estimate a current value of the first latency delay DL1, from one or more previous execution(s) of the chained task, cl- if the estimated current value of the first latency delay DL1 is greater than a third predetermined threshold value, DS1a, then activate a first core offloading mode for which a tail portion (T12) of the first part is executed on the second core (A2) and deactivated on the first core (A1), dl- if the estimated current value of the first latency delay DL1 is less than a fourth predetermined threshold value, DS1b, then return to the nominal implementation, with the tail portion (T12) of the first part executed again on the first core (A1) and deactivated on the second core (A2).

4. Method according to one of claims 1 to 3, in which, the third core being present and the third core (A3) requiring a third latency delay, DL3, to support a third part (TK3) of the chained task, the method further comprises the following steps: b3- estimating a current value of the third latency delay DL3, from one or more previous execution(s) of the chained task, c3- if the estimated current value of the third latency delay DL3 is greater than a fifth predetermined threshold value, DS3a, then activating a load shedding mode of the third core for which a head portion (T32) of the third part is executed on the second core (A2) and deactivated on the third core (A3), d3- if the estimated current value of the third latency delay DL3 is less than a sixth predetermined threshold value, DS3b, then returning to the nominal implementation,with the head portion (T32) of the third part executed again on the third core (A3) and deactivated on the second core (A2).,

5. Method according to claim 3 or 4, wherein: the first predetermined threshold value DS2a is strictly greater than the second predetermined threshold value DS2b and / or the third predetermined threshold value DS1a is strictly greater than the fourth predetermined threshold value DS1b.

6. Method according to any one of claims 1 to 5, in which the current value of the second latency delay DL2 is an average value calculated over the last M executions of the chained task (TK).

7. Method according to any one of claims 1 to 6, in which the current value of the first latency delay DL1 is an average value calculated over the last M executions of the chained task (TK).

8. Method according to any one of claims 1 to 7, in which the chained task (TK) is executed in an asynchronous periodic manner, the period being dependent on the rotation speed of the engine (60) of the motor vehicle.

9. Method according to any one of claims 1 to 8, in which: - the first part (TK1) of the chained task comprises, in a nominal execution (TK1-n), a base portion (T10) followed by a tail portion (T12), - the second part (TK2) of the chained task comprises, in a nominal execution (TK2-n), a base portion (T20) preceded by a head portion (T21) and followed by a tail portion (T23), the base portions (T10, T20) being derived from a predefined division.

10. A method according to any one of claims 3 to 9, wherein the load shedding mode of the first core is exclusive of the load shedding mode of the second core.

11. A multi-core microcontroller (51) in a control unit (50) in a motor vehicle, the microcontroller being configured to implement the method according to any one of claims 1 to 10.

12. A control unit (50) comprising a multi-core microcontroller (51) according to claim 11.