# US 2021/0081323 A1 · Method of improving l1 icache performance with large programs

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

- Number: US 2021/0081323 A1
- Document ID: US20210081323A1
- Status: Published application
- Kind: A1
- Application number: 16/568,698
- Filed: 2019-09-12
- Published: 2021-03-18
- Earliest claimed: 2019-09-12
- Assignees: Marvell International Ltd.
- Applicants: Marvell International Ltd.
- Inventors: Edward MCLELLAN; Alexander RUCKER; Shay GAL-ON; Srilatha MANNE
- Web page: https://patentgrep.com/patent/US20210081323A1

## CPC

- G06F 12/0893: Caches characterised by their organisation or structure
- G06F 12/0862: with prefetch
- G06F 2212/1021: Hit rate improvement
- G06F 2212/452: Instruction code
- G06F 2212/602: Details relating to cache prefetching
- G06F 2212/6024: History based prefetching
- G06F 2212/6028: Prefetching based on hints or prefetch instructions
- G06F 2212/608: Details relating to cache mapping
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The hit rate of a L1 icache when operating with large programs is substantially improved by reserving a section of the L1 icache for regular instructions and a section for non-instruction information. Instructions are prefetched for storage in the instruction section of the L1 icache based on information in the non-instruction section of the L1 icache.

## Claims

### Claim 1

A method of operating a computer system, the method comprising:
accessing a L1 icache that stores regular instructions and non-instruction information, to obtain a regular instruction; and
prefetching regular instructions to be stored in the L1 icache based on the non-instruction information stored in the L1 icache, when the regular instruction is not present in the L1 icache.

### Claim 2 (depends on 1)

The method of claim 1, wherein the L1 icache includes a plurality of sets and a plurality of ways such that each set has a number of ways, the number of ways including a first number of ways for storing the regular instructions and a second number of ways for storing the non-instruction information.

### Claim 3 (depends on 2)

The method of claim 2, wherein prefetching the regular instructions further comprises:
determining whether the L1 icache has received a request to obtain an instruction located at a specific memory address;
determining whether the specific memory address is stored in the first number of ways of the number of ways in the L1 icache;
outputting the instruction associated with the specific memory address to a processor when the specific memory address is stored in the L1 icache; and
determining whether the specific memory address is sequential or non-sequential after outputting the instruction.

### Claim 4 (depends on 3)

The method of claim 3, wherein determining whether the specific memory address is sequential or non-sequential includes determining whether a current value of a program counter is more than one greater than a last value of the program counter, a sequential address having a current value that is one greater than the last value, and a non-sequential address having a current value that is more than one greater than the last value.

### Claim 5 (depends on 3)

The method of claim 3, further comprising when the specific memory address is non-sequential:
accessing a correlation table to identify a target address;
accessing a filter table to determine a usefulness of the target address;
determining whether the target address is already present in the L1 icache when the target address is useful; and
prefetching the target address when the target address is useful and not already present in the L1 icache.

### Claim 6 (depends on 3)

The method of claim 3, further comprising when the specific memory address is sequential:
accessing a filter table to determine a usefulness of the specific memory address;
determining whether the specific memory address is already present in the L1 icache when the specific memory address is useful; and
prefetching a next sequential cache line when the specific memory address is useful and not already present in the L1 icache.

### Claim 7 (depends on 3)

The method of claim 3, further comprising:
outputting a request to obtain the instruction associated with the specific memory address to a larger memory when the specific memory address is not stored in the L1 icache;
determining whether the specific memory address is sequential or non-sequential after outputting the request to the larger memory;
mapping a last memory address to the specific memory address to form mapped information when the specific memory address is non-sequential; and
storing the mapped information in a correlation table.

### Claim 8 (depends on 2)

The method of claim 2, wherein storing the non-instruction information includes:
determining a page number of a specific memory address; and
prefetching from a larger memory to obtain all of the memory addresses that have a same page number as the specific memory address.

### Claim 9

A computer system, comprising:
a L1 icache that stores regular instructions and non-instruction information; and
a processor coupled to the L1 icache, the processor being configured to:
access the L1 icache to obtain a regular instruction; and
prefetch regular instructions to be stored in the L1 icache based on the non-instruction information stored in the L1 icache, when the regular instruction is not present in the L1 icache.

### Claim 10 (depends on 9)

The computer system of claim 9, wherein the L1 icache has a plurality of sets and a plurality of ways such that each set has a number of ways, the number of ways including a first number of ways for storing the regular instructions and a second number of ways for storing the non-instruction information.

### Claim 11 (depends on 10)

The computer system of claim 10, wherein the processor prefetches the regular instructions by:
determining whether the L1 icache has received a request to obtain an instruction located at a specific memory address;
determining whether the specific memory address is stored in the first number of ways of the number of ways in the L1 icache;
outputting the instruction associated with the specific memory address to a processor when the specific memory address is stored in the L1 icache; and
determining whether the specific memory address is sequential or non-sequential after outputting the instruction.

### Claim 12 (depends on 11)

The computer system of claim 11, wherein the processor determines whether the specific memory address is sequential or non-sequential by determining whether a current value of a program counter is more than one greater than a last value of the program counter, a sequential address having a current value that is one greater than the last value, and a non-sequential address having a current value that is more than one greater than the last value.

### Claim 13 (depends on 11)

The computer system of claim 11, wherein when the specific memory address is non-sequential, the processor is further configured to:
access a correlation table to identify a target address;
access a filter table to determine a usefulness of the target address;
determine whether the target address is already present in the L1 icache when the target address is useful; and
prefetch the target address when the target address is useful and not already present in the L1 icache.

### Claim 14 (depends on 11)

The computer system of claim 11, wherein when the specific memory address is sequential, the processor is further configured to:
access a filter table to determine a usefulness of the specific memory address;
determine whether the specific memory address is already present in the L1 icache when the specific memory address is useful; and
prefetch a next sequential cache line when the specific memory address is useful and not already present in the L1 icache.

### Claim 15

A non-transitory computer-readable medium having computer-readable instructions stored thereon which, when executed by a processor, cause the processor to execute a method of cache prefetching, the method comprising:
accessing a L1 icache that stores regular instructions and non-instruction information, to obtain a regular instruction; and
prefetching regular instructions to be stored in the L1 icache based on the non-instruction information stored in the L1 icache, when the regular instruction is not present in the L1 icache.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the L1 icache includes a plurality of sets and a plurality of ways such that each set has a number of ways, the number of ways including a first number of ways for storing the regular instructions and a second number of ways for storing the non-instruction information.

### Claim 17 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein prefetching the regular instructions further comprises:
determining whether the L1 icache has received a request to obtain an instruction located at a specific memory address;
determining whether the specific memory address is stored in the first number of ways of the number of ways in the L1 icache;
outputting the instruction associated with the specific memory address to a processor when the specific memory address is stored in the L1 icache; and
determining whether the specific memory address is sequential or non-sequential after outputting the instruction.

### Claim 18 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein determining whether the specific memory address is sequential or non-sequential includes determining whether a current value of a program counter is more than one greater than a last value of the program counter, a sequential address having a current value that is one greater than the last value, and a non-sequential address having a current value that is more than one greater than the last value.

### Claim 19 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein when the specific memory address is non-sequential, the method further comprises:
accessing a correlation table to identify a target address;
accessing a filter table to determine a usefulness of the target address;
determining whether the target address is already present in the L1 icache when the target address is useful; and
prefetching the target address when the target address is useful and not already present in the L1 icache.

### Claim 20 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein when the specific memory address is sequential, the method further comprises:
accessing a filter table to determine a usefulness of the specific memory address;
determining whether the specific memory address is already present in the L1 icache when the specific memory address is useful; and
prefetching a next sequential cache line when the specific memory address is useful and not already present in the L1 icache.
