Method for accurately estimating stack demand in embedded system

An embedded system, accurate estimation technology, applied in the direction of memory system, calculation, program control design, etc., can solve problems such as system instability, achieve accurate calculation results, and ensure the effect of safety and reliability
CN101876923AInactive Publication Date: 2010-11-03INST OF ACOUSTICS CHINESE ACAD OF SCI

Patent Information

Authority / Receiving Office
CN ยท China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF ACOUSTICS CHINESE ACAD OF SCI
Publication Date
2010-11-03
Estimated Expiration
Not applicable ยท inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
Patent Text Reader

Abstract

The invention provides a method for accurately estimating stack demand in an embedded system, which comprises the following steps of: performing stack demand analysis on the stack demand of a runtime library and a standard library of a local function and each call tree by using a complete function call relational graph, and summing; determining the maximum stack demand of each interrupt program in each priority level, summing, and adding the additional stack demand increased by saving the processor state; and summing the results to obtain the maximum stack demand of a single thread, wherein the complete function call relational graph is obtained by the following steps of: performing control flow analysis on a complete function relational graph to obtain a primary function relational graph, further analyzing by using a value analysis method of an abstract interpretation algorithm aiming at an indirect call function and a recursive call function, and noting function calls which cannot be analyzed by users. Aiming at multi-thread, a single thread step is repeated, a sum is calculated, and finally the sum plus the stack demand of the operation system is the total stack demand of the system.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to a method for analyzing stack use in an embedded system, in particular, the invention relates to a method for accurately estimating the stack requirement in an embedded system. Background technique

[0002] Stack memory is allocated statically by the program developer. If the usage of the stack is underestimated, the program will run incorrectly; if the usage of the stack is overestimated, the system memory resources will be wasted. The stack analyzer can not only reduce the difficulty for programmers to develop programs, but also reduce many hidden errors.

[0003] The present invention comprehensively analyzes the progress of related research in this field, for example, patent application number 200810061578.2 designs a method of stack usage analysis. In this patent, the executable file is used as input, disassembly is performed, the stack analysis of the basic block, the stack analysis in the function, and the stack usage i...

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