IP Library › Granted Patent US 11,372,646
Granted Patent B2
US 11,372,646 · App. 16/684,410 · Granted Jun 28, 2022

Exit history based branch prediction

Inventors: Kai Chirca (Dallas, TX); Timothy D. Anderson (University Park, TX); David E. Smith, Jr. (Allen, TX); Paul D. Gauvreau (Dallas, TX)
Assignee: Texas Instruments Incorporated
G06F9/3806G06F9/30101G06F9/3844G06F9/3853
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 11,372,646
App. No.
16/684,410
Granted
Jun 28, 2022
Kind
B2
Abstract

A computer-implemented method includes fetching a fetch-packet containing a first hyper-block from a first address of a memory. The fetch-packet contains a bitwise distance from an entry point of the first hyper-block to a predicted exit point. The method further includes executing a first branch instruction of the first hyper-block. The first branch instruction corresponds to a first exit point. The first branch instruction includes an address corresponding to an entry point of a second hyper-block. The method also includes storing, responsive to executing the first branch instruction, a bitwise distance from the entry point of the first hyper-block to the first exit point. The method further includes moving a program counter from the first exit point of the first hyper-block to the entry point of the second hyper-block.

Claims (43)

1. A system, comprising:

a processor comprising an exit history register, the processor coupled to a memory, the memory storing an exit history table and a plurality of hyper-blocks, each hyper-block including:

at least one branch instruction;

exactly one entry point; and

at least one exit point, wherein each of the at least one exit point corresponds to

a respective branch instruction of the at least one branch instruction; and

an instruction pipeline of the processor, the instruction pipeline configured to cause the processor to:

fetch a fetch-packet that includes a set of instructions of a first hyper-block of the plurality of hyper-blocks starting from the entry point of the first hyper-block and ending at a predicted exit point of the at least one exit point of the first hyper-block based on a first bitwise distance between the entry point of the first hyper-block and the predicted exit point;

execute a first branch instruction of the first hyper-block, wherein the first branch instruction has a target address corresponding to the entry point of a second hyper-block of the plurality of hyper-blocks, and wherein executing the first branch instruction comprises changing a value of a program counter from a first exit point of the at least one exit point of the first hyper-block to the entry point of the second hyper-block; and

store, responsive to executing the first branch instruction, a second bitwise distance from the entry point of the first hyper-block to the first exit point in the exit history register.

2. The system of claim 1 , wherein the instruction pipeline is further configured to cause the processor to determine that the first exit point corresponds to the predicted exit point, and based on the determination, store the first exit point in the exit history table.

3. The system of claim 1 , wherein the instruction pipeline is further configured to cause the processor to identify an address corresponding to the entry point of the second hyper-block as the target address of the first branch instruction.

4. The system of claim 1 , wherein the instruction pipeline is further configured to cause the processor to determine that the first exit point does not correspond to the predicted exit point, and based on the determination, flush one or more values in the exit history register.

5. The system of claim 1 , wherein the instruction pipeline is further configured to cause the processor to:

perform an exclusive-or operation between each bit of an address corresponding to the entry point of the second hyper-block and each bit in a word in the exit history register; and

index the exit history table with at least some portion of a result of the exclusive-or operation.

6. The system of claim 5 , wherein the instruction pipeline is further configured to cause the processor to retrieve an indexed value from the exit history table, the retrieved indexed value corresponding to a predicted exit point of the second hyper-block.

7. The system of claim 1 , wherein the exit history register is a virtual register of a reconfigurable width.

8. A method, comprising:

fetching a fetch-packet that includes a set of instructions of a first hyper-block starting from a first address of a memory and ending at a predicted exit point of the first hyper-block based on a first bitwise distance from the first address of the first hyper-block to the predicted exit point;

executing a first branch instruction of the first hyper-block, wherein the first branch instruction corresponds to a first exit point, and wherein the first branch instruction has a target address corresponding to an entry point of a second hyper-block;

storing, responsive to executing the first branch instruction, a second bitwise distance from the first address of the first hyper-block to the first exit point; and

changing a value of a program counter from the first exit point of the first hyper-block to the entry point of the second hyper-block.

9. The method of claim 8 , further comprising determining that the first exit point corresponds to the predicted exit point, and based on the determination, storing the first exit point in an exit history table.

10. The method of claim 9 , further comprising identifying an address corresponding to the entry point of the second hyper-block as the target address of the first branch instruction.

11. The method of claim 10 , further comprising:

performing an exclusive-or operation between each bit of the address corresponding to the entry point of the second hyper-block and each bit in a word in an exit history register; and

indexing the exit history table with at least some portion of a result of the exclusive-or operation.

12. The method of claim 11 , further comprising retrieving an indexed value from the exit history table, the retrieved indexed value corresponding to a predicted exit point of the second hyper-block.

13. The method of claim 11 , further comprising reconfiguring the exit history register to store one or more additional exits.

14. The method of claim 11 , further comprising determining that the first exit point does not correspond to the predicted exit point, and based on determining that the first exit point does not correspond to the predicted exit point, flushing one or more values in the exit history register.

15. A non-transitory computer-readable medium storing machine instructions executable by a processor, the machine instructions comprising instructions to:

fetch a fetch-packet that includes a set of instructions of a first hyper-block starting from a first address of a memory and ending at a predicted exit point based on a first bitwise distance from the first address of the first hyper-block to the predicted exit point;

execute a first branch instruction of the first hyper-block, wherein the first branch instruction corresponds to a first exit point, and wherein the first branch instruction has a target address corresponding to an entry point of a second hyper-block;

store, responsive to executing the first branch instruction, a second bitwise distance from the first address of the first hyper-block to the first exit point; and

change a value of a program counter from the first exit point of the first hyper-block to the entry point of the second hyper-block.

16. The non-transitory computer-readable medium of claim 15 , the machine instructions further comprising instructions to determine that the first exit point corresponds to the predicted exit point, and based on the determination, storing the first exit point in an exit history table.

17. The non-transitory computer-readable medium of claim 16 , the machine instructions further comprising instructions to identify an address corresponding to the entry point of the second hyper-block as the target address of the first branch instruction.

18. The non-transitory computer-readable medium of claim 17 , the machine instructions further comprising instructions to:

perform an exclusive-or operation between each bit of the address corresponding to the entry point of the second hyper-block and each bit in a word in an exit history register; and

index the exit history table with at least some portion of a result of the exclusive-or operation.

19. The non-transitory computer-readable medium of claim 18 , the machine instructions further comprising instructions to: retrieve an indexed value from the exit history table, the retrieved indexed value corresponding to a predicted exit point of the second hyper-block.

20. The non-transitory computer-readable medium of claim 18 , the machine instructions further comprising instructions to determine that the first exit point does not correspond to the predicted exit point, and based on the determination that the first exit point does not correspond to the predicted exit point, flush one or more values in the exit history register.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 14, 2019
From: CHIRCA, KAI; ANDERSON, TIMOTHY D.; SMITH, DAVID E., JR.; GAUVREAU, PAUL D.
To: TEXAS INSTRUMENTS INCORPORATED
Reel/Frame 051014/0267 →
Continuity (2)
Provisional Application 62786861 · Dec 31, 2018
Related Publication 20200210191A1 · Jul 2, 2020
Cited By (2)
US 12,197,917 US 12,487,830