IP Library Granted Patent US 7,526,422
Granted Patent B1
US 7,526,422 · App. 09/992,076 · Granted Apr 28, 2009

System and a method for checking lock-step consistency between an in circuit emulation and a microcontroller

Assignee: Cypress Semiconductor Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,526,422
App. No.
09/992,076
Granted
Apr 28, 2009
Kind
B1
Abstract

A system and a method for checking consistency of a lock-step process while debugging a microcontroller code. A host device copies a partially copies a production microcontroller in an ICE (in-circuit emulation) to form a virtual microcontroller. The virtual microcontroller and the microcontroller simultaneously and independently run a microcontroller code for debugging purposes. The microcontroller residing on a test circuit includes a first memory and the virtual microcontroller residing in the ICE includes a second memory. A host computer copies a content of the first memory and a content of the second memory in the host computer memory when the execution of the code is halted. Software in the host device compares the content of the first memory and the content of the second memory for consistency. In case of a disparity between the content of the first memory and the content of the second memory, a user traces the execution of the code in a trace buffer residing in the ICE and debugs the faulty code accordingly.

Claims (33)

1. A method for debugging microcontroller code comprising:

a) programming said microcontroller code into a target microcontroller including a first memory and into an in circuit emulator base station including a second memory, a trace buffer, and a target microcontroller emulator which is not identical to and emulates operation of said target microcontroller and initializing said first memory and said second memory;

b) executing the microcontroller code on the target microcontroller and on the target microcontroller emulator in lock step by executing same instructions using same clocking signals;

c) verifying lock step of said executing step by comparing content of the first memory and content of the second memory when said target microcontroller encounters a breakpoint and said executing step halts;

d) if lock step of said executing step is not verified, reporting an error, saving an execution history using said trace buffer and debugging said microcontroller code; and

e) if lock step of said executing step is verified, continuing execution of the microcontroller code.

2. The method of claim 1 further comprising:

locating an error within the microcontroller code by tracing the execution history using the trace buffer.

3. The method of claim 1 wherein said first memory includes a first central processing unit (CPU) register and wherein said second memory includes a second CPU register, wherein said method further comprises:

verifying lock step of said executing step by comparing contents of the first CPU register and contents of the second CPU register.

4. The method of claim 1 wherein said in circuit emulator base station comprises a field programmable gate array (FPGA), and wherein said target microcontroller emulator is programmed into said FPGA.

5. The method of claim 1 wherein the target microcontroller is a production microcontroller.

6. A system for debugging microcontroller code, comprising:

a target microcontroller including a first memory;

an in circuit emulator base station including a second memory and a target microcontroller emulator which is not identical to and emulates operation of said target microcontroller, wherein said target microcontroller and said target microcontroller emulator execute said microcontroller code, wherein said microcontroller code execution occurs in lock step by executing same instructions using same clocking signals; and

an interface coupled to said target microcontroller and said in circuit emulator base station, wherein lock step of said microcontroller code execution is verified by comparing said first memory with said second memory when said target microcontroller encounters a breakpoint and said microcontroller code execution halts, and wherein a mismatch between said first and second memories initiates debugging said microcontroller code.

7. The system as recited in claim 6 wherein the target microcontroller is installed on a pod.

8. The system as recited in claim 6 wherein said in circuit emulator base station includes a field programmable gate array (FPGA), and wherein said target microcontroller emulator is programmed into said FPGA.

9. The system as recited in claim 6 wherein the first memory includes a first static random access memory (SRAM) and the second memory includes a second SRAM.

10. The system as recited in claim 6 wherein the first memory includes a first central processing unit (CPU) register and the second memory includes a second CPU register.

11. The system as recited in claim 6 wherein lock step of said microcontroller code execution is maintained by synchronizing said target microcontroller and said target microcontroller emulator.

12. The system as recited in claim 6 wherein said target microcontroller is a production microcontroller.

13. The system as recited in claim 6 wherein said in circuit emulator base station includes a trace buffer.

14. A system for maintaining lock step execution of microcontroller code during debugging, comprising:

a target microcontroller including a first memory;

an in circuit emulator base station including a second memory and a target microcontroller emulator which is not identical to and emulates operation of said target microcontroller, wherein said target microcontroller and said target microcontroller emulator execute said microcontroller code, wherein said microcontroller code execution occurs in lock step by executing same instructions using same clocking signals;

a computer system coupled to said in circuit emulator base station and controlling debugging of said microcontroller code; and

an interface coupled to said target microcontroller and said in circuit emulator base station, wherein lock step of said microcontroller code execution is verified by said computer system by comparing said first memory with said second memory when said target microcontroller encounters a breakpoint and said microcontroller code execution halts, and wherein a mismatch between said first and second memories initiates debugging said microcontroller code.

15. The system as recited in claim 14 wherein the target microcontroller is installed on a pod.

16. The system as recited in claim 14 wherein said in circuit emulator base station includes a field programmable gate array (FPGA), and wherein said target microcontroller emulator is programmed into said FPGA.

17. The system as recited in claim 14 wherein the first memory includes a first central processing unit (CPU) register and the second memory includes a second CPU register.

18. The system as recited in claim 14 wherein said in circuit emulator base station includes a trace buffer.

19. The system as recited in claim 14 wherein the target microcontroller is a production microcontroller.

Assignments (6)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 3, 2021
From: MONTEREY RESEARCH, LLC
To: NVIDIA CORPORATION
Reel/Frame 057120/0577 →
CORRECTIVE ASSIGNMENT TO CORRECT THE 8647899 PREVIOUSLY RECORDED ON REEL 035240 FRAME 0429. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY INTERST. Recorded Nov 3, 2020
From: CYPRESS SEMICONDUCTOR CORPORATION; SPANSION LLC
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 058002/0470 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 14, 2016
From: CYPRESS SEMICONDUCTOR CORPORATION
To: MONTEREY RESEARCH, LLC
Reel/Frame 040911/0238 →
PARTIAL RELEASE OF SECURITY INTEREST IN PATENTS Recorded Aug 11, 2016
From: MORGAN STANLEY SENIOR FUNDING, INC., AS COLLATERAL AGENT
To: CYPRESS SEMICONDUCTOR CORPORATION; SPANSION LLC
Reel/Frame 039708/0001 →
SECURITY INTEREST Recorded Mar 21, 2015
From: CYPRESS SEMICONDUCTOR CORPORATION; SPANSION LLC
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 035240/0429 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 13, 2001
From: NEMECEK, CRAIG
To: CYPRESS SEMICONDUCTOR CORPORATION
Reel/Frame 012325/0327 →