# US 2010/0169624 A1 · Adaptive Fetch Advance Control for a Low Power Processor

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2010/0169624 A1
- Document ID: US20100169624A1
- Status: Published application
- Kind: A1
- Application number: 12/347,848
- Filed: 2008-12-31
- Published: 2010-07-01
- Earliest claimed: 2008-12-31
- Assignees: Texas Instruments Incorporated
- Inventors: Hirofumi Yamamoto
- Web page: https://patentgrep.com/patent/US20100169624A1

## CPC

- G06F 9/3842: {Speculative instruction execution}
- G06F 9/3802: {Instruction prefetching}
- G06F 9/3814: {Implementation provisions of instruction buffers, e.g. prefetch buffer; banks}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A digital signal processor (DSP) includes an instruction buffer queue (IBQ) with multiple lines, as well as a modifiable fetch advance parameter to specify a fetch advance setting for the IBQ. The DSP also has a control flow module. In response to execution of a program in the DSP, the control flow module may automatically determine whether a branch has been predicted for the program, or for a portion of the program. The control flow module may automatically reduce the fetch advance parameter in response to determining that a branch has been predicted for the program. Also, the control flow module may automatically increase the fetch advance setting in response to determining that no branch has been predicted for a portion of the program. Other embodiments are described and claimed.

## Claims

### Claim 1

A method for controlling instruction flow in a digital signal processor, the method comprising:
automatically determining whether a branch has been predicted for a program, in response to execution of the program in a digital signal processor; and
in response to determining that the branch has been predicted for the program, automatically reducing a fetch advance setting for the digital signal processor.

### Claim 2 (depends on 1)

A method according to claim 1, further comprising:
prefetching an instruction packet into an instruction buffer queue (IBQ) in the digital signal processor; and
wherein the operation of determining whether the branch has been predicted for the program comprises determining whether the prefetched instruction packet corresponds to a predicted branch.

### Claim 3 (depends on 2)

A method according to claim 2, wherein the operation of determining whether the prefetched instruction packet corresponds to the predicted branch comprises:
determining whether a branch taken buffer (BTB) in the digital signal processor predicts the branch for the prefetched instruction packet.

### Claim 4 (depends on 3)

A method according to claim 3, wherein the operation of determining whether the prefetched instruction packet corresponds to the predicted branch further comprises:
automatically updating a branch prediction (BP) data structure, in response to determining that the BTB predicts the branch for the prefetched instruction packet; and
using the BP data structure to determine whether the prefetched instruction packet corresponds to the predicted branch.

### Claim 5 (depends on 1)

A method according to claim 1, further comprising:
determining whether any branch has been predicted for a portion of the program; and
in response to determining that no branch has been predicted for the portion of the program, automatically increasing the fetch advance setting for the digital signal processor.

### Claim 6 (depends on 5)

A method according to claim 5, wherein:
the operation of automatically reducing the fetch advance setting comprises automatically setting the fetch advance setting to less than three prefetch lines; and
the operation of automatically increasing the fetch advance setting comprises automatically setting the fetch advance setting to more than three prefetch lines.

### Claim 7 (depends on 1)

A method according to claim 1, wherein the operation of determining whether the branch has been predicted for the program comprises:
determining whether at least one branch has been predicted within a predetermined number of lines in an instruction buffer queue (IBQ) in the digital signal processor.

### Claim 8 (depends on 7)

A method according to claim 7, wherein the operation of determining whether at least one branch has been predicted within the predetermined number of lines in the IBQ comprises:
determining whether at least one branch has been predicted within the predetermined number of lines in the IBQ, starting at a read pointer for the IBQ.

### Claim 9

A processor, comprising:
a control flow module comprising:
an instruction buffer queue (IBQ) with multiple lines; and
a modifiable fetch advance parameter to specify a fetch advance setting for the IBQ;
the control flow module operable to automatically determine whether a branch has been predicted for a program, in response to execution of the program in the processor, and to automatically modify the fetch advance parameter in response to determining that the branch has been predicted for the program.

### Claim 10 (depends on 9)

A processor according to claim 9, wherein:
the control flow module is operable to determine whether any branch has been predicted for a portion of the program; and
the control flow module is operable to automatically increase the fetch advance setting for the processor in response to determining that no branch has been predicted for the portion of the program.

### Claim 11 (depends on 9)

A processor according to claim 9, wherein:
the control flow module is operable to determine whether at least one branch has been predicted within a predetermined number of lines in the IBQ, starting at a read pointer for the IBQ.

### Claim 12 (depends on 9)

A processor according to claim 9, further comprising:
a branch prediction (BP) data structure to hold entries that identify predicted branches; and
wherein the control flow module is operable to use the BP data structure to determine whether the branch has been predicted for the program.

### Claim 13 (depends on 12)

A processor according to claim 12, further comprising:
a branch taken buffer (BTB) in the control flow module;
wherein the control flow module is operable to determine whether the branch has been predicted for the program, based at least in part on the BTB

### Claim 14 (depends on 9)

A processor according to claim 9, further comprising:
a fetch pipeline and a branch prediction (BP) module within the control flow module;
the fetch pipeline operable to prefetch an instruction packet into the IBQ; and
the BP module operable to determine whether the branch has been predicted for the prefetched instruction packet and to provide the fetch pipeline with branch prediction data in response to determining that the branch has been predicted for the prefetched instruction packet.

### Claim 15 (depends on 14)

A processor according to claim 14, further comprising:
a first BP data structure in the BP module; and
a second BP data structure in the fetch pipeline;
wherein the BP module uses the first BP data structure to determine whether the branch has been predicted for the prefetched instruction packet; and
the fetch pipeline uses the second BP data structure to determine whether the branch has been predicted for the program.

### Claim 16 (depends on 15)

A processor according to claim 15, further comprising:
the BP module operable to snoop the instruction packet when the fetch pipeline prefetches the instruction packet, and to update the second BP data structure in response to detecting a branch prediction for the snooped instruction packet.

### Claim 17

An electronic device comprising:
a processor, comprising:
a control flow module comprising:
an instruction buffer queue (IBQ) with multiple lines; and
a modifiable fetch advance parameter to specify a fetch advance setting for the IBQ; and
the control flow module operable to automatically determine whether a branch has been predicted for a program, in response to execution of the program in the processor, and to automatically modify the fetch advance parameter in response to determining that the branch has been predicted for the program; and
at least one input/output (I/O) port responsive to the processor.

### Claim 18 (depends on 17)

An electronic device according to claim 17, wherein:
the processor further comprises a branch prediction (BP) data structure with entries to identify predicted branches; and
wherein the control flow module uses the BP data structure to determine whether the branch has been predicted for the program.

### Claim 19 (depends on 17)

An electronic device according to claim 17, wherein the control flow module comprises:
a fetch pipeline operable to prefetch instruction packets into the IBQ; and
a BP module operable to snoop instruction packets when the fetch pipeline prefetches the instruction packets, and to update a BP data structure in response to detecting branch predictions for the snooped instruction packets.

### Claim 20 (depends on 17)

An electronic device according to claim 17, wherein:
the control flow module determines whether any branch has been predicted for a portion of the program; and
the control flow module automatically increases the fetch advance setting for the processor in response to determining that no branch has been predicted for the portion of the program.
