IP Library › Granted Patent US 12,182,037
Granted Patent B2
US 12,182,037 · App. 18/173,500 · Granted Dec 31, 2024

Cache control to preserve register data

Inventors: Jonathan M. Redshaw (St. Albans, GB); Winnie W. Yeung (San Jose, CA); Benjiman L. Goodman (Austin, TX); David K. Li (Austin, TX); Zelin Zhang (San Jose, CA); Yoong Chert Foo (London, GB)
Assignee: Apple Inc.
G06F12/126G06F12/0811G06F12/0891
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 12,182,037
App. No.
18/173,500
Granted
Dec 31, 2024
Kind
B2
Abstract

Techniques are disclosed relating to eviction control for cache lines that store register data. In some embodiments, memory hierarchy circuitry is configured to provide memory backing for register operand data in one or more cache circuits. Lock circuitry may control a first set of lock indicators for a set of registers for a first thread, including to assert one or more lock indicators for registers that are indicated, by decode circuitry, as being utilized by decoded instructions of the first thread. The lock circuitry may preserve register operand data in the one or more cache circuits, including to prevent eviction of a given cache line from a cache circuit based on an asserted lock indicator. The lock circuitry may clear the first set of lock indicators in response to a reset event. Disclosed techniques may advantageously retain relevant register information in the cache with limited control circuit area.

Claims (65)

1. An apparatus, comprising:

processor pipeline circuitry configured to perform operations on register operand data, wherein the processor pipeline circuitry includes decode circuitry configured to decode instructions for execution;

memory hierarchy circuitry configured to provide memory backing for register operand data in one or more cache circuits; and

lock circuitry configured to:

control a first set of lock indicators for a set of registers for a first thread, including to assert one or more lock indicators for registers that are indicated, by the decode circuitry, as being utilized by decoded instructions of the first thread;

preserve register operand data in the one or more cache circuits, including to prevent eviction of a given cache line from a cache circuit based on an asserted lock indicator, wherein the asserted lock indicator is for a register for which operand data is stored in the given cache line; and

clear the first set of lock indicators in response to a reset event.

2. The apparatus of claim 1 , wherein the lock circuitry is further configured to:

control a second set of lock indicators for the set of registers for the first thread; and

switch from the first set of lock indicators to the second set of lock indicators in response to the reset event.

3. The apparatus of claim 2 , wherein the processor pipeline circuitry is configured to pipeline, at least through a schedule pipeline stage, information that identifies a set of lock indicators corresponding to a given operation.

4. The apparatus of claim 3 , wherein the processor pipeline circuitry is configured to perform a fence operation in response to the reset event such that all operations that use the first set of lock indicators reach a pipeline stage before any operations that use the second set of lock indicators proceed past the pipeline stage.

5. The apparatus of claim 1 , wherein the reset event corresponds to a threshold number of registers in the set of registers being locked.

6. The apparatus of claim 1 , wherein the reset event corresponds to a threshold number of stall cycles of the first thread in a pipeline stage.

7. The apparatus of claim 1 , wherein the reset event corresponds to a compiler hint.

8. The apparatus of claim 1 , further comprising:

operand cache circuitry configured to:

store register operand data;

maintain last-use indicators for one or more operand cache entries; and

control circuitry configured to, in response to the reset event, flush operand data to the memory hierarchy circuitry from one or more operand cache entries indicated as being last-use.

9. The apparatus of claim 1 , further comprising:

scoreboard circuitry configured to track which architectural registers are stored at a first cache level, wherein the lock circuitry is configured to assert a lock indicator for a register in response to a map request confirming, based on the scoreboard circuitry, that operand data for the corresponding register is stored at the first cache level.

10. The apparatus of claim 1 , wherein the apparatus is a computing device that further includes:

a central processing unit;

a display; and

network interface circuitry.

11. The apparatus of claim 1 ,

wherein the processor pipeline circuitry includes a plurality of single-instruction multiple-data pipelines configured to execute instructions;

the apparatus further comprising fixed-function circuitry configured to control the single-instruction multiple-data pipelines to perform operations for at least one of the following types of programs:

graphics shader programs; and

machine learning programs.

12. A method, comprising:

decoding, by a computing system, instructions for execution, wherein the instructions indicate operations on register operand data;

providing, by the computing system, memory backing for register operand data in one or more caches;

controlling, by the computing system, a first set of lock indicators for a set of registers for a first thread, including to assert one or more lock indicators for registers that are indicated as being utilized by decoded instructions of the first thread;

preserving, by the computing system, register operand data in the one or more caches, including preventing eviction of a given cache line from a cache based on an asserted lock indicator, wherein the asserted lock indicator is for a register for which operand data is stored in the given cache line; and

clearing, by the computing system, the first set of lock indicators in response to a reset event.

13. The method of claim 12 , further comprising:

controlling a second set of lock indicators for the set of registers for the first thread; and

switching from the first set of lock indicators to the second set of lock indicators in response to the reset event.

14. The method of claim 12 , wherein the reset event corresponds to one or more of the following reset events:

a threshold number of registers in the set of registers being locked; and

a threshold number of stall cycles of the first thread in a pipeline stage.

15. A non-transitory computer readable storage medium having stored thereon design information that specifies a design of at least a portion of a hardware integrated circuit in a format recognized by a semiconductor fabrication system that is configured to use the design information to produce the circuit according to the design, wherein the design information specifies that the circuit includes:

processor pipeline circuitry configured to perform operations on register operand data, wherein the processor pipeline circuitry includes decode circuitry configured to decode instructions for execution;

memory hierarchy circuitry configured to provide memory backing for register operand data in one or more cache circuits; and

lock circuitry configured to:

control a first set of lock indicators for a set of registers for a first thread, including to assert one or more lock indicators for registers that are indicated, by the decode circuitry, as being utilized by decoded instructions of the first thread;

preserve register operand data in the one or more cache circuits, including to prevent eviction of a given cache line from a cache circuit based on an asserted lock indicator, wherein the asserted lock indicator is for a register for which operand data is stored in the given cache line; and

clear the first set of lock indicators in response to a reset event.

16. The non-transitory computer readable storage medium of claim 15 , wherein the lock circuitry is further configured to:

control a second set of lock indicators for the set of registers for the first thread; and

switch from the first set of lock indicators to the second set of lock indicators in response to the reset event.

17. The non-transitory computer readable storage medium of claim 16 , wherein the processor pipeline circuitry is configured to:

pipeline, at least through a schedule pipeline stage, information that identifies a set of lock indicators corresponding to a given operation; and

perform a fence operation in response to the reset event such that all operations that use the first set of lock indicators reach a pipeline stage before any operations that use the second set of lock indicators proceed past the pipeline stage.

18. The non-transitory computer readable storage medium of claim 15 , wherein the reset event corresponds to a threshold number of registers in the set of registers being locked.

19. The non-transitory computer readable storage medium of claim 15 , wherein the circuit further includes:

operand cache circuitry configured to:

store register operand data;

maintain last-use indicators for one or more operand cache entries; and

control circuitry configured to, in response to the reset event, flush operand data to the memory hierarchy circuitry from one or more operand cache entries indicated as being last-use.

20. The non-transitory computer readable storage medium of claim 15 , wherein:

the circuit further includes scoreboard circuitry configured to track which architectural registers are stored at a first cache level; and

the lock circuitry is configured to assert a lock indicator for a register in response to a map request confirming, based on the scoreboard circuitry, that operand data for the corresponding register is stored at the first cache level.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 8, 2024
From: ZHANG, ZELIN; FOO, YOONG CHERT
To: APPLE INC.
Reel/Frame 066047/0664 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 23, 2023
From: REDSHAW, JONATHAN M.; YEUNG, WINNIE W.; GOODMAN, BENJIMAN L.; LI, DAVID K.
To: APPLE INC.
Reel/Frame 062786/0990 →
Continuity (1)
Related Publication 20240289282A1 · Aug 29, 2024