Method for obtaining a target variable, method for determining a source variable, corresponding devices, execution units, system and computer programs

The method and device automate variable adaptation by using a shared memory and adaptation indicator to ensure adaptations occur only when necessary, addressing inefficiencies in existing methods and reducing workload and development effort.

FR3153169B1Active Publication Date: 2025-08-15VITESCO TECHNOLOGIES GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
FR2023009803
Authority / Receiving Office
FR · FR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-09-18
Publication Date
2025-08-15
Estimated Expiration
2043-09-18

AI Technical Summary

Technical Problem

Existing methods for adapting variables between software components with different formats are inefficient, leading to increased workload, high engineering effort, and reduced flexibility due to manual scheduling and unnecessary adaptations, especially when execution frequencies differ.

Method used

A method and device that automatically adapt variables by using a shared memory to store an adaptation indicator, triggering adaptation only when necessary, and integrating an adaptation function within consumer units to read and convert variables as needed, without manual scheduling.

Benefits of technology

Reduces CPU load, decreases development effort, and optimizes data flow by ensuring adaptations occur only when required, thus improving efficiency and flexibility in variable adaptation across software components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000025_0000
    Figure 00000025_0000
  • Figure 00000025_0001
    Figure 00000025_0001
  • Figure 00000026_0000
    Figure 00000026_0000
Patent Text Reader

Abstract

The invention relates to a method for obtaining a target variable, comprising data, coded in a target format, intended to be used by at least one software execution unit, called a consumer unit, said consumer unit belonging to at least one software component of a computer system comprising at least one processor capable of executing at least said consumer unit, said method comprising: - reading in a memory of the computer system an adaptation indicator of a source variable, produced by a software execution unit, called a producer unit, said consumer unit belonging to at least one other software component of said computer system, said source variable comprising said data, coded in a source format, distinct from the target format, said memory being shared between said at least one consumer unit and said producer unit, - when the adaptation indicator is set to a first value,indicating that an adaptation of the source variable into the target variable is required, the adaptation of the source variable into the target variable, and- reading the target variable into the memory of the computer system, otherwise. Figure for abstract: FIG. 7.,
Need to check novelty before this filing date? Find Prior Art

Description

Title of the invention: Method for obtaining a target variable, method for determining a source variable, corresponding devices, execution units, system and computer programs Technical field

[0001] The invention relates to the technical field of computer systems comprising several software components which exchange data between them.

[0002] The invention relates in particular to the compatibility between a variable produced by a software unit of a first software component and an input variable used by a software unit of another software component. State of the prior art

[0003] In a manner known per se, two software components of the same computer system are required to exchange data via a communication interface. This communication can be done in software form via a variable which is written by one or more software components, called producers of the variable, and read by one or more other software components, called consumers of this variable.

[0004] In computing, a variable is a container that stores a value or data that can be modified throughout the execution of a computer program. It is used to store temporary or permanent data that will be used in calculations or operations. In programming, a variable is defined by three components: its name, its type and its value. The name is a unique identifier that allows the variable to be referenced, the type defines the nature and format (for example 8, 16, 32, 64 bits with a fixed number of bits after the decimal point or floating point) of the data stored in the variable (for example an integer, a character string, a boolean, etc.) and the value is the data actually stored in the variable.

[0005] A disadvantage is that the variables produced by the producer components and those consumed by the consumer components are not all defined in the same way. In other words, even if they represent the same information, for example, they can have: - different names, for example VB and Vbat to designate the voltage of a battery, - different units of measurement, for example V and mV, - different types and implementation choices. For example, a voltage can be defined as an unsigned 8-bit character (its software value varies between 0 and 255) or as an unsigned integer coded on 16 bits (its software value varies between 0 and 32767).

[0006] In the following, we will talk about variable format.

[0007] It is therefore necessary to provide, when integrating two software components using variables of different formats to code the same data into the same computer program, an adaptation allowing the transition from one to the other. Generally, this adaptation is implemented between the producer component and the consumer component.

[0008] More precisely, a software execution unit implementing the adaptation in question is generally developed separately from the producer and consumer components, then statically integrated into a scheduled sequence of execution of the different components.

[0009] To ensure a consistent data flow, the scheduling of the ADP execution unit performing the adaptation function must meet the following conditions: - be called after a first software execution unit which produces the data (for example the voltage value of a battery) and writes it into a first variable, called source, DA1 =VB according to a first variable format; and - be called before a second software execution unit which reads the data in a second Vbat variable, called target, according to a second variable format.

[0010] In relation to [Fig. 1], we present by way of example a first software component CM1 comprising an execution unit implementing a function F1 configured to produce the variable VB, a second software component CM2 comprising an execution unit implementing a function F2 configured to use the variable Vbat and a third software component, called adaptation, CMP ADP, comprising an execution unit implementing an ADP function for adapting the variable VB into the variable Vbat.

[0011] These conditions are easy to satisfy when the first and second execution units F1 and F2 are programmed in the same and unique time sequence, for example a single and unique software task executed by a processor at a given execution frequency. Indeed, as illustrated by [Fig.2], the execution sequence first comprises the execution unit F1 which produces the variable VB and stores it in memory, then the adaptation function ADP is called to carry out the adaptation of the variable VB and produce the variable Vbat, then finally it is the function F2 which executes and uses the variable Vbat which is available. Because all the functions execute at the same frequency, the scheduling F1 - ADP - F2 is respected so that the sequence can be repeated as many times as necessary.

[0012] On the other hand, when the execution units F1 and F2 are not scheduled in the same time sequence, for example, they belong to two distinct software tasks running at different execution frequencies, the optimal scheduling of the adaptation function execution unit with respect to Fl and F2 can become complex to establish: - calling the ADP adaptation function after Fl is not necessary if Fl is executed again before F2 is launched (the VB variable is rewritten), - calling the ADP adaptation function before the execution of F2 is not necessary if the VB variable has already been adapted in Vbat (for example because F2 has already been called since the last execution of Fl).

[0013] In the example of [Fig. 3], we consider two distinct time sequences SQ1 and SQ2 which are executed in parallel (PRL). The first sequence SQ1 has a schedule according to which an execution of the unit F1 is followed by an execution of the adaptation function ADP. It is noted that the execution frequency of F1 is not constant. Indeed, a longer time period elapses between the second and third call of F1 than between the first and the second. The second sequence SQ2 has a schedule according to which an execution of the function F2 alternates with a call of the function ADP. More precisely, it is the sequence SQ1 which begins with the execution of the unit F1, followed by an execution of the function ADP, itself followed by a new execution of the function F1 and the function ADP.We note that the first call of the ADP function was useless, since the value coded in the variable VB was modified by the second execution of Fl before an execution of F2 was even triggered. After the second execution of ADP, it is the second sequence which is executed with the launch of F2, then of the ADP function, then of F2 again. We note that the second execution of ADP by the sequence SQ1 was useful, but that this is not the case for the one triggered in the sequence SQ2. Indeed, the ADP function is launched there while there has been no production of a new value of the variable VB by FL. This ordering is therefore not optimal.

[0014] To facilitate the process of programming and scheduling the executions of the different functions of production, adaptation and use of a variable, which is manual, one can decide to implement one or other of the following strategies: - the execution of the adaptation function is programmed before that of the consumption function of the Vbat variable, or - the execution of the adaptation function is programmed after that of the production function of the VB variable.

[0015] Even if it is not optimal, this approach guarantees that the adapted variable Vbat is always up to date.

[0016] We now consider in relation to [Fig.4] a more complex use case according to which three variables DA1, DA2 and DA3 are produced by an internal software component INT_CMP comprising three distinct software tasks TSK1, TSK2, TSK3 executing at three distinct execution frequencies, for example equal to 1000ms, 1ms and 100ms respectively, on three distinct processors. These variables must be adapted by an execution unit ADP_IN before being consumed by an external or third-party software component EXT_CMP, integrated in the software task TSK2 at the frequency 1ms. In the example of [Fig.4], the three variables datai, data2, data3 are adapted by the ADP_IN function every 1ms while some of them (datai every 1000ms and data 3 every 100ms) are produced and therefore updated at a slower rate.

[0017] The variable DA4 is produced by the third-party software component EXT_CMP. It must be adapted by an adaptation function ADP_OUT, so that it can be consumed by execution units of the internal software component INT_CMP (in the software tasks TSK1 and TSK4).

[0018] The adaptation is performed every 1ms while there is no consuming execution unit operating at this rate (TSK1 operates at 1000ms and TSK3 at 100ms).

[0019] This example illustrates well the fact that: - some variables are adapted on the side of the consuming execution unit. This is the case of the DA1-DA3 input variables of third-party execution units of the third-party software component EXT_CMP, - some other variables are adapted on the side of the producer execution unit. This is the case for the DA4 output variables of the third-party software component EXT_CMP, because the consuming execution units are scheduled immediately after the adaptation.

[0020] This strategy is the most used because it has the advantage of only requiring the development of two adaptation execution units, a unit for adapting the variables produced by the INT_CMP component and consumed by the third-party software component and the DA4 variables produced by the third-party EXT_CMP component and consumed by the internal INT_CMP component.

[0021] The adaptation is thus carried out around the third-party software component to isolate it from the internal component.

[0022] This solution, however, has the following drawbacks: - First, while the adaptation code can be generated automatically, it is still necessary to manually check the data flow, schedule the execution of any new adaptation functions, and update the scheduling of existing adaptation execution units if necessary, - secondly, it does not guarantee that the adaptation is always carried out at the optimal frequency.

[0023] Indeed, in relation to [Fig.5a], we consider an example of adaptation implemented on the side of the software component producing a variable. According to this example, a software execution unit RI produces a variable DA1 every 1 ms on a first processor A1 at the execution frequency of 1 ms. A software execution unit R2 executes on a processor A2 at the frequency of 100 ms and consumes a variable DA2 every 100 ms. A software execution unit ADP is programmed to execute after each execution of RI on the processor A1. It takes the variable DA1 as input and produces the adapted variable DA2 as output.

[0024] It is understood that if a production frequency of DA1 is higher than a consumption frequency of DA2, then adaptations of DA1 by ADP are unnecessarily implemented. For example, if the production of DA1 is carried out every 10 ms and the consumption of DA2 every 100 ms, then 9 adaptations out of 10 are useless, because they are carried out on an unchanged value of the variable DA1 since the previous execution of ADP.

[0025] In relation to [Fig.5b], we now consider an example of adaptation implemented on the side of the software component consuming a variable DA2. The execution unit RI executes on a processor A1 and produces the variable DA1 every 100 ms. The execution unit R2 executes on the processor A2 and consumes the variable DA2 every 1 ms. An execution unit R3 executes on a processor A3 and consumes the variable DA2 every 10 ms. An execution unit ADP is programmed to execute before R2 and R3 respectively on the processors A2 and A3 and produce the adapted variable DA2 from the variable DA1.

[0026] It is understood that if a consumption frequency of DA2 is greater than a production frequency of the variable DA1, then adaptations of the variable DA1 are carried out unnecessarily. For example, if the production of DA1 by RI is carried out every 100 ms and the consumption of DA2 is carried out respectively every 1 ms and 10 ms by R2 and R3, then 109 adaptations out of 110 are useless, because they are carried out on an unchanged value of the variable DA1 since the previous execution of ADP.

[0027] In view of the above, current solutions are not optimal. In particular, they lead to: - increased workload of the computer system due to unnecessary executions of the adaptation unit, - a high engineering effort, and - reduced flexibility to program adaptations optimally.

[0028] The high engineering effort is explained by: - the need to develop, integrate and maintain adaptation software units and manually program the scheduling of the execution of these adaptation software units in the production and consumption sequences of the variables by the various software components, - the grouping of variables to be adapted and the corresponding adaptation units by software tasks, according to the frequencies of production and consumption of these variables by other units / components, - this manual integration work is prone to errors, which leads to data flow problems between the producing software component and the consuming software component.

[0029] The reduced flexibility is due in particular to: - the use of independent execution software units to perform adaptation functions, - to monolithic producer and / or consumer software components, particularly when it comes to third-party software, which do not allow the execution of an adaptation unit to be inserted between two executions of software units of these components. There is therefore a need for a solution that does not have such drawbacks.

[0030] The present invention improves the situation. Summary of the invention

[0031] To this end, it proposes a method for obtaining a target variable, comprising data, coded in a target format, intended to be used by at least one software execution unit, called a consumer unit, said consumer unit belonging to at least one software component of a computer system comprising at least one processor capable of executing at least said consumer unit. Said method comprises: - reading in a memory of the computer system an indicator of adaptation of a source variable, produced by a software execution unit, called producer unit, said consumer unit belonging to at least one other software component of said computer system, said source variable comprising said data, coded in a source format, distinct from the target format, said memory being shared between said at least one consumer unit and said producer unit, - when the adaptation indicator is set to a first value, indicating that an adaptation of the source variable into the target variable is required, the adaptation of the source variable into the target variable, and - reading the target variable in the memory of the computer system, otherwise.

[0032] With the invention, the adaptation of the source variable is implemented by the software execution unit consuming a target variable which codes the same data, for example the same physical measurement, as the source variable, but according to another format.

[0033] Furthermore, this adaptation is not triggered by the software execution unit consumer only when necessary, depending on the value of a source variable adaptation indicator. This indicator is configured to take a first value indicating that an adaptation of the source variable to the target variable is required and a second value indicating the opposite.

[0034] On the contrary, when the adaptation indicator indicates that it is not necessary to adapt the source variable (because it has already been adapted since the last update), the value of the target variable stored in memory is simply read in order to be made available to the consuming unit.

[0035] Thus, the invention proposes a simple and effective solution which makes it possible to automatically trigger the adaptation of a variable when necessary and only in this case, without having to manually program a schedule of the different executions of the production and consumption units, nor to take into account the execution frequencies of each of them. This solution is based on the integration within the consumer units of a new adaptation function of the source variable and on the use of a memory shared between the producer and consumer units. This shared memory stores at least the adaptation indicator and the target variable.

[0036] The invention thus contributes to reducing the CPU load linked to the implementation of the adaptation of the variables produced by producer units and intended to be consumed by consumer entities. It also makes it possible to reduce the development effort linked to the definition and implementation of the software execution units of the adaptation functions according to the prior art. It also makes it possible to optimize the dynamic behavior of the adaptation function, in particular by accelerating the propagation of the data flows (the target variable is only adapted when necessary).

[0037] According to another aspect, the adaptation of the source variable into the target variable comprises: - reading in said memory, of the source variable, comprising a code of said data, in a source format, - determining a data code in the target format from the data code in the source format extracted from the source variable, and - setting the adaptation indicator to a second value, distinct from the first value, indicating that an adaptation of the source variable to the target variable is not required and - the provision of the adapted target variable and the updated adaptation indicator in the memory.

[0038] In order to prevent the adaptation of the source variable from being triggered by another consuming unit after it, the value of the adaptation indicator is updated and stored in memory. The adapted target variable is stored in memory and therefore made available to other consuming units.

[0039] According to yet another aspect, the method is implemented, following the reading by the consumer unit, of a label inserted into computer code instructions of said consumer unit, said label associating computer code instructions for the execution of said method.

[0040] According to a non-limiting exemplary embodiment, the obtaining method according to the invention is implemented in the form of a macro. This macro therefore carries out the steps of the method according to the invention. It may be included in a software component of the computer system other than that of the consuming software execution unit. For example, it is a so-called adaptation software component which groups together all the adaptation functions necessary for the execution of the software components of a given computer program of the computer system.

[0041] According to a non-limiting exemplary embodiment, the macro function that implements the method for obtaining the target variable according to the invention is associated with a label already used by the source code of the consuming unit to access the data of the target variable that it needs. The reading of the source variable and the writing of the target variable are thus carried out in this associated macro function, which can itself be defined outside the source computer code. In this way, the implementation of the invention does not involve modification of the source code. This is particularly advantageous when the consuming unit is part of a third-party software component, of which only the object code is available.

[0042] The invention also relates to a device for obtaining a target variable, comprising data, coded in a target format, intended to be used by at least one software execution unit, called a consumer unit, said consumer unit belonging to at least one software component of a computer system comprising at least one processor capable of executing said consumer unit. Said device is configured to implement: - reading in a memory of the computer system an indicator of adaptation of a source variable, produced by a software execution unit, called producer unit, said consumer unit belonging to at least one other software component of said computer system, said source variable comprising said data, coded in a source format, distinct from the target format, said memory being shared between said at least one consumer entity and said producer unit, - when the adaptation indicator is set to a first value, indicating that an adaptation of the source variable into the target variable is required, the adaptation of the source variable into the target variable, and - reading the target variable from the computer system memory, otherwise.

[0043] Advantageously, such a device implements the aforementioned method, in its various embodiments.

[0044] According to a non-limiting exemplary embodiment, the aforementioned device is integrated into a software execution unit, called a consuming unit of a target variable, included in a software component of a computer system.

[0045] According to another non-limiting exemplary embodiment, the aforementioned device is implemented in a software execution unit included in a software component of the computer system dedicated to the adaptation of variables. It is distinct from the software component of the production unit.

[0046] According to a non-limiting exemplary embodiment, the implementation of the aforementioned device is triggered by the reading of a label in computer code instructions of said software execution unit, said label being associated with computer code instructions for the execution of said device.

[0047] Correlatively, the invention also relates to a method for determining a source variable, comprising data, coded in a source format, said method being intended to be implemented by a software execution unit, called a producer unit, configured to produce the source variable, said producer unit being included in a software component of an information system comprising at least one processor capable of executing said producer unit. Said method comprises: - obtaining said data, from a memory of the producer unit, - coding said data, a code of said data in a source format being obtained and inserting said code into said source variable, - the positioning of an adaptation indicator of the source variable to a first value indicating that an update is required, and - storing said source variable and the adaptation indicator in a memory of said computer system, said memory being shared with at least one other execution software unit, called a consumer unit, included in another software component of the information system, and configured to use a target variable comprising a code of said data in a target format, distinct from said source format.

[0048] With the invention, a software execution unit which produces a target variable intended to be used (or consumed) by one or more other execution units of another software component of the computer system, makes it available to them in a shared memory space and associates with it an update indicator, which provides information on the need for an execution unit of the other software component to update it or not.

[0049] Advantageously, such a device implements the aforementioned determination method, in its various embodiments.

[0050] According to a non-limiting exemplary embodiment, the aforementioned device is integrated into a software execution unit, called a unit producing a source variable, included in a software component of a computer system.

[0051] According to another non-limiting exemplary embodiment, the aforementioned device is implemented in a software execution unit included in a software component of the computer system, dedicated to the adaptation of variables and distinct from that of the producing software execution unit.

[0052] According to a non-limiting exemplary embodiment, the implementation of the aforementioned device is triggered by the reading of a label in computer code instructions of said software execution unit, said label being associated with computer code instructions for the execution of said device.

[0053] According to a non-limiting exemplary embodiment, the aforementioned devices for determining a source variable and obtaining a target variable are integrated into a computer system comprising at least one processor and a memory, said memory being configured to store at least a first and a second software component intended to be executed by said at least one processor, the first software component comprising a software execution unit, called a producer, configured to produce the source variable, the second software component comprising a software execution unit, called a consumer, configured to use the target variable.

[0054] The aforementioned system, producing unit, consuming unit and devices have the same advantages as the aforementioned obtaining and determining methods.

[0055] The invention also relates to computer program products comprising instructions for executing the aforementioned obtaining and determining methods.

[0056] The invention finally relates to a recording medium readable by a computer on which the aforementioned computer programs are recorded.

[0057] Of course, the embodiments which have just been presented can be combined with each other. Brief description of the drawings

[0058] Other characteristics and advantages will appear during the reading of the detailed description which follows for the understanding of which one will refer to the attached drawings among which:

[0059] [Fig-1] already described, schematically illustrates an example of implementation of an adaptation of a source variable into a target variable by a dedicated software component according to the prior art;

[0060] [Fig.2] already described, schematically illustrates an example of a software task executing a time sequence of producing a source variable, adapting the source variable into a target variable and consuming the target variable according to the prior art;

[0061] [Fig.3] already described, schematically illustrates an example of two software tasks running in parallel, one comprising the production of the source variable, the other comprising the consumption of the target variable and the adaptation of the source variable into the target variable being implemented in the two software tasks, according to the prior art;

[0062] [Fig.4] already described, schematically illustrates a first example of scheduling the production of several source variables by distinct software execution units of a software component, distributed over several software tasks executing at distinct time frequencies, their adaptation into target variables, and the consumption of the target variables by a third-party component, according to the prior art;

[0063] [Fig.5a] already described, schematically illustrates a second example of scheduling software units for producing a source variable, adapting the source variable into a target variable and consuming the target variable, when they are executed in distinct software tasks at distinct time frequencies according to the prior art;

[0064] [Fig.5b] already described, schematically illustrates a third, more complex example of scheduling software units for producing a source variable, adapting the source variable into a target variable and consuming the target variable, when they are executed on distinct software tasks at distinct time frequencies according to the prior art;

[0065] [Fig.6] schematically illustrates an example of a computer system comprising a device for obtaining a target variable and a device for determining a source variable according to a particular non-limiting example embodiment of the invention;

[0066] [Fig.7] presents in the form of a flowchart the steps of a method for obtaining a target variable according to a particular non-limiting exemplary embodiment of the invention;

[0067] [Fig.8] details the adaptation of a source variable into a target variable according to a particular non-limiting exemplary embodiment of the invention;

[0068] [Fig.9] presents in the form of a flowchart the steps of a method for determining a source variable according to a particular non-limiting exemplary embodiment of the invention; and

[0069] [Fig. 10] presents an example of hardware structure of a device for obtaining a target variable and of a device for determining a source variable according to a particular non-limiting example embodiment of the invention. Description of the embodiments

[0070] In the following description, identical, similar or analogous elements will be designated by the same reference numerals. Unless otherwise indicated, the diagrams are not necessarily to scale.

[0071] The block diagrams, flowcharts and message sequence diagrams in the figures illustrate the architecture, functionalities and operation of systems, devices, methods and computer program products according to one or more exemplary embodiments. Each block of a block diagram or each phase of a flowchart may represent a module or a portion of software code comprising instructions for implementing one or more functions. According to certain implementations, the order of the blocks or phases may be changed, or the corresponding functions may be implemented in parallel. The process blocks or phases may be implemented using circuits, software or a combination of circuits and software, in a centralized manner, or in a distributed manner, for all or part of the blocks or phases.The systems, devices, methods and methods described may be modified, added to and / or deleted while remaining within the scope of this description. For example, the components of a device or system may be integrated or separated. Also, the described functions may be implemented using more or fewer components or phases, or with other components or through other phases. Any suitable data processing system may be used for the implementation. A suitable data processing system or device includes, for example, a combination of software code and circuitry, such as a processor, controller or other circuitry suitable for executing the software code. When the software code is executed, the processor or controller causes the system or device to implement some or all of the functionalities of the blocks and / or phases of the methods or methods according to the exemplary embodiments.Software code may be stored in memory or a readable medium accessible directly or through another module by the processor or controller.

[0072] In relation to [Fig.6], there is presented, as an illustrative example, a system in computer system S, also called a calculator, in which the invention is located. The system S may or may not be embedded, for example in a vehicle. It has the hardware structure of a computer. It includes in particular hardware components including one or more processors PROC1, PROC2, a non-volatile memory MNV in which one or more application software programs are stored, such as the program Pg, a random access memory MEM and one or more communication interfaces IC. It also includes an operating system (not shown) capable of managing the use of the hardware and software resources of the calculator S by the application software program(s) Pg. Such a software program Pg comprises one or more software components CMP1, CMP2 and CMP3 which exchange data stored in a shared memory, for example the aforementioned RAM MEM. A software component CMP1, CMP2, CMP3 comprises one or more software execution units UP1, UC2, UC3. An execution unit is configured to process input data and produce output data, at a given frequency, defined by a system event cyclically clocked on a time basis (for example 1 ms, 5 ms, 10 ms, 100 ms, ...) or to respond to an external event, for example the reception of a signal from an actuator (not shown).

[0073] For example, the application software program Pg is an engine control program for a vehicle.Shared data are variables that encode measurements of physical quantities collected by sensors placed at different points in the vehicle. For example, the physical quantity measured is the voltage of a battery. Since the software components are not all necessarily designed by the same company, the variables they use as input and produce as output are not all compatible with each other, in the sense that their data are not all encoded in the same format. For example, the component CMP1 produces a variable DA1 = VB that represents a voltage measurement of a battery, for example obtained from one or more sensors placed in the vehicle's engine, and the software component CMP2 consumes a variable DA2 = Vbat that represents this voltage measurement in another format. It is assumed that the software component CMP3 also consumes the target variable DA2.

[0074] The application software program Pg also uses a scheduler, not shown, configured to schedule the execution of the software execution units of its software components CMP1, CMP2, CMP3 by the hardware and software resources made available to it by the computer S, taking into account the execution frequencies of their execution units. To do this, it defines one or more software tasks, each being associated with a given execution frequency and constituting an integration container for the execution unit(s) of its components that must execute at the given frequency. In a manner known per se, a software task is generally associated with a given priority relative to other software tasks, which allows it to be preempted if necessary in favor of another higher priority software task.

[0075] The invention falls within the context of such a computer system and proposes a mechanism for adapting a source variable produced by a software unit executing one of the software components of the application software program Pg, for example the source variable DA1 produced by the producer unit UP1 of the component software CMP1, into a target variable DA2 intended to be consumed by an execution software unit, for example the consuming unit UC2, UC3 of the software component CMP2, CMP3, which is integrated into the access functions to this target variable.

[0076] In the example of [Fig.l], the consumer unit UC2 comprises a device 200 for obtaining a target variable according to one or more embodiments of the invention.Such a device is configured to read from a memory of the computer system, for example the memory MEM, an adaptation indicator of a source variable, produced by a software execution unit, called the producer unit, said consumer unit belonging to at least one other software component of said computer system, for example the producer unit UP1 of the component CMP1, said source variable comprising said data, coded in a source format, distinct from the target format, said memory being shared between said at least one consumer unit and said producer unit, when the adaptation indicator is set to a first value, indicating that an adaptation of the source variable into the target variable is required, adapt the source variable into the target variable, and read the target variable in the memory MEM, otherwise. The device 200 therefore implements the method for obtaining a target variable which will be described further in relation to [Fig.7].Likewise, the consuming unit UC3 comprises the device 200 for obtaining the target variable DA2, also implementing the method for obtaining a target variable according to the invention.

[0077] In the example of [Fig. 6] the producer unit UP1 of the software component CMP1 comprises a device 100 for determining a source variable configured to obtain data from a memory of the producer unit, code said data in a source format and insert the code obtained into a source variable, position an adaptation indicator of the source variable to a first value indicating that an update is required, and store said source variable and the adaptation indicator in a memory of said computer system, for example the memory MEM, said memory being shared with at least one other execution software unit, called a consumer unit, included in another software component of the information system, for example UC2 of the software component CMP2 and UC3 of the software component CMP3, and configured to use a target variable comprising a code of said data in a target format, distinct from said source format.The device 100 implements a method for determining a source variable which will be described further in relation to [Fig.8].

[0078] A method for obtaining a target variable DA2 according to an exemplary embodiment of the invention is now described in relation to [Fig. 7]. It is for example implemented by the aforementioned device 200. This device 200 may or may not be integrated into the consuming unit UC2 of the target variable DA2 in question. If it is outside the consuming unit UC2, then it is called by this consuming unit UCE when it executes.

[0079] At 70, an indicator FLG for adapting the source variable is obtained. For example, it is read from a memory location of the memory MEM of the computer system S, which is shared between the different software components CMP1, CMP2, CMP3 of this system. According to one or more exemplary embodiments, the indicator FLG is configured to take a value from among a first and a second value VL1, VL2:

[0080] - the first value VL1, for example equal to 1, indicates that an adaptation of the source variable DA1 is required,

[0081] - the second value VL2 for example equal to 0, indicates that an adaptation of the source variable DA1 is not required.

[0082] At 71, the value of the indicator is tested. If it corresponds to the first value VL1, the adaptation of the source variable is triggered at 72. It produces an adapted target variable DA2. Otherwise, the target variable DA2 is obtained at 73. For example, it is read from a memory location of the memory MEM. The adapted target variable DA2, respectively read, constitutes the output value or result produced by the determination method.

[0083] We will now detail in relation to [Fig.8], an example of implementation of the adaptation of the source variable DA1 into the target variable DA2 according to one embodiment.

[0084] At 721, the source variable DA1 is obtained. For example, it is read from a memory location of the shared memory MEM. It includes a data item CD1, for example a voltage measurement, coded according to a first format. If we take the example described above, the unit used is V and the data item is coded on 8 bits as an unsigned integer of character type. The target variable DA2 uses mV as the unit and codes the voltage measurement, according to a second format (CD2) in the form of an unsigned integer on 16 bits.

[0085] At 722, a corresponding CD2 encoded data value in the second format is determined from the CD1 code extracted from the source variable. For example, the format conversion is performed as follows: CD2 = (uintl6)(CDl*RES +K); where RES is a predefined resolution change factor and K is a constant, to go from the first format to the second format. For example, RES is 229 and K is zero.

[0086] At 723, the adaptation indicator FLG is positioned at the second value VL2, instead of the first value VL1, to indicate that an adaptation is no longer required.

[0087] In 724, the adapted variable DA2 and the updated adaptation indicator FLG are stored in their respective memory locations in the shared memory MEM.

[0088] In this way, the adaptation of the source variable DA2 is implemented within the consuming unit UC2, when it needs to access it. Furthermore, the adaptation itself is conditioned by the value of the adaptation indicator FLG. Thus, if another consuming unit of the same target variable DA2, for example UC3, needs to access the target variable DA2 before the consuming unit UC2, it is the consuming unit that will carry out the adaptation of the source variable, according to the value of the indicator FLG stored in memory MEM.

[0089] Finally, no scheduling of the execution of the adaptation function is necessary, since it is integrated into or called from the function for accessing the target variable of the consuming unit UC2.

[0090] According to one or more embodiments of the invention, the method which has just been described is implemented, following the reading by the consuming unit, of a label inserted into computer code instructions of said consuming unit, said label associating computer code instructions for the execution of said method. For example, the method for obtaining a target variable is implemented in the form of a macro function.

[0091] An example of a “GET” macro function is written as follows: GET_ macro<nom de la donnée> : - checks if the FLG indicator is at the first VL1 value - - if the indicator is at the first value VL1, calls the adaptation function "func_adapt_Vbat" - For example, for the target variable DA2 = Vbaf. #define GET_Vbat() (if (FLG == 1) ? func_adapt_Vbat() : Vbat) The adaptation function is defined as follows: - calculates the data encoded in the second format from the data encoded in the first format - - sets the FLG indicator to the second VL2 value - - returns the Value of the adapted DA2 variable.

[0092] For example, the adaptation function is written as follows: (uint32) func_adapt_Vbat() { Vbat = (uintl6)VB*229; FLG = 0; return (Vbat);} }

[0093] It is understood that in this case, the device 200 is not necessarily integrated into the consumer unit UC2.

[0094] The method for obtaining a target variable which has just been presented can be used to adapt the same source variable DA1 or another source variable into another target variable than the variable DA2. In this case, the adaptation function will be different and another adaptation indicator will be used. It is understood that the memory MEM will include as many distinct indicators as there are distinct pairs (source variable, target variable) used within the computer program Pg.

[0095] An example of implementation of a method for determining a source variable according to one or more embodiments of the invention is now described in relation to [Fig. 9]. For example, it is implemented by the device 100 of the producer unit UP1.

[0096] At 90, a data item D, for example a voltage measurement of a battery, produced by the producing unit UP1 is obtained. For example, it is stored in a memory of the producing unit UP1.

[0097] In 91, it is coded in the first format and inserted into the source variable DA1.

[0098] At 92, the indicator for adapting the source variable to the target variable DA2 is set to the first value VL1 to indicate that an adaptation is required, since a new value of the data is available.

[0099] At 93, the updated values ​​of the source variable DA1 and the indicator FLG are stored in the memory MEM.

[0100] According to one embodiment, the method for determining a source variable which has just been described is implemented by the device 100 which is integrated into the producer unit UP1.

[0101] According to another embodiment, the determination method is implemented by the producer unit UP1 of the source variable, upon reading a label inserted into computer code instructions, said label associating computer code instructions for the execution of said method.

[0102] For example, this label corresponds to a macro function which may or may not be integrated into the producing unit UP1.

[0103] As an example, a macro function associated with a label “SET_DA1” is written as follows: #define SET_DA1 (value) { DAl=(value); FLG=1;}

[0104] The present description thus relates to a software or computer program, capable of being executed by a host device (for example, the device 100, 200) by means of one or more data processors, this software / program comprising instructions to cause the execution by this host device of all or part of the steps of one or more methods described in this document. These instructions are intended to be stored in a memory of the host device, loaded and then executed by one or more processors of this host device so as to cause the execution by this host device of the process.

[0105] This software / program may be coded using any programming language, and be in the form of source code, object code, or intermediate code between source code and object code, such as in a partially compiled form, or in any other desirable form.

[0106] The host device may be implemented by one or more physically distinct machines. The host device may generally have the architecture of a computer, including components of such architecture: data memory(s), processor(s), communication bus, hardware interface(s) for connecting this host device to a network or other equipment, user interface(s), etc.

[0107] In one embodiment, all or part of the steps of the programming method or of another method described in this document are implemented by a programming device provided with means for implementing these steps of this method.

[0108] These means may comprise software means (for example, instructions of one or more components of a program) and / or hardware means (for example, data memory(ies), processor(s), communication bus, hardware interface(s), etc.).

[0109] These means may comprise, for example, one or more circuits configured to execute one or more or all of the steps of one of the methods described herein. These means may comprise, for example, at least one processor and at least one memory comprising program instructions configured to, when executed by the processor, cause the device to execute one or more or all of the steps of one of the methods described herein.

[0110] [Fig. 10] illustrates an example of hardware structure of a device 100 for obtaining a target variable, respectively of a device 200 for determining a source variable according to the invention. In this example, the device 100, 200 is configured to implement all the steps of the method for obtaining, respectively determining, described in the present document. Alternatively, it could also implement only part of these steps.

[0111] In relation to [Fig. 10], the device 100, 200 comprises at least one processor 110, 210 and at least one memory 120, 220. The device 100, 200 may also include one or more communication interfaces. In this example, the device 100, 200 includes network interfaces 130 (e.g., network interfaces for accessing a wired / wireless network, including an Ethernet interface, a WIFI interface, etc.) connected to the processor 110, 210 and configured to communicate via one or more wired / wireless communication links and user interfaces 140, 240 (e.g., a keyboard, a mouse, a display screen, etc.) connected to the processor. The device 100, 200 may also include a or more media readers 150 for reading a computer-readable storage medium (e.g., a digital storage disk (CD-ROM, DVD, Blue Ray, etc.), a USB flash drive, etc.). The processor 110, 210 is connected to each of the other aforementioned components in order to control the operation thereof.

[0112] The memory 120, 220 may include random access memory (RAM), cache memory, non-volatile memory, backup memory (e.g., programmable or flash memories), read only memory (ROM), a hard disk drive (HDD), a solid state drive (SSD), or any combination thereof. The ROM of the memory 120, 220 may be configured to store, among other things, an operating system of the device 100, 200 and / or one or more computer program codes of one or more software applications. The RAM of the memory 120, 220 may be used by the processor 110 for temporary storage of data.

[0113] The processor 110, 220 may be configured to store, read, load, execute and / or otherwise process instructions stored in a computer-readable storage medium and / or in the memory 120, 220 such that, when the instructions are executed by the processor, the device 100, 200 executes one or more or all of the steps of the method of obtaining, respectively determining, described in this document. Means implementing a function or a set of functions may correspond in this document to a software component, a hardware component or a combination of hardware and / or software components, capable of implementing the function or the set of functions, according to what is described below for the means concerned.

[0114] The present description also relates to an information medium readable by a data processor, and comprising instructions of a program as mentioned above.

[0115] The information carrier may be any hardware means, entity or apparatus, capable of storing the instructions of a program as mentioned above. Usable program storage media include ROM or RAM memories, magnetic storage media such as magnetic disks and magnetic tapes, hard disks or optically readable digital data storage media, or any combination of these media.

[0116] In some cases, the computer-readable storage medium is not transient. In other cases, the information medium may be a transient medium (e.g., a carrier wave) for the transmission of a signal (electromagnetic, electrical, radio, or optical signal) carrying the program instructions. This signal may be conveyed via a suitable transmission means, wired or wireless: electrical or optical cable, radio or infrared link, or by other means.

[0117] An embodiment also relates to a computer program product comprising a computer-readable storage medium having program instructions stored thereon, the program instructions being configured to cause the host device (e.g., a computer) to perform some or all of the steps of one or more methods described herein when the program instructions are executed by one or more processors and / or one or more programmable hardware components of the host device.

[0118] The invention which has just been presented is not limited to the particular example of a computer system embedded in a vehicle which has just been presented and it applies to other embedded systems, for example in the field of aeronautics, railways, or transport in general.

[0119] The invention which has just been presented has numerous advantages. It makes it possible to guarantee that the adaptation of a source variable into a target variable is carried out when necessary and only in this case, without having to implement manual scheduling of this adaptation in relation to the execution of the different producing and consuming units of these variables.

Claims

Claims

1. Method for obtaining a target variable, comprising data, coded in a target format, intended to be used by at least one software execution unit, called a consumer unit, said consumer unit belonging to at least one software component of a computer system comprising at least one processor capable of executing at least said consumer unit, said method comprising: - reading in a memory of the computer system an adaptation indicator of a source variable, produced by a software execution unit, called a producer unit, said consumer unit belonging to at least one other software component of said computer system, said source variable comprising said data, coded in a source format, distinct from the target format, said memory being shared between said at least one consumer unit and said producer unit, - when the adaptation indicator is set to a first value,indicating that an adaptation of the source variable into the target variable is required, the adaptation of the source variable into the target variable, and - reading the target variable into the computer system's memory, otherwise.,

2. Method for obtaining a target variable according to claim 1, characterized in that the adaptation of the source variable into the target variable comprises: - reading from said memory, the source variable, comprising a code of said data, in a source format, - determining a code of the data in the target format from the code of the data in the source format extracted from the source variable, and - setting the adaptation indicator to a second value, distinct from the first value, indicating that an adaptation of the source variable to the target variable is not required and - making available the adapted target variable and the updated adaptation indicator in the memory.

3. Method for obtaining a target variable according to claim 1, characterized in that it is implemented, following the reading by the consuming unit, of a label inserted into computer code instructions of said consuming unit, said label associating computer code instructions for carrying out said method.

4. Method for determining a source variable, comprising data, coded in a source format, said method being intended to be implemented by a software execution unit, called a producer unit, configured to produce the source variable, said producer unit being included in a software component of an information system comprising at least one processor capable of executing said producer unit, said method comprising: - obtaining said data, from a memory of the producer unit, - coding said data, a code of said data in a source format being obtained and inserting said code into said source variable, - positioning an adaptation indicator of the source variable to a first value indicating that an update is required, and - storing said source variable and the adaptation indicator in a memory of said computer system,said memory being shared with at least one other execution software unit, called a consumer unit, included in another software component of the information system, and configured to use a target variable comprising a code of said data in a target format, distinct from said source format.,

5. Method for determining a source variable according to claim 4, characterized in that it is implemented by the software execution unit producing the source variable, upon reading a label inserted into computer code instructions of said producing software execution unit, said label associating computer code instructions for the execution of said method.

6. Device (100) for obtaining a target variable, comprising data, coded in a target format, intended to be used by at least one software execution unit, called a consumer unit, said consumer unit belonging to at least one software component of a computer system comprising at least one processor capable of executing said consumer unit, said device being configured to implement: - reading in a memory of the computer system an indicator of adaptation of a source variable, produced by a software execution unit, called a producer unit, said consumer unit belonging to at least one other software component of said computer system, said source variable comprising said data, coded in a source format, distinct from the target format, said memory being shared between said at least one consuming entity and said producing unit, - when the adaptation indicator is positioned at a first value, indicating that an adaptation of the source variable into the target variable is required, the adaptation of the source variable into the target variable, and - reading the target variable in the memory of the computer system, otherwise.

7. Device for obtaining a target variable according to the preceding claim, characterized in that it is implemented in a software execution unit included in a software component of the computer system.

8. Device (200) for determining a source variable, comprising data, coded in a source format, said method being intended to be implemented by a software execution unit, called a producer unit, configured to produce the source variable, said producer unit being included in a software component of an information system comprising at least one processor capable of executing said producer unit, said device being configured to implement: - obtaining said data, from a memory of the producer unit, - coding said data, a code of said data in a source format being obtained and inserting said code into said source variable, - positioning an adaptation indicator of the source variable to a first value indicating that an update is required, and - storing said source variable and the adaptation indicator in a memory of said computer system,said memory being shared with at least one other execution software unit, called a consumer unit, included in another software component of the information system, and configured to use a target variable comprising a code of said data in a target format, distinct from said source format.,

9. Device for determining a source variable according to the preceding claim, characterized in that it is implemented in a software execution unit included in a software component of the computer system.

10. Software execution unit, called a consuming unit of a target variable, included in a software component of a computer system, characterized in that it is configured to implement a device for obtaining a target variable according to claims 6 and 7

11. / . Software execution unit, called a unit for producing a source variable, included in a software component of a computer system, characterized in that it is configured to implement a device for determining a source variable according to any one of claims 8 and 9.

12. Software execution unit according to any one of claims 10 and 11, characterized in that the implementation of the device is triggered by the reading of a tag in computer code instructions of said software execution unit, said tag being associated with computer code instructions for the execution of said device.

13. A computer program comprising instructions for executing a method according to any one of claims 1 to 5, when said program is executed by a computer.