# US 2021/0173783 A1 · Instruction cache prefetch throttle

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

- Number: US 2021/0173783 A1
- Document ID: US20210173783A1
- Status: Published application
- Kind: A1
- Application number: 16/709,831
- Filed: 2019-12-10
- Published: 2021-06-10
- Earliest claimed: 2019-12-10
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Aparna Thyagarajan; Ashok Tirupathy Venkatachar; Marius Evers; Angelo Wong; William E. Jones
- Web page: https://patentgrep.com/patent/US20210173783A1

## CPC

- G06F 12/0862: with prefetch
- G06F 9/3804: {for branches, e.g. hedging, branch folding}
- G06F 9/3808: {for instruction reuse, e.g. trace cache, branch target cache}
- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 2212/1021: Hit rate improvement
- G06F 2212/602: Details relating to cache prefetching
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques for controlling prefetching of instructions into an instruction cache are provided. The techniques include tracking either or both of branch target buffer misses and instruction cache misses, modifying a throttle toggle based on the tracking, and adjusting prefetch activity based on the throttle toggle.

## Claims

### Claim 1

A method for controlling prefetching of instructions into an instruction cache, the method comprising:
tracking either or both of branch target buffer misses and instruction cache misses;
modifying a throttle toggle based on the tracking; and
adjusting prefetch activity for the instruction cache based on the throttle toggle.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
modifying a throttling degree based on the tracking, wherein the throttling degree indicates a degree to which throttling occurs,
wherein adjusting the prefetch activity is also performed based on the throttling degree.

### Claim 3 (depends on 1)

The method of claim 1, wherein:
the tracking comprises detecting that a number of consecutive branch target buffer and instruction cache misses is above a first threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is to be throttled.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
the tracking comprises detecting that a number of consecutive branch target buffer and instruction cache misses is not above a first threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is not to be throttled.

### Claim 5 (depends on 1)

The method of claim 1, wherein:
the tracking comprises detecting that a number of consecutive branch target buffer and instruction cache misses is above a first threshold and that a number of outstanding branch target buffer and instruction cache misses is above a second threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is to be throttled.

### Claim 6 (depends on 1)

The method of claim 1, wherein:
the tracking comprises detecting either that a number of consecutive branch target buffer and instruction cache misses is not above a first threshold or that a number of such outstanding branch target buffer and instruction cache misses is not above a second threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is not to be throttled.

### Claim 7 (depends on 1)

The method of claim 1, wherein:
the tracking comprises in response to detecting that a number of outstanding branch target buffer and instruction cache misses is above a first threshold, tracking a number of consecutive branch target buffer and instruction cache misses; and
in response to detecting that the number of consecutive branch target buffer and instruction cache misses is above a second threshold, setting the throttle toggle to indicate that instruction cache prefetching is to be throttled.

### Claim 8 (depends on 1)

The method of claim 1, wherein the tracking comprises:
tracking instruction cache misses.

### Claim 9 (depends on 1)

The method of claim 1, wherein the tracking comprises:
not tracking branch target buffer misses.

### Claim 10 (depends on 2)

The method of claim 2, wherein the throttling degree indicates one of a number of instructions that are prefetched and a number of caches into which prefetching of instructions occurs.

### Claim 11

An instruction fetching system for controlling prefetching of instructions into an instruction cache, the instruction fetching system comprising:
a branch target buffer; and
a miss tracker configured to:
track either or both of branch target buffer misses of the branch target buffer and instruction cache misses;
modify a throttle toggle based on the tracking; and
adjust prefetch activity for the instruction cache based on the throttle toggle.

### Claim 12 (depends on 11)

The instruction fetching system of claim 11, wherein the miss tracker is further configured to:
modify a throttling degree based on the tracking, wherein the throttling degree indicates a degree to which throttling occurs,
wherein adjusting the prefetch activity is also performed based on the throttling degree.

### Claim 13 (depends on 11)

The instruction fetching system of claim 11, wherein:
the tracking comprises detecting that a number of consecutive branch target buffer and instruction cache misses is above a first threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is to be throttled.

### Claim 14 (depends on 11)

The instruction fetching system of claim 11, wherein:
the tracking comprises detecting that a number of consecutive branch target buffer and instruction cache misses is not above a first threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is not to be throttled.

### Claim 15 (depends on 11)

The instruction fetching system of claim 11, wherein:
the tracking comprises detecting that a number of consecutive branch target buffer and instruction cache misses is above a first threshold and that a number of outstanding branch target buffer and instruction cache misses is above a second threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is to be throttled.

### Claim 16 (depends on 11)

The instruction fetching system of claim 11, wherein:
the tracking comprises detecting either that a number of consecutive branch target buffer and instruction cache misses is not above a first threshold or that a number of outstanding branch target buffer and instruction cache misses is not above a second threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is not to be throttled.

### Claim 17 (depends on 11)

The instruction fetching system of claim 11, wherein:
the tracking comprises in response to detecting that a number of outstanding branch target buffer and instruction cache misses is above a first threshold, tracking a number of consecutive branch target buffer and instruction cache misses; and
in response to detecting that the number of consecutive branch target buffer and instruction cache misses is above a second threshold, setting the throttle toggle to indicate that instruction cache prefetching is to be throttled.

### Claim 18 (depends on 11)

The instruction fetching system of claim 11, wherein:
the tracking comprises tracking instruction cache misses.

### Claim 19 (depends on 11)

The instruction fetching system of claim 11, wherein:
the tracking comprises not tracking branch target buffer misses.

### Claim 20 (depends on 12)

The instruction fetching system of claim 12, wherein the throttling degree indicates one of a number of instructions that are prefetched and a number of caches into which prefetching of instructions occurs.

### Claim 21

A processor comprising:
an instruction cache;
a branch target buffer; and
a miss tracker configured to:
track either or both of branch target buffer misses of the branch target buffer and instruction cache misses;
modify a throttle toggle based on the tracking; and
adjust prefetch activity for the instruction cache based on the throttle toggle.

### Claim 22 (depends on 21)

The processor of claim 21, wherein the miss tracker is further configured to:
modify a throttling degree based on the tracking, wherein the throttling degree indicates a degree to which throttling occurs,
wherein adjusting the prefetch activity is also performed based on the throttling degree.

### Claim 23 (depends on 21)

The processor of claim 21, wherein:
the tracking comprises detecting that a number of consecutive branch target buffer and instruction cache misses is above a first threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is to be throttled.

### Claim 24 (depends on 21)

The processor of claim 21, wherein:
the tracking comprises detecting that a number of consecutive branch target buffer and instruction cache misses is not above a first threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is not to be throttled.

### Claim 25 (depends on 21)

The processor of claim 21, wherein:
the tracking comprises detecting that a number of consecutive branch target buffer and instruction cache misses is above a first threshold and that a number of outstanding branch target buffer and instruction cache misses is above a second threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is to be throttled.

### Claim 26 (depends on 21)

The processor of claim 21, wherein:
the tracking comprises detecting either that a number of consecutive branch target buffer and instruction cache misses is not above a first threshold or that a number of outstanding branch target buffer and instruction cache misses is not above a second threshold, and, in response, setting the throttle toggle to indicate that instruction cache prefetching is not to be throttled.

### Claim 27 (depends on 21)

The processor of claim 21, wherein:
the tracking comprises in response to detecting that a number of outstanding branch target buffer and instruction cache misses is above a first threshold, tracking a number of consecutive branch target buffer and instruction cache misses; and
in response to detecting that the number of consecutive branch target buffer and instruction cache misses is above a second threshold, setting the throttle toggle to indicate that instruction cache prefetching is to be throttled.

### Claim 28 (depends on 21)

The processor of claim 21, wherein:
the tracking comprises tracking instruction cache misses.

### Claim 29 (depends on 21)

The processor of claim 21, wherein:
the tracking comprises not tracking branch target buffer misses.

### Claim 30 (depends on 22)

The processor of claim 22, wherein the throttling degree indicates one of a number of instructions that are prefetched and a number of caches into which prefetching of instructions occurs.
