CN103677954B - Emulator - Google Patents
Emulator Download PDFInfo
- Publication number
- CN103677954B CN103677954B CN201210362746.8A CN201210362746A CN103677954B CN 103677954 B CN103677954 B CN 103677954B CN 201210362746 A CN201210362746 A CN 201210362746A CN 103677954 B CN103677954 B CN 103677954B
- Authority
- CN
- China
- Prior art keywords
- emulation
- content
- emulator
- group
- user model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The invention discloses a kind of emulator, including an emulation chip, the emulation chip includes emulation logic module, register group and mirror registers group;In the user mode, the emulation logic module controls the content of the content and register group of the mirror registers group to be consistent in real time;After user model enters monitoring mode, the emulation logic module controls the content of the mirror registers group no longer to change, and numerical value therein is exactly numerical value when exiting user model;After monitoring mode enters user model, the emulation logic module controls the content of the register group to be rewritten into the content in the mirror registers group, and now the numerical value in the register group has reverted to numerical value when exiting user model.The present invention can simplify the process to keep the scene intact with restoring scene, improve efficiency, reduce the probability for mistake occur.
Description
Technical field
The present invention relates to a kind of emulator.
Background technology
There is the user program of User Exploitation in processor chips, in the writing and debug of user program, used work
Tool is usually processor chips emulator.Using the emulation chip for including product treatment device chip various functions in emulator, use
In the work behavior of analog equipment processor chips, product treatment device chip is sufficiently close in function and performance, emulates core
The debugging module of piece and emulator, which coordinates, realizes the simulation run of user program and every debugging function.Emulator has monitoring mode
With two kinds of mode of operations of user model, emulation chip performs user program, analog equipment core at full speed in emulator under user model
The state of piece configuration processor, emulation chip performs the monitoring programme that emulator provides in emulator under monitoring mode, and with debugging
Module interacts, and completes export and modification that user pays close attention to chip status data, information.Emulation chip performs use in the user mode
Family program, when performing monitoring programme in the monitoring mode, some general registers can be multiplexed(Such as 8051 single-chip microcomputer accumulator
A, R0, R1, DPTR etc.), therefore, emulation chip exits when user model enters monitoring mode, it is necessary to protect under user control
These register values that can be used in the monitoring mode, i.e., these register values are saved by emulator, that is, protected
Shield scene., it is necessary to which emulator continues to run with user program after user has observed chip status, control emulation chip exits monitoring
Pattern reenters user model.Now, user program is continued to run with from exiting before at user model, so corresponding
When all register values are also required to exit user model, the register value that those are used in the monitoring mode recovers
The value preserved into emulator when keeping the scene intact, i.e., these register values are recovered by emulator, that is, restoring scene.
So, monitoring mode was passed in and out in user program implementation procedure even if just can guarantee that, the situation also continuously performed with user program
It is consistent.In existing emulator, the need of work emulator and emulation chip of above-mentioned protection and restoring scene, which coordinate, to be completed.Protect
When protecting live, emulator control emulation chip enters monitoring mode, and provides one section of monitoring programme to keep the scene intact by emulation core
Piece performs, and needing register value to be protected to read one by one in buffer register special in emulation chip, is led to by emulator
The private communication passage being connected with emulation chip is crossed to take away and be saved in emulator one by one.During restoring scene, emulator control
Emulation chip wouldn't enter user model, still in monitoring mode.Emulator passes through the private communication passage that is connected with emulation chip
The register value being saved in emulator is put into buffer register special in emulation chip, and held by emulation chip one by one
The monitoring programme of one section of restoring scene of row, one by one writes these register values in the register of emulation chip, finally just controls
Emulation chip enters user model.It can be seen that above-mentioned protection/restoring scene process very complicated, efficiency in existing emulator are not
Height, need protection/recovery register it is more in the case of, easily there is mistake.Emulator can not be also realized to these deposits
The Real Time Observation of device value.
The content of the invention
The technical problem to be solved in the present invention provides a kind of emulator, can simplify the mistake to keep the scene intact with restoring scene
Journey, efficiency is improved, reduce the probability for mistake occur.
In order to solve the above technical problems, the emulator of the present invention, including an emulation chip, it is imitative that the emulation chip includes one
True logic module, a register group and a mirror registers group;
In the user mode, the content of the content and register group of emulation logic module control mirror registers group is protected in real time
Hold unanimously, i.e., when a certain register value changes in register group, the value of mirror registers is corresponded in mirror registers group
Change therewith;
After user model enters monitoring mode, the content of emulation logic module control mirror registers group no longer changes,
Numerical value therein is exactly numerical value when exiting user model;
After monitoring mode enters user model, the content of emulation logic module control register group, which is rewritten, to be mirrored into depositing
Content in device group, now the numerical value in register group reverted to numerical value when exiting user model.
Using the emulator of the present invention, the work with restoring scene that keeps the scene intact transfers to emulation chip exiting and again completely
It is automatically performed when newly entering user model, meanwhile, emulator can read register value in real time, be observed for user.Simplify
Keep the scene intact with the process of restoring scene, improve the operating efficiency of emulator, reduce the probability for mistake occur, there is provided be real
Debugging New function.It is favorably improved the exploitation debugging efficiency of user program.
Brief description of the drawings
The present invention is further detailed explanation with reference to the accompanying drawings and detailed description:
Accompanying drawing is the structural representation of the emulator.
Embodiment
Referring to shown in accompanying drawing, in the following embodiments, the emulator 1 includes emulation chip 2, debugging module 3.Emulation
There are communication port 9 and a control signal wire 8 to connect between chip 2 and debugging module 3.Emulation chip 2 includes emulation logic
Module 7, processor core 4, register group 5 and mirror registers group 6.Processor core 4 and register group 5 in emulation chip 2 with
Consistent in product chips, mirror registers group 6 is the mirror image of register group 5.Emulator 1 is under user model, and emulation is patrolled
Collecting module 7 controls the content of mirror registers group 6 to be consistent in real time with the content of register group 5;Enter monitoring mould from user model
After formula, emulation logic module 7 controls the content of mirror registers group 6 no longer to change;When entering user model from monitoring mode, imitate
The content of the true control register group 5 of logic module 7 is rewritten into the content in mirror registers group 6.Processor core 4 can not read and write mirror
As register group 6.No matter under monitoring mode or user model, debugging module 7 can be transferred through the reading mirror image of communication port 9 and post
Content in storage group 6.Debugging module 7 is emulated by control signal wire 8 to the output mode control signal of emulation chip 2, control
Chip 2 is in user model or monitoring mode.
So, emulator 1 is under user model, and debugging module 3 exports mould by control signal wire 8 to emulation chip 2
Formula control signal, control emulation chip 2 are in user model.Emulation logic module 7 controls the content of mirror registers group 6 and deposit
The content of device group 5 is consistent in real time, i.e., corresponding in mirror registers group 6 when a certain register value changes in register group 5
The value of mirror registers also changes therewith.Debugging module 3 can read the content in mirror registers group 6 by communication port 9, i.e.,
The real time value of register group 5 in emulation chip 2 can be obtained.When user needs emulator 1 into monitoring mode, debugging module 3
Monitoring mould is entered from user model to the output mode control signal of emulation chip 2, control emulation chip 2 by control signal wire 8
Formula.Into after monitoring mode, emulation logic module 7 controls the content of mirror registers group 6 no longer to change, even if register group 5
Content change(Because performing monitoring programme etc.), the content of mirror registers group 6 also no longer changes, and numerical value therein is exactly
Exit numerical value during user model.When user needs emulator 1 to exit monitoring mode to reenter user model, debugging module 3
Use is reentered from monitoring mode to the output mode control signal of emulation chip 2, control emulation chip 2 by control signal wire 8
Family pattern.The content of the control register group 5 of emulation logic module 7 is rewritten into the content in mirror registers group 6, now register
Numerical value in group 5 has reverted to numerical value when exiting user model.This completes during pattern switching keep the scene intact with it is extensive
Multiple field process, meanwhile, emulator 1 can obtain the real time content of the register group of emulation chip 2 in the user mode.
The present invention is described in detail above by embodiment and embodiment, but these are not composition pair
The limitation of the present invention.Without departing from the principles of the present invention, those skilled in the art can also make many deformations and change
Enter, these also should be regarded as protection scope of the present invention.
Claims (5)
1. a kind of emulator, including an emulation chip, it is characterised in that:The emulation chip includes an emulation logic module, one
Register group and a mirror registers group;
In the user mode, the emulation logic module controls the content of the content and register group of the mirror registers group real
When be consistent;
After user model enters monitoring mode, the emulation logic module controls the content of the mirror registers group no longer to become
Change, numerical value therein is exactly numerical value when exiting user model;
After monitoring mode enters user model, it is described that the emulation logic module controls the content of the register group to be rewritten into
Content in mirror registers group, now the numerical value in the register group reverted to numerical value when exiting user model.
2. emulator as claimed in claim 1, it is characterised in that:The emulation chip also includes a processor core, the processing
Device core can not read and write the mirror registers group.
3. emulator as claimed in claim 1, it is characterised in that:Also include a debugging module, the debugging module is imitated with described
True chip is connected by a communication port, and the debugging module can be transferred through communication port reading under monitoring mode and user model
Take the content in the mirror registers group.
4. emulator as claimed in claim 3, it is characterised in that:One is also associated between the debugging module and emulation chip
Root control signal wire, the debugging module by the control signal wire to emulation chip output mode control signal, described in control
Emulation chip is in user model or monitoring mode.
5. emulator as claimed in claim 1, it is characterised in that:The processor core and register group of the emulation chip and production
Processor core in product chip is identical with Register functional.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210362746.8A CN103677954B (en) | 2012-09-25 | 2012-09-25 | Emulator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210362746.8A CN103677954B (en) | 2012-09-25 | 2012-09-25 | Emulator |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103677954A CN103677954A (en) | 2014-03-26 |
CN103677954B true CN103677954B (en) | 2018-02-13 |
Family
ID=50315611
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210362746.8A Active CN103677954B (en) | 2012-09-25 | 2012-09-25 | Emulator |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103677954B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102016105844A1 (en) * | 2016-03-31 | 2017-10-05 | Dspace Digital Signal Processing And Control Engineering Gmbh | Method for testing a control program of a control device in a simulation environment on a computer |
CN106485020B (en) * | 2016-10-31 | 2019-10-01 | 上海华虹集成电路有限责任公司 | Processor chips emulator with nonvolatile memory |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6647511B1 (en) * | 1998-09-17 | 2003-11-11 | Texas Instruments Incorporated | Reconfigurable datapath for processor debug functions |
CN101206614A (en) * | 2006-12-20 | 2008-06-25 | 上海华虹集成电路有限责任公司 | Simulator for simulating register with specific function |
CN101751323A (en) * | 2008-11-28 | 2010-06-23 | 上海华虹集成电路有限责任公司 | Microprocessor chip emulator and breakpoint setting method |
CN101968763A (en) * | 2009-07-27 | 2011-02-09 | 上海华虹集成电路有限责任公司 | High-speed processor chip simulator |
CN102110045A (en) * | 2009-12-24 | 2011-06-29 | 上海华虹集成电路有限责任公司 | Simulator for displaying debugging information in real time |
CN102467444A (en) * | 2010-11-11 | 2012-05-23 | 上海华虹集成电路有限责任公司 | Simulation debugging system for special function register |
-
2012
- 2012-09-25 CN CN201210362746.8A patent/CN103677954B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6647511B1 (en) * | 1998-09-17 | 2003-11-11 | Texas Instruments Incorporated | Reconfigurable datapath for processor debug functions |
CN101206614A (en) * | 2006-12-20 | 2008-06-25 | 上海华虹集成电路有限责任公司 | Simulator for simulating register with specific function |
CN101751323A (en) * | 2008-11-28 | 2010-06-23 | 上海华虹集成电路有限责任公司 | Microprocessor chip emulator and breakpoint setting method |
CN101968763A (en) * | 2009-07-27 | 2011-02-09 | 上海华虹集成电路有限责任公司 | High-speed processor chip simulator |
CN102110045A (en) * | 2009-12-24 | 2011-06-29 | 上海华虹集成电路有限责任公司 | Simulator for displaying debugging information in real time |
CN102467444A (en) * | 2010-11-11 | 2012-05-23 | 上海华虹集成电路有限责任公司 | Simulation debugging system for special function register |
Also Published As
Publication number | Publication date |
---|---|
CN103677954A (en) | 2014-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103941619B (en) | A kind of development platform based on the reconfigurable Microcomputer Protection of FPGA | |
CN101206614B (en) | Simulator for simulating register with specific function | |
CN103207830B (en) | Emulator with software breakpoint | |
CN106528443B (en) | FLASH management system and method suitable for spaceborne data management | |
CN103677954B (en) | Emulator | |
CN104391770A (en) | Online debugging and upper computer communication module of SOC (system-on-chip) chip for embedded data security system | |
CN103793263B (en) | DMA transaction-level modeling method based on Power PC processor | |
CN104461859A (en) | Emulator and method for supporting NVM soft breakpoint debugging | |
CN102467446A (en) | Processor chip simulator capable of setting program pointer value | |
CN106528414B (en) | Processor chips emulator | |
CN104216829B (en) | A kind of method and system of flush bonding module concurrent test | |
CN101751323A (en) | Microprocessor chip emulator and breakpoint setting method | |
CN102110045B (en) | Simulator for displaying debugging information in real time | |
CN104461796B (en) | JTAG debugging modules and adjustment method for embedded 8051CPU | |
CN104035898B (en) | A kind of memory access system based on VLIW type processors | |
CN106485020B (en) | Processor chips emulator with nonvolatile memory | |
CN101329650B (en) | Smart card emulator | |
CN105405280B (en) | A kind of implementation method for debugging electric power acquisition terminal and obtaining amr message | |
CN101751324B (en) | Non-contact type intelligent card simulator and a working mode switching method | |
CN102467444A (en) | Simulation debugging system for special function register | |
CN203204494U (en) | Multifunctional high-stability slot structure and multifunctional card insertion module combined system | |
CN107885527A (en) | A kind of code revision method and device of test system | |
CN104698867A (en) | Data interaction method of data acquisition card based on M-file system function | |
CN103678073A (en) | Simulation system | |
CN103049214B (en) | Magnetic disc array card and there is the disc array system of extended function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |