Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and device for detecting program running deviation from path

A technology for program operation and program detection, applied in error detection/correction, generation of response errors, instruments, etc., can solve problems such as key data error modification

Active Publication Date: 2021-03-26
LOONGSON TECH CORP
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, if the CPU runs to a critical code due to the program running away, and makes a wrong modification to the critical data inside the microcontroller, or even erases the code segment, the consequences will be disastrous, and the chip cannot solve this problem. question

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for detecting program running deviation from path
  • A method and device for detecting program running deviation from path
  • A method and device for detecting program running deviation from path

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0070] In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0071] refer to figure 1 , which shows a flow chart of the steps of a method for detecting program running off-path in Embodiment 1 of the present invention, which is applied to a processor with a newly added block identification register, and may specifically include the following steps:

[0072] Step 101, extract block identification setting and detection instructions.

[0073] A basic program block refers to a sequence of statements executed sequentially in the program, in which there is only one entry and one exit, the entry is the first statement in it, and the exit is the last statement in it. For a basic program block, it only enters from its entry and exits from its exit during execution, which is also called a basic bloc...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides methods and devices of detecting path deviation of program running. The method comprises: extracting, decoding and executing a block identifier setting and a detection instruction to enable a second block identifier of a pre-executed second precursor program basic-block to be acquired from a block identifier register, and determining path deviation of program running according to a first block identifier and the second block identifier, wherein path deviation of program running is confirmed if a block identifier matching the second block identifier doesnot exist in the first block identifier. It is realized that program basic-blocks are used as units, and before a first instruction of each program basic-block is executed, path deviation of programrunning is confirmed if it is checked that the program basic-block is not executed according to a correct path, a phenomenon of path deviation of program running can be enabled to be early found, thusturning to error processing is carried out, and serious consequences, such as consequences that critical data are deleted or a code segment is erased due to path deviation of program running, which are difficult for recovery are avoided.

Description

technical field [0001] The present invention relates to the technical field of safety micro-controllers, in particular to a method for detecting program running off-path, a device for detecting program running off-path, an electronic device and a readable storage medium. Background technique [0002] A microcontroller is a single-chip microcomputer that integrates the main part of a microcomputer on a chip. It has a large number of applications in various fields, from general civil and industrial control to some occasions that emphasize safety and reliability, such as financial payment. , aerospace control, etc., everywhere. [0003] In the case of external strong interference injection, the operation of the CPU inside the microcontroller may be abnormal, and the so-called program runaway phenomenon occurs, causing the program to deviate from the normal operation path. These disturbances include artificially added power supply disturbances, light disturbances, pulse disturb...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/07
CPCG06F11/0751
Inventor 苏孟豪
Owner LOONGSON TECH CORP