CN102662809A - 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
- CN102662809A CN102662809A CN2012100559524A CN201210055952A CN102662809A CN 102662809 A CN102662809 A CN 102662809A CN 2012100559524 A CN2012100559524 A CN 2012100559524A CN 201210055952 A CN201210055952 A CN 201210055952A CN 102662809 A CN102662809 A CN 102662809A
- Authority
- CN
- China
- Prior art keywords
- break
- instruction
- poing
- debugging
- 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.)
- Granted
Links
Images
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 path figure (ITRS:International Technology Roadmap for Semiconductors) points out, debugging and needed time of orientation problem, will be exponential type along with the progress of technology and increase.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) said, in the design process of whole SOC(system on a chip), from throwing for the first time the successful to the end realization all functions of sheet; The time of hardware debug is near 35% of the whole time, and this numeral also can increase along with the raising of integrated level.Be that how more reasonably the design debug means become an important challenge in the design of on-chip system debug method of driving with debugging dirigibility and coverage rate.
Inserting the adjustment method of break-poing instruction, is the effectively a kind of of on-chip system debug and means flexibly.This method is employed in expecting instruction stream position usually and inserts break-poing instruction, and when the debug target machine ran to this instruction, the running status of Break-Up System got into debugging mode, and the debugging user can be through the current state information of debugging method recording geometry.Before withdrawing from debugging mode, need be replaced into former instruction to the break-poing instruction of inserting, the controlled target machine restarts from the position of this instruction to carry out, and guarantees the correctness of former instruction operation sequence with this.In addition, the debugging user does not delete before the break-poing instruction, hopes this break-poing instruction continuously effective, and like this, when this position was arrived in instruction stream circular flow, this break-poing instruction was still effective, realizes debugging the monitoring of user to a certain particular state with this.
If according to the method described above, carry out break-poing instruction and insert when designing, will occur like accompanying drawing 1, situation shown in 2.In the accompanying drawing 1, insert break-poing instruction in the A position of expection, after break-poing instruction was carried out, the debugging user got involved, and withdraws from before the debugging, recovers the instruction of former A position.After the break-poing instruction of inserting has been performed once, just replaced back original instruction,, when implementing this position again, do not had break-poing instruction if break-poing instruction is the instruction in the loop body so.In other words, do not delete under the prerequisite of breakpoint the debugging user, break-poing instruction is removed after carrying out once automatically.
In the accompanying drawing 2, insert break-poing instruction in the A position of expection, after break-poing instruction was carried out, the debugging user got involved, and withdraws from before the debugging, does not recover the instruction of former A position.After withdrawing from debugging, target machine brings into operation from the A position, and break-poing instruction is hit once more, and so infinite loop is carried out, system exception.
Summary of the invention:
The controllability of adjustment method, requiring to debug the user can be through the running status and implementation to be debugged of the effective controlled target machine of debugger.The low invasion property of adjustment method then requires debug process not change original program implementation behavior, original program run result is not exerted an influence.Based on above-mentioned two requirements, the present invention has realized a kind of adjustment method based on virtual break-poing instruction.This method is through inserting virtual break-poing instruction (when this break-poing instruction is carried out in the instruction back of pausing; Debugging person is invisible), the time slot that utilizes this break-poing instruction to carry out is the time gap, accomplishes the recovery of expection break-poing instruction; Before not having debugged deletion, expection break-poing instruction continuously effective.Simultaneously, when guaranteeing to implement the expection break-poing instruction at every turn, the true(-)running of target machine.Particular content is following:
A kind of seamless on-chip system debug method based on virtual break-poing instruction comprises the steps: to insert the expection break-poing instruction in the A position of expection insertion break-poing instruction; When target machine runs to this expection break-poing instruction; Get into debugging mode, open debug window, the debugging user gets involved debugging; Before withdrawing from debugging mode, with the former instruction recovery of A position, next bar location of instruction in the target machine instruction stream; Be referred to as the B position; Insert a virtual break-poing instruction, the time slot that utilizes this virtual break-poing instruction to carry out is accomplished the recovery of expection break-poing instruction; The enable debugs window withdraws from debugging mode; User in the commissioning test process is invisible for said virtual break-poing instruction.
The invention has the beneficial effects as follows: said method need not user intervention, and after realizing once inserting breakpoint, breakpoint behavior continuous and effective is removed breakpoint until the user, for the debugging of embedded SOC(system on a chip) provides flexibly and means efficiently.
Description of drawings:
Fig. 1 is that expection insertion break-poing instruction is once effectively moved synoptic diagram.
Fig. 2 is that breakpoint circulation execution operation synoptic diagram is inserted in expection.
Fig. 3 is that the present invention inserts virtual break-poing instruction operation synoptic diagram.
Fig. 4 is an interconnect architecture synoptic diagram of the present invention.
Embodiment:
Below in conjunction with accompanying drawing the present invention is done detailed description.
The implementation structure of said method is shown in accompanying drawing 3, and the position that break-poing instruction is inserted for expection in the A position is in the said A position insertion break-poing instruction of scheming among a; When target machine runs to this break-poing instruction; Get into debugging mode, open debug window, the debugging user gets involved debugging; Among the said figure b, be implemented in withdraw from debugging mode before, the former instruction of A position is recovered, next bar location of instruction is referred to as the B position in the target machine instruction stream, inserts a virtual break-poing instruction, the enable debugs window withdraws from debugging mode.Target machine brings into operation from the A position, and when running to the B position, virtual break-poing instruction is performed, and gets into debugging mode; But do not open debug window, the debugging user can not get involved debugging, in said figure c; Utilize this time slot, accomplish two operations, the one, the former instruction of recovery B position; The 2nd, recover the break-poing instruction of A position, withdraw from debugging mode, target machine begins to continue operation from the B position.So, promptly realized the true(-)running of target machine instruction stream, the break-poing instruction that the expection of A position is simultaneously inserted is recovered automatically.
For realizing said method, at first define the debug system interconnected model, shown in accompanying drawing 4.This system comprises following 3 assemblies:
Target machine: the target debugger object, accomplish the operation of instruction stream, after running into break-poing instruction, suspend the target machine operation, control debugging middleware starts.After receiving debugging middleware exiting command, begin to continue operation from break-poing instruction.
The debugging middleware: the signal centre of debugging user and target machine, it is transparent to exchange family on probation.The order of reception debug window, but resolve to target machine identification control information; The open and close of communicating by letter between controlled target machine and debug window.
Debug window: the debugging user is visible, sends debug command to target machine.
In said debug system, realize said adjustment method for adopting a kind of normalized form, the present invention will disclose a kind of R language, the implementation procedure of method shown in describing thus.
The R language characteristic is: first ornamental, the basic operation of R language are wall scroll primitive, have defined the State Control statement simultaneously, stipulate its definition by system component according to concrete realization, are convenient to the description of method; Second in time with the space on succession, succession is meant that the operation of R language description carries out according to the order of primitive sequence on the time, succession then is meant the specific run order of 3 assemblies in the debug system on the space; The 3rd closed, R language have been stipulated the initial behavior start and termination behavior end that carry out, simultaneously, 3 assemblies close and open operation closed respectively.
The grammer of R language is explained as follows:
1, Xn: Boolean quantity, n value 0~9, its value false and true, expression " vacation " and " very " respectively;
2, Read, address, mark: read data in " address ", in " mark " these data of middle preservation;
3, Write, data, the address: will " data " write " address " in;
4, If condition goto sign: " condition " be " very " time, jump to " sign " position execution, otherwise execution in proper order;
5, #An: data markers, n value 0~9, this mark can record data;
6 、, $Yn: first logograph is known, and n value 0~9 has defined R language wall scroll unit language;
7, #xx: State Control statement, this statement comprise 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 operation;
# 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 provided with;
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, debugging user visual target machine during debug window is opened, in all the other moment, it is transparent that target machine is exchanged family on probation.
This adjustment method starts target machine with the debugging user and operates to beginning, is final node with the target machine end of run, in the method for following R language description, is initialized as the debug window opening.
Below according to execution sequence, said method is described:
When initial, the system debug window is opened, and is X0 assignment " vacation ", and the instruction of the PC position when reading the target machine time-out deposits #A0 in; Read expection the instruction of breakpoint location watchpoint_address is set, deposit #A1 in; Judge whether the current PC value equals the watchpoint_address value, whether confirm to cause system to get into debugging mode with this, if unequal by the execution of break-poing instruction; Showing the position that this moment, target machine suspended, is not breakpoint location, so insert break-poing instruction ta in the watchpoint_address position; Zhuan Ru $Y2; The enable debugs window withdraws from debugging mode, and target machine brings into operation from the PC position.
When target machine runs to the breakpoint location of setting, carry out break-poing instruction, get into debugging mode, judge " very " and " vacation " of X0 this moment.Because in the implementation of front, X0 is " vacation ", therefore, redirect is gone into start and is begun to carry out.
Be X0 assignment " vacation " that the instruction of the PC position when reading the target machine time-out deposits #A0 in; Read expection the instruction of breakpoint location watchpoint_address is set, deposit #A1 in; At this moment, criterion PC==watchpoint_address sets up, and shows that the entering of debugging mode this moment is caused by the break-poing instruction execution.
Redirect Ru $Y1 carries out the insertion of virtual breakpoint: put X0 and be " very ", read the instruction of NPC position; Preserve #A2, insert break-poing instruction ta in the NPC position, the instruction that is kept at #A0 is returned to the PC position; Zhuan Ru $Y2; The enable debugs window withdraws from debugging mode, and target machine begins to move from the PC position.
This moment, the instruction of PC position was replaced into presumptive instruction, and the instruction of NPC position is a break-poing instruction, when running to NPC; Break-poing instruction is carried out, and gets into debugging mode again, and this moment, X0 was " very "; The instruction of NPC position is recovered, cancel virtual break-poing instruction, Zhuan Ru $Y0.In this time slot that brings by the virtual break-poing instruction of execution, break-poing instruction is write the PC position by the completion of debugging middleware.Do not open debug window this moment, i.e. it is transparent that family on probation is exchanged in this break-poing instruction execution.
Put X0 and be " vacation " at Zai $Y0 place, and sign virtual break-poing instruction this moment has been finished dealing with, and judges PC value and watchpoint_address that the current goal machine suspends, because current break-poing instruction is virtual adding, therefore, both are difference obviously.Break-poing instruction ta is inserted in execution in the watchpoint_address position, withdraw from debugging mode, and target machine brings into operation.
When the execution that do not circulate of the instruction operation sequence of target machine, implementing at last so, there not be breakpoint again to hit yet, target machine end of run at this moment will be if the break-poing instruction of being circulated again into will repeat according to above-mentioned once more.
Claims (1)
1. the seamless on-chip system debug method based on virtual break-poing instruction comprises the steps: to insert the expection break-poing instruction in the A position of expection insertion break-poing instruction; When target machine runs to this expection break-poing instruction; Get into debugging mode, open debug window, the debugging user gets involved debugging; Before withdrawing from debugging mode, with the former instruction recovery of A position, next bar location of instruction in the target machine instruction stream; Be referred to as the B position; Insert a virtual break-poing instruction, the time slot that utilizes this virtual break-poing instruction to carry out is accomplished the recovery of expection break-poing instruction; The enable debugs window withdraws from debugging mode;
It is characterized in that: user in the commissioning test process is invisible for said virtual break-poing instruction.
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 true CN102662809A (en) | 2012-09-12 |
CN102662809B 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 |
---|---|
CN102662809B (en) | 2014-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9342437B2 (en) | Backward post-execution software debugger | |
US6356862B2 (en) | Hardware and software co-verification employing deferred synchronization | |
US8914777B2 (en) | Forward post-execution software debugger | |
US8584097B2 (en) | Post-execution software debugger with event display | |
US8170859B1 (en) | Methods, apparatuses and computer program products for simulating arbitrary unmodified code | |
CN108664380B (en) | After-execution software debugging system with performance display and debugging method | |
CN101339581B (en) | Embedded system on-line debugging emulation method based on communication interruption | |
CN105843694A (en) | Methods and apparatus for controlled recovery of error information between independently operable processors | |
CN105354136B (en) | A kind of adjustment method, multi-core processor and commissioning device | |
CN105528284B (en) | A kind of kernel fault filling method and electronic equipment | |
US8997059B2 (en) | Reverse debugging | |
US10552190B2 (en) | Precise error injection for driver testing | |
US10592376B2 (en) | Real-time hierarchical protocol decoding | |
US8762779B2 (en) | Multi-core processor with external instruction execution rate heartbeat | |
CN104272271B (en) | Processor device with instruction trace ability | |
CN104915287B (en) | Unit test method and system | |
CN101261601A (en) | Microprocessor debugging method and microprocessor debugging module | |
CN106030532A (en) | Software replayer for transactional memory programs | |
CN105892817A (en) | Control method and device for windows in application program | |
US6212493B1 (en) | Profile directed simulation used to target time-critical crossproducts during random vector testing | |
US20030028862A1 (en) | Debugger impact reduction through motion of induction variable based breakpoints | |
US20120054376A1 (en) | Real-time usb class level decoding | |
JP2007058813A (en) | Verification device and verification method | |
CN102662809A (en) | System adjustment method on seamless sheet based on virtual break-point instruction | |
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 |