IP Library Granted Patent US 8,151,093
Granted Patent B2
US 8,151,093 · App. 11/517,569 · Granted Apr 3, 2012

Software programmable hardware state machines

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 8,151,093
App. No.
11/517,569
Granted
Apr 3, 2012
Kind
B2
Abstract

The present invention provides software programmable hardware state machines to detect a cause of an error in a processor and prevent the error from occurring. In example embodiments, processors, systems and methods are provided to prevent an unwanted change in architectural state from occurring as a result of execution of a specific sequence of instruction types. A processor core is provided that includes an execution unit, a programmable mask register and a buffer that stores values representing instructions dispatched to the execution unit. The processor core also includes control logic to determine whether there is a match between a sequence in the mask register and a sequence in the buffer and, upon detecting a match, to generate control signals to perform a desired action. The desired action prevents an unwanted change from occurring to the architectural state of the processor. The desired action may be preventing the dispatch of a next instruction, flushing a pipeline, clearing an instruction fetch buffer, generating an exception etc. The processor core further comprises a programmable fix register. In an embodiment, the control logic generates the control signals based on control bits stored in the fix register.

Claims (63)

1. A processor core, having an execution unit for processing instructions, comprising:

a programmable mask register;

a decoder to decode each instruction in a sequence of instructions to generate decoded bits;

an encoder coupled to the decoder and configured to selectively encode the decoded bits to produce values representing the sequence of instructions, wherein each value is smaller in size than an instruction that it represents;

a buffer that stores the values representing the sequence of instructions; and

control logic to determine whether there is a match between a sequence in the mask register and the values representing the sequence of instructions in the buffer and, upon detecting a match, to generate control signals to perform a desired action.

2. The processor core of claim 1 , further comprising a programmable fix register.

3. The processor core of claim 2 , wherein the control logic generates the control signals based on control bits stored in the fix register.

4. The processor core of claim 1 , wherein the control signals prevent an unwanted change in the architectural state of the processor core.

5. The processor core of claim 1 , wherein the control signals stall dispatch of a next instruction to the execution unit.

6. The processor core of claim 1 , wherein the control signals insert at least one bubble in a pipeline of the processor.

7. The processor core of claim 1 , wherein the control signals generate an exception.

8. The processor core of claim 1 , wherein the control signals flush at least a portion of a pipeline of the processor.

9. The processor core of claim 1 , wherein the control signals delete instructions in the instruction buffer and re-fetch instructions starting from a specified address.

10. The processor core of claim 1 , wherein a first value stored in the buffer includes only an opcode of an instruction.

11. The processor core of claim 1 , wherein a first value stored in the buffer includes an encoded opcode of an instruction.

12. The processor core of claim 1 , wherein the buffer stores values representing instructions that are to be dispatched to the execution unit.

13. A tangible computer readable storage medium comprising a processor embodied in software, the processor comprising:

a programmable mask register;

a decoder to decode each instruction in a sequence of instructions to generate decoded bits;

an encoder coupled to the decoder and configured to selectively encode the decoded bits to produce values representing the sequence of instructions, wherein each value is smaller in size than an instruction that it represents;

a buffer that stores the values representing the sequence of instructions; and

control logic to determine whether there is a match between a sequence in the mask register and the sequence in the buffer and, upon detecting a match, to generate control signals to perform a desired action.

14. The tangible computer readable storage medium of claim 13 , further comprising a programmable fix register.

15. The tangible computer readable storage medium of claim 14 , wherein the control logic generates the control signals based on control bits stored in the fix register.

16. The tangible computer readable storage medium of claim 13 , wherein the control signals prevent an unwanted change in the architectural state of the processor core.

17. The tangible computer readable storage medium of claim 13 , wherein the processor is embodied in hardware description language software.

18. The tangible computer readable storage medium of claim 13 , wherein the processor is embodied in one of Verilog hardware description language software and VHDL hardware description language software.

19. An instruction dispatch unit for a processor, comprising:

a decoder to decode each instruction in a sequence of instructions to generate decoded bits;

an encoder coupled to the decoder and configured to selectively encode the decoded bits to produce values representing instruction types being dispatched to an execution unit, wherein each value is smaller in size than an instruction that it represents;

a buffer that stores the values representing instruction types being dispatched to an execution unit;

a software accessible mask register enabled to store at least one sequence of values representing instruction types; and

control logic to determine whether there is a match between a sequence in the mask register and a sequence in the buffer and to generate control signals to perform a desired action upon determining a match.

20. A method to prevent an unwanted change in the architectural state of a processor, the method comprising:

storing a mask value in a programmable mask register;

decoding each instruction in a sequence of instructions to generate decoded bits;

encoding the decoded bits to produce values representing the sequence of instructions, wherein each value is smaller in size than an instruction that it represents;

storing the values representing the sequence of instructions in a buffer;

determining whether there is a match between the mask value in the mask register and the sequence in the buffer; and

upon detecting a match, generating control signals to perform a desired action.

21. A method to detect a sequence of instructions that causes an error in a processor and to implement a solution, the method comprising:

storing a mask value in a programmable mask register;

decoding each instruction in a sequence of instructions being dispatched to an execution unit to generate decoded bits;

encoding the decoded bits to produce values representing the sequence of instructions, wherein each value is smaller in size than an instruction that it represents;

storing the values in an instruction type buffer;

detecting an instruction to be dispatched to the execution unit whose execution will result in an error, based on a comparison between a mask in the mask register and a sequence of values in the instruction type buffer; and

upon detecting the instruction, generating control signals to perform a desired action.

22. A system comprising:

a decoder to decode each instruction in a sequence of instructions to generate decoded bits;

an encoder coupled to the decoder and configured to selectively encode the decoded bits to produce values representing instruction types being dispatched to an execution unit, wherein each value is smaller in size than an instruction that it represents;

a buffer that stores the values representing instruction types dispatched to an execution unit;

a software accessible mask register enabled to store at least one sequence of values representing instruction types; and

control logic to determine whether there is a match between a sequence in the mask register and a sequence in the buffer and to generate control signals to perform a desired action upon determining a match.

23. In an integrated circuit chip including a microprocessor, a method for preventing an unwanted condition caused by execution of a particular sequence of instructions, comprising:

providing a first register configured to store a mask value;

providing a circuit to decode each instruction in a sequence of instructions to generate decoded bits;

providing a circuit to encode the decoded bits to produce values representing the sequence of instructions, wherein each value is smaller in size than an instruction that it represents;

providing a second register configured to store the values representing the sequence of instructions;

providing a circuit to compare values in the second register with the mask value stored in the first register and to produce a match indication when a particular sequence of instructions matches the mask value; and

providing a circuit to generate control bits in response to the match indication, wherein the control bits cause the execution unit to perform a desired action.

24. The method of claim 23 , wherein the step of providing a second register comprises:

providing a second register, wherein the second register is a first-in, first-out buffer configured to store a value representing a particular instruction before the particular instruction is executed by the execution unit.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 2, 2014
From: BRIDGE CROSSING, LLC
To: ARM FINANCE OVERSEAS LIMITED
Reel/Frame 033074/0058 →