IP Library Granted Patent US 7,996,660
Granted Patent B2
US 7,996,660 · App. 11/838,194 · Granted Aug 9, 2011

Software controlled CPU pipeline protection

Assignee: Texas Instruments Incorporated
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,996,660
App. No.
11/838,194
Granted
Aug 9, 2011
Kind
B2
Abstract

A processor in a digital system executes instructions in an instruction execution pipeline. The processor detects a pipeline protection directive while executing instructions and sets a pipeline protection mode in accordance with the directive. The processor then continues to fetch and execute instructions in an unprotected manner if the pipeline protection mode is off and continues to fetch and execute instruction in a protected manner if the pipeline protection mode is on.

Claims (47)

1. A computer system comprising a central processing unit (CPU), the CPU comprising:

an instruction execution pipeline having a plurality of pipeline stages;

detection circuitry for detecting a pipeline stage conflict;

stall circuitry connected to receive a detection signal from the detection circuitry and operable to stall a portion of the instruction execution pipeline until the pipeline stage conflict is resolved;

mode circuitry connected to the stall circuitry having a protected mode enabling the stall circuitry and a non-protected mode disabling the stall circuitry; and

interrupt circuitry connected to the mode circuitry and responsive to receipt of an interrupt signal to

store an indication of a current mode of the mode circuitry,

cause the mode circuitry to enter the protected mode,

perform an interrupt service routine corresponding to the received interrupt signal in the protected mode, and

upon completion of the interrupt service routine restore the mode circuitry to a mode corresponding to the stored indication of current mode.

2. The CPU of claim 1 , wherein the mode circuitry is operable to be placed in an enabled mode or a disabled mode in response to an instruction executed by the instruction execution pipeline.

3. The CPU of claim 1 , wherein the mode circuitry is a status register that is responsive to certain instructions executed by the instruction execution pipeline.

4. The CPU of claim 1 , further comprising detection circuitry operable to direct the mode circuitry be placed in an enabled mode or a disabled mode in response to a task identification number associated with an instruction being executed by the instruction execution pipeline.

5. The CPU of claim 1 , further comprising detection circuitry operable to direct the mode circuitry be placed in an enabled mode or a disabled mode in response to an address associated with an instruction being executed by the instruction execution pipeline.

6. A method for executing instructions in an instruction execution pipeline, comprising:

fetching instructions from program memory and executing them in the instruction execution pipeline;

detecting a pipeline protection directive while executing instructions;

setting a pipeline protection mode to on or off in accordance with the detected pipeline protection directive;

continuing to fetch and execute instructions in an unprotected manner if the pipeline protection mode is off and continuing to fetch and execute instruction in a protected manner if the pipeline protection mode is on; and

servicing an interrupt responsive to receipt of an interrupt signal by

storing an indication of whether a current pipeline protection mode is on or off,

setting the pipeline protection mode to on,

performing an interrupt service routine corresponding to the interrupt signal with the pipeline protection mode set on, and

upon completion of the interrupt service routine restoring the pipeline protection mode to a mode corresponding to the stored indication of current pipeline protection mode.

7. The method of claim 6 , wherein detecting comprises decoding an instruction being executed in the instruction execution pipeline.

8. The method of claim 6 , wherein detecting comprises setting a bit in a status register in response to an instruction being executed in the instruction execution pipeline.

9. The method of claim 6 , wherein detecting comprises detecting a pipeline protection directive associated with a task that is being executed.

10. The method of claim 6 , wherein detecting comprises detecting an address associated with an instruction being executed in the instruction execution pipeline that is within a defined address region.

11. The method of claim 6 , wherein executing instructions in a protected manner comprises:

detecting a data hazard associated with two or more instructions in the pipeline; and

stalling a portion of the pipeline until the data hazard is resolved.

12. The method of claim 11 , wherein executing instructions in an unprotected manner comprises ignoring any data hazard that occurs among instructions in the instruction execution pipeline.

13. A computer system comprising a central processing unit (CPU), the CPU comprising:

an instruction execution pipeline having a plurality of pipeline stages;

detection circuitry for detecting a pipeline stage conflict;

stall circuitry connected to receive a detection signal from the detection circuitry and operable to stall a portion of the instruction execution pipeline until the pipeline stage conflict is resolved;

mode circuitry connected to the stall circuitry having a protected mode enabling the stall circuitry and a non-protected mode disabling the stall circuitry; and

interrupt circuitry connected to the mode circuitry and responsive to receipt of an interrupt signal to

perform a service routine corresponding to the interrupt signal when the mode circuitry is in the protected mode, and

disable performing a service routine corresponding to the interrupt signal when the mode circuitry is in the non-protected mode.

14. A method for executing instructions in an instruction execution pipeline, comprising:

fetching instructions from program memory and executing them in the instruction execution pipeline;

detecting a pipeline protection directive while executing instructions;

setting a pipeline protection mode to on or off in accordance with the detected pipeline protection directive;

continuing to fetch and execute instructions in an unprotected manner if the pipeline protection mode is off and continuing to fetch and execute instruction in a protected manner if the pipeline protection mode is on;

performing a corresponding interrupt service routine responsive to receipt of an interrupt signal when the pipeline protection mode is on; and

not performing a corresponding interrupt service routine responsive to receipt of an interrupt signal when the pipeline protection mode is off.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 29, 2007
From: TALGE, REID EDMOND
To: TEXAS INSTRUMENTS INCORPORATED
Reel/Frame 019769/0537 →
Continuity (1)
Related Publication 20090049280A1 · Feb 19, 2009