Summary of the invention
In view of this, the invention provides the method and the device of the on-the-spot reproduction of a kind of hardware, realize the on-the-spot reproduction of hardware, the problem of the speed of the on-the-spot reproduction of the reduction hardware that is caused by hardware environment such as chip and development boards to overcome prior art.
For realizing above-mentioned purpose, the present invention provides following technical scheme:
The method of the on-the-spot reproduction of a kind of hardware comprises:
Occur backing up the data message in the current hardware scene when unusual at chip, generate backup data file;
Obtain the executable file that carries Debugging message, resolve said executable file, obtain the routine data information of the pairing chip operation of said Debugging message;
Shine upon the corresponding actual physical address of said routine data information;
Transform the said actual physical address after the mapping, set up the corresponding relation between itself and the said backup data file;
From the backup of said backup data file, read the corresponding variable data of said actual physical address according to said corresponding relation;
Obtain the development board or internal storage data on the test board and the register data that back up in said backup data file;
Show said variable data, internal storage data and register data in user interface, reproduction hardware is on-the-spot.
Preferably, the said mode of setting up between said actual physical address and the said backup data file that corresponding relation adopted is:
The said actual physical address that transforms after shining upon is the file pointer of said backup data file.
Preferably, the said executable file that carries Debugging message that obtains also comprises before:
Create virtual memory; Hardware information on analog chip, development board or the test board; Said backup data file is moved in the said virtual memory; Comprise internal storage data and register data on development board or the test board in the said backup data file, and the correlated variables data during the chip working procedure.
Preferably, said read the corresponding variable data of actual physical address and obtain internal storage data and register data after, also comprise before the said demonstration:
Through telecommunication media said variable data, internal storage data and register data are sent to said user interface.
Preferably, the said corresponding relation of setting up between said actual physical address and the said backup data file adopts the mode of non-file pointer to set up.
Preferably, said user interface is the graphical interfaces interface.
Preferably, the said executable file that carries Debugging message is the file that unusual preceding operation does not appear in chip.
The device of the on-the-spot reproduction of a kind of hardware comprises:
Whether detecting unit is used for detection chip and occurs unusually;
Backup units is used for backing up the data message at current hardware scene, generates backup data file;
Analytic unit is used to analyze the executable file that carries Debugging message; Comprise in the said analytic unit:
Acquisition module is used to obtain the executable file that carries Debugging message;
Parsing module is used to resolve said executable file, obtains the routine data information of the pairing chip operation of the Debugging message that carries in the said executable file;
Mapping block is used to shine upon the corresponding actual physical address of said routine data information;
Set up module, be used to transform the said actual physical address after the mapping, set up the corresponding relation between itself and the said backup data file;
Reading unit is used for reading the corresponding variable data of said actual physical address according to the backup of said corresponding relation from said backup data file;
Acquiring unit is used for obtaining the development board or internal storage data on the test board and the register data that back up in said backup data file;
The reproduction unit is used to show said True Data in user interface, and reproduction hardware is on-the-spot.
Preferably, also comprise in the said device:
Create the unit, be used to create virtual memory;
Mobile unit is used for said backup data file is moved to preset said virtual memory.
Preferably, establishment unit, mobile unit, detecting unit, backup units, the analytic unit in the said device is arranged at service end; Reading unit in the said device, acquiring unit and reproduction unit are arranged at client; Said service end and client are carried out information interaction through telecommunication media.
Can know via above-mentioned technical scheme; Compared with prior art, the invention discloses the method and the device of the on-the-spot reproduction of a kind of hardware, when its method is employed in chip and operation exception occurs; Back up the data message in the current hardware scene, and generate corresponding backup data file; Then; Through analyzing sequence of operations such as Debugging message, mapping; From backup data file, obtain the data message that reproduction needs according to the actual physical address that gets access to, and directly from backup data file, obtain for the data message that need not analyze Debugging message; At last, the related data information that gets access to is sent in user interface and shows the on-the-spot reproduction of realization hardware.Through method disclosed by the invention; Do not need emulator, promptly need not rely on hardware that backed up data is returned on chip and the development board, and adopt software analysis to obtain the mode of reproduction desired data; Can improve the speed and the economize on hardware resource of the on-the-spot reproduction of hardware; Simultaneously, after reappearing the hardware scene fast,, further improved the time of technician's analysis chip problem also for the technician provides convenience.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
, chip goes wrong when moving in hardware environment; The mode that prior art adopted is by chip and development board, test board relevant data to be returned in the hardware environment; So that accomplish to the on-the-spot reproduction of hardware, still, when adopting prior art to carry out the reproduction of hardware scene; Support hardware is limited by the travelling speed of hardware environment easily, and can make the on-the-spot limited speed of reproduction hardware based on the limited hardware resource.But; The disclosed method and system of the present invention relate to is not a kind ofly having chip and development board under interior hardware environment fully; Utilize software to realize the reproduction that hardware is on-the-spot, improved and reappeared speed, mainly be meant base band SoC chip (System on Chip in the present invention; System level chip), concrete technical scheme is carried out detailed explanation through following embodiment disclosed by the invention.
Embodiment one
See also accompanying drawing 1, the method for the present invention discloses the on-the-spot reproduction of a kind of hardware mainly may further comprise the steps:
Step S101 occurs backing up the data message in the current hardware scene when unusual at chip, generates backup data file.
When chip goes wrong in the process of operation, the temporary transient operation of chip at this moment or (immediate status) out of service, but chip still is in the state that powers on, and the related data in operation suspension or hardware scene before out of service is not also lost.Therefore, back up the data message in the current hardware scene, this data message comprises the routine data information of moving on the information (information in the register), chip of chip itself, and the internal memory on development board or the test board, the related data information in the register.Utilize backed up data information to generate backup data file at last again, promptly in this backup data file, preserve above-mentioned data message, and these data messages are the required data of the on-the-spot reproduction of hardware.
Step S102 obtains the executable file that carries Debugging message, resolves said executable file, obtains the routine data information of the pairing chip operation of said Debugging message.
Step S103 shines upon the corresponding actual physical address of said routine data information.
Step S104 transforms the said actual physical address after the mapping, sets up the corresponding relation between itself and the said backup data file.
Step S105 from the backup of said backup data file, reads the corresponding variable data of said actual physical address according to said corresponding relation.
Step S106 obtains the development board or internal storage data on the test board and the register data that back up in said backup data file.
Step S107 shows said variable data, internal storage data and register data in user interface, and reproduction hardware is on-the-spot.
, got access to respectively and realized the on-the-spot required related data of reproduction hardware, i.e. variable data, internal storage data and register data during at execution in step S102 to step S106.In above-mentioned these Data Acquisition processes, the method for obtaining of variable data needs the analysis of process Debugging message just can obtain, and internal storage data and register data then need not analyzed Debugging message.Therefore, execution in step S102 mainly is divided into to step S106 and analyzes Debugging message and needn't analyze two kinds of processes of Debugging message.
Wherein, The situation of analyzing Debugging message is: execution in step S102 is to step S105; At first; The executable file that carries Debugging message through analysis obtains the routine data information of chip operation, and the related data information of special symbol, variable in the program for example includes the physical address information of data message in this related data information; Then, the actual physical address of above-mentioned each routine data information of obtaining is shone upon, transform again, set up the actual physical address of each routine data information and the relation between the backup data file; At last, through this kind corresponding relation of setting up, obtain the corresponding variable data of this actual physical address in the backup data file.
Need to prove; Analyzing Debugging message promptly is through the executable file that carries Debugging message is resolved; This executable file that carries Debugging message promptly is that the unusual preceding file that is moved takes place chip, through it being resolved the routine data information of obtaining the chip operation.
In addition; The process of analyzing Debugging message be for obtain with chip on the relevant actual physical address of working procedure data message, for example certain variable or symbol place memory address adopts the mode of analysis Debugging message to obtain relevant actual physical address; Be because register (or internal memory) address on the chip is can to obtain according to the user manual of chip in advance; Be fixed value, and according to the difference of chip, register (internal memory) quantity, title, physical address values all can be different.
The situation that need not analyze Debugging message is: execution in step S106, directly from backup data file, obtain, and promptly directly obtain internal storage data and register data on development board or the test board from backup data file.
Need to prove; Because step S102 is the situation that needs to analyze Debugging message to step S105; And step S106 is the situation that need not analyze Debugging message, and therefore, above-mentioned steps S106 can carry out after execution of step S105; Also can before execution in step S102, carry out, not influence the disclosed technical scheme of the embodiment of the invention.
Obtain the related data information that reappears with the hardware scene through two kinds of different situations of above-mentioned foundation after; Execution in step S107; Variable data, internal storage data and register data that execution in step S105 and step S106 are got access to are sent to user interface; And it is shown at user interface, realize with the on-the-spot purpose of software reproduction hardware.
Need to prove that user interface can be divided three classes: command interface, routine interface and graphical interfaces interface.In disclosed this embodiment of the present invention, user interface is optimum is chosen as the graphical interfaces interface.The graphical interfaces interface adopts patterned operation interface, for example window, icon, menu and dialog box figures interface, through the various figures that are easy to discern with system's each item function, various application program and file; Intuitively, show realistically; The technician can check the above-mentioned data message that gets access to through mouse, menu and dialog box, i.e. information of chip itself (comprising register on the chip etc.) or development board (test board) relevant information can also be the routine data information on chip, the moved (operation results of program for example; Information in the operational process; Comprise variable etc., last, through these various information that shows at the user interface place; Realize the on-the-spot purpose of reproduction hardware, the technician can be analyzed unusual chip occurring through the hardware scene of reproduction.
On the disclosed basis of the invention described above embodiment, can adopt multiple existing mode to shine upon in the above-mentioned process that actual physical address is shone upon, for example utilize the mode of tabling look-up to shine upon.In addition, after the mapping actual physical address, set up the mode that corresponding relation adopted between this actual physical address and the backup data file, different because the position of current saved backup data file is different.
When backup data file was stored in the hard disk internal memory, the mode that corresponding relation adopted that set up between this actual physical address and the backup data file this moment was: the said actual physical address that transforms after shining upon is the file pointer of said backup data file.Then; When carrying out above-mentioned steps S105; According to the corresponding variable data of the actual physical address that is converted into file pointer in this document pointer reading of data backup file, execution in step S107 is committed to user interface with this data variable more at last, so that the technician checks.
Through the invention described above the disclosed embodiments, there be not chip and development board fully under interior hardware environment, utilize software to realize the reproduction that hardware is on-the-spot, improved and reappeared speed, the economize on hardware resource.Simultaneously, after reappearing the hardware scene fast,, further improved the time of technician's analysis chip problem also for the technician provides convenience.
In addition, different according to the position that backup data file is preserved, the also disclosed embodiment two of the present invention is elaborated to this kind situation.
Embodiment two
On the disclosed basis of the invention described above, see also accompanying drawing 2, the method for the on-the-spot reproduction of the embodiment of the invention two disclosed a kind of hardware mainly may further comprise the steps:
Step S201 occurs backing up the data message in the current hardware scene when unusual at chip, generates backup data file.
Step S202 creates virtual memory, and the hardware information on analog chip, development board or the test board moves to said backup data file in the said virtual memory.
The process of the backup data file that backup generates when execution in step S201 is consistent with the implementation of step S101 among the embodiment one, repeats no more here.Therefore, when carrying out the step S202 of present embodiment, move to the internal storage data and the register data that comprise in the backup data file in the said virtual memory on development board or the test board, and the correlated variables data during the chip working procedure.
Step S203 obtains the executable file that carries Debugging message, resolves said executable file, obtains the routine data information of the pairing chip operation of said Debugging message.
Step S204 shines upon the corresponding actual physical address of said routine data information.
Step S205 transforms the said actual physical address after the mapping, sets up the corresponding relation between itself and the said backup data file.
Step S206 from the backup of said backup data file, reads the corresponding variable data of said actual physical address according to said corresponding relation.
Step S207 obtains the development board or internal storage data on the test board and the register data that back up in said backup data file.
Step S208 shows said variable data, internal storage data and register data in user interface, and reproduction hardware is on-the-spot.
, got access to respectively and realized the on-the-spot required related data of reproduction hardware during to step S207 at execution in step S203, i.e. variable data, internal storage data and register data are in obtaining the process of above-mentioned these data.Equally, described in embodiment one, exist through analyzing Debugging message and needn't analyzing two kinds of situation of Debugging message.In disclosed embodiment of this invention two, step S203 to performed process of step S206 and the embodiment one step S102 to the implementation basically identical of step S105; The process basically identical that process that step S207 is performed and step S106 are performed repeats no more here.
Need to prove that during to step S207, from backup data file, obtain Various types of data at execution in step S203 equally, different with embodiment is that backup data file is stored in the virtual memory in the present embodiment.Therefore, execution in step S203 relates to when from backup data file, obtaining data or information during to step S207, in fact all from virtual memory, reads.
In addition, because backup data file is stored in the virtual memory; So, when execution in step S205, set up the mode that the corresponding relation between said actual physical address and the said backup data file adopts; Can adopt the mode of existing non-transformed document pointer to set up; Actual physical address is being shone upon, in the reading of data backup file during variable data of corresponding actual physical address, employing be the method for searching virtual memory region address offset amount.
Through the disclosed method of the invention described above embodiment; Backing up the data that realize the on-the-spot reproduction of hardware; Generate corresponding backup data file; Again this backup data file is moved in the computing machine in the virtual memory of creating in advance, and utilize this backup data file in virtual memory region, to simulate the situations such as data branch situation and register on the development board, and hardware information such as analog chip.When carrying out above-mentioned steps S203 to step S208; Directly obtain needed data or information the backup data file in being stored in this virtual memory, sending it to the user interface place, realize utilizing software reproduction hardware on-the-spot; And adopt the present invention directly from virtual memory, to obtain required data or information; Need not read hard disk, improve the speed of data query, make the data that get access to accomplish optimization; Further improve the speed of the on-the-spot reproduction of hardware, and practiced thrift hardware resource.Simultaneously, after reappearing the hardware scene fast,, further improved the time of technician's analysis chip problem also for the technician provides convenience.
Embodiment three
On the disclosed basis of the invention described above embodiment, the invention also discloses a kind of method that is applicable to the on-the-spot reproduction of a kind of hardware when user interface and data are in the various computing machine respectively.In present embodiment three, the method for the on-the-spot reproduction of the hardware when user interface and data are in two computing machines respectively sees also accompanying drawing 3, and the method for present embodiment mainly may further comprise the steps on the basis of the foregoing description one:
Step S101 occurs backing up the data message in the current hardware scene when unusual at chip, generates backup data file.
Step S102 obtains the executable file that carries Debugging message, resolves said executable file, obtains the routine data information of the pairing chip operation of said Debugging message.
Step S103 shines upon the corresponding actual physical address of said routine data information.
Step S104 transforms the said actual physical address after the mapping, sets up the corresponding relation between itself and the said backup data file.
Step S105 from the backup of said backup data file, reads the corresponding variable data of said actual physical address according to said corresponding relation.
Step S106 obtains the development board or internal storage data on the test board and the register data that back up in said backup data file.
Step S108 is sent to said user interface through telecommunication media with said variable data, internal storage data and register data.
Step S107 shows said variable data, internal storage data and register data in user interface, and reproduction hardware is on-the-spot.
Need to prove; The content that the step of the same numeral among above-mentioned steps S101, S102, S103, S104, S105, S106 and step S107 and the embodiment one is carried out is basic identical to repeat no more here; Different is for present embodiment and embodiment one; The on-the-spot required data of the hardware that will in a computing machine, obtain are sent to the user interface place of another computing machine through telecommunication media, and in this user interface place demonstration, realize the reproduction that hardware is on-the-spot.
See also accompanying drawing 4, on the basis of embodiment two, the method for present embodiment mainly may further comprise the steps:
Step S201 occurs backing up the data message in the current hardware scene when unusual at chip, generates backup data file.
Step S202 creates virtual memory, and the hardware information on analog chip, development board or the test board moves to said backup data file in the said virtual memory.
Step S203 obtains the executable file that carries Debugging message, resolves said executable file, obtains the routine data information of the pairing chip operation of said Debugging message.
Step S204 shines upon the corresponding actual physical address of said routine data information.
Step S205 transforms the said actual physical address after the mapping, sets up the corresponding relation between itself and the said backup data file.
Step S206 from the backup of said backup data file, reads the corresponding variable data of said actual physical address according to said corresponding relation.
Step S207 obtains the development board or internal storage data on the test board and the register data that back up in said backup data file.
Step S209 is sent to said user interface through telecommunication media with said variable data, internal storage data and register data.
Step S208 shows said variable data, internal storage data and register data in user interface, and reproduction hardware is on-the-spot.
Need to prove; The content that the step of the same numeral among above-mentioned steps S201, S202, S203, S204, S205, S206, S207 and step S208 and the embodiment two is carried out is basic identical to repeat no more here; Different is; Variable data, internal storage data and the register data that present embodiment will obtain in a computing machine is sent to the user interface place of another computing machine through telecommunication media, and in this user interface place demonstration, realizes the reproduction that hardware is on-the-spot.
In addition; In step S108 and step S209 that the invention described above embodiment three carries out, through telecommunication media said variable data, internal storage data and register data are sent to said user interface, said telecommunication media can be existing physical telecommunication media; USB line (Universal Serial BUS for example; Or existing communication protocol, for example TCP/TP procotol USB).
In the embodiment of the invention three, in the disclosed method, utilize a computer simulation emulator of the prior art, chip is checked, debugged to emulator at interior all hardware software implementation, then, through another computing machine.Adopt the embodiment of the invention three disclosed methods, not only realized under the situation that does not have hardware fully, fast the hardware scene being reappeared, realized that really on-the-spot recovery do not have the hardware purpose; And, in present embodiment three, only need to provide the data computing machine to change to different chips; Promptly the memory address according to concrete chip distributes, and concrete change is carried out in related register address change etc.; Then, utilize the on-the-spot reproduction of said process Rapid Realization hardware again.
Need to prove, on the computing machine that shows on the user interface, also can do corresponding change as required as required, then, realize the on-the-spot reproduction of hardware again, further increase dirigibility and convenience that the commissioning staff uses.
Describe the method for the on-the-spot reproduction of a kind of hardware among the disclosed embodiment of the invention described above in detail; Can adopt the device of various ways to realize for method of the present invention; Therefore the invention also discloses the device of the on-the-spot reproduction of a kind of hardware, provide concrete embodiment below and be elaborated.
See also accompanying drawing 5, the apparatus structure synoptic diagram for the on-the-spot reproduction of the disclosed a kind of hardware of the present invention mainly comprises: detecting unit 501, backup units 502, analytic unit 503, reading unit 504, acquiring unit 505 and reproduction unit 506.Wherein, Detecting unit 501 is connected with backup units 502; Backup units is connected with analytic unit 503, reading unit 504, acquiring unit 505, and analytic unit 503 is connected with reading unit 504, and reading unit 504 is connected with reproduction unit 506 respectively with acquiring unit 505.
Whether detecting unit 501 is used for detection chip and occurs unusually.
Backup units 502 is used for backing up the data message at current hardware scene, generates backup data file.
Analytic unit 503 is used to analyze the executable file that carries Debugging message.
Need to prove, in analytic unit 503, comprise: acquisition module 5031, parsing module 5032, mapping block 5033 and set up module 5034.
Acquisition module 5031 is used to obtain the executable file that carries Debugging message.
Parsing module 5032 is used to resolve said executable file, obtains the routine data information of the pairing chip operation of the Debugging message that carries in the said executable file.
Mapping block 5033 is used to shine upon the corresponding actual physical address of said routine data information.
Set up module 5034, be used to transform the said actual physical address after the mapping, set up the corresponding relation between itself and the said backup data file.
Reading unit 504 is used for reading the corresponding variable data of said actual physical address according to the backup of said corresponding relation from said backup data file.
Acquiring unit 505 is used for obtaining the development board or internal storage data on the test board and the register data that back up in said backup data file.
Reproduction unit 506 is used to show said True Data in user interface, and reproduction hardware is on-the-spot.
The disclosed device of the embodiment of the invention is carried out the relevant data procedures of obtaining based on the disclosed method of the invention described above; Detailed process is: the operation that detects chip when detecting unit 501 has occurred unusually; Utilize backup units 502 will realize that the data of the on-the-spot reproduction of hardware back up; Then, utilize analytic unit 503, reading unit 504 and acquiring unit 505 from the backup data file that backup units 502 generates, to obtain corresponding data or information again, last; On reproduction unit 506, show, realize the reproduction that hardware is on-the-spot.
On the basis of the disclosed device of the invention described above, see also accompanying drawing 6, can also comprise in this device: create unit 507 and mobile unit 508.
Create unit 507, be used to create virtual memory.
Mobile unit 508 is used for said backup data file is moved to preset said virtual memory.
Need to prove, create unit 507 and be connected with mobile unit 508, reading unit 504, acquiring unit 505 respectively; Mobile unit 508 is connected with backup units 502, establishment unit 507 respectively.
See also accompanying drawing 7, the disclosed device of the invention described above embodiment can be divided into client 1 and service end 2, in said client 1, comprises: reading unit 504, acquiring unit 505 and reproduction unit 506; Comprise in the said service end 2: create unit 507, mobile unit 508, detecting unit 501, backup units 502, analytic unit 503.
Wherein, said service end 2 is carried out information interaction with client 1 through telecommunication media 3, and said telecommunication media 3 can be the physical telecommunication media; USB line (Universal Serial BUS for example; USB), also can be existing communication protocol, for example TCP/TP procotol.
In sum:
Through method disclosed by the invention and device; Utilize the software simulation emulator, promptly need not rely on hardware that backed up data is returned on chip and the development board, and adopt software analysis to obtain the mode of reproduction desired data; Can improve the speed and the economize on hardware resource of the on-the-spot reproduction of hardware; Simultaneously, after reappearing the hardware scene fast,, further improved the time of technician's analysis chip problem also for the technician provides convenience.
Each embodiment adopts the mode of going forward one by one to describe in this instructions, and what each embodiment stressed all is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For the disclosed device of embodiment, because it is corresponding with the embodiment disclosed method, so description is fairly simple, relevant part is partly explained referring to method and is got final product.
The method of describing in conjunction with embodiment disclosed herein or the step of algorithm can be directly with the software modules of hardware, processor execution, and perhaps the combination of the two is implemented.Software module can place the storage medium of any other form known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or the technical field.
To the above-mentioned explanation of the disclosed embodiments, make this area professional and technical personnel can realize or use the present invention.Multiple modification to these embodiment will be conspicuous concerning those skilled in the art, and defined General Principle can realize under the situation that does not break away from the spirit or scope of the present invention in other embodiments among this paper.Therefore, the present invention will can not be restricted to these embodiment shown in this paper, but will meet and principle disclosed herein and features of novelty the wideest corresponding to scope.