Claims
- 1. In a pipelined computer architecture, a method for detecting instruction queue status at a cycle K, wherein instructions may be removed from the queue out of sequence, the method comprising:
determining a number of invalid instructions in the queue during cycle K−2; determining a number of instructions issued for cycle K−1; determining a number of instructions enqueued for cycle K−1; and responsive to the number of invalid instructions, the number of instructions issued, and the number of enqueued instructions, determining a value indicative of a number of free rows in the queue cycle K.
- 2. The method of claim 1, wherein the indicative value is equal to the sum of the number of free rows and the number of issued instructions, less the number of enqueued instructions.
- 3. The method of claim 2 wherein the number of free rows, the number of issued instructions, and the number of enqueued instructions are each represented as a flat vector, and wherein adding comprises shifting in one direction, and subtracting comprises shifting in an opposite direction.
- 4. The method of claim 2, further comprising:
determining a count of instructions speculatively issued in cycle K−1, which have produced a cache hit, wherein the indicative value is additionally responsive to the count of speculatively issued instructions.
- 5. The method of claim 4, wherein the indicative value is equal to the sum of the number of free rows, the number of issued instructions, and the count of speculatively issued instructions, less the number of enqueued instructions.
- 6. The method of claim 1, further comprising:
generating a stall signal responsive to the indicative value.
- 7. The method of claim 6, wherein generating a stall signal further comprises:
comparing the indicative value and a predetermined value; and generating a stall signal if the indicative value is less than a predetermined value.
- 8. The method of claim 7, wherein the predetermined value is related to a maximum number of instructions that can be enqueued in one cycle.
- 9. The method of claim 6, wherein generating a stall signal further comprises:
comparing the indicative value and a count of instructions to be enqueued; and generating a stall signal if the indicative value is less than the count of instructions to be enqueued.
- 10. The method of claim 9, further comprising encoding the count of instructions to be enqueued.
- 11. An apparatus, in a pipelined computer architecture, for detecting instruction queue status at a cycle K, wherein instructions may be removed from the queue out of sequence, comprising:
means for determining a number of invalid instructions in the queue during cycle K−2; means for determining a number of instructions issued for cycle K−1; means for determining a number of instructions enqueued for cycle K−1; and an adder/subtracter which, responsive to the number of invalid instructions, the number of instructions issued, and the number of enqueued instructions, determines a value indicative of the number of invalid instructions in the queue cycle K.
- 12. The apparatus of claim 11, wherein the adder/subtracter further comprises:
a subtracter which subtracts the number of enqueued instructions from the sum of the number of free rows and the number of issued instructions to produce a remainder, the remainder being the indicative value.
- 13. The apparatus of claim 12 wherein the number of free rows, the number of issued instructions, and the number of enqueued instructions are each represented as a flat vector, and wherein the adder/subtracter adds by shifting in one direction, and subtracts by shifting in an opposite direction.
- 14. The apparatus of claim 12, further comprising:
an adder which adds, to the remainder, a count of instructions speculatively issued in cycle K−1, which have produced a cache hit, to produce a sum, the sum being the indicative value.
- 15. The apparatus of claim 14, wherein the indicative value is equal to the sum of the number of free rows, the number of issued instructions, and the count of speculatively issued instructions, less the number of enqueued instructions.
- 16. The apparatus of claim 11, further comprising:
a comparator which generates a stall signal, responsive to the indicative value.
- 17. The apparatus of claim 16, wherein the comparator compares the indicative value and a predetermined value, and generates a stall signal if the indicative value is less than a predetermined value.
- 18. The apparatus of claim 17, wherein the predetermined value is related to a maximum number of instructions that can be enqueued in one cycle.
- 19. The apparatus of claim 16, wherein the comparator compares the indicative value and a count of instructions to be enqueued, and generates a stall signal if the indicative value is less than the count of instructions to be enqueued.
- 20. The apparatus of claim 19, further comprising:
an encoder which encodes the count of instructions to be enqueued.
- 21. In a pipelined computer, a queue status detection circuit for detecting instruction queue status at a cycle K, wherein instructions may be removed from the queue out of sequence, comprising:
a counter circuit for determining a number of invalid instructions in the queue during cycle K−2; a counter circuit for determining a number of instructions issued for cycle K−1; a counter circuit for determining a number of instructions enqueued for cycle K−1; and an adder/subtracter circuit which, responsive to the number of invalid instructions, the number of instructions issued, and the number of enqueued instructions, determines a value indicative of the number of invalid instructions in the queue cycle K.
- 22. The queue status detection circuit of claim 21, wherein the adder/subtracter circuit further comprises:
a subtracter circuit which subtracts the number of enqueued instructions from the sum of the number of free rows and the number of issued instructions to produce a remainder, the remainder being the indicative value.
- 23. The queue status detection circuit of claim 22 wherein the number of free rows, the number of issued instructions, and the number of enqueued instructions are each represented as a flat vector, and wherein the adder/subtracter circuit adds by shifting in one direction, and subtracts by shifting in an opposite direction.
- 24. The queue status detection circuit of claim 22, further comprising:
an adder circuit which adds to the remainder a count of instructions speculatively issued in cycle K−1, which have produced a cache hit, to produce a sum, the sum being the indicative value.
- 25. The queue status detection circuit of claim 24, wherein the indicative value is equal to the sum of the number of free rows, the number of issued instructions, and the count of speculatively issued instructions, less the number of enqueued instructions.
- 26. The queue status detection circuit of claim 21, further comprising:
a comparator circuit which generates a stall signal, responsive to the indicative value.
- 27. The queue status detection circuit of claim 26, wherein the comparator circuit compares the indicative value and a predetermined value, and generates a stall signal if the indicative value is less than a predetermined value.
- 28. The queue status detection circuit of claim 26, wherein the comparator circuit compares the indicative value and a count of instructions to be enqueued, and generates a stall signal if the indicative value is less than the count of instructions to be enqueued.
- 29. The queue status detection circuit of claim 29, further comprising:
an encoder circuit which encodes the count of instructions to be enqueued.
- 30. In a pipelined computer, a system board comprising an integrated circuit, which includes a queue status detection circuit for detecting instruction queue status at a cycle K, wherein instructions may be removed from the queue out of sequence, the queue status detection circuit comprising:
an adder/subtracter circuit which calculates a value indicative of the number of invalid instructions in the queue in cycle K, wherein the adder/subtracter circuit further comprises:
a subtracter circuit which subtracts the number of instructions enqueued in cycle K−1 from the sum of the number of free rows in the queue in cycle K−2 and the number of instructions issued in cycle K−1 to produce a remainder, and an adder circuit which adds to the remainder the number of instructions speculatively issued in cycle K−1 which have produced a cache hit, to produce a sum, the sum being the indicative value, wherein the number of free rows, the number of issued instructions, the number of enqueued instructions and the number of speculatively issued instructions are each represented as a flat vector, wherein the adder/subtracter circuit adds by shifting in one direction, and subtracts by shifting in an opposite direction; and a comparator circuit which generates a stall signal, responsive to the indicative value.
- 31. The system board of claim 30, wherein the comparator circuit compares the indicative value and a predetermined value, and generates a stall signal if the indicative value is less than a predetermined value.
- 32. The system board of claim 30, wherein the comparator circuit compares the indicative value and a count of instructions to be enqueued, and generates a stall signal if the indicative value is less than the count of instructions to be enqueued.
- 33. The system board of claim 32, wherein the queue status detection circuit further comprises:
an encoder circuit which encodes the number of instructions to be enqueued.
RELATED APPLICATION(S)
[0001] This application is a continuation of U.S. application Ser. No. 09/465,689, filed Dec. 17, 1999, which claims the benefit of U.S. Provisional Application No. 60/118,130, filed Feb. 1, 1999. The entire teachings of the above application(s) are incorporated herein by reference.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60118130 |
Feb 1999 |
US |
Continuations (1)
|
Number |
Date |
Country |
Parent |
09465689 |
Dec 1999 |
US |
Child |
10356943 |
Jan 2003 |
US |