CN112306810B - Function monitoring method and device, heterogeneous multi-core SOC (system on chip) and electronic equipment - Google Patents

Function monitoring method and device, heterogeneous multi-core SOC (system on chip) and electronic equipment Download PDF

Info

Publication number
CN112306810B
CN112306810B CN202011240982.3A CN202011240982A CN112306810B CN 112306810 B CN112306810 B CN 112306810B CN 202011240982 A CN202011240982 A CN 202011240982A CN 112306810 B CN112306810 B CN 112306810B
Authority
CN
China
Prior art keywords
function
data
heterogeneous multi
monitoring
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011240982.3A
Other languages
Chinese (zh)
Other versions
CN112306810A (en
Inventor
牛建彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing CHJ Automotive Information Technology Co Ltd
Original Assignee
Beijing CHJ Automotive Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing CHJ Automotive Information Technology Co Ltd filed Critical Beijing CHJ Automotive Information Technology Co Ltd
Priority to CN202011240982.3A priority Critical patent/CN112306810B/en
Publication of CN112306810A publication Critical patent/CN112306810A/en
Application granted granted Critical
Publication of CN112306810B publication Critical patent/CN112306810B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3013Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is an embedded system, i.e. a combination of hardware and software dedicated to perform a certain function in mobile devices, printers, automotive or aircraft systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a function monitoring method and device, a heterogeneous multi-core SOC and electronic equipment. The method comprises the following steps: when the heterogeneous multi-core SOC runs, acquiring preset data sent by a plurality of tasks of the same function at the beginning and ending of execution, wherein the plurality of tasks are from at least two cores in the heterogeneous multi-core SOC; calculating the acquired data according to a preset algorithm to obtain the characteristic value of the function; and if the characteristic value of the function is inconsistent with the preset value corresponding to the function, judging that the function is executed in error. The scheme of the present disclosure can realize the timing monitoring of tasks in a plurality of cores of the heterogeneous multi-core SOC, so that the heterogeneous multi-core SOC has a timing monitoring function for a program running on the heterogeneous multi-core SOC.

Description

Function monitoring method and device, heterogeneous multi-core SOC (system on chip) and electronic equipment
Technical Field
The disclosure relates to the field of computer fault monitoring, in particular to a function monitoring method and device, heterogeneous multi-core SOC and electronic equipment.
Background
System-on-a-Chip (SOC) is a technology that integrates a complete System on a single Chip, grouping all or part of the necessary electronic circuitry into packets. So-called complete systems typically include a central processing unit, memory, peripheral circuits, etc. SOCs have been developed in parallel with other technologies, such as silicon on insulator, which can provide enhanced clock frequencies, thereby reducing the power consumption of the microchip.
SOC technology is commonly applied to small, increasingly complex user terminal devices. For example, the SOC of the sound detection apparatus is an apparatus provided on a single chip for a user to include an audio receiving terminal, an analog-to-digital converter, a microprocessor, necessary memory, and input-output logic control. SOC is a major solution to replacing integrated circuits due to unprecedented efficient integrated performance. SOC has become a necessary trend in the development of current microelectronic chips.
The SOC integrating a plurality of different architecture processing unit cores in a single chip is called heterogeneous multi-core SOC. Wherein the different architecture processing unit cores may include an application core and a control core. The current heterogeneous multi-core SOC system generally only ensures the functional safety of the control core, and no scheme for monitoring the functional safety of the application core in the SOC exists. The application core typically uses a linux system that itself does not have a timing protection mechanism, however, functions running on the application core sometimes involve security requirements.
Disclosure of Invention
The purpose of the present disclosure is to provide a reliable and practical function monitoring method and device, heterogeneous multi-core SOC, and electronic equipment.
To achieve the above object, the present disclosure provides a function monitoring method for heterogeneous multi-core SOC, the method including:
when the heterogeneous multi-core SOC runs, acquiring preset data sent by a plurality of tasks of the same function at the beginning and ending of execution, wherein the plurality of tasks are from at least two cores in the heterogeneous multi-core SOC;
calculating the acquired data according to a preset algorithm to obtain the characteristic value of the function;
and if the characteristic value of the function is inconsistent with the preset value corresponding to the function, judging that the function is executed in error.
Optionally, the tasks in the heterogeneous multi-core SOC send respective predetermined data to respective corresponding data storage intervals, wherein the data storage interval corresponding to a task is determined according to the timing period of the task,
when the heterogeneous multi-core SOC runs, acquiring preset data sent by a plurality of tasks with the same function at the beginning and ending of execution, wherein the preset data comprises the following steps: and when the heterogeneous multi-core SOC operates, acquiring preset data sent by a plurality of tasks with the same function at the beginning and ending of execution from the same data storage interval.
Optionally, the data in each data storage section is arranged in a circular queue.
Optionally, calculating the acquired data according to a predetermined algorithm to obtain a feature value of the function, including: the data acquired in each monitoring period is calculated according to a preset algorithm to obtain the characteristic value of the function in the monitoring period,
if the characteristic value of the function is inconsistent with the preset value corresponding to the function, judging that the function is executed in error, wherein the method comprises the following steps: if the characteristic value of a function in a monitoring period is inconsistent with a preset value corresponding to the function, the function execution error is judged.
Optionally, the duration of the monitoring period is the same as the minimum value of the timing period of the function to be monitored.
Optionally, the method further comprises:
and if the function is judged to be normally executed in the next monitoring period after the function execution error is judged in the monitoring periods of the continuous preset times, executing the synchronous operation of the monitoring period so as to enable the monitoring period to be synchronously started with the timing period with the minimum time length in the timing periods of the functions to be monitored.
Optionally, the predetermined data includes first predetermined data transmitted at the start of execution of a task and second predetermined data transmitted at the end of execution,
calculating the acquired data according to a preset algorithm to obtain the characteristic value of the function, wherein the method comprises the following steps: calculating the acquired data according to the following algorithm to obtain the characteristic value of the function:
F(x)=x 29 +x 28 +x 23 +x 22 +x 18 +x 11 +x 10 +x 12 +x 8 +x 7 +x 5 +x 3 +x 2 +x+1
wherein Z is the characteristic value of the function, n is the number of tasks included in the function, and x 1i The first predetermined data, x, sent for the ith task of the function 2i And the second preset data sent for the ith task of the function.
The present disclosure also provides a function monitoring apparatus for heterogeneous multi-core SOC, the apparatus comprising:
the acquisition module is used for acquiring preset data sent by a plurality of tasks of the same function when the heterogeneous multi-core SOC runs and the execution starts and ends, wherein the plurality of tasks are from at least two cores in the heterogeneous multi-core SOC;
the calculation module is used for calculating the acquired data according to a preset algorithm to obtain the characteristic value of the function;
and the judging module is used for judging that the function is executed in error if the characteristic value of the function is inconsistent with the preset value corresponding to the function.
Optionally, the tasks in the heterogeneous multi-core SOC send respective predetermined data to respective corresponding data storage intervals, wherein the data storage interval corresponding to a task is determined according to the timing period of the task,
the acquisition module comprises:
and the acquisition sub-module is used for acquiring the preset data sent by a plurality of tasks with the same function at the beginning and ending of execution from the same data storage interval when the heterogeneous multi-core SOC runs.
Optionally, the data in each data storage section is arranged in a circular queue.
Optionally, the computing module includes:
a first calculation sub-module for calculating the data acquired in each monitoring period according to a preset algorithm to obtain the characteristic value of the function in the monitoring period,
the judging module comprises:
and the judging sub-module is used for judging that the function is executed in error if the characteristic value of the function in a monitoring period is inconsistent with the preset value corresponding to the function.
Optionally, the duration of the monitoring period is the same as the minimum value of the timing period of the function to be monitored.
Optionally, the apparatus further comprises:
and the synchronization module is used for executing the synchronization operation of the monitoring period if the function is judged to be normally executed in the next monitoring period after judging that the function is executed in error in all the monitoring periods of the continuous preset times, so that the monitoring period is synchronously started with the timing period with the minimum time length in the timing period of the function to be monitored.
Optionally, the predetermined data includes first predetermined data transmitted at the start of execution of a task and second predetermined data transmitted at the end of execution,
the computing module includes:
the second calculation sub-module is used for calculating the acquired data according to the following algorithm to obtain the characteristic value of the function:
F(x)=x 29 +x 28 +x 23 +x 22 +x 18 +x 11 +x 10 +x 12 +x 8 +x 7 +x 5 +x 3 +x 2 +x+1
wherein Z is the characteristic value of the function, n is the number of tasks included in the function, and x 1i The first predetermined data, x, sent for the ith task of the function 2i And the second preset data sent for the ith task of the function.
The disclosure also provides a heterogeneous multi-core SOC, which includes a processor, where the processor is configured to execute the above-mentioned function monitoring method provided by the disclosure.
The disclosure also provides an electronic device, which comprises the heterogeneous multi-core SOC provided by the disclosure.
According to the technical scheme, data sent by a plurality of tasks which are in at least two cores in the heterogeneous multi-core SOC and execute the same function when the execution starts and ends are calculated according to a preset algorithm, the calculated characteristic value of the function is compared with a preset value corresponding to the function, whether the function is normally executed is judged according to the comparison result, and accordingly the execution time of the tasks contained in the function is monitored. The scheme of the present disclosure can realize the timing monitoring of tasks in different cores of the SOC, so that the heterogeneous multi-core SOC has a timing monitoring function for a program running on the heterogeneous multi-core SOC.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate the disclosure and together with the description serve to explain, but do not limit the disclosure. In the drawings:
FIG. 1 is a flow chart of a method of function monitoring for heterogeneous multi-core SOCs provided by an exemplary embodiment;
FIG. 2 is a schematic diagram of a task provided by an exemplary embodiment sending data to a data storage interval;
FIG. 3 is a schematic diagram of a circular queue in a data storage section provided by an exemplary embodiment;
FIG. 4 is a schematic diagram of data acquired for each cycle in a data storage interval according to an exemplary embodiment;
FIG. 5 is a schematic diagram of the data calculation results of the various functions of a monitoring cycle provided by an exemplary embodiment;
FIG. 6 is a block diagram of a function monitoring apparatus for heterogeneous multi-core SOCs provided by an example embodiment.
Detailed Description
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
An application core and a control core may be included in a heterogeneous multi-core SOC. The application core is an application controller (e.g., a core of ARM (Advanced RISC Machines) company) and the control core is a microcontroller (e.g., an M core of ARM company). In addition, the different architecture processing unit cores may also include a real-time controller (e.g., ARM company's R core).
As described above, the current heterogeneous multi-core SOC system generally only ensures the functional security of the control core therein, and there is no scheme for monitoring the functional security of the application core in the SOC. The inventors contemplate that the calculation may be performed using data sent by tasks in multiple cores, and whether a function is executed correctly may be determined according to a comparison result of the calculation result and a predetermined value. Thus, the timing monitoring function of tasks in different cores of the heterogeneous multi-core SOC is realized.
FIG. 1 is a flowchart of a method for functional monitoring of heterogeneous multi-core SOCs, provided by an example embodiment. As shown in fig. 1, the method may include the following steps.
Step S101, when the heterogeneous multi-core SOC is running, acquiring predetermined data transmitted by a plurality of tasks of the same function at the start and end of execution. Wherein the plurality of tasks are from at least two cores in the heterogeneous multi-core SOC.
Step S102, the acquired data are calculated according to a preset algorithm, and the characteristic value of the function is obtained.
Step S103, if the characteristic value of the function is inconsistent with the preset value corresponding to the function, judging that the function is executed in error.
Wherein at least two cores in the heterogeneous multi-core SOC may include, for example, a control core and an application core. The tasks in the control core and the tasks in the application core may together perform one function. When executing this function, the tasks are executed in a predetermined order. One predetermined data is sent outwards when one task starts to be executed, and the other predetermined data is sent outwards when the execution is finished. The predetermined data for each task is preferably different. The data sent by the same task at the beginning of execution and at the end of execution are also preferably not identical. If one predetermined data transmitted by a task is received, the task may be considered to have started to be executed, and if another predetermined data transmitted by the task is received, the task may be considered to have ended to be executed. The data sent by a task at the beginning of execution and at the end of execution can be regarded as timing information for the task. Accordingly, the present disclosure may be viewed as monitoring the execution time of tasks contained by a function.
The acquired data (including the data transmitted at the beginning and end of execution) sent by the task may be arranged according to the acquired sequence, and calculated according to a predetermined algorithm, to obtain the feature value of the function.
Since the tasks in a function are predetermined, the data transmitted by each task at the start of execution and at the end of execution are also predetermined, and the algorithm is also predetermined, the calculation result (characteristic value) should be fixed, the calculation result in the case of normal execution of the function may be stored in advance, and the characteristic value calculated from the data acquired in real time may be compared with the stored result in advance. If so, it can be determined that all tasks in the function have been normally performed, and the function has been normally performed. If the tasks are inconsistent, it can be determined that at least one task in the function is not normally executed, and the function is not normally executed.
According to the technical scheme, data sent by a plurality of tasks which are in at least two cores in the heterogeneous multi-core SOC and execute the same function when the execution starts and ends are calculated according to a preset algorithm, the calculated characteristic value of the function is compared with a preset value corresponding to the function, whether the function is normally executed is judged according to the comparison result, and accordingly the execution time of the tasks contained in the function is monitored. The scheme of the present disclosure can realize the timing monitoring of tasks in different cores of the SOC, so that the heterogeneous multi-core SOC has the function of timing monitoring to the program running on the heterogeneous multi-core SOC.
In the monitoring process, only one of the functions can be monitored, and the data sent by the task can be directly received through the timed task daemon. In another embodiment, multiple functions may also be monitored simultaneously. In this embodiment, each task may send data into a partition of memory. For example, a plurality of tasks in the heterogeneous multi-core SOC send respective predetermined data to respective corresponding data storage intervals. The data storage interval corresponding to a task may be determined according to the timing period of the task.
Wherein the timing period of a function refers to the length of time between two consecutive executions of each task in the function. For example, if each task in a function is performed once per second, the timing period for that function is one second. A plurality of data storage sections, each for storing data transmitted by a task whose timing period is in a specific range, may be divided in the memory in advance.
FIG. 2 is a schematic diagram of a task provided by an exemplary embodiment sending data to a data storage interval. As shown in fig. 2, the heterogeneous multi-core SOC includes a first control core, a second control core, a third control core, a first application core, a second application core, and a third application core. The first control core comprises a task 1, a task 2 and a task 3, the second control core comprises a task 4, a task 5 and a task 6, and the third control core comprises a task 7, a task 8 and a task 9. The first application core comprises an application 1, an application 2 and an application 3, the second application core comprises an application 4, an application 5 and an application 6, and the third application core comprises an application 7, an application 8 and an application 9. The tasks described above in this disclosure include task 1-task 9 in the control core, and application 1-application 9 in the application core.
As shown in fig. 2, the memory is divided into a first data storage section, a second data storage section and a third data storage section. The first data storage interval is used for storing data sent by tasks with timing periods between 1s and 5s, the second data storage interval is used for storing data sent by tasks with timing periods between 6s and 10s, and the third data storage interval is used for storing data sent by tasks with timing periods between 10s and 20 s.
The method comprises the steps that a task 1 and a task 5 are two tasks with the same function, a timing period is 1s, and the task 1 and the task 5 send data to a first data storage interval; task 8, task 9, application 2 and application 5 are four tasks with the same function, and the timing period is 7s, then task 8, task 9, application 2 and application 5 send data to the second data storage interval; the application 6 and the application 8 are two tasks with the same function, and the timing period is 12s, and then the application 6 and the application 8 send data to the third data storage interval.
The timed task monitoring daemon may obtain data sent by each task from the first, second, and third data storage intervals.
In this embodiment, when the heterogeneous multi-core SOC is running, acquiring predetermined data transmitted by a plurality of tasks of the same function at the start of execution and the end of execution (step S101) may include: when the heterogeneous multi-core SOC operates, the scheduled data sent by a plurality of tasks with the same function at the beginning and ending of execution are acquired from the same data storage interval.
The tasks of the same function have equal timing periods, and the transmitted data are stored in the same data storage area, so that the data transmitted by a plurality of tasks of the same function at the start and end of execution can be acquired from the same data storage area.
In this embodiment, the data sent by the task is stored in different data storage areas according to different timing periods, so that the data is easy to sort, is not easy to make mistakes, and is easy to acquire the data with the same function.
Wherein the data in each data storage section may be arranged in a circular queue. The annular queue is a data structure connected end to end, adopts the linear space of an array, has simple data organization, and follows the principle of first in first out, namely, the data stored in the queue is firstly taken out and then stored and then taken out. FIG. 3 is a schematic diagram of a circular queue in a data storage section according to an exemplary embodiment. As shown in fig. 3, the queue length is 64. The queue starts at 0 and is arranged in a clockwise direction to 63. The data stored in the data storage section may be a0, a1, … …, a6, a7, a8, a9, … …, a63 in a queue arrangement. The ring queue can be used for quickly knowing whether the queue is full or not, and data can be accessed at a higher speed.
In yet another embodiment, the execution of the function may also be monitored periodically. On the basis of the above embodiment, calculating the acquired data according to a predetermined algorithm to obtain the feature value of the function (step S102) may include: and calculating the data acquired in each monitoring period according to a preset algorithm to obtain the characteristic value of the function in the monitoring period.
In this embodiment, if the feature value of a function is inconsistent with a predetermined value corresponding to the function, determining that the function is executed in error includes: if the characteristic value of a function in a monitoring period is inconsistent with a preset value corresponding to the function, the function execution error is judged.
The monitoring period is a period for monitoring the function once, namely, a period for calculating and judging once according to the acquired data. And calculating according to the data acquired in the primary monitoring period to obtain the characteristic value of the function in the current monitoring period, and only describing the execution condition of the function in the current monitoring period according to the comparison result of the characteristic value. The execution condition in the next monitoring period is calculated and compared by the data acquired in the next monitoring period.
Since the timing periods may be different for different functions, the duration of the monitoring period does not coincide with the timing period of some functions. For example, if the duration of the monitoring period is 2s and the timing period of a function is 3s, the data sent by the task of the function cannot be received in the first monitoring period; if the duration of the monitoring period is 2s and the timing period of the other function is 1s, the function can be judged once every two times the function is executed.
In order to more comprehensively monitor a plurality of functions, the duration of the monitoring period may be set to be the same as the minimum value of the timing period of the function to be monitored. For example, the timing periods of the three functions are 1s, 3s, and 5s, respectively, and the duration of the monitoring period is set to 1s. Thus, for a function with a timing period of 1s, each monitoring period is judged once; for the function with the timing period of 3s, judging once every 3 monitoring periods; for a function with a timing period of 5s, the judgment is made every 5 monitoring periods. Thus, not all the data acquired every monitoring period is used for calculation and judgment.
After the timing task monitoring daemon acquires the data sent by the task from the data storage interval, the calculated characteristic value can be sent to a monitoring chip on the heterogeneous multi-core SOC and judged by the monitoring chip. When the calculation result of each monitoring period is sent to the monitoring chip, a flag bit may be added in front of the calculation result to indicate whether the calculation result of the monitoring period is the latest calculated characteristic value or not, and whether the calculation result of the monitoring period is available for judgment or not. For example, the timing periods of the three functions are 1s, 3s, and 5s, respectively, and the duration of the monitoring period is 1s. Then before the second monitoring period in 2s sends the calculation result of the data of the function with the timing period of 3s to the monitoring chip, a flag bit of "1" can be added to indicate that the calculation result cannot be used for judging the execution condition of the function with the timing period of 3 s; before the calculation result of the data of the function with the timing period of 1s, which is sent to the monitoring chip in the second monitoring period of 2s, a flag bit of "0" may be added to indicate that the feature value may be used to determine the execution condition of the function with the timing period of 1s.
FIG. 4 is a schematic diagram of data acquired for each cycle in a data storage interval according to an exemplary embodiment. As shown in fig. 4, in a data storage section, the data acquired in the monitoring period N are 0X23, 0X98, … …, the data acquired in the monitoring period n+1 are 0X67, 0X89, … …, the data acquired in the monitoring period n+2 are 0X34, 0X12, … …, and the data acquired in the monitoring period n+3 are 0X58, 0X62, … …. Wherein, the acquired data are hexadecimal numbers.
And according to a preset algorithm, calculating the data of each task of a function to obtain a calculation result. If a function is executed just after a monitoring period, the calculation result is a characteristic value, a '0' flag bit can be added before the characteristic value, and the calculation result can be used for judging; if a function is not executed in a monitoring period, the calculation result is not a characteristic value, and a flag bit of '1' can be added before the calculation result.
Fig. 5 is a schematic diagram of data calculation results of respective functions of a monitoring period according to an exemplary embodiment. As shown in fig. 5, in a monitoring period, the calculation result of the data of the first function is Z1, the flag bit before Z1 is "0", the calculation result of the data of the second function is Z2, the flag bit before Z2 is "1", the calculation result of the data of the third function is Z3, and the flag bit before Z3 is "0". Wherein the monitoring period is 1s, the timing period of the first function is 1s, the timing period of the second function is 2s, and the timing period of the second function is 3s. Fig. 5 may be the result of the calculation of the first monitoring period. Wherein, the first function is executed, the calculation result Z1 is the characteristic value of the function, and the flag bit is 0; the second and third functions are not executed, the calculated results Z2 and Z3 are not characteristic values, and the flag bit is "1".
The data calculation results of each function in the monitoring period can be sent to the monitoring chip, and the monitoring chip selects the calculation result with the flag bit of 0 as the characteristic value to be compared with the preset data to make judgment.
In yet another embodiment, the method may further comprise:
if the function execution error is judged in the monitoring period of the continuous preset times and the function execution is judged to be normal in the next monitoring period, the synchronous operation of the monitoring period is executed, so that the monitoring period and the timing period with the minimum time length in the timing period of the function to be monitored are synchronously started.
If it is determined that the function is normally executed in the next monitoring period after determining that the function is executed in one of the monitoring periods of the predetermined number of consecutive times, it is considered that the monitoring period is not synchronized with the timing period, and a relatively large deviation occurs, and the monitoring period needs to be adjusted to be synchronized with the timing period. The monitoring period and the timing period are synchronized, wherein the monitoring period starts in synchronization with one of the timing periods. If the duration of the monitoring period is the same as the minimum value of the durations of the timing periods of the plurality of functions, the monitoring period may be adjusted to start in synchronization with the timing period having the minimum duration of the timing periods of the plurality of functions. This can avoid a decrease in judgment accuracy caused by the start of the monitoring period and the timing period being out of synchronization. The predetermined number of consecutive times may be derived from experimentation or experience. For example, twice.
As the predetermined algorithm, any algorithm may be included as long as it is capable of causing the same data to rarely appear in the calculation result to calculate different results, or the same result to be calculated from different data. In yet another embodiment, the predetermined data transmitted by a task includes first predetermined data transmitted by the task at the start of execution and second predetermined data transmitted at the end of execution.
In this embodiment, calculating the acquired data according to a predetermined algorithm to obtain the feature value of the function (step S102) may include: the acquired data is calculated according to the following algorithm to obtain the characteristic value of the function:
F(x)=x 29 +x 28 +x 23 +x 22 +x 18 +x 11 +x 10 +x 12 +x 8 +x 7 +x 5 +x 3 +x 2 +x+1
wherein Z is the characteristic value of the function, n is the number of tasks included in the function, x 1i First predetermined data, x, sent for the ith task of the function 2i Second predetermined data sent for the ith task of the function.
The feature value calculated by the formula has extremely low error probability and can be used for accurately judging.
The following is a step of performing function monitoring on heterogeneous multi-core SOCs in one embodiment.
The heterogeneous multi-core SOC is provided with a control core, an application core and a monitoring chip. In one of the application cores a memory and a timed task monitoring daemon are provided. The memory is divided into a plurality of data storage intervals.
Step 1: the execution of tasks requiring timing protection is synchronized after the heterogeneous multi-core SOC is powered up, for example, task 1, task 5, task 8, task 9, application 2, application 5, application 6, and application 8 in fig. 2 are synchronized when starting up the running.
Step 2: and setting a communication initialization operation of the timing task monitoring daemon and the monitoring chip, and enabling the timing monitoring state to be unopened.
Step 3: the timed task monitoring daemon initializes the data in the data storage interval. The data in the data storage interval are all annular queues, and the length of each queue is 64.
And 4, establishing communication between the timed task monitoring daemon and the monitoring chip, starting the monitoring state, and informing each task to start timed task monitoring by the timed task monitoring daemon.
Step 5, each task sends predetermined data (first predetermined data and second predetermined data) to the corresponding data storage section, wherein the predetermined data is also a ring queue, and for example, the value of the ring queue is hexadecimal number: 0x34, 0x89, … …, 0x66, queue length 64.
And 6, in a monitoring period, the timed task monitoring daemon collects data sent by each task according to time sequence, and calculates calculation results Z1, Z2 and Z3 of the first function, the second function and the third function in the monitoring period.
And 7, in the same monitoring period, the timing task monitoring daemon transmits Z1, Z2 and Z3 to the monitoring chip together with the flag bit thereof, wherein the flag bit with one bit before the characteristic value represents whether the data in the monitoring period is valid or not, 1 represents invalid, and 0 represents valid.
And 8, in the cycle period, the monitoring chip judges whether the characteristic value (the calculation result with the flag bit of 0) is consistent with the pre-stored data, if so, the monitoring period passes, and if the characteristic value of the continuous three monitoring periods is not matched, the monitoring period is failed in timing, and the kernel with the problem needs to be restarted.
The disclosure also provides a function monitoring device for heterogeneous multi-core SOC. FIG. 6 is a block diagram of a function monitoring apparatus for heterogeneous multi-core SOCs provided by an example embodiment. As shown in fig. 6, the function monitoring apparatus 600 for heterogeneous multi-core SOCs may include an acquisition module 601, a calculation module 602, and a determination module 603.
The acquiring module 601 is configured to acquire, when the heterogeneous multi-core SOC is running, predetermined data sent by a plurality of tasks of the same function at the beginning of execution and the ending of execution, where the plurality of tasks are from at least two cores in the heterogeneous multi-core SOC.
The calculation module 602 is configured to calculate the obtained data according to a predetermined algorithm, so as to obtain a feature value of the function.
The judging module 603 is configured to judge that the function is executed in error if the feature value of the function is inconsistent with the predetermined value corresponding to the function.
Optionally, the plurality of tasks in the heterogeneous multi-core SOC send respective predetermined data to respective corresponding data storage intervals, where the data storage interval corresponding to a task is determined according to a timing period of the task.
In this embodiment, the acquisition module 601 may include an acquisition sub-module.
The acquisition sub-module is used for acquiring preset data sent by a plurality of tasks with the same function at the beginning and ending of execution from the same data storage interval when the heterogeneous multi-core SOC runs.
Optionally, the data in each data storage section is arranged in a circular queue.
Alternatively, the computing module 602 may include a first computing sub-module.
The first calculation submodule is used for calculating the data acquired in each monitoring period according to a preset algorithm to obtain the characteristic value of the function in the monitoring period.
Also, the determination module 603 may include a determination sub-module.
The judging submodule is used for judging that the function is executed in error if the characteristic value of the function in a monitoring period is inconsistent with the preset value corresponding to the function.
Optionally, the duration of the monitoring period is the same as the minimum value of the timing period of the function to be monitored.
Optionally, the apparatus 600 may further comprise a synchronization module.
And the synchronization module is used for executing the synchronization operation of the monitoring period if the function is judged to be normally executed in the next monitoring period after judging that the function is executed in error in all the monitoring periods of the continuous preset times, so that the monitoring period and the timing period with the minimum time length in the timing periods of the functions to be monitored are synchronously started.
Optionally, the predetermined data includes first predetermined data sent by a task at the beginning of execution and second predetermined data sent by the task at the end of execution.
The computing module 603 may include a second computing sub-module.
The second calculation submodule is used for calculating the acquired data according to the following algorithm to obtain the characteristic value of the function:
F(x)=x 29 +x 28 +x 23 +x 22 +x 18 +x 11 +x 10 +x 12 +x 8 +x 7 +x 5 +x 3 +x 2 +x+1
wherein Z is the characteristic value of the function, n is the number of tasks included in the function, x 1i First predetermined data, x, sent for the ith task of the function 2i Second predetermined data sent for the ith task of the function.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
According to the technical scheme, data sent by a plurality of tasks which are in at least two cores in the heterogeneous multi-core SOC and execute the same function when the execution starts and ends are calculated according to a preset algorithm, the calculated characteristic value of the function is compared with a preset value corresponding to the function, whether the function is normally executed is judged according to the comparison result, and accordingly the execution time of the tasks contained in the function is monitored. The scheme of the present disclosure can realize the timing monitoring of tasks in different cores of the SOC, so that the heterogeneous multi-core SOC has a timing monitoring function for a program running on the heterogeneous multi-core SOC.
The disclosure also provides a heterogeneous multi-core SOC, which comprises a processor, wherein the processor is used for executing the function monitoring method for the heterogeneous multi-core SOC.
The disclosure also provides an electronic device, which comprises the heterogeneous multi-core SOC provided by the disclosure.
The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solutions of the present disclosure within the scope of the technical concept of the present disclosure, and all the simple modifications belong to the protection scope of the present disclosure.
In addition, the specific features described in the above embodiments may be combined in any suitable manner without contradiction. The various possible combinations are not described further in this disclosure in order to avoid unnecessary repetition.
Moreover, any combination between the various embodiments of the present disclosure is possible as long as it does not depart from the spirit of the present disclosure, which should also be construed as the disclosure of the present disclosure.

Claims (12)

1. A method for monitoring functions of heterogeneous multi-core SOCs, the method comprising:
when the heterogeneous multi-core SOC runs, acquiring preset data sent by a plurality of tasks of the same function at the beginning and ending of execution, wherein the plurality of tasks are from at least two cores in the heterogeneous multi-core SOC;
calculating the acquired data according to a preset algorithm to obtain the characteristic value of the function;
if the characteristic value of the function is inconsistent with the preset value corresponding to the function, judging that the function is executed in error;
the method comprises the steps that a plurality of tasks in the heterogeneous multi-core SOC send respective preset data to respective corresponding data storage intervals, wherein the data storage interval corresponding to one task is determined according to the timing period of the task;
when the heterogeneous multi-core SOC runs, acquiring preset data sent by a plurality of tasks with the same function at the beginning and ending of execution, wherein the preset data comprises the following steps: when the heterogeneous multi-core SOC operates, acquiring preset data sent by a plurality of tasks with the same function at the beginning and ending of execution from the same data storage interval;
the step of calculating the acquired data according to a preset algorithm to obtain the characteristic value of the function comprises the following steps: calculating the acquired data according to the following algorithm to obtain the characteristic value of the function:
F(x)=x 29 +x 28 +x 23 +x 22 +x 18 +x 11 +x 10 +x 12 +x 8 +x 7 +x 5 +x 3 +x 2 +x+1
wherein Z is the characteristic value of the function, n is the number of tasks included in the function, and x 1i First predetermined data, x, sent for the ith task of the function 2i And second predetermined data transmitted for an ith task of the function, wherein the predetermined data comprises first predetermined data transmitted when a task starts to execute and second predetermined data transmitted when execution ends.
2. The method of claim 1, wherein the data in each data storage interval is arranged in a circular queue.
3. The method according to claim 1, wherein calculating the acquired data according to a predetermined algorithm to obtain the feature value of the function comprises: the data acquired in each monitoring period is calculated according to a preset algorithm to obtain the characteristic value of the function in the monitoring period,
if the characteristic value of the function is inconsistent with the preset value corresponding to the function, judging that the function is executed in error, wherein the method comprises the following steps: if the characteristic value of a function in a monitoring period is inconsistent with a preset value corresponding to the function, the function execution error is judged.
4. A method according to claim 3, characterized in that the duration of the monitoring period is the same as the minimum value of the timing period of the function to be monitored.
5. The method according to claim 4, wherein the method further comprises:
and if the function is judged to be normally executed in the next monitoring period after the function execution error is judged in the monitoring periods of the continuous preset times, executing the synchronous operation of the monitoring period so as to enable the monitoring period to be synchronously started with the timing period with the minimum time length in the timing periods of the functions to be monitored.
6. A function monitoring apparatus for a heterogeneous multi-core SOC, the apparatus comprising:
the acquisition module is used for acquiring preset data sent by a plurality of tasks of the same function when the heterogeneous multi-core SOC runs and the execution starts and ends, wherein the plurality of tasks are from at least two cores in the heterogeneous multi-core SOC;
the calculation module is used for calculating the acquired data according to a preset algorithm to obtain the characteristic value of the function;
the judging module is used for judging that the function is executed in error if the characteristic value of the function is inconsistent with the preset value corresponding to the function;
the multiple tasks in the heterogeneous multi-core SOC send respective predetermined data to respective corresponding data storage intervals, where the data storage interval corresponding to a task is determined according to a timing period of the task, and the acquisition module includes:
the acquisition sub-module is used for acquiring preset data sent by a plurality of tasks with the same function at the beginning and ending of execution from the same data storage interval when the heterogeneous multi-core SOC runs;
the predetermined data includes a first predetermined data transmitted when a task starts to be executed and a second predetermined data transmitted when the execution ends, and the calculation module includes:
the second calculation sub-module is used for calculating the acquired data according to the following algorithm to obtain the characteristic value of the function:
F(x)=x 29 +x 28 +x 23 +x 22 +x 18 +x 11 +x 10 +x 12 +x 8 +x 7 +x 5 +x 3 +x 2 +x+1
wherein Z is the characteristic value of the function, n is the number of tasks included in the function, and x 1i The first predetermined data, x, sent for the ith task of the function 2i And the second preset data sent for the ith task of the function.
7. The apparatus of claim 6, wherein the data in each data storage interval is arranged in a circular queue.
8. The apparatus of claim 6, wherein the computing module comprises:
a first calculation sub-module for calculating the data acquired in each monitoring period according to a preset algorithm to obtain the characteristic value of the function in the monitoring period,
the judging module comprises:
and the judging sub-module is used for judging that the function is executed in error if the characteristic value of the function in a monitoring period is inconsistent with the preset value corresponding to the function.
9. The apparatus of claim 8, wherein the monitoring period has a duration that is the same as a minimum value of a timing period of a function to be monitored.
10. The apparatus of claim 9, wherein the apparatus further comprises:
and the synchronization module is used for executing the synchronization operation of the monitoring period if the function is judged to be normally executed in the next monitoring period after judging that the function is executed in error in all the monitoring periods of the continuous preset times, so that the monitoring period is synchronously started with the timing period with the minimum time length in the timing period of the function to be monitored.
11. A heterogeneous multi-core SOC comprising a processor configured to perform the function monitoring method of any of claims 1-5.
12. An electronic device comprising the heterogeneous multi-core SOC of claim 11.
CN202011240982.3A 2020-11-09 2020-11-09 Function monitoring method and device, heterogeneous multi-core SOC (system on chip) and electronic equipment Active CN112306810B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011240982.3A CN112306810B (en) 2020-11-09 2020-11-09 Function monitoring method and device, heterogeneous multi-core SOC (system on chip) and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011240982.3A CN112306810B (en) 2020-11-09 2020-11-09 Function monitoring method and device, heterogeneous multi-core SOC (system on chip) and electronic equipment

Publications (2)

Publication Number Publication Date
CN112306810A CN112306810A (en) 2021-02-02
CN112306810B true CN112306810B (en) 2023-08-22

Family

ID=74325332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011240982.3A Active CN112306810B (en) 2020-11-09 2020-11-09 Function monitoring method and device, heterogeneous multi-core SOC (system on chip) and electronic equipment

Country Status (1)

Country Link
CN (1) CN112306810B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013061783A (en) * 2011-09-13 2013-04-04 Toyota Motor Corp Multi-core processor
CN108037994A (en) * 2017-11-15 2018-05-15 中国电子科技集团公司第三十二研究所 Scheduling mechanism supporting multi-core parallel processing in heterogeneous environment
CN108388230A (en) * 2018-02-11 2018-08-10 北京车和家信息技术有限公司 A kind of method for scheduling task, task scheduling system, Vehicle Electronic Control Unit and vehicle
CN108920409A (en) * 2018-06-22 2018-11-30 阜阳师范学院 A kind of heterogeneous multi-nucleus processor institutional framework for realizing fault tolerance
CN109298658A (en) * 2018-07-26 2019-02-01 联创汽车电子有限公司 Double-core EPS controls program flow and its monitoring system and monitoring method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9823843B2 (en) * 2015-07-23 2017-11-21 Qualcomm Incorporated Memory hierarchy monitoring systems and methods

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013061783A (en) * 2011-09-13 2013-04-04 Toyota Motor Corp Multi-core processor
CN108037994A (en) * 2017-11-15 2018-05-15 中国电子科技集团公司第三十二研究所 Scheduling mechanism supporting multi-core parallel processing in heterogeneous environment
CN108388230A (en) * 2018-02-11 2018-08-10 北京车和家信息技术有限公司 A kind of method for scheduling task, task scheduling system, Vehicle Electronic Control Unit and vehicle
CN108920409A (en) * 2018-06-22 2018-11-30 阜阳师范学院 A kind of heterogeneous multi-nucleus processor institutional framework for realizing fault tolerance
CN109298658A (en) * 2018-07-26 2019-02-01 联创汽车电子有限公司 Double-core EPS controls program flow and its monitoring system and monitoring method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张一哲.基于多核SoC的负载平衡任务调度算法优化策略.软件导刊.2011,第10卷(第05期),第55-57页. *

Also Published As

Publication number Publication date
CN112306810A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
EP1690184B1 (en) Apparatus and method for time ordering events in a system having multiple time domains
EP2499571B1 (en) Advanced communication controller unit and method for recording protocol events
CN102073562B (en) Hardware-based main/standby switch arbitration method
WO2018185651A1 (en) A method for sharing a can bus between a plurality of nodes, a circuit comprising a can bus and a plurality of nodes, and an electric aircraft with such a circuit
US8190941B2 (en) Field control system
US10994675B2 (en) Vehicle control device and vehicle system
CN107943603B (en) Running state detection method, detection circuit and electronic equipment
CN107977302B (en) CPU utilization rate output method and device
WO2005073855A1 (en) Real-time debug support for a dma device and method thereof
US20200201808A1 (en) Time-division multiplexing (tdm) data transfer on serial interfaces
JPH11272635A (en) Multiprocessor control system, booting device and booting controller used for the same
CN114328003B (en) Method for realizing data reverse order processing through CRC hardware module
WO2015012993A1 (en) Method and apparatus for multi-chip reduced pin cross triggering to enhance debug experience
CN110262920A (en) The indirect dog-feeding method of the external house dog of linux system, house dog feed dog and act on behalf of drive module, watchdog system
CN112306810B (en) Function monitoring method and device, heterogeneous multi-core SOC (system on chip) and electronic equipment
CN102822805B (en) The method of the circulating continuancing time of monitoring routing unit and hardware data processing unit
US10095643B2 (en) Direct memory access control device for at least one computing unit having a working memory
CN115905055A (en) Computing device and data acquisition method
CN113032307A (en) Integrated device access request processing method and related assembly
CN110177032B (en) Message routing quality monitoring method and gateway controller
CN112596578A (en) Clock monitoring circuit and monitoring method
CN112154419A (en) Performance monitoring device and method, system on chip, movable platform and camera
CN110989333A (en) Redundancy control method based on multiple computing cores, computing cores and redundancy control system
CN111371635A (en) Network node monitoring method, device and system
US20170125126A1 (en) Transmission apparatus, diagnosis method, computer-readable recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant