Method for monitoring internal memory varible rewrite based on finite-state-machine

A technology of finite state machine and memory, which is applied in the field of monitoring memory variable rewriting based on finite state machine, which can solve problems such as abnormal reading and writing of CPU memory, limitation of application range, and abnormal interruption of CPU, so as to achieve accurate positioning and improve debugging efficiency , good real-time effect

Inactive Publication Date: 2006-05-24
ZTE CORP
View PDF1 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The advantage of this method is accurate positioning and good real-time performance, but this method also has defects: it depends on the CPU hardware. When the CPU hardware does not provide data debugging registers, it cannot complete the monitoring of non-stack variables being rewritten; In addition, this method is also limited by the number of data breakpoint registers of the CPU, and the number of variables monitored at one time cannot exceed the number of data breakpoint registers, so its application range is limited
The defect of this method is that in the multitasking environment of shared global memory, since multiple tasks are in the address space of uniform addressing, when one task changes the non-stack state variable of another task by mistake, it is not necessarily Will or will not immediately cause CPU memory read and write exceptions, often after a task has been running for a long time, the CPU may be abnormally interrupted due to other parts of the memory read and write
Due to this hysteresis effect, it is more difficult to locate faults where non-stack variables are incorrectly overwritten

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
  • Method for monitoring internal memory varible rewrite based on finite-state-machine
  • Method for monitoring internal memory varible rewrite based on finite-state-machine
  • Method for monitoring internal memory varible rewrite based on finite-state-machine

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0014] Such as figure 1 As shown, the present invention provides a method for monitoring memory variable rewriting based on a finite state machine, which specifically includes:

[0015] First, according to the monitoring parameters of the memory variable to be monitored and the monitoring conditions, a monitoring unit is set (step 101). Then, set several monitoring points at different positions of the finite state machine (step 102). When the program runs to the monitoring point, it is judged whether the corresponding monitoring conditions recorded in the monitoring unit have been satisfied (step 103). If the monitoring condition has been met, output monitoring information at the monitoring point of the finite state machine (step 104). Next, monitor the next monitoring unit (step 105). If the monitoring condition is not satisfied, then directly monitor the next monitoring unit (step 105).

[0016] Such as figure 2 As shown, the specific steps to set up the monitoring uni...

Embodiment 2

[0030] Such as image 3 As shown, in the present invention, when it is impossible to determine whether the monitoring point and the monitoring unit are set, the specific process is as follows:

[0031] First, judge whether the monitoring point is set (step 301), if the monitoring point is not set, then exit the monitoring program. If the monitoring point is set, then judge whether the monitoring unit is set (step 302); if the monitoring unit is set, then take out a monitoring unit, and judge whether the monitoring has been completed (step 303); Whether condition satisfies (step 304); If monitoring condition satisfies, then mark this unit monitoring completion sign, and record monitoring information (step 305), judge whether monitoring unit scans and finish (step 306); And in above-mentioned process, do not detect If the monitoring unit finds that the monitoring unit has finished monitoring or the monitoring condition of the monitoring unit is not met, it will directly determi...

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 method includes steps: based on monitoring parameters of memory variable to be monitored and monitoring condition, setting up monitoring units; setting up some monitoring points at different positions of Finite State Machine (FSM); when program runs to the monitoring point, determining whether the relevant monitoring condition recorded in the monitoring unit is satisfied; if yes, the monitoring point of FSM outputs monitoring information. Advantages are: when CPU hardware does not possess register for debugging data, fault of rewritten unstack variable is positioned to level of status and event so as to raise debugging efficiency. Features are: accurate positioning and good performance in real time. Further, rewritten unstack variable can be positioned to function level inside FSM.

Description

technical field [0001] The invention relates to a method for monitoring the rewriting of non-stack memory variables in the embedded software environment of the finite state machine, and provides a method for locating the rewriting of non-stack variables in a multi-task operating environment based on shared global memory, especially The invention relates to a method for monitoring memory variable rewriting based on a finite state machine. Background technique [0002] In an embedded multitasking environment, how to locate non-stack variables that have been incorrectly rewritten is the most labor-intensive task in the debugging process and version running process. When it is wrongly rewritten, by whom, and how to catch the wrong rewrite are the first issues to be considered in software debugging or software fault location. [0003] In the existing non-stack memory variable reading and writing monitoring method, the fault that the non-stack memory variable is wrongly rewritten...

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 Applications(China)
IPC IPC(8): G06F11/36
Inventor 刘红军吴从海李海建
Owner ZTE CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products