CN102662809B - System adjustment method on seamless sheet based on virtual break-point instruction - Google Patents
System adjustment method on seamless sheet based on virtual break-point instruction Download PDFInfo
- Publication number
- CN102662809B CN102662809B CN201210055952.4A CN201210055952A CN102662809B CN 102662809 B CN102662809 B CN 102662809B CN 201210055952 A CN201210055952 A CN 201210055952A CN 102662809 B CN102662809 B CN 102662809B
- Authority
- CN
- China
- Prior art keywords
- instruction
- break
- poing
- target machine
- poing instruction
- 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 realizes a system adjustment method on a seamless sheet based on virtual break-point instruction. Based on the controllability and low invasibility of the adjustment method, through inserting a virtual break-point instruction (which invisible for a debugger when the break-point instruction is executed) behind a pause instruction and using a time slot the break-point instruction executes, the method accomplishes the recovery of an expected break-point instruction. The expected break-point instruction is effective before being debugged and deleted. Meanwhile, the correct operation of an object machine is ensured when the expected break-point instruction is executed each time.
Description
Technical field:
The invention belongs to integrated circuit fields, be specifically related to a kind of adjustment method of SOC (system on a chip).
Background technology:
International semiconductor Technology Roadmap (ITRS:International Technology Roadmap for Semiconductors) is pointed out, debugging and the time required for orientation problem, will along with the progress of technique exponentially type growth.According to document AReconfigurable Design-for-Debug Infrastructure for SoCs (M.Abramovici, Paul Bradley, Kumar Dwarakanah, et al., In Proceedings ACM/IEEE Design Automation Conference (DAC), 2006:7-12), in the design process of whole SOC (system on a chip), sheet is thrown to finally successfully realizing all functions from first time, the time of hardware debug is close to 35% of the whole time, and this numeral also can increase along with the raising of integrated level.With debug flexibility and coverage rate in the design of on-chip system debug method that drives, how more reasonable design debugging method, become an important challenge.
Inserting the adjustment method of break-poing instruction, is the one effectively and flexibly means of on-chip system debug.The method is typically employed in expecting instruction stream position and inserts break-poing instruction, and when debug target machine runs to this instruction, the running status of Break-Up System, enters debugging mode, and debug user can by the current state information of debugging method recording geometry.Before exiting debugging mode, need the break-poing instruction inserting to be replaced into former instruction, control objectives machine restarts from the position of this instruction to perform, and guarantees the correctness of former instruction operation sequence with this.In addition, before debug user does not delete break-poing instruction, wish this break-poing instruction continuously effective, like this, when instruction stream circular flow is to this position, this break-poing instruction is still effective, realizes the monitoring of debug user to a certain particular state with this.
If according to the method described above, when carrying out break-poing instruction insertion design, situation as shown in accompanying drawing 1,2 will be there is.In accompanying drawing 1, insert break-poing instruction in the A position of expection, after break-poing instruction performs, debug user is got involved, and before exiting debugging, recovers the instruction of former A position.The break-poing instruction inserted is performed once, is just set to and gains original instruction, if so break-poing instruction is the instruction in loop body, when performing this position again, does not have break-poing instruction.In other words, do not delete the prerequisite of breakpoint at debug user under, break-poing instruction, after execution once, is automatically cleared.
In accompanying drawing 2, insert break-poing instruction in the A position of expection, after break-poing instruction performs, debug user is got involved, and before exiting debugging, does not recover the instruction of former A position.After exiting debugging, target machine brings into operation from A position, and break-poing instruction is hit again, and infinite loop like this performs, system exception.
Summary of the invention:
The controllability of adjustment method, requires that debug user can by the running status of debugger effective control objectives machine and implementation to be debugged.The low invasive of adjustment method, then require that debug process does not change the act of execution of original program, do not have an impact to original program operation result.Based on above-mentioned two requirements, present invention achieves a kind of adjustment method based on virtual break-poing instruction.The method by inserting virtual break-poing instruction (when this break-poing instruction performs after pause instruction, debugging person is invisible), the time slot utilizing this break-poing instruction to perform and time slot, complete the recovery of expection break-poing instruction, before there is no debugged deletion, expection break-poing instruction continuously effective.Meanwhile, when guaranteeing each execution to expection break-poing instruction, the true(-)running of target machine.Particular content is as follows:
Based on a seamless on-chip system debug method for virtual break-poing instruction, comprise the steps: the A position of inserting break-poing instruction in expection, insert expection break-poing instruction, when target machine runs to this expection break-poing instruction, enter debugging mode, open debug window, debug user gets involved debugging; Before exiting debugging mode, the former instruction of A position is recovered, next location of instruction in target machine instruction stream, be referred to as B position, insert a virtual break-poing instruction, the time slot utilizing this virtual break-poing instruction to perform, completes the recovery of expection break-poing instruction, enable debugs window, exits debugging mode; Described virtual break-poing instruction user in commissioning process is invisible.
The invention has the beneficial effects as follows: described method is without the need to user intervention, and after realizing once inserting breakpoint, breakpoint behavior continuous and effective, until breakpoint is removed by user, the debugging for Embedded SoC provides flexibly and efficient means.
Accompanying drawing illustrates:
Fig. 1 is that expection insertion break-poing instruction once effectively runs schematic diagram.
Fig. 2 is that breakpoint circulation execution operation schematic diagram is inserted in expection.
Fig. 3 is that the present invention inserts virtual break-poing instruction operation schematic diagram.
Fig. 4 is interconnect architecture schematic diagram of the present invention.
Embodiment:
Below in conjunction with accompanying drawing, the present invention is described in detail.
Described method realize structure as shown in Figure 3, A position is that the position of break-poing instruction is inserted in expection, and break-poing instruction is inserted in the A position in described figure a, when target machine runs to this break-poing instruction, enter debugging mode, open debug window, debug user gets involved debugging; In described figure b, realize before exiting debugging mode, the former instruction of A position recovered, next location of instruction in target machine instruction stream, is referred to as B position, and insert a virtual break-poing instruction, enable debugs window, exits debugging mode.Target machine brings into operation from A position, and when running to B position, virtual break-poing instruction is performed, enter debugging mode, but do not open debug window, debug user can not get involved debugging, as described in figure c, utilize this time slot, complete two operations, one is the former instruction recovering B position, and two is the break-poing instructions recovering A position, exit debugging mode, target machine continues to run from B position.So, namely achieve the true(-)running of target machine instruction stream, the break-poing instruction that the expection of A position is inserted simultaneously is recovered automatically.
For realizing described method, first define debug system interconnected model, as shown in Figure 4.This system comprises following 3 assemblies:
Target machine: target debugger object, completes the operation of instruction stream, after running into break-poing instruction, suspends target machine and runs, and controls debugging middleware and starts.After receiving debugging middleware exiting command, continue to run from break-poing instruction.
Debugging middleware: the signal centre of debug user and target machine is transparent to debug user.Receive debug window order, resolve to the control information of target machine identifiable design; Control objectives machine and the open and close communicated between debug window.
Debug window: debug user is visible, sends debug command to target machine.
In described debug system, for adopting a kind of normalized form to realize described adjustment method, the present invention will disclose a kind of R language, describe the implementation procedure of shown method thus.
The feature of R language is: the first ornamental, and the basic operation of R language is wall scroll primitive, defines state control statement simultaneously, specifies that it defines by system component according to specific implementation, be convenient to the description of method; Second succession in time and spatially, on the time, succession refers to that the operation that R language describes performs according to the order of primitive sequence, and spatially succession then refers to the specific run order of 3 assemblies in debug system; 3rd closed, R language defines the initial behavior start of execution and termination behavior end, and meanwhile, closedown and the open operation of 3 assemblies close respectively.
The grammer of R language is described as follows:
1 ,@Xn: Boolean quantity, n value 0 ~ 9, its value false and true, represents "false" and "True" respectively;
2, Read, address, mark: read data in " address ", in " mark " these data of middle preservation;
3, Write, data, address: will " data " write " address " in;
4, If condition goto identifies: " condition " be " very " time, jump to " mark " position performs, otherwise order performs;
5, #An: data markers, n value 0 ~ 9, this mark can record data;
6, $ Yn: first logograph is known, n value 0 ~ 9, defines R language wall scroll unit language;
7, #xx: state control statement, this statement comprises some wall scroll unit languages;
# windows_down: debug window is closed;
# windows_open: debug window is opened;
# debugmod_down: debugging mode is closed;
# debugmod_open: debugging mode starts;
# run_on: target machine runs;
# run_down: target machine end of run;
# non_bphit: debugging mode starts;
8, ta: break-poing instruction;
9, watchpoint_address: the break-poing instruction position that expection is arranged;
10, PC: the location of instruction of the current operation of target machine;
11, NPC: the next instruction position of next-door neighbour PC;
Wherein, debug user opens period visual target machine at debug window, and in all the other moment, target machine is transparent to debug user.
This adjustment method, starting target machine with debug user and operate to beginning, is final node with target machine end of run, in the method that following R language describes, is initialized as debug window opening.
Below according to execution sequence, said method is described:
Time initial, system debug window is opened, and is@X0 assignment "false", reads the instruction of PC position when target machine suspends, stored in #A0; Read the instruction that expection arranges breakpoint location watchpoint_address, stored in #A1; Judge whether current PC value equals watchpoint_address value, be confirmed whether to cause system to enter debugging mode by the execution of break-poing instruction with this, if unequal, showing the position of now target machine time-out, is not breakpoint location, so insert break-poing instruction ta in watchpoint_address position, proceed to $ Y2, enable debugs window, exits debugging mode, and target machine brings into operation from PC position.
When target machine runs to the breakpoint location of setting, perform break-poing instruction, enter debugging mode, now judge "True" and the "false" of@X0.Due in implementation above ,@X0 is "false", and therefore, redirect enters start and starts to perform.
For@X0 assignment "false", read the instruction of PC position when target machine suspends, stored in #A0; Read the instruction that expection arranges breakpoint location watchpoint_address, stored in #A1; Now, criterion PC==watchpoint_address sets up, and shows that now entering of debugging mode is caused by break-poing instruction execution.
Redirect enters $ Y1, perform the insertion of virtual breakpoint: putting@X0 is "True", read the instruction of NPC position, preserve into #A2, insert break-poing instruction ta in NPC position, the instruction being kept at #A0 is returned to PC position, proceed to $ Y2, enable debugs window, exits debugging mode, and target machine starts to run from PC position.
The now instruction of PC position is replaced into presumptive instruction, and the instruction of NPC position is break-poing instruction, when running to NPC, break-poing instruction performs, and enter debugging mode again, now@X0 is "True", the instruction of NPC position is recovered, cancels virtual break-poing instruction, proceed to $ Y0.At this by performing in time slot that virtual break-poing instruction brings, being completed by debugging middleware and break-poing instruction is write PC position.Now do not open debug window, namely this break-poing instruction performs transparent to debug user.
At Y0 place, putting X0 is "false", and characterize now virtual break-poing instruction and processed, judge the PC value that current goal machine suspends and watchpoint_address, because current break-poing instruction is virtual adding, therefore, both are obviously different.Perform and insert break-poing instruction ta in watchpoint_address position, exit debugging mode, target machine brings into operation.
When the instruction operation sequence of target machine does not circulate execution, so in execution to last, also not have breakpoint again to hit, now target machine end of run, if the break-poing instruction of being circulated again into, will repeat according to above-mentioned again.
Claims (1)
1. based on a seamless on-chip system debug method for virtual break-poing instruction, comprise the steps: the A position of inserting break-poing instruction in expection, insert expection break-poing instruction, when target machine runs to this expection break-poing instruction, enter debugging mode, open debug window, debug user gets involved debugging; Before exiting debugging mode, the former instruction of A position is recovered, next location of instruction in target machine instruction stream, be referred to as B position, insert a virtual break-poing instruction, the time slot utilizing this virtual break-poing instruction to perform, completes the recovery of expection break-poing instruction, enable debugs window, exits debugging mode;
It is characterized in that: described virtual break-poing instruction user in commissioning process is invisible;
Described adjustment method starts target machine with debug user and operates to beginning, is final node with target machine end of run;
The implementation procedure of adjustment method is described with R language:
Time initial, system debug window is opened, and is@X0 assignment "false", reads the instruction of PC position when target machine suspends, stored in #A0; Read the instruction that expection arranges breakpoint location watchpoint_address, stored in #A1; Judge whether current PC value equals watchpoint_address value, be confirmed whether to cause system to enter debugging mode by the execution of break-poing instruction with this, if unequal, showing the position of now target machine time-out, is not breakpoint location, so insert break-poing instruction ta in watchpoint_address position, proceed to $ Y2, enable debugs window, exits debugging mode, and target machine brings into operation from PC position;
When target machine runs to the breakpoint location of setting, perform break-poing instruction, enter debugging mode, now judge "True" and the "false" of@X0, due in implementation above ,@X0 is "false", and therefore, redirect enters start and starts execution;
For@X0 assignment "false", read the instruction of PC position when target machine suspends, stored in #A0; Read the instruction that expection arranges breakpoint location watchpoint_address, stored in #A1; Now, criterion PC==watchpoint_address sets up, and shows that now entering of debugging mode is caused by break-poing instruction execution;
Redirect enters $ Y1, perform the insertion of virtual breakpoint: arranging@X0 is "True", read the instruction of NPC position, preserve into #A2, insert break-poing instruction ta in NPC position, the instruction being kept at #A0 is returned to PC position, proceed to $ Y2, enable debugs window, exits debugging mode, and target machine starts to run from PC position;
The now instruction of PC position is replaced into presumptive instruction, and the instruction of NPC position is break-poing instruction, when running to NPC, break-poing instruction performs, and enter debugging mode again, now@X0 is "True", the instruction of NPC position is recovered, cancels virtual break-poing instruction, proceed to $ Y0; At this by performing in time slot that virtual break-poing instruction brings, being completed by debugging middleware and break-poing instruction is write PC position; Now do not open debug window, namely this break-poing instruction performs transparent to debug user;
At Y0 place, arranging X0 is "false", and characterize now virtual break-poing instruction and processed, judge the PC value that current goal machine suspends and watchpoint_address, because current break-poing instruction is virtual adding, therefore, both are obviously different; Perform and insert break-poing instruction ta in watchpoint_address position, exit debugging mode, target machine brings into operation;
When the instruction operation sequence of target machine does not circulate execution, so in execution to last, also not have breakpoint again to hit, now target machine end of run, if the break-poing instruction of being circulated again into, will repeat again;
The grammer of R language is described as follows:
1) ,@Xn: Boolean quantity, n value 0 ~ 9, its value false and true, respectively expression "false" and "True";
2), Read, address, mark: read data in " address ", in " mark " these data of middle preservation;
3), Write, data, address: will " data " write " address " in;
4), If condition goto identifies: " condition " is " that very " time, jump to " " position performs mark, otherwise order performs;
5), #An: data markers, n value 0 ~ 9, these label record data;
6), $ Yn: first logograph is known, n value 0 ~ 9, defines R language wall scroll unit language;
7), #xx: state control statement, this statement comprises some wall scrolls unit languages;
#windows_down: debug window is closed;
#windows_open: debug window is opened;
#debugmod_down: debugging mode is closed;
#debugmod_open: debugging mode starts;
#run_on: target machine runs;
#run_down: target machine end of run;
#non_bphit: debugging mode starts;
8), ta: break-poing instruction;
9), watchpoint_address: the break-poing instruction position that expection is arranged;
10), PC: the location of instruction of the current operation of target machine;
11), NPC: the next instruction position of next-door neighbour PC;
Wherein, debug user opens period visual target machine at debug window, and in all the other moment, target machine is transparent to debug user.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210055952.4A CN102662809B (en) | 2012-03-06 | 2012-03-06 | System adjustment method on seamless sheet based on virtual break-point instruction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210055952.4A CN102662809B (en) | 2012-03-06 | 2012-03-06 | System adjustment method on seamless sheet based on virtual break-point instruction |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102662809A CN102662809A (en) | 2012-09-12 |
CN102662809B true CN102662809B (en) | 2014-12-24 |
Family
ID=46772306
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210055952.4A Active CN102662809B (en) | 2012-03-06 | 2012-03-06 | System adjustment method on seamless sheet based on virtual break-point instruction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102662809B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5687375A (en) * | 1994-10-14 | 1997-11-11 | International Business Machines Corporation | Debugging of High Performance Fortran programs with backup breakpoints |
CN101004707A (en) * | 2007-01-18 | 2007-07-25 | 浙江大学 | Embedded type software debugging device, and method for implementing debugging |
CN101149687A (en) * | 2006-09-21 | 2008-03-26 | 北京航空航天大学 | Breakpoint debugging method for LR(k) grammar random grammar position |
CN101826032A (en) * | 2009-03-06 | 2010-09-08 | 英伟力新能源科技(上海)有限公司 | High-efficiency real-time multi-task operating system kernel |
-
2012
- 2012-03-06 CN CN201210055952.4A patent/CN102662809B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5687375A (en) * | 1994-10-14 | 1997-11-11 | International Business Machines Corporation | Debugging of High Performance Fortran programs with backup breakpoints |
CN101149687A (en) * | 2006-09-21 | 2008-03-26 | 北京航空航天大学 | Breakpoint debugging method for LR(k) grammar random grammar position |
CN101004707A (en) * | 2007-01-18 | 2007-07-25 | 浙江大学 | Embedded type software debugging device, and method for implementing debugging |
CN101826032A (en) * | 2009-03-06 | 2010-09-08 | 英伟力新能源科技(上海)有限公司 | High-efficiency real-time multi-task operating system kernel |
Also Published As
Publication number | Publication date |
---|---|
CN102662809A (en) | 2012-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8161328B1 (en) | Debugger interface | |
US6356862B2 (en) | Hardware and software co-verification employing deferred synchronization | |
CN101887393B (en) | Equipment fault reproduction method and system based on para-virtualization technique | |
CN101339581B (en) | Embedded system on-line debugging emulation method based on communication interruption | |
CN108664380B (en) | After-execution software debugging system with performance display and debugging method | |
CN105608258B (en) | A kind of Model-based diagnosis and information flow visual simulation system and method | |
US20020147965A1 (en) | Tracing out-of-order data | |
Cheng et al. | A jit compiler for android’s dalvik vm | |
CN104915287B (en) | Unit test method and system | |
CN100592266C (en) | Microprocessor debugging method and microprocessor debugging module | |
CN102147756B (en) | Methods and systems for testing terminal | |
CN104965776B (en) | Mobile terminal checks the method and system of daily record in recovery mode | |
CN104272271B (en) | Processor device with instruction trace ability | |
KR101547163B1 (en) | Debug instruction for use in a multi-threaded data processing system | |
CN101493847A (en) | Communication chip system chip tracing and debugging method and apparatus | |
CN107273313A (en) | The USB mode of USB interface and the compatibility method and device of MHL patterns | |
KR100354932B1 (en) | Methods and data processors for providing show cycles on multiplexing buses | |
CN101751327A (en) | Method for tracing embedded processor debugging | |
CN102662809B (en) | System adjustment method on seamless sheet based on virtual break-point instruction | |
CN109885466A (en) | Emulation mode, system and the medium of processor C8000 | |
CN106528414B (en) | Processor chips emulator | |
CN107451015A (en) | A kind of intelligent television critical data backup and data reconstruction method | |
JP2007058813A (en) | Verification device and verification method | |
CN102193860A (en) | Microcontroller online debugging circuit and method as well as microcontroller | |
CN100481093C (en) | System for verifying target and verification method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |