CN107436842A - A kind of microcode adjustment method and veneer - Google Patents
A kind of microcode adjustment method and veneer Download PDFInfo
- Publication number
- CN107436842A CN107436842A CN201610356506.5A CN201610356506A CN107436842A CN 107436842 A CN107436842 A CN 107436842A CN 201610356506 A CN201610356506 A CN 201610356506A CN 107436842 A CN107436842 A CN 107436842A
- Authority
- CN
- China
- Prior art keywords
- debugging
- instruction
- microcode
- veneer
- message
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3648—Software debugging using additional hardware
Abstract
The present invention provides a kind of microcode adjustment method and veneer, in the microcode adjustment method, when going to break-poing instruction, calls the debugging routine prestored on veneer to debug the microcode on veneer.In microcode adjustment method provided by the invention, due to debugging routine is stored onto veneer in advance, therefore, in follow-up debugging process, it is not necessary to debugging routine is issued to veneer by IDE again, so IDE programs need not be run on computers, simplify the debugging process of microcode, and the operation of IDE programs must be supported due to being no longer required for computer, so also reducing the requirement of the equipment to being debugged, and then improve Consumer's Experience.
Description
Technical field
The present invention relates to the communications field, more particularly to a kind of microcode adjustment method and veneer.
Background technology
Network today development speed is surprising, and the growth of network traffics and the appearance of new business are, it is necessary to which the network equipment has line
Fast and flexible disposal ability.Network processing unit relies on the advantages of its high speed processing and flexible programmability, it has also become current
The effective tool of data processing in network.
NP (Network Processor, network processing unit) core cell is micro engine, is populated with being used in micro engine
The microcode handled message data.After message enters micro engine, just trigger microcode and perform.If necessary to be carried out to microcode
Debugging, typically sets Hardware Breakpoint in microcode, then allows micro-code instruction single step to perform.Then after reading single step execution
Message context, message context is modified, wherein message context includes the message context
Register resources and message content.
In order to be debugged to microcode, at present, more common scheme is as shown in figure 1, the network interface and veneer 2 of computer 1
Network interface is direct-connected, and IDE (Integrated Development Environment, IDE) program is run on computer 1.
IDE is available to the application program that user is used for programming development environment, and it generally comprises code editor, compiler, debugger
And tool graphical user interface.The debugging of current many programs is required for using matched IDE environment.
There is two big acp chip of NP and CPU on veneer 2, microcode is deposited inside the micro engine in wherein NP.CPU is upper can
Drive software is run, and CPU is provided with the debugging serial interface for receiving debugging routine.The drive software of CPU operations can be resident
One agent (agency) client, the client are connected by Socket (socket) with the IDE of computer, are received IDE and are transmitted across
The message come.The control command that IDE can will be sent to microcode is packaged into message, and agent programs are sent to by Socket.
The message that Agent programs parsing IDE is sended over, corresponding operating is carried out to micro engine by NP cpu i/f.This mode will
Micro engine is asked to need special DEBUG (debugging) module, DEBUG modules are used for accessing register and the packet header inside micro engine
The resources such as memory space.
In above-mentioned existing debugging plan, because the debugging routine for debugging microcode must be issued to veneer so leading by IDE
Cause have to when microcode debugging efforts using computer operation IDE programs, so that debugging process is complicated, in addition,
The computer debugged have to run corresponding to IDE environment, so, requirement of the existing debugging plan to equipment is also compared
Height, above-mentioned two problems can cause Consumer's Experience to reduce.
The content of the invention
The main technical problem to be solved in the present invention is to provide a kind of microcode adjustment method, for solving in the prior art
The technical problem of the IDE environment supporting with the microcode must be run when debugging to microcode on computers.
In order to solve the above technical problems, the present invention provides a kind of microcode adjustment method, including:
When going to break-poing instruction, the debugging routine prestored on veneer is called;
The microcode on the veneer is debugged according to the debugging routine.
In an embodiment of the present invention, in addition to:
Receive the debugging instruction of user's input and store to the first memory space;
It is described debugging is carried out to the microcode on the veneer according to the debugging routine to include:
The debugging instruction is read from first memory space, is entered using the debugging routine according to the debugging instruction
Row debugging.
In an embodiment of the present invention, also include before the debugging routine prestored on the calling veneer:Root
Break-poing instruction is set in predeterminated position according to breakpoint setup instruction.
It is described to set break-poing instruction to include in predeterminated position according to breakpoint setup instruction in an embodiment of the present invention:
It will need to set the original micro-code instruction at breakpoint to replace with break-poing instruction and preserve the original micro-code instruction.
It is described according to the debugging routine microcode on the veneer to be debugged in an embodiment of the present invention
Mode includes:
When reading information store instruction, Debugging message, which is stored to the second memory space, the Debugging message, includes report
The register resources and message content of literary context;
Or,
When reading information modification instruction, the Debugging message is modified;
Or,
When reading breakpoint END instruction, the debugging to original micro-code instruction corresponding to current breakpoint instruction is exited.
In an embodiment of the present invention, it is described Debugging message is stored to the second memory space after also include:In notice
Central processor reads Debugging message.
In an embodiment of the present invention, the debugging bag exited to original micro-code instruction corresponding to current breakpoint instruction
Include:Current breakpoint instruction is replaced with into original micro-code instruction corresponding to the break-poing instruction.
The present invention provides a kind of veneer, including network processing unit and memory, the network processing unit include micro engine;
When going to break-poing instruction, the micro engine control microcode enters debugging mode, calls and is prestored on veneer
Debugging routine;
The micro engine is debugged according to the debugging routine to the microcode on the veneer.
In an embodiment of the present invention, in addition to central processing unit, the central processing unit receive user's input
After debugging instruction, by the first memory space of debugging instruction storage to the memory;The micro engine is from described first
The debugging instruction is read in memory space, and is debugged using the debugging routine according to the debugging instruction.
In an embodiment of the present invention, after the micro engine reads information store instruction, Debugging message is stored
To the second memory space and the central processing unit is notified, the Debugging message includes the register resources and report of message context
Literary content.
In an embodiment of the present invention, the memory stores to be arranged on static random on the network processing unit
Device, the SRAM being arranged on outside the network processing unit or the dynamic that is arranged on outside the network processing unit with
Machine accesses any one in memory.
The beneficial effects of the invention are as follows:
A kind of microcode adjustment method provided by the invention and veneer, when going to break-poing instruction, microcode is set to enter debugging
State, the debugging routine prestored on veneer is called to debug the microcode on veneer.Adjusted in microcode provided by the invention
In method for testing, due in advance storing debugging routine onto veneer, therefore, in follow-up debugging process, it is not necessary to pass through again
IDE issues debugging routine to veneer, so IDE programs need not be run on computers, simplifies the debugging process of microcode, and
The operation of IDE programs must be supported due to being no longer required for computer, so the requirement of the equipment to being debugged is also reduced, and then
Improve Consumer's Experience.
Brief description of the drawings
Fig. 1 is that veneer microcode of the prior art debugs schematic diagram;
Fig. 2 is a kind of flow chart for the microcode adjustment method that the embodiment of the present invention one provides;
Fig. 3 is a kind of structural representation for the microcode debugging apparatus that the embodiment of the present invention two provides;
Fig. 4 is the first structural representation that debugging module is instructed in the embodiment of the present invention two;
Fig. 5 is second of structural representation that debugging module is instructed in the embodiment of the present invention two;
Fig. 6 is the third structural representation that debugging module is instructed in the embodiment of the present invention two;
Fig. 7 is another structural representation for the microcode debugging apparatus that the embodiment of the present invention two provides;
Fig. 8 is the single plate structure schematic diagram that the embodiment of the present invention three provides;
Fig. 9 is the schematic flow sheet of the veneer microcode adjustment method of the embodiment of the present invention three.
Embodiment
The present invention is described in further detail below by embodiment combination accompanying drawing.
Embodiment one:
The present embodiment provides a kind of microcode adjustment method, refer to Fig. 2, this method includes:
S201, when going to break-poing instruction, call the debugging routine that prestores on veneer.
In the present embodiment, in micro engine in addition to microcode, also one section of code segment dedicated for debugging, this section of generation
Code is exactly debugging routine.After the micro engine in network processing unit goes to break-poing instruction, the debugging routine can be called.
S202, according to debugging routine the microcode on veneer is debugged.
Debugging routine includes a variety of codes that can realize certain function, and these functions include setting breakpoint (Set
Breakpoint), register (Registers) or message content (Packet memory) are read, is changed in register or message
Hold, single step performs (Single Step), operation (Continue) etc..The debugging instruction that debugging routine can input according to user
Perform function corresponding to corresponding code and then realization.
In the present embodiment, also need to receive user's input before the microcode on veneer is debugged according to debugging routine
Debugging instruction.Debugging instruction is issued to CPU by computer and is then stored in the first memory space, and the first memory space can be with
To be arranged on SRAM on network processing unit (Static Random Access Memory, static RAM), setting
In the SRAM outside the network processing unit or DRAM being arranged on outside network processing unit (Dynamic Random-Access
Memory, dynamic RAM).
User can input various debugging instructions by CLI (command-line interface, Command Line Interface),
CLI refers to the interface that executable instruction can be keyed under user's prompt, and it does not support mouse generally, and user passes through input through keyboard
Instruction, CPU are stored after receiving instruction to CLI instructions.
It is understood that under some specific scenes, when being debugged to the microcode on veneer, can also not need
User input instruction, for example, when going to break-poing instruction, the code in automatic running debugging routine is debugged to microcode.
After CPU stores debugging instruction to the first memory space, micro engine reads debugging from the first memory space and referred to
Order, control debugging routine realize the desired function of user according to debugging instruction.
In the present embodiment, the mode debugged according to the debugging instruction read to the microcode on veneer is included so
It is several:
The first, when reading information store instruction, Debugging message, which is stored to the second memory space, Debugging message, to be included
The register resources and message content of message context.
As the first memory space, the second memory space can be to be arranged on SRAM on network processing unit, be arranged on net
SRAM outside the network processor or DRAM being provided in outside network processing unit.First memory space and the second memory space
It can be the different storage address for belonging to same memory, different memories can also be belonged to.Stored when by Debugging message
To the second memory space, it can also allow CPU within the very first time in the second memory space by interrupt notification CPU
Debugging message be read out, and be further displayed to user.
Second, when reading information modification instruction, Debugging message is modified.
Because the effect of microcode in itself is exactly that message is handled, so in order to test the correctness of micro code program, also
Need to modify to Debugging message, that is, need to modify to the register resources and message content of message context, change
If result and the expection of user be not inconsistent, illustrate that the micro-code instruction has problem, can if be consistent with the expection of user
To determine that the micro-code instruction has no problem.
The third, when reading breakpoint END instruction, exits the tune to original micro-code instruction corresponding to current breakpoint instruction
Examination.
Exit the debugging to original micro-code instruction corresponding to current breakpoint instruction, be allow current breakpoint instruct corresponding to it is former
Beginning micro-code instruction exits debugging mode, and in the present embodiment, breakpoint END instruction includes two types, and one kind is to be used to control directly
Connect and exit debugging mode, such as user inputs Continue as debugging instruction in CLI interfaces.Another is that single step performs
Instruction, before single step execute instruction is used to the original micro-code instruction stored before being written back at current breakpoint instruction, by the row
The original micro-code instruction of next is substituted for break-poing instruction and stores original micro-code instruction, then assigns debugging instruction notice and exits
Debugging mode, and new breakpoint is triggered, enter debugging mode from new breakpoint again.If user is currently debugging the 37th row
Micro-code instruction, then its be desired with single step execution, then user can input " Single Step " by CLI.Micro engine can
First to replace the break-poing instruction of 37 rows with the original micro-code instruction of storage, the original micro-code instruction of 38 rows is then substituted for breakpoint
Instruction, while the original micro-code instruction of 38 rows is preserved, so that after the instruction of the 38th row debugging terminates, write-back is original micro-
Code instruction.
It is worth noting that, also include being instructed according to breakpoint setup before the debugging routine prestored on veneer is called
In predeterminated position, break-poing instruction is set.Before being debugged to one section of microcode, it is necessary at least one break-poing instruction is first set,
Simultaneously as debugging process is triggered by break-poing instruction, so, also must assure that before debugging mode is entered each time by
At least one break-poing instruction in debugging code be present.So for body, set break-poing instruction must be before being debugged.
But in fact, in the present embodiment, break-poing instruction can also be set in debugging process, the break-poing instruction simply now set is
It is micro engine is again introduced into debugging mode when going to microcode other positions for debugging use next time.It is mentioned here its
His position is the predetermined position of user, and user can determine the position of break-poing instruction by way of specifying line number.The present embodiment
It is middle that a kind of set-up mode of break-poing instruction is provided:It will need to set the original micro-code instruction at breakpoint to be substituted for break-poing instruction.By
After debugging at break-poing instruction terminates, it is also necessary to break-poing instruction is reverted into original micro-code instruction, so, original microcode is referred to
Order also needs to preserve original micro-code instruction while replacing with break-poing instruction.
The partial code that a debugging routine is provided below is referred to for those skilled in the art, as follows:
From above-mentioned code segment as can be seen that debugging routine be mainly used in out of cmd spaces in SRAM read debugging refer to
Order, corresponding program is then performed according to the debugging instruction read, for example, when the instruction read from cmd spaces is " 1 "
When, Case 1 program is performed, read Debugging message storage includes message context to SRAM RSP spaces, Debugging message
Register resources and message content etc..When the instruction read is " 2 ", Debugging message is modified.Likewise, when debugging
Instruct for " 3 " when, then exit debugging, make micro engine continue normal to perform microcode.
Although being that debugging instruction is stored in SRAM cmd spaces in above-mentioned example, SRAM is stored debugging information into
RSP spaces, but it is understood that, in actual application, it is not required that debugging instruction must be stored in cmd spaces
It is interior, likewise, being also not required in SRAM to be stored debugging information into RSP spaces.
In actual debugging process, Debugging message reads for CPU and is shown to user by display device, and debugs and refer to
Order is indicated for the debugging routine execution which kind of code in network processing unit.So why by debugging instruction with
Debugging message is stored separately, and is to allow CPU and micro engine can determine which information of oneself reading.But art technology
Guarantee to allow CPU to read Debugging message rather than debugging instruction as long as personnel should be appreciated that, allow micro engine to read just
True debugging instruction rather than Debugging message, then also not related even if debugging instruction and the not separated storage of Debugging message.For example,
Corresponding prefix is all added for all Debugging message, to be made a distinction with the debugging instruction of no addition prefix, this
In the case of, CPU just reads the information with the particular prefix as Debugging message when reading information, and micro engine is only read
The information of the prefix is not as debugging instruction.
In microcode adjustment method provided by the invention, due in advance storing debugging routine onto veneer, therefore, rear
In continuous debugging process, it is not necessary to debugging routine is issued to veneer by IDE again, so IDE journeys need not be run on computers
Sequence, the debugging process of microcode is simplified, and the operation of IDE programs must be supported due to being no longer required for computer, so also reducing
To the requirement for the equipment debugged, and then improve Consumer's Experience.
Embodiment two:
The present embodiment provides a kind of microcode debugging apparatus, and the microcode adjustment method that embodiment one provides can be adjusted in the microcode
Plant running is tried, refer to Fig. 3:
Microcode debugging apparatus 30 includes routine call module 301 and instruction debugging module 302.
Routine call module 301 is used for when going to break-poing instruction, calls the debugging routine prestored on veneer.
In the present embodiment, in micro engine in addition to microcode, also one section of code segment dedicated for debugging, this section of generation
Code is exactly debugging routine.After the micro engine in network processing unit goes to break-poing instruction, routine call module 301 be able to can be called
The debugging routine.
Instruction debugging module 302 is used to debug the microcode on veneer according to debugging routine.
Debugging routine includes a variety of codes that can realize certain function, and these functions include setting breakpoint, and reading is posted
Storage or message content, register or message content are changed, single step performs, operation etc..Debugging routine can input according to user
Debugging instruction perform corresponding code and then function corresponding to realizing.
In the present embodiment, before instruction debugging module 302 is debugged according to debugging routine to the microcode on veneer also
Need to receive the debugging instruction that user inputs.Debugging instruction is issued to CPU by computer and is then stored in the first memory space,
First memory space can be to be arranged on SRAM on network processing unit, the SRAM being arranged on outside network processing unit or be arranged on net
DRAM outside network processor.
User can input various debugging instructions by CLI, and CLI refers to that executable instruction can be keyed under user's prompt
Interface, it does not support mouse generally, and user is instructed by input through keyboard, CPU receive instruction after to CLI instruction deposit
Storage.
It is understood that under some specific scenes, when being debugged to the microcode on veneer, can also not need
User input instruction, for example, when going to break-poing instruction, make microcode automatically into debugging mode, automatic running debugging routine
In code microcode is debugged.
After CPU stores debugging instruction to the first memory space, micro engine reads debugging from the first memory space and referred to
Order, instruction debugging module 302 control debugging routine to realize the desired function of user according to debugging instruction.
As shown in figure 4, instruction debugging module 302 includes the first debugging module 3021.First debugging module 3021 is used to work as
When reading information store instruction, Debugging message, which is stored to the second memory space, Debugging message, includes posting for message context
Memory resource and message content.
As the first memory space, the second memory space can be to be arranged on SRAM on network processing unit, be arranged on net
SRAM outside the network processor or DRAM being provided in outside network processing unit.First memory space and the second memory space
It can be the different storage address for belonging to same memory, different memories can also be belonged to.Stored when by Debugging message
To the second memory space, it can also allow CPU within the very first time in the second memory space by interrupt notification CPU
Debugging message be read out, and be further displayed to user.
Such as Fig. 5, instruction debugging module 302 includes the second debugging module 3022.Second debugging module 3022 is used to read
During information modification instruction, Debugging message is modified.
Because the effect of microcode in itself is exactly that message is handled, so in order to test the correctness of micro code program, also
Need to modify to Debugging message, that is, need to modify to the register resources and message content of message context, change
If result and the expection of user be not inconsistent, illustrate that the micro-code instruction has problem, can if be consistent with the expection of user
To determine that the micro-code instruction has no problem.
Instruction debugging module 302 illustrated in fig. 6 includes the 3rd debugging module 3023, for reading breakpoint END instruction
When, debugging mode is exited in control current breakpoint instruction.
In the present embodiment, breakpoint END instruction includes two types, and one kind is to be used to control directly to exit debugging mode,
Such as user inputs Continue as debugging instruction in CLI interfaces.Another is single step execute instruction, and single step, which performs, to be referred to
Make for before the original micro-code instruction stored before is written back at current breakpoint instruction, by the row original microcode of next
Instruction is substituted for break-poing instruction and stores original micro-code instruction.Then assign debugging instruction notice and exit debugging mode, and trigger
New breakpoint, enter debugging mode from new breakpoint again.If user is currently debugging the micro-code instruction of the 37th row, then
It is desired with single step execution, then user can input " Single Step " by CLI.Micro engine can be first with the original of storage
Beginning micro-code instruction replaces the break-poing instruction of 37 rows, and the original micro-code instruction of 38 rows then is substituted for into break-poing instruction, while to 38
Capable original micro-code instruction is preserved, so as to the instruction of the 38th row debugging terminate after, the original micro-code instruction of write-back.
It will be appreciated by those skilled in the art that instruction debugging module can include above-mentioned first, second, third simultaneously
And the 4th debugging module.
Among a kind of example that the present embodiment provides, as shown in fig. 7, microcode debugging apparatus 30 also includes breakpoint setup mould
Block 300, breakpoint setup module 300 are used for before instruction debugging module 302 calls the debugging routine prestored on veneer, root
Break-poing instruction is set in predeterminated position according to breakpoint setup instruction.Before being debugged to one section of microcode, breakpoint setup module 300
Have to first set at least one break-poing instruction, simultaneously as debugging process is triggered by break-poing instruction, so, each
The secondary debugging mode that enters also must assure that at least one break-poing instruction in debugged code be present before.So for body, break
Point setup module 300 sets break-poing instruction must be before being debugged.But in fact, in the present embodiment, in debugging process
Point of interruption setup module 300 can also set break-poing instruction, and the break-poing instruction that simply now breakpoint setup module 300 is set is to supply
Debugging uses next time, is micro engine is again introduced into debugging mode when going to microcode other positions.It is mentioned here other
Position is the predetermined position of user, and user can determine the position of break-poing instruction by way of specifying line number.In the present embodiment
A kind of set-up mode of break-poing instruction is provided for breakpoint setup module 300:It will need to set the original micro-code instruction at breakpoint to replace
Change break-poing instruction into.After terminating due to the debugging at break-poing instruction, it is also necessary to which break-poing instruction is reverted into original micro-code instruction, institute
To also need to preserve original micro-code instruction while original micro-code instruction is replaced with into break-poing instruction.
The partial code that a debugging routine is provided below is referred to for those skilled in the art, as follows:
From above-mentioned code segment as can be seen that debugging routine be mainly used in out of cmd spaces in SRAM read debugging refer to
Order, corresponding program is then performed according to the debugging instruction read, for example, when the instruction read from cmd spaces is " 1 "
When, Case 1 program is performed, read Debugging message storage includes message context to SRAM RSP spaces, Debugging message
Register resources and message content etc..When the instruction read is " 2 ", Debugging message is modified.Likewise, when debugging
Instruct for " 3 " when, then exit debugging, make micro engine continue normal to perform microcode.
Although being that debugging instruction is stored in SRAM cmd spaces in above-mentioned example, and store debugging information into
SRAM RSP spaces, but it is understood that, in actual application, it is not required that debugging instruction must be stored in cmd
In space, likewise, being also not required in SRAM to be stored debugging information into RSP spaces.
In actual debugging process, Debugging message reads for CPU and is shown to user by display device, and debugs and refer to
Order is indicated for the debugging routine execution which kind of code in network processing unit.So why by debugging instruction with
Debugging message is stored separately, and is to allow CPU and micro engine can determine which information of oneself reading.But art technology
Guarantee to allow CPU to read Debugging message rather than debugging instruction as long as personnel should be appreciated that, allow micro engine to read just
True debugging instruction rather than Debugging message, then also not related even if debugging instruction and the not separated storage of Debugging message.For example,
Corresponding prefix is all added for all Debugging message, to be made a distinction with the debugging instruction of no addition prefix, this
In the case of, CPU just reads the information with the particular prefix as Debugging message when reading information, and micro engine is only read
The information of the prefix is not as debugging instruction.
Embodiment three:
The present embodiment provides a kind of veneer, and the veneer includes network processing unit and memory.There is micro- draw in network processing unit
Hold up, microcode is stored with micro engine, if after breakpoint is set in these microcodes, will when micro engine goes to break-poing instruction
Into debugging mode, the debugging routine prestored on veneer is called to debug the microcode in micro engine.Debugging routine
Can with resided in as microcode among micro engine.After debugging instruction is read, according to debugging instruction, debugging routine pair is utilized
Microcode in micro engine is debugged.
As shown in figure 8, in a kind of example of the present embodiment, veneer 80 includes network processing unit 801 and memory 802,
Memory 802 can be arranged on network processing unit 801, can also set the place outside network processing unit 801 on veneer 80,
Preferably, the veneer 80 also includes central processing unit 803.Central processing unit 803 passes through PCI-E connections network processing unit 801.
After debugging mode is entered, user can issue debugging instruction to central processing unit by CLI interfaces from computer
803, the debugging instruction can be stored in the first memory space of memory 802 by central processing unit 803, and micro engine 8011 can
To read debugging instruction from the first memory space and be debugged using debugging routine according to debugging instruction.
If the debugging instruction that micro engine 8011 is read is information store instruction, micro engine 8011 can believe debugging
Breath stores to the second memory space of memory 802 and notifies central processing unit 803, allows central processing unit 803 can be from second
Debugging message is read in memory space and is shown by display device to user.In the present embodiment, Debugging message includes
The register resources and message content of message context.
The microcode debugging process on veneer in the present embodiment is illustrated with reference to Fig. 9:
After micro engine 8011 goes to break-poing instruction in network processing unit 801, debugging mode will be entered.
S901, micro engine store debugging information into the RSP spaces of memory;
Debugging message includes content and message packet header in register etc..
S902, micro engine triggering are interrupted, and notify central processing unit;
S903, central processing unit read Debugging message from the RSP spaces of memory;
The information that central processing unit is read can be shown to user by the computer being connected with veneer, allow user to obtain debugging
Information, debugging instruction is then sent from CLI interfaces according to Debugging message.
S904, central processing unit arrive debugging instruction storage in the cmd spaces of memory;
Debugging instruction has a variety of, may be respectively used for realizing and sets breakpoint, reads register or message content, modification deposit
Device or message content, single step perform, operation etc..
Although set in scheme above break-poing instruction be in debugging process, that is, into after debugging mode,
Be it will be apparent to a skilled person that debugging process is triggered by break-poing instruction, so, entering debugging each time
It also must assure that at least one break-poing instruction in debugged code be present before state.So on the whole, break-poing instruction is set
Must be before being debugged.In such scheme, the break-poing instruction set in debugging process is used for debugging next time,
It is micro engine is again introduced into debugging mode when going to microcode other positions.Other positions mentioned here are that user is predetermined
Position, user can determine the position of break-poing instruction by way of specifying line number.The side of break-poing instruction is set in the present embodiment
Formula is:It will need to set the original micro-code instruction at breakpoint to be substituted for break-poing instruction.After terminating due to the debugging at break-poing instruction,
Also need to break-poing instruction reverting to original micro-code instruction, so, gone back while original micro-code instruction is replaced with into break-poing instruction
Need to preserve original micro-code instruction.
S905, micro engine read debugging instruction from the cmd spaces of memory.
After micro engine reads debugging instruction, can control debugging routine perform corresponding to code, realize that user wants
Function.Such as breakpoint is set, read register or message content or changes register or message content etc..
Prestored in the veneer that the present embodiment provides to the debugging routine that microcode thereon is debugged when micro engine is held
Row enters debugging mode when arriving break-poing instruction, calls the debugging routine to debug the microcode on veneer.The present invention is provided
Veneer on microcode when being debugged, because veneer itself has had debugging routine, so tune need not be issued by IDE
Program is tried, so IDE programs need not be run on computers, simplifies the debugging process of microcode, and due to being no longer required for electricity
Brain must support the operation of IDE programs, so also reducing the requirement of the equipment to being debugged, and then improve user's body
Test.
Obviously, those skilled in the art should be understood that each module of the invention described above or each step can be with general
Computing device realizes that they can be concentrated on single computing device, or be distributed in what multiple computing devices were formed
On network, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to be stored in
Performed in storage medium (ROM/RAM, magnetic disc, CD) by computing device, and in some cases, can be with different from this
The order at place performs shown or described step, either they are fabricated to respectively each integrated circuit modules or by it
In multiple modules or step be fabricated to single integrated circuit module to realize.So the present invention be not restricted to it is any specific
Hardware and software combine.
Above content is to combine specific embodiment further description made for the present invention, it is impossible to assert this hair
Bright specific implementation is confined to these explanations.For general technical staff of the technical field of the invention, do not taking off
On the premise of from present inventive concept, some simple deduction or replace can also be made, should all be considered as belonging to the protection of the present invention
Scope.
Claims (11)
1. a kind of microcode adjustment method, including:
When going to break-poing instruction, the debugging routine prestored on veneer is called;
The microcode on the veneer is debugged according to the debugging routine.
2. microcode adjustment method as claimed in claim 1, it is characterised in that also include:
Receive the debugging instruction of user's input and store to the first memory space;
It is described debugging is carried out to the microcode on the veneer according to the debugging routine to include:
The debugging instruction is read from first memory space, is adjusted using the debugging routine according to the debugging instruction
Examination.
3. microcode adjustment method as claimed in claim 1, it is characterised in that described to call the debugging journey prestored on veneer
Also include before sequence:Break-poing instruction is set in predeterminated position according to breakpoint setup instruction.
4. microcode adjustment method as claimed in claim 3, it is characterised in that described to be instructed according to breakpoint setup in predeterminated position
Break-poing instruction is set to include:It will need to set the original micro-code instruction at breakpoint to replace with break-poing instruction and preserve described original micro-
Code instruction.
5. the microcode adjustment method as described in claim any one of 1-4, it is characterised in that described according to the debugging routine pair
The mode that microcode on the veneer is debugged includes:
When reading information store instruction, Debugging message, which is stored to the second memory space, the Debugging message, to be included on message
Register resources hereafter and message content;
Or,
When reading information modification instruction, the Debugging message is modified;
Or,
When reading breakpoint END instruction, the debugging to original micro-code instruction corresponding to current breakpoint instruction is exited.
6. microcode adjustment method as claimed in claim 5, it is characterised in that described to store Debugging message to the second storage sky
Between after, methods described also includes:Central processing unit is notified to read Debugging message.
7. microcode adjustment method as claimed in claim 5, it is characterised in that described to exit to former corresponding to current breakpoint instruction
The debugging of beginning micro-code instruction includes:Current breakpoint instruction is replaced with into original micro-code instruction corresponding to the break-poing instruction.
8. a kind of veneer, it is characterised in that including network processing unit and memory, the network processing unit includes micro engine;
When going to break-poing instruction, the micro engine calls the debugging routine prestored on veneer;
The micro engine is debugged according to the debugging routine to the microcode on the veneer.
9. veneer as claimed in claim 8, it is characterised in that also received including central processing unit, the central processing unit
After the debugging instruction of user's input, by the first memory space of debugging instruction storage to the memory;The micro engine
The debugging instruction is read from first memory space, and is adjusted using the debugging routine according to the debugging instruction
Examination.
10. veneer as claimed in claim 9, it is characterised in that after the micro engine reads information store instruction, will adjust
Examination information stores to the second memory space and notifies the central processing unit, and the Debugging message includes the deposit of message context
Device resource and message content.
11. the veneer as described in claim any one of 7-10, it is characterised in that the memory is to be arranged at the network
Manage SRAM on device, the SRAM being arranged on outside the network processing unit or be arranged on the network
Any one in dynamic random access memory outside processor.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610356506.5A CN107436842A (en) | 2016-05-25 | 2016-05-25 | A kind of microcode adjustment method and veneer |
PCT/CN2017/074452 WO2017202083A1 (en) | 2016-05-25 | 2017-02-22 | Microcode debugging method and single board |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610356506.5A CN107436842A (en) | 2016-05-25 | 2016-05-25 | A kind of microcode adjustment method and veneer |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107436842A true CN107436842A (en) | 2017-12-05 |
Family
ID=60412056
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610356506.5A Pending CN107436842A (en) | 2016-05-25 | 2016-05-25 | A kind of microcode adjustment method and veneer |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107436842A (en) |
WO (1) | WO2017202083A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108388510A (en) * | 2018-02-09 | 2018-08-10 | 福建升腾资讯有限公司 | A kind of method and computer equipment controlling Debugging message output by storage configuration |
CN112994963A (en) * | 2019-12-13 | 2021-06-18 | 深圳市中兴微电子技术有限公司 | Processing method and device |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113454607B (en) | 2019-03-21 | 2023-08-22 | 杭州飞步科技有限公司 | Debugging method, device and system-on-chip |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1394010A (en) * | 2001-06-21 | 2003-01-29 | 华为技术有限公司 | Microcode test method and device for network processor |
US6691308B1 (en) * | 1999-12-30 | 2004-02-10 | Stmicroelectronics, Inc. | Method and apparatus for changing microcode to be executed in a processor |
CN101178685A (en) * | 2007-09-27 | 2008-05-14 | 上海大学 | Enhancement type microprocessor piece on-chip dynamic state tracking method with special function register breakpoints |
CN101778015A (en) * | 2010-01-07 | 2010-07-14 | 中兴通讯股份有限公司 | Micro-code test method and device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10334801B3 (en) * | 2003-07-30 | 2005-01-27 | Infineon Technologies Ag | Semiconductor circuit for exchanging external data, addresses and/or commands during normal operation has a test interface for a test operation with a built-in self-test |
US7743232B2 (en) * | 2007-07-18 | 2010-06-22 | Advanced Micro Devices, Inc. | Multiple-core processor with hierarchical microcode store |
US20090031121A1 (en) * | 2007-07-24 | 2009-01-29 | Via Technologies | Apparatus and method for real-time microcode patch |
CN104778116B (en) * | 2014-01-09 | 2018-09-18 | 深圳市中兴微电子技术有限公司 | A kind of multibreak software debugging device and method |
-
2016
- 2016-05-25 CN CN201610356506.5A patent/CN107436842A/en active Pending
-
2017
- 2017-02-22 WO PCT/CN2017/074452 patent/WO2017202083A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6691308B1 (en) * | 1999-12-30 | 2004-02-10 | Stmicroelectronics, Inc. | Method and apparatus for changing microcode to be executed in a processor |
CN1394010A (en) * | 2001-06-21 | 2003-01-29 | 华为技术有限公司 | Microcode test method and device for network processor |
CN101178685A (en) * | 2007-09-27 | 2008-05-14 | 上海大学 | Enhancement type microprocessor piece on-chip dynamic state tracking method with special function register breakpoints |
CN101778015A (en) * | 2010-01-07 | 2010-07-14 | 中兴通讯股份有限公司 | Micro-code test method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108388510A (en) * | 2018-02-09 | 2018-08-10 | 福建升腾资讯有限公司 | A kind of method and computer equipment controlling Debugging message output by storage configuration |
CN108388510B (en) * | 2018-02-09 | 2021-09-24 | 福建升腾资讯有限公司 | Method for controlling debugging information output through storage configuration and computer equipment |
CN112994963A (en) * | 2019-12-13 | 2021-06-18 | 深圳市中兴微电子技术有限公司 | Processing method and device |
Also Published As
Publication number | Publication date |
---|---|
WO2017202083A1 (en) | 2017-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5347649A (en) | System for dynamically generating, correlating and reading multiprocessing trace data in a shared memory | |
US8856742B2 (en) | Distributed debugging | |
CN107797846B (en) | Soc chip verification method | |
CN104821954B (en) | A kind of cross-platform remote procedure calling (PRC) method | |
CN106155883B (en) | A kind of virtual machine method for testing reliability and device | |
CN109522087B (en) | Virtual mechanism building method and system based on domestic Shenwei processor | |
CN104750603B (en) | A kind of multi-core DSP software simulator and its physical layer software test method | |
US8819640B2 (en) | Establishing cloud debug breakpoints assigned to users | |
CN110147240A (en) | Application program installation method, system and storage medium based on cloud storage | |
CN107436842A (en) | A kind of microcode adjustment method and veneer | |
CN109144515A (en) | The off-line simulation method and device of the graphical algorithm configuration of DCS | |
CN103544105B (en) | Debug method and device of multi-core processor based on VCPU (virtual central processing unit) | |
CN114580344A (en) | Test excitation generation method, verification system and related equipment | |
CN110287107A (en) | The data processing of block chain and intelligent contract combined debugging integrated approach, system and computer readable storage medium | |
CN101668036B (en) | Simulating system of distributed device and method for processing service by simulating distributed device | |
CN110825731A (en) | Data storage method and device, electronic equipment and storage medium | |
US20070150866A1 (en) | Displaying parameters associated with call statements | |
US7529890B1 (en) | System, apparatus and method for facilitating on-chip testing | |
CN108427584A (en) | The configuration method of the chip and the chip with parallel computation core quickly started | |
CN108334392A (en) | Start method, storage medium, equipment and the system of the page in Android system | |
CN112486807A (en) | Pressure testing method and device, electronic equipment and readable storage medium | |
CN107526672A (en) | A kind of method and device of data record | |
US20090300626A1 (en) | Scheduling for Computing Systems With Multiple Levels of Determinism | |
CN107688535A (en) | A kind of mobile device APP performance data display methods and device | |
DE102022120925A1 (en) | AUTOMATED CABLE REPAIR ON SITE |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171205 |
|
RJ01 | Rejection of invention patent application after publication |