Claims
- 1. A data processor with a branch target address cache, the data processor comprising:
- a branch target address cache storing a plurality of sets, each one of the plurality of sets comprising a fetch address and a target address, the branch target address cache outputting a target address of a selected one of the plurality of sets if the fetch address of the selected one of the plurality of sets is logically equivalent to a first subset of an input address;
- a branch unit coupled to the branch target address cache, the branch unit generating an execution fetch address responsive to a received instruction and to a value of a condition precedent at a first time, the received instruction stored in a memory location identified by the input address, the branch unit storing the execution fetch address and a subset of the input address in the branch target address cache if a predicted value of the condition precedent at a subsequent time to the first time is logically equivalent to a predetermined value.
- 2. The data processor of claim 1 wherein the branch unit further comprises a counter register storing a number, the number being the condition precedent if the received instruction is a first type of branch instruction.
- 3. The data processor of claim 2 wherein the branch unit decrements the number responsive to the execution of the received instruction.
- 4. The data processor of claim 3 further comprising:
- a condition register coupled to the branch unit, the condition register storing a bit, the bit being the condition precedent if the received instruction is a second type of branch instruction;
- a branch history table storing a plurality of history states, each one of history states indexed by a differing one of a plurality of indices, the branch history table outputting one of the plurality of history states if the one of the plurality of indices of the one of the history states is logically equivalent to a second subset of the input address;
- a sequencer unit coupled to the branch history table, the sequencer unit generating a decode fetch address responsive to the one of the plurality of history states; and
- wherein the branch unit modifies the one of the plurality of history states responsive to the execution fetch address.
- 5. The data process of claim 1 further comprising:
- a condition register coupled to the branch unit, the condition register storing a bit, the bit being the condition precedent if the received instruction is a second type of branch instruction;
- a branch history table storing a plurality of history states, each one of history states indexed by a differing one of a plurality of indices, the branch history table outputting one of the plurality of history states if the one of the plurality of indices of the one of the history states is logically equivalent to a second subset of the input address;
- a sequencer unit coupled to the branch history table, the sequencer unit generating a decode fetch address responsive to the one of the plurality of history states; and
- wherein the branch unit modifies the one of the plurality of history states responsive to the execution fetch address.
- 6. A data processor with a branch target address cache, the
- data processor comprising: a branch target address cache storing a plurality of sets, each one of the plurality of sets comprising a fetch address and a target address, the branch target address cache outputting a target address of a selected one of the plurality of sets if the fetch address of the selected one of the plurality of sets is logically equivalent to a first subset of an input address;
- a branch history table storing a plurality of history states, each one of history states indexed by a differing one of a plurality of indices, the branch history table outputting one of the plurality of history states if the one of the plurality of indices of the one of the history states is logically equivalent to a second subset of the input address;
- a sequencer unit coupled to the branch history table, the sequencer unit generating a decode fetch address responsive to the one of the plurality of history states;
- a branch unit coupled to the branch target address cache, the branch unit generating an execution fetch address responsive to a received instruction and to a value of a condition precedent at a first time, the received instruction stored in a memory location identified by the input address, the branch unit storing the execution fetch address and a subset of the input address in the branch target address cache if a predicted value of the condition precedent at a subsequent time to the first time is logically equivalent to a predetermined value, the branch unit modifying the one of the plurality of history states responsive to the execution fetch address;
- a condition register coupled to the branch unit, the condition register storing a bit, the bit being the condition precedent if the received instruction is a first type of branch instruction; and
- a counter register storing a number, the number being the condition precedent if the received instruction is a second type of branch instruction.
- 7. The data processor of claim 6 wherein the branch unit decrements the number responsive to the execution of the received instruction.
- 8. A method of operating a data processor comprising the steps of:
- during a first time period, receiving an input address of an instruction in a branch target address cache;
- first outputting a target address of a selected one of a plurality of sets if a fetch address of the selected one of the plurality of sets is logically equivalent to a first subset of the input address, each one of the plurality of sets comprising a fetch address and a target address;
- during a second time period, receiving the instruction in a branch unit coupled to the branch target address cache;
- generating an execution fetch address responsive to the instruction and to a value of a condition precedent, the instruction stored in a memory location identified by the input address; and
- first storing the execution fetch address and a subset of the input address in the branch target address cache if a predicted value of the condition precedent at a subsequent time to the first time period is logically equivalent to a predetermined value.
- 9. The method of claim 8 further comprising the step of second storing a number in a counter register coupled to the branch unit, the number being the condition precedent if the received instruction is a first type of branch instruction.
- 10. The method of claim 9 further comprising the step of decrementing the number responsive to the execution of the received instruction.
- 11. The method of claim 10 further comprising the steps of:
- during a third time period prior to the second time period,
- a second outputting of a history state from a branch history table, the branch history table storing a plurality of history states, each one of history states indexed by a differing one of a plurality of indices, the branch history table outputting one of the plurality of history states if the one of the plurality of indices of the one of the history states is logically equivalent to a second subset of the input address;
- a sequencer unit coupled to the branch history table, the sequencer unit generating a decode fetch address responsive to the one of the plurality of history states; and
- during the second time period,
- modifying the one of the plurality of history states responsive to the execution fetch address.
- 12. The method of claim 11 further comprising the step of reading a logic state in a condition register by the branch unit, the condition register coupled to the branch unit, the logic state being the condition precedent if the received instruction is a second type of branch instruction.
- 13. The method of claim 8 further comprising the steps of:
- during a third time period prior to the second time period,
- a second outputting of a history state from a branch history table, the branch history table storing a plurality of history states, each one of history states indexed by a differing one of a plurality of indices, the branch history table outputting one of the plurality of history states if the one of the plurality of indices of the one of the history states is logically equivalent to a second subset of the input address;
- a sequencer unit coupled to the branch history table, the sequencer unit generating a decode fetch address responsive to the one of the plurality of history states; and
- during the second time period,
- modifying the one of the plurality of history states responsive to the execution fetch address.
- 14. The method of claim 13 further comprising the step of reading a logic state in a condition register by the branch unit, the condition register coupled to the branch unit, the logic state being the condition precedent if the received instruction is a second type of branch instruction.
RELATED APPLICATION
The present invention is related by subject matter to an application entitled "Data Processor with Branch Prediction and Method of Operation," to Black et al., filed concurrently herewith Ser. No. 08/192/292, now abandoned which is a continuation of Ser. No. 08/637/189.
US Referenced Citations (4)
Number |
Name |
Date |
Kind |
4200927 |
Hughes et al. |
Apr 1980 |
|
5101341 |
Circello et al. |
Mar 1992 |
|
5230068 |
Van Dyke et al. |
Jul 1993 |
|
5442756 |
Grouchowski et al. |
Aug 1995 |
|
Foreign Referenced Citations (1)
Number |
Date |
Country |
0 227 892 |
Jul 1987 |
EPX |