CN105446842B - A kind of ADI DSP code in-service monitoring method - Google Patents
A kind of ADI DSP code in-service monitoring method Download PDFInfo
- Publication number
- CN105446842B CN105446842B CN201510884908.8A CN201510884908A CN105446842B CN 105446842 B CN105446842 B CN 105446842B CN 201510884908 A CN201510884908 A CN 201510884908A CN 105446842 B CN105446842 B CN 105446842B
- Authority
- CN
- China
- Prior art keywords
- code
- code segment
- segment
- dsp
- adi
- 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
Links
Abstract
The invention discloses a kind of ADI DSP code in-service monitoring method, according to the link mapped file of DSP, the code segment that can be to be monitored in load document toward DSP increases code monitors label;DSP continues the LDR in reading non-volatile storage at runtime, if it find that code monitors mark, then compare the operation code in nonvolatile memory code and RAM;If the two is inconsistent, rechecking is carried out;If it is confirmed that it is inconsistent, then judge RAM operation code error, takes alarm measure immediately, misregistration information to nonvolatile memory is used for accident analysis.The method can be realized by simply modifying LDR file to the in-service monitoring for running code.
Description
Technical field
The present invention relates to a kind of ADI DSP code in-service monitoring methods, belong to embedded system field.
Background technique
With the high speed development of microprocessor technology, digital signal processor (DSP) has been increasingly being applied to aviation
Space flight, Industry Control etc. are to reliability, the higher occasion of security requirement.Due to processor always toward low-power consumption, low-voltage,
High integration direction is developed, and influence of the soft error to system safety can not be ignored.So-called " soft error " (soft error) is
Refer to the mistake of signal or data, also known as " single-particle inversion " (single-event upset).The appearance of this mistake is general
It is to be caused the jump of internal storage state by irradiations such as cosmic rays due to the memory of computer, but will not usually cause object to device
Rationality damage, device can generally restore after resetting.If the region of memory of error is located exactly at dsp operation code location
Domain may then cause serious safety problem.So if soft error existing for DSP code area can be detected before problem generation
Effective treatment measures are missed and take, by the safety and reliability for the system that greatly improves.
Summary of the invention
In order to solve the above-mentioned technical problems, the present invention provides a kind of ADI DSP code in-service monitoring methods.
In order to achieve the above object, the technical scheme adopted by the invention is that:
A kind of ADI DSP code in-service monitoring method, includes the following steps,
Step 1, specification link describe the section name in file, code segment and data segment are distinguished;
Step 2, customized crossover tool, according to the link mapped file that link generates, identifying can be in load document
Code segment to be monitored, and upper code Monitor Flag is set in each code segment to be monitored;
The link mapped file be .MAP file, it is described can load document be .LDR file;
Step 3, the LDR contents of program in program operation process first in reading non-volatile storage, has discriminated whether
Code monitors mark, if so, then reading code segment from nonvolatile memory, then according to nonvolatile memory
Load address and load length corresponding position from RAM in LDR read code segment;
Two parts code segment is carried out byte-by-byte comparison by step 4, if completely the same, continues to read and subsequent
Code segment, if it is inconsistent, code segment is read from nonvolatile memory and RAM again;If continuous several times compare
It is inconsistent, then it is judged as in RAM that code segment is abnormal;After confirmation error, detailed error information is recorded to non-volatile memories
In device, it is convenient for crash analysis.
Pass through the code in DRAM outside the code segment and piece in L2 memory in code segment in piece in L1 memory, piece
Section distinguishes code segment and data segment respectively with different name nominatings.
Code segment in piece in L1 memory is named as " L1_code ", and the code segment in piece in L2 memory is named as
" L2_code ", the code segment in the outer DRAM of piece are then named as " ext_code ".
One group is provided in the crossover tool for determining code segment keyword to be monitored.
The process of crossover tool addition code monitors mark is,
Crossover tool reads the segment information in MAP, if Duan Mingzhong includes any keyword, records the starting point of this section
Location and end address, crossover tool read the load information in LDR file, if load destination address is located exactly at some and waits supervising
Depending in sector address domain, then setting upper code Monitor Flag in the code segment.
Continuous number of comparisons is 10 times.
It can be realized as transporting advantageous effects of the invention: the present invention need to only carry out LDR file simply modification
The in-service monitoring of line code, to improve the safety and reliability of system.
Detailed description of the invention
Fig. 1 is process schematic of the invention.
Fig. 2 is the flow chart that crossover tool adds code monitors mark.
Specific embodiment
The invention will be further described below in conjunction with the accompanying drawings.Following embodiment is only used for clearly illustrating the present invention
Technical solution, and not intended to limit the protection scope of the present invention.
As shown in Figure 1, a kind of ADI DSP code in-service monitoring method, comprising the following steps:
Step 1, specification link describe the section name in file, code segment and data segment are distinguished.
Since program data section content is usually to change, and code segment is usually constant, erroneous detection and leakage in order to prevent
Inspection, it is necessary to which the section name first in specification link description file distinguishes code segment and data segment.Pass through L1 memory in piece
In code segment, the code segment in piece in L2 memory and the code segment in the outer DRAM of piece use different name nominatings respectively,
Code segment and data segment are distinguished.Specific name are as follows: the code segment in piece in L1 memory is named as " L1_code ", piece
Code segment in interior L2 memory is named as " L2_code ", and the code segment in the outer DRAM of piece is then named as " ext_code ".Link
After can generate link mapped file, i.e. .MAP file, this document includes all sections of address allocation information.Code is by compiling
Translate, link, loading etc. that generate after processes can load document, i.e. .LDR file.
Step 2, customized crossover tool, according to the link mapped file that link generates, identifying can be in load document
Code segment to be monitored, and upper code Monitor Flag is set in each code segment to be monitored.
It is provided with one group in crossover tool to be used to determine code segment keyword to be monitored, such as " _ code ", " program "
Deng.As shown in Fig. 2, the process of crossover tool addition code monitors mark are as follows: crossover tool reads the segment information in MAP, if
Duan Mingzhong includes any keyword, then records the initial address and end address of this section, and crossover tool reads adding in LDR file
Information carrying breath sets upper code monitors in the code segment if load destination address is located exactly in some sector address domain to be monitored
Mark.
In order to improve program operation speed, DSP the BOOT stage can according to the load information in executable file, by program from
Nonvolatile memory is loaded into RAM, then runs the code in RAM, at this time the code and RAM in nonvolatile memory
In code just have one-to-one relationship.
Step 3, the LDR contents of program in program operation process first in reading non-volatile storage, has discriminated whether
Code monitors mark, if so, then reading code segment from nonvolatile memory, then according to nonvolatile memory
Load address and load length corresponding position from RAM in LDR read code segment.
Two parts code segment is carried out byte-by-byte comparison by step 4, if completely the same, continues to read and subsequent
Code segment, if it is inconsistent, code segment is read from nonvolatile memory and RAM again;If continuous several times compare
Inconsistent, the number generally continuously compared is 10 times, then is judged as in RAM that code segment is abnormal;It, will be wrong in detail after confirmation error
False information is recorded into nonvolatile memory, is convenient for crash analysis.
Using the above method, according to the link mapped file of DSP, toward the code segment that can be to be monitored in load document of DSP
Increase code monitors label;DSP continues the LDR in reading non-volatile storage at runtime, if it find that code monitors mark
Will then compares the operation code in nonvolatile memory code and RAM;If the two is inconsistent, rechecking is carried out;Such as
Fruit confirmation is inconsistent, then judges RAM operation code error, take alarm measure immediately, misregistration information is deposited to non-volatile
Reservoir is used for accident analysis.This method need to only carry out simply modification to LDR file can be realized as the online prison of operation code
Depending on to improve the safety and reliability of system.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, without departing from the technical principles of the invention, several improvement and deformations can also be made, these improvement and deformations
Also it should be regarded as protection scope of the present invention.
Claims (6)
1. a kind of ADI DSP code in-service monitoring method, it is characterised in that: include the following steps,
Step 1, specification link describe the section name in file, code segment and data segment are distinguished;
Step 2, customized crossover tool, according to the link mapped file that link generates, identify can in load document wait supervise
Upper code Monitor Flag is set depending on code segment, and in each code segment to be monitored;
The link mapped file be .MAP file, it is described can load document be .LDR file;
Step 3, the LDR contents of program in program operation process first in reading non-volatile storage, has discriminated whether code
Monitor Flag, if so, then reading code segment from nonvolatile memory, then according in nonvolatile memory LDR
Load address and load length corresponding position from RAM code segment is read;
Code segment in code segment and RAM in the nonvolatile memory of reading is carried out byte-by-byte comparison by step 4, if
It is completely the same, then continue reading and subsequent code segment, if it is inconsistent, by code segment again from nonvolatile memory
It is read in RAM;If continuous several times are more inconsistent, it is judged as in RAM that code segment is abnormal;It, will be detailed after confirmation error
Thin error message is recorded into nonvolatile memory, is convenient for crash analysis.
2. a kind of ADI DSP code in-service monitoring method according to claim 1, it is characterised in that: deposited by L1 in piece
The code segment in the outer DRAM of code segment and piece in code segment, piece in reservoir in L2 memory is ordered with different titles respectively
Name, code segment and data segment are distinguished.
3. a kind of ADI DSP code in-service monitoring method according to claim 2, it is characterised in that: L1 memory in piece
In code segment be named as " L1_code ", the code segment in piece in L2 memory is named as " L2_code ", in the outer DRAM of piece
Code segment is then named as " ext_code ".
4. a kind of ADI DSP code in-service monitoring method according to claim 1, it is characterised in that: the crossover tool
In be provided with one group for determining code segment keyword to be monitored.
5. a kind of ADI DSP code in-service monitoring method according to claim 4, it is characterised in that: the crossover tool
Addition code monitors mark process be,
Crossover tool read MAP in segment information, if Duan Mingzhong include any keyword, record this section initial address and
End address, crossover tool read the load information in LDR file, if load destination address is located exactly at some to be monitored section
In address field, then upper code Monitor Flag is set in the code segment.
6. a kind of ADI DSP code in-service monitoring method according to claim 1, it is characterised in that: continuous number of comparisons
It is 10 times.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510884908.8A CN105446842B (en) | 2015-12-03 | 2015-12-03 | A kind of ADI DSP code in-service monitoring method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510884908.8A CN105446842B (en) | 2015-12-03 | 2015-12-03 | A kind of ADI DSP code in-service monitoring method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105446842A CN105446842A (en) | 2016-03-30 |
CN105446842B true CN105446842B (en) | 2019-01-04 |
Family
ID=55557074
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510884908.8A Active CN105446842B (en) | 2015-12-03 | 2015-12-03 | A kind of ADI DSP code in-service monitoring method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105446842B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101484878A (en) * | 2006-07-18 | 2009-07-15 | 英特尔公司 | A method to use global variables for Pre-EFI initialization modules in EFI-based firmware |
CN101551763A (en) * | 2009-05-15 | 2009-10-07 | 中国人民解放军国防科学技术大学 | Method and device for repairing single event upset in field programmable logic gate array |
CN102354294A (en) * | 2011-08-23 | 2012-02-15 | 西安空间无线电技术研究所 | Method for detecting spatial single event upset of space-borne DSP (Digital Signal Processor) chip |
CN102521062A (en) * | 2011-11-29 | 2012-06-27 | 西安空间无线电技术研究所 | Software fault-tolerant method capable of comprehensively on-line self-detection single event upset |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8205019B2 (en) * | 2005-09-30 | 2012-06-19 | Intel Corporation | DMA transfers of sets of data and an exclusive or (XOR) of the sets of data |
-
2015
- 2015-12-03 CN CN201510884908.8A patent/CN105446842B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101484878A (en) * | 2006-07-18 | 2009-07-15 | 英特尔公司 | A method to use global variables for Pre-EFI initialization modules in EFI-based firmware |
CN101551763A (en) * | 2009-05-15 | 2009-10-07 | 中国人民解放军国防科学技术大学 | Method and device for repairing single event upset in field programmable logic gate array |
CN102354294A (en) * | 2011-08-23 | 2012-02-15 | 西安空间无线电技术研究所 | Method for detecting spatial single event upset of space-borne DSP (Digital Signal Processor) chip |
CN102521062A (en) * | 2011-11-29 | 2012-06-27 | 西安空间无线电技术研究所 | Software fault-tolerant method capable of comprehensively on-line self-detection single event upset |
Also Published As
Publication number | Publication date |
---|---|
CN105446842A (en) | 2016-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101805234B1 (en) | Method, non-transitory computer readable storage medium, and auxiliary memory for monitoring a data memory | |
US20100058144A1 (en) | Memory system with ecc-unit and further processing arrangement | |
CN109117327A (en) | A kind of hard disk detection method and device | |
CN106022107A (en) | Method and system for protecting program execution integrity | |
US20150161030A1 (en) | Detecting method and system for concurrency bugs | |
CN105988921A (en) | Method and device for detecting out of range problem of memory | |
US8195986B2 (en) | Method, system and computer program product for processing error information in a system | |
CN104281805B (en) | Method for security protection and processor | |
WO2007086150A1 (en) | Memory destruction detection method and device | |
CN107921979B (en) | Train alarm processing method and system | |
CN104142889A (en) | Test point setting and optimization method of single-particle soft errors at assembly level | |
CN105446842B (en) | A kind of ADI DSP code in-service monitoring method | |
CN111027072B (en) | Kernel Rootkit detection method and device based on elf binary standard analysis under Linux | |
GB2551574B (en) | An apparatus and method for generating and processing a trace stream indicative of instruction execution by processing circuitry | |
CN104461880A (en) | Method for automatically detecting heap corruption in embedded system | |
JP5545771B2 (en) | Diagnostic device, diagnostic method, and diagnostic program diagnostic method | |
JP3124278B2 (en) | Inspection method of memory cell contents of program memory | |
US8516310B2 (en) | Information processing device equipped with write-back cache and diagnosis method for main memory of the same | |
JP2010097432A (en) | Ram diagnosis apparatus and program thereof | |
US7593258B2 (en) | Protection of the flow of a program executed by an integrated circuit or of data contained in this circuit | |
CN109254898A (en) | A kind of software module executes sequential monitoring method and monitoring system | |
CN104008049A (en) | Method for monitoring stack storage in motor vehicle controller work system | |
CN106502929A (en) | A kind of target device, a kind of processing method and processing device of internal storage data | |
US20070179635A1 (en) | Method and article of manufacure to persistently deconfigure connected elements | |
CN107943604B (en) | Secure computer memory self-checking method and device for real-time operating system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |