The present disclosure relates to a method of exchanging data in a real-time operating system between a primary core and a secondary core in a multi-core processor. A system may employ multiple cores or processors to execute respective interdependent paths at various processing speeds. The system may require an exchange or transfer of data between the respective paths.
A method of exchanging data in a real-time operating system, between a primary core and a secondary core in a multi-core processor, includes executing a primary path via the primary core and executing a secondary path via the secondary core. The primary path is configured to be a relatively faster processing task and the secondary path is configured to be a relatively slower processing task. The method includes devising a freeze in process flag to have a respective flag status set and cleared by the primary path. The method includes devising a data frozen flag to have a respective flag status set and cleared by both the primary and the secondary paths. A component operatively connected to the multi-core processor may be controlled based at least partially on a difference between primary and secondary sets of calculations executed by the primary and secondary cores, respectively.
The method enables avoidance of false errors due to overlapping tasks in the system between the primary path (faster processing task) and the secondary path (slower processing task), wherein the slower processing task requires input data copied over or frozen from the faster processing task. The secondary path includes determining if the difference between the primary set of calculations executed by the primary core and the secondary set of calculations is at or below a threshold. The component may be adjusted if the difference is at or below the threshold. The component may include but is not limited to, an internal combustion engine or a hybrid electric propulsion system.
The primary path includes determining if an input data should be frozen based at least partially on the respective status of the data frozen flag and the freeze in process flag. The primary path includes performing a primary set of calculations on the input data to obtain an output data. The secondary path includes performing a secondary set of calculations on the input data based at least partially on the respective status of the data frozen flag. The secondary path requires a transfer of the input data from the primary core to the secondary core to perform the secondary set of calculations.
The method includes preventing the input data from being used in the secondary set of calculations, via the freeze in process flag and the data frozen flag, if the secondary path is executed during a period of time between said determining if the input data should be frozen and said performing the primary set of calculations.
Determining if the input data should be frozen based at least partially on the respective status of the data frozen flag and the freeze in process flag includes, if the respective status of both the data frozen flag and the freeze in process flag are false, then freezing the input data and setting the respective status of the freeze in process flag as true. The frozen input data may be transferred from the primary core to the secondary core. If the respective status of the data frozen flag is true, and the freeze in process flag is true, then the primary path will re-set the respective status of both the freeze in process flag and the data frozen flag as false.
The primary path includes determining if the output data is valid for comparison with the secondary set of calculations based at least partially on the respective flag status of the data frozen flag and the freeze in process flag. Determining if the output data is valid for comparison includes, if the respective status of the data frozen flag is false and the freeze in process flag is true, then freezing the output data and setting the respective status of the data frozen flag as true and the freeze in process flag as false. The frozen output data may be transferred from the primary core to the secondary core. If the respective status of both the freeze in process flag and the data frozen flag are true, then then the primary path will re-set the respective status of both the freeze in process flag and the data frozen flag as false.
Performing the secondary set of calculations on the input data based at least partially on the respective status of the data frozen flag includes, if the respective status of the data frozen flag is true, performing the secondary set of calculations on the frozen input data, via the secondary core. The data frozen flag may be set as false thereafter.
A method of monitoring torque in a traction system having a multi-core processor and a component, the multi-core processor having a primary core and a secondary core, includes executing a primary path via the primary core and executing a secondary path via the secondary core. The primary path includes a primary set of calculations for obtaining an original set of torque values. The secondary path includes a secondary set of calculations for obtaining a redundant set of torque values. A component, such as an internal combustion engine or hybrid electric propulsion system, is operatively connected to the multi-core processor. The component may be adjusted if a difference between the primary set of calculations and the secondary set of calculations is at or below a threshold.
The above features and advantages and other features and advantages of the present disclosure are readily apparent from the following detailed description of the best modes for carrying out the disclosure when taken in connection with the accompanying drawings.
Referring to the drawings, wherein like reference numbers refer to like components,
Referring to
In the system 10, multiple different processing tasks may be executed in a near synchronous manner. As used herein, a “task” is a periodically executing computer code routine that is operative to perform one or more computational functions. Each task may include a plurality of computations that may be performed on data made available to the multi-core processor 16.
Referring to
Referring to
In block 52, the method 50 includes executing a primary path 100 (discussed in detail below with respect to
The component 14 may include but is not limited to, an internal combustion engine or hybrid electric propulsion system. In one embodiment, the primary path 100 involves primary torque calculations (i.e. for obtaining an original set of torque values) at a relatively faster rate and the secondary path 200 involves monitoring torque calculations (i.e. for obtaining a redundant set of torque values) at a relatively slower rate. The secondary core 22 requires input data copied over or frozen from the primary core 20 to perform monitoring or redundant torque calculations. The input data may be obtained via various sensors 24 operatively connected to the component 14. For example, the sensors 14 may include an engine speed sensor. The redundant torque calculations ensure operational integrity of the device 12.
The primary and secondary paths 100, 200 on the primary core 20 and the secondary core 22, respectively, require exclusive execution to prevent overlapping. The overlapped executions or overlapped tasks can create the partial skipping of primary data freezing tasks and lead to false errors in torque monitoring. For example, if the secondary path 200 of the secondary core 22 runs while the functions of the primary core 20 are in the process of completing, the primary core 20 will not freeze or copy over input data. However, the secondary path 200 will continue to calculate the redundant torque calculations using “old” frozen data. This causes a data coherence issue. As described below, the partial skipping of data freezing can be recovered, even while the primary path 100 and the secondary path 200 continue to be overlapped in execution, by employing two distinct flags.
Referring to block 54 of
The freeze in process flag being true indicates that the primary path 100 is presently engaged in freezing the input data. Conversely, the freeze in process flag being false indicates that the primary path 100 is presently not engaged in freezing the input data. The freeze in process flag is set and cleared to ensure that if the secondary path 200 is executed during the period of time between blocks 110 and block 120 of the primary path 100, that input data set will not be used in the secondary set of calculations (block 220) and data will be collected in the next cycle or iteration of the primary path 100. Accordingly, the freeze in process flag preserves data coherence.
In block 56 of
As shown in
As shown in
Referring now to
In block 230 of
In summary, the method 50 enables avoidance of false errors due to overlapping tasks in the system 10 between the primary path 100 (faster processing task) and the secondary path 200 (slower processing task), wherein the slower processing task requires input data copied over or frozen from the faster processing task. The method 50 ensures data coherency, via the respective paths going through block 112 and block 132, shown in
The controller C includes a computer-readable medium (also referred to as a processor-readable medium), including a non-transitory (e.g., tangible) medium that participates in providing data (e.g., instructions) that may be read by a computer (e.g., by a processor of a computer). Such a medium may take many forms, including, but not limited to, non-volatile media and volatile media. Non-volatile media may include, for example, optical or magnetic disks and other persistent memory. Volatile media may include, for example, dynamic random access memory (DRAM), which may constitute a main memory. Such instructions may be transmitted by one or more transmission media, including coaxial cables, copper wire and fiber optics, including the wires that comprise a system bus coupled to a processor of a computer. Some forms of computer-readable media include, for example, a floppy disk, a flexible disk, hard disk, magnetic tape, other magnetic media, a CD-ROM, DVD, other optical media, punch cards, paper tape, other physical media with patterns of holes, a RAM, a PROM, an EPROM, a FLASH-EEPROM, other memory chips or cartridges, or other media from which a computer can read.
Look-up tables, databases, data repositories or other data stores described herein may include various kinds of mechanisms for storing, accessing, and retrieving various kinds of data, including a hierarchical database, a set of files in a file system, an application database in a proprietary format, a relational database management system (RDBMS), etc. Each such data store may be included within a computing device employing a computer operating system such as one of those mentioned above, and may be accessed via a network in one or more of a variety of manners. A file system may be accessible from a computer operating system, and may include files stored in various formats. An RDBMS may employ the Structured Query Language (SQL) in addition to a language for creating, storing, editing, and executing stored procedures, such as the PL/SQL language mentioned above.
The detailed description and the drawings or FIGS. are supportive and descriptive of the disclosure, but the scope of the disclosure is defined solely by the claims. While some of the best modes and other embodiments for carrying out the claimed disclosure have been described in detail, various alternative designs and embodiments exist for practicing the disclosure defined in the appended claims. Furthermore, the embodiments shown in the drawings or the characteristics of various embodiments mentioned in the present description are not necessarily to be understood as embodiments independent of each other. Rather, it is possible that each of the characteristics described in one of the examples of an embodiment can be combined with one or a plurality of other desired characteristics from other embodiments, resulting in other embodiments not described in words or by reference to the drawings. Accordingly, such other embodiments fall within the framework of the scope of the appended claims.