EP1782204A2 - Emulation and debug interfaces for testing an integrated circuit with an asynchronous microcontroller - Google Patents
Emulation and debug interfaces for testing an integrated circuit with an asynchronous microcontrollerInfo
- Publication number
- EP1782204A2 EP1782204A2 EP05758728A EP05758728A EP1782204A2 EP 1782204 A2 EP1782204 A2 EP 1782204A2 EP 05758728 A EP05758728 A EP 05758728A EP 05758728 A EP05758728 A EP 05758728A EP 1782204 A2 EP1782204 A2 EP 1782204A2
- Authority
- EP
- European Patent Office
- Prior art keywords
- emulation
- interface
- jtag
- software
- instruction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
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
- G06F11/362—Software debugging
- G06F11/3648—Software debugging using additional hardware
- G06F11/3656—Software debugging using additional hardware using a specific debug interface
Definitions
- the present invention relates to computer program emulation and debugging, and more particularly to circuits and methods for digitally interfacing with embedded asynchronous microcontrollers with standard Joint Test Action Group (JTAG) test access ports (TAP).
- JTAG Joint Test Action Group
- the input/output (I/O), memory, assembler, compiler, and graphical user interfaces of the ICE development system are all then available to the engineer so that the programs can be tested in the actual target hardware. All the I/O, program memory, data memory, CPU registers, and peripherals in the target system are accessible to and modifiable by the host development system.
- Breakpoints allow program execution to be stopped when certain events occur, and are another important debugging resource. Being able to stop program executions at defined locations and conditions allows a full analysis of how the program got where it did and how it affected the target system. Emulators can also use breakpoints to implement single stepping that allows the engineer to execute the target program one instruction at a time.
- ICE development systems and their supporting equipment and software are expensive. They are also highly specialized to the particular processors being used in each target embedded system, and adapters and special software must be purchased for each type.
- dedicated on-chip logic is needed for interfacing to the external emulator. Usually it is an IP either provided by the emulator company or by the supplier of the embedded microprocessor. Such extra costs add to the IC development expense budget.
- Emulators can be used to take control and test computer circuit boards their processor, memory, or bus interfaces. Once in control, the emulator loads and runs diagnostic tests to debug the target hardware and software. Test access on densely packed boards is no problem for a processor emulator, although the real processor must be socketed to allow its replacement. Emulators were used extensively in board development, but increasing processor speeds now have made them impractical.
- ROM-memory emulators plug into the sockets to replace the boot ROM, and insert diagnostic program code for the processor's normal boot code.
- Such socket interfaces are bi-directional so that the unit-under-test (UUT) can communicate with the tester. But ROM emulators are not able to diagnose the processor to boot ROM area. Product design circuit modifications need to be made if the ROM's are soldered- in.
- Bus emulators can be connected to a bus slot or edge connector, giving test access to the various circuits and functions of the UUT via read/write bus cycles. They are useful for testing plug-in bus cards such as VME and PCI.
- Bus emulators can be connected to a bus slot or edge connector, giving test access to the various circuits and functions of the UUT via read/write bus cycles. They are useful for testing plug-in bus cards such as VME and PCI.
- JTAG Joint Test Action Group
- a serial interface defined is known as the test access port (TAP). It uses five data and timing pins to access daisy-chained shift registers built into each component's I/O pins. Such allows a chain of JTAG-compliant components to be "boundary scanned" for errors.
- the JTAG protocol has been expanded by microprocessor and digital signal processor (DSP) manufacturers to provide on-board debug facilities for hardware and software developers. Such helps overcome the typical 30-MHz speed barrier encountered by external emulators. Vendor-specific extensions to JTAG typically have 2-3 additional signal lines and an enhanced instruction set for controlling the processor core.
- debug interface-enabled CPU's include Intel® Pentium® processors, Intel XScaleTM Microarchitecture Processors, MotorolaTM, IBM® PowerPCTM, AMD®, MIPS®, and ARM® processor families.
- the IEEE also has published IEEE ISTO- 5001 for debug interfaces.
- the debug interfaces have been given various trademark names, e.g., Motorola's background debug mode (BDM), AMD's hardware debug tool(HDT), and Motorola/IBM's common on-chip processor (COP).
- BDM background debug mode
- HDT hardware debug tool
- COP Motorola/IBM's common on-chip processor
- the BDM interface is similar to JTAG, but the signal lines and protocol differ.
- Test and diagnostic equipment designed to use a processor's debug interface requires only about six to 10 test points on the UUT. Such access can be achieved in most board designs, either by placing an interposer between CPU 116 and the socket, using a very simple bed of nails when CPUs are soldered, or making use of the JTAG break-out header provided by some board manufacturers.
- Any bus-architecture UUT can be divided into functional blocks such as bridges,
- RAM random access memory
- video controllers and I/O controllers.
- I/O controllers Each functional block contains arrays of memory or I/O registers.
- Test programs use the extended JTAG debug functions provided by processor manufacturers to sequentially access these registers, building up a complete test.
- Low-level functions include stop/start the processor, read/write memory, read/write general-purpose registers, read/write I/O, breakpoints, single-step code, and code trace. Combinations of these functions accommodate downloading test code to a UUT, controlling and monitoring test code execution, and collecting test results from UUT memory.
- the read/write functions can test RAM, which also verifies intermediate buses.
- I/O controllers are tested either by looping the output back into the input, as in the case of network interface controllers, or generating/measuring signals with external devices attached to the board's connectors.
- Some test systems include I/O emulation units, which avoid the need to attach real peripheral devices. More expense and complexity is encountered if the target device CPU is not a synchronous type. Specialized interfaces are needed to deal with asynchronously clocked embedded processors.
- a target device integrated circuit embodiment of the present invention comprises an embedded asynchronous microcontroller and is fitted with a standard JTAG- TAP interface.
- a JTAG-TAP port controller and emulation interface are able to intercept and substitute every instruction being fetched from a code memory.
- An external emulation PC has the ability to inspect on-board data and code memories by instructing the embedded asynchronous microcontroller to read and write them to the
- JTAG-TAP interface Single-stepping and breakpoint registers are provided for debugging and testing by the external emulation PC.
- An advantage of the present invention is a circuit is provided with built-in emulation and debug capability.
- a further advantage of the present invention is a method is provided for a target device to be tested in free running mode while watching for breakpoints the device performance is not hampered, or emulation code can be executed at less than full speed that interacts with a PC.
- a still further advantage of the present invention is that a system is provided which has an inexpensive and industry standard JTAG serial interface.
- FIG. 1 is a functional block diagram of an emulation system embodiment of the present invention.
- Fig. 2 is a flowchart diagram of an emulation interface mode method embodiment of the present invention, and is useful in the system of Fig. 1.
- Fig. 1 illustrates an emulation system embodiment of the present invention, and is referred to herein by the general reference numeral 100.
- the emulation system 100 comprises an ordinary personal computer (PC) 102 connected to a target device 104 through a standardized 5-pin JTAG interface 106.
- PC personal computer
- a TCK/clock pin synchronizes the internal state machine operations.
- a TMS/mode select pin is sampled at the rising edge of TCK to determine the next state.
- a TDI/data-in pin is sampled at the rising edge of TCK and shifted into the target device 104's test or programming logic when the internal state machine is in the correct state.
- a TDO/data-out pin represents the data shifted out of the target device 104's test or programming logic and is valid on the falling edge of TCK when the internal state machine is in the correct state.
- a TRST/reset pin resets an internal state machine when driven low.
- a software tool included and operating on the PC 102 is able to control the emulation behavior of the target device through the emulation hardware interface.
- the debugging software defines various functions to interface the emulator software environment so it can interact with the target device. For example: read/write RAM
- DATA, IDATA, XDATA read/write special function register (SFR); read/write program code; initialize, re-initialize, reset/stop target hardware; read/write program counter; get/set registers; STOP, single STEP and RUN target execution; and, set/clear breakpoints.
- the target device 104 is a single-chip integrated circuit (IC) and includes a JTAG test access port (TAP) controller 108 connected to an emulation interface 110.
- Program code from a code memory 112 can be substituted with debug code and register information from the emulation interface.
- debug code and other control information is downloaded from the PC 102 through he JTAG TAP 106 and TAP controller 108.
- a data memory 114 is connected through a private bus to an asynchronous microcontroller (CPU) 116.
- CPU 116 can be an Intel type 80C51 microcomputer.
- the emulation interface 110 includes a JTAG interface 118, a configuration (EMU_CFG) register 120, an emulation data register (EMU_DR) 122, a breakpoints (EMU_BP) register 124, an instruction register (EMU_IR) 126, a program counter (EMU_PC) register 128, and emulation (EMU) controller 130, and a bus multiplexer 132 to switch between emulation code or regular program code from the code memory 112.
- the EMU_IR 126 contains the 8-bit instruction to be executed by CPU 116 when in EMU External Mode.
- the EMU_PC register 128 stores a current 18-bit value of the code address when a STOP or a breakpoint occurs. It is used by the emulator to restore the system by forcing a jump to the program counter address.
- the EMU breakpoints register 124 stores two 18-bit instruction addresses the operator wants the microcontroller 116 to break execution and halt.
- the EMU DR 122 provides for external inspection by PC 102 of 8-bit data in memories 112 and 114.
- the asynchronous microcontroller 116 is commanded to move data from the memories and internal registers into the EMU_DR register 122.
- the EMU_DR 122 can be then read out though the JTAG interface 118.
- Table I defines the nine bits used in the EMU_CFG register 120.
- FIG. 2 represents an emulation- interface mode process, and is referred to herein by the general reference numeral 200.
- the emulation can be controlled by PC 102, the various bits in EMU_CFG register 120 are writeable and readable by PC 102 and are inspected and partially modified by process 200.
- Table I provides the program bit symbols used hereafter in describing process 200.
- the process 200 begins at a new program instruction request, e.g., by CPU 116 through instruction start signal and code address bus.
- a step 202 checks to see if the EMU ON flag (EMU CFG.l) is set, meaning the emulation mode is on. If it is, then a step 204 checks the DIR & Start_instr flag (EMU_CFG.5).
- a step 206 copies the code address (code add) into the EMU_PC register 128, in effect an unconditional program jump for CPU 116.
- a step 208 saves the CPU's interrupt enable bit.
- a step 210 disables CPU interrupts and watch dog timer (WDT).
- a step 214 loops until IR_V becomes true.
- a step 216 sends the instruction register EMU_IR to CPU 116 for execution and then loops back to step 202.
- step 218 allows a regular program instruction from code memory 112 top be routed through multiplexer 132 to CPU 116 for regular execution. In other words, a test for emulation mode is made every instruction cycle of CPU 116. The overhead connected with this can be very minimal in terms of propagation time, as the decision to do an emulation instruction can be implemented with hardware.
- step 204 found that DIR & Start_instr flag was not true, a step 220 restores IEN.7 and disables the WDT.
- a step 222 looks to see if single-stepping (STEP) is required (EMU_CFG.3). If yes, a step 224 sends a next instruction to CPU 116.
- Embodiments of the present invention recognize that when real time debugging is not required it is possible to reduce the number of IC pads dedicated to emulation, and those pads can use an inexpensive serial interface.
- the standard JTAG Test Access Port is already present in many modern IC devices for test purposes, and typically will not add any further costs to present designs in terms of silicon area, package, design.
- Software running on PC 102 can control registers in the emulation interface through the JTAG interface, the register bits are used by the hardware to control various interactions with CPU 116.
- Initialization IIT
- RE-INIT re-initialization
- target reset functions are called by the software tool on PC 102 when it is necessary to initialize or finalize the hardware target.
- routines include any initialization of the PC-to-JTAG interface, as well as the initialization of the configuration registers of the emulation interface 110.
- the EMU_reset command writes a "0" the EMU_CFG.NRST bit. Such forces a reset of the whole chip except the JTAG controller 108 and the emulation interface 110.
- RUN, STOP and STEP emulation controls are included.
- An EMU freeze mode is entered as soon the reset flag (NRST) is written again to "1" and the internal chip-reset sequence is completed, CPU 116 will try to start up again. But the emulation interface 110, finding the EMU ON and DIR bits equal to "1", will freeze CPU 116 at the instruction address 0x0000, just during the fetching phase, entering into the EMU freeze mode. In this phase, it is possible to reconfigure the registers of emulation interface 110, defining the breakpoints addresses, or the external instructions. It's also possible to modify the direction of the instructions after a current instruction has been executed.
- the DIR bit is read for each current operation by emulation interface 110, and is processed again only at the beginning of the next new instruction.
- An EMU external mode is entered when emulation software on PC 102 lets CPU 116 run and writes the EMU_CFG.IR_V bit to "1 ". Such will validate the content of instruction register 126 that is passed to CPU 116 to be executed (EMU Internal Mode).
- emulation interface 110 will check the EMU-ON and DIR bits in EMU_CFG register 120. If the DIR bit is still at one, emulation interface 110 will automatically reset the DR_V bit to invalidate the instruction register and will enter in the EMU freeze mode.
- the external emulator can synchronize its operations with the events within the target device 104. Polling the IR_V bit until it becomes "0", as in step 212, emulation PC 102 will know when CPU 116 is frozen. Setting the IR_V to "1 " will let CPU 116 have the current instruction via EMUJR register 126.
- emulation interface 110 To prevent entering the interrupt state during the EMU External Mode, emulation interface 110 temporarily disables all the interrupts, and resets the global interrupt enable bit in an associated interrupt controller. Similarly any watch dog timer is inactivated while CPU 116 is in emulation mode.
- the original value of the global interrupt enable bit is saved into the EMU CFG.IE bit and is restored into the interrupt controller every time EMU internal modes are entered.
- the target device 104 will enter into either an EMU internal step mode or an EMU internal standard mode, depending on the value of the EMU CFG.STEP bit.
- EMU internal step mode only one complete instruction is provided to CPU 116 from the internal memory.
- the emulation interface 110 will then copy the code address bus value into the EMU-PC register, set the DI R bit to "1" for the next cycle, copy the global interrupt enable bit into EMU CFG.IE, and reset the STEP bit to 0
- EMU internal standard mode the execution will run full speed from the internal memory until a STOP command is received. This is done by either writing "1" EMU CFG. STOP, or until a breakpoint is encountered.
- the emulation interface 110 then copies the code address bus value into the EMU-PC register, sets the DIR bit to "1" for the next cycle, copies the global interrupt enable bit into EMU_CFG, and sets the EMU V.STOP V (stop valid bit) to "1", or setthe EMU V.BP1 V / BP2 V (breakpoints valid bit) to "1".
- the emulation software tool on PC 102 preferably has only indirect read/write access into all of the data/code memory space via CPU 116.
- a direct access of the emulation interface 110 to the code and data memories 112 and 114 is not desirable since CPU 116 is asynchronous, and multiplexed access of the memories would slow down process execution. It is possible while CPU 116 is in the emulation state to execute arbitrary code through the emulation interface.
- Access to any kind of embedded memories uses CPU 116 to do the data shuttling, by running a routine to move the memory contents into the emulation hardware registers accessible from JTAG.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
Claims
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US58856204P | 2004-07-16 | 2004-07-16 | |
US63211204P | 2004-11-30 | 2004-11-30 | |
PCT/IB2005/052372 WO2006008721A2 (en) | 2004-07-16 | 2005-07-16 | Emulation and debug interfaces for testing an integrated circuit with an asynchronous microcontroller |
Publications (1)
Publication Number | Publication Date |
---|---|
EP1782204A2 true EP1782204A2 (en) | 2007-05-09 |
Family
ID=35462490
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
EP05758728A Withdrawn EP1782204A2 (en) | 2004-07-16 | 2005-07-16 | Emulation and debug interfaces for testing an integrated circuit with an asynchronous microcontroller |
Country Status (3)
Country | Link |
---|---|
EP (1) | EP1782204A2 (en) |
JP (1) | JP2008507025A (en) |
WO (1) | WO2006008721A2 (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070214389A1 (en) * | 2006-03-08 | 2007-09-13 | Severson Matthew L | JTAG power collapse debug |
DE102008019861A1 (en) * | 2008-04-17 | 2009-10-29 | Göpel electronic GmbH | Method for controlling connection pins of an emulatable component and arrangement for carrying out the method |
CN101814054B (en) * | 2010-03-23 | 2012-05-02 | 苏州国芯科技有限公司 | Instruction tracing controller for debugging microcontroller |
CN104239176A (en) * | 2014-10-16 | 2014-12-24 | 成都傅立叶电子科技有限公司 | Multi-user multi-target remote JTAG debugging system based on Internet |
CN105528270B (en) * | 2015-12-30 | 2018-03-30 | 东风商用车有限公司 | JTAG (Joint test action group) and BDM (brain-based data model) integrated debugging interface and using method thereof |
CN111984521B (en) * | 2019-05-23 | 2022-11-29 | 核工业理化工程研究院 | Board-level debugging method without JTAG (Joint test action group) intervention |
CN111753475B (en) * | 2020-06-28 | 2022-06-28 | 福建工程学院 | Method for simulating MSI digital logic chip based on Cortex-M0+ microcontroller |
CN112100954B (en) * | 2020-08-31 | 2024-07-09 | 北京百度网讯科技有限公司 | Method, apparatus and computer storage medium for verifying chip |
CN117251314A (en) * | 2022-06-09 | 2023-12-19 | 象帝先计算技术(重庆)有限公司 | Simulation debugging system and method |
CN117632611B (en) * | 2023-12-05 | 2024-05-14 | 北京中天星控科技开发有限公司 | General testing device for microprocessor chip |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020065646A1 (en) * | 2000-09-11 | 2002-05-30 | Waldie Arthur H. | Embedded debug system using an auxiliary instruction queue |
-
2005
- 2005-07-16 WO PCT/IB2005/052372 patent/WO2006008721A2/en active Application Filing
- 2005-07-16 JP JP2007520966A patent/JP2008507025A/en not_active Withdrawn
- 2005-07-16 EP EP05758728A patent/EP1782204A2/en not_active Withdrawn
Non-Patent Citations (1)
Title |
---|
See references of WO2006008721A3 * |
Also Published As
Publication number | Publication date |
---|---|
WO2006008721A3 (en) | 2006-12-21 |
JP2008507025A (en) | 2008-03-06 |
WO2006008721A2 (en) | 2006-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5590354A (en) | Microcontroller provided with hardware for supporting debugging as based on boundary scan standard-type extensions | |
US6185732B1 (en) | Software debug port for a microprocessor | |
US6145122A (en) | Development interface for a data processor | |
EP1782204A2 (en) | Emulation and debug interfaces for testing an integrated circuit with an asynchronous microcontroller | |
US8180620B2 (en) | Apparatus and method for performing hardware and software co-verification testing | |
US6145123A (en) | Trace on/off with breakpoint register | |
US5329471A (en) | Emulation devices, systems and methods utilizing state machines | |
US6922821B1 (en) | System and a method for checking lock step consistency between an in circuit emulation and a microcontroller while debugging process is in progress | |
JP3846939B2 (en) | Data processor | |
EP0762276B1 (en) | Data processor with built-in emulation circuit | |
US6032268A (en) | Processor condition sensing circuits, systems and methods | |
US5621651A (en) | Emulation devices, systems and methods with distributed control of test interfaces in clock domains | |
US6148381A (en) | Single-port trace buffer architecture with overflow reduction | |
JP4190114B2 (en) | Microcomputer | |
JP4126105B2 (en) | Digital processor test method | |
US5841670A (en) | Emulation devices, systems and methods with distributed control of clock domains | |
Stollon | On-chip instrumentation: design and debug for systems on chip | |
US8112267B2 (en) | System and a method for checking lock-step consistency between an in circuit emulation and a microcontroller | |
US20030200425A1 (en) | Devices, systems and methods for mode driven stops | |
US20070011663A1 (en) | Distinguishing Between Two Classes of Trace Information | |
US20040193957A1 (en) | Emulation devices, systems and methods utilizing state machines | |
JP2004178591A (en) | Progressive extended compression mask for dynamic trace | |
EP0411904A2 (en) | Processor condition sensing circuits, systems and methods | |
JP2005070949A (en) | Program processing apparatus | |
EP0685793A2 (en) | Emulation device, system and method with distributed control of test interfaces in clock domains |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
AK | Designated contracting states |
Kind code of ref document: A2 Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LI LT LU LV MC NL PL PT RO SE SI SK TR |
|
AX | Request for extension of the european patent |
Extension state: AL BA HR MK YU |
|
17P | Request for examination filed |
Effective date: 20070621 |
|
RBV | Designated contracting states (corrected) |
Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LI LT LU LV MC NL PL PT RO SE SI SK TR |
|
DAX | Request for extension of the european patent (deleted) | ||
17Q | First examination report despatched |
Effective date: 20071105 |
|
RAP1 | Party data changed (applicant data changed or rights of an application transferred) |
Owner name: NXP B.V. |
|
RAP1 | Party data changed (applicant data changed or rights of an application transferred) |
Owner name: NXP B.V. |
|
STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN |
|
18D | Application deemed to be withdrawn |
Effective date: 20110202 |