Cache Line Promotion to Register

Cache line promotion to register techniques are described. In one example, a first plurality of instances of a load instruction are processed by an execution unit of a processing device by accessing data from a load response obtained from a load-store unit. The data is stored to a data reuse cache. Responsive to processing a second plurality of instances of the load instruction by accessing the data from the data reuse cache, the data is promoted from the data reuse cache to a load register number of the execution unit. A third plurality of instances of the load instruction are processed at the execution unit by accessing the data from the load register number.

Skip to: Description  ·  Claims  · Patent History  ·  Patent History
Description
BACKGROUND

Processors, such as central processing units, graphics processing units, and so forth are tasked with processing ever-increasing amounts of data. Access to this data is a significant factor in speed, at which, the processor is able to process the data. Cache systems are employed to reduce access latency, including using multiple cache levels, such as a level 1 cache integrated with a faster, level 0 cache, e.g., a data reuse cache. A cache system is confronted with a variety of challenges including tradeoffs between latency, throughput, size, and so forth. These challenges hinder processor operation in conventional real-world scenarios, the effects of which are compounded by ever-increasing amounts of data.

BRIEF DESCRIPTION OF THE DRAWINGS

The detailed description is described with reference to the accompanying figures.

FIG. 1 is a block diagram of a processing system configured to execute one or more applications, in accordance with one or more implementations.

FIG. 2 is a block diagram of a non-limiting example device configured to employ cache line promotion to register techniques.

FIG. 3 is a block diagram of a non-limiting example system configured to employ cache line promotion to register techniques in a multi-core processor architecture with a split cache.

FIG. 4 is a block diagram of a non-limiting example system configured to employ cache line promotion to register techniques.

FIG. 5 is a screen shot of a non-limiting example of executable instructions configured to employ cache line promotion to register techniques.

FIG. 6 is a flow diagram depicting a procedure in a non-limiting example implementation of operations of a data reuse cache implementing cache line promotion to register techniques.

DETAILED DESCRIPTION

Efficiency of data access by processors significantly affects the speed and operation of a processing system as a whole. Improving access latency between storage and processing circuitry enhances speed of operation, reduces power consumption, conserves processing bandwidth, and supports various technical advantages for systems and devices implemented with processors. Accordingly, cache line promotion to register techniques, systems, and devices are described that further increase technical advantages gained through use of a data reuse cache by a processor implemented in hardware.

In aspects, a processor, e.g., a central processing unit, a graphics processing unit, a machine-learning processor, a parallel processor, a system on chip, an application specific integrated circuit, and so forth, is configurable to include at least one core and a cache system with one or more cache levels. The cache system enables fast data retrieval using low-latency storage circuits, which are implemented within the core, external and coupled to the core, shared by multiple cores, and so forth. The core, for instance, includes an execution unit for processing data and a load-store unit for transferring data between the cache system and the execution unit.

The cache levels balance size and speed of the cache system by implementing successively larger cache levels to improve efficiency. The cache levels leverage spatial and temporal locality to improve data access latency. In cache operations, a “hit” occurs when requested data is available in at least one cache level, and a “miss” occurs when the data is not available from the cache levels.

To address challenges with conventional cache systems, a data reuse cache is implemented within the processor, such as within the core, external to the core, shared by multiple cores, and so forth. The data reuse cache enhances performance of the processor by reducing access latency for repeated load instructions, in particular, recurring load instructions for unchanged, reusable data, such as static variables and constant values. In at least one example, the data reuse cache adopts cache line promotion to register techniques, which enhance performance and efficiency of reloading the execution unit with unchanged data for processing. The data reuse cache promotes frequently accessed, unchanging data from the cache system to enable faster data access than from the cache levels.

In one or more aspects, the data reuse cache is operatively coupled between the execution unit and the load-store unit, or directly coupled to the execution unit separately from a connection established between the execution unit and the load-store unit. In variations, the data reuse cache is configured for access in parallel with one or more of the cache levels of the cache system. In at least one example, the data reuse cache is implemented separate from one or more cache levels of the cache system, e.g., separate from a level 1 cache level, a level 2 cache level, and so forth, which are managed by the load-store unit. For example, the data reuse cache is implemented as a separate, specialized cache level, e.g., a level 0 cache level, which is faster at serving data than the cache system. Lower access latency than the cache system is achievable, in at least one example, through having a closer physical proximity to the execution unit than the cache system, through having a faster interface or faster circuit technology than the load-store unit or the cache system, or a combination of physical and technology factors. The data reuse cache is implemented, solely, for load responses, reducing access time (e.g., from four cycles to access data from a level 1 cache level to two cycles to access the data from the data reuse cache), thereby improving core operations overall. In variations, the data reuse cache and the cache system are integrated into a vertical or stacked cache that includes multiple substrate layers that arrange the cache levels and the data reuse cache in a vertical (e.g., stacked) order. In one example, the data reuse cache and the level 1 cache level are located closer to the core and the processor within the stack than the other cache levels, which improves performance.

Cache misses at the data reuse cache introduce additional latency that diminishes performance. Configuring a small data reuse cache for improved speed, for instance, potentially increases the miss rate. To reduce the miss rate of the data reuse cache, an access filter (e.g., employed by a filter module) controls whether load instructions are allowed access to the data reuse cache. Load instructions are filtered based on a likelihood of resulting in a hit or miss, for example, which is tracked using a hit counter that updates based on performance. The filter prevents recurrently missing load instructions from accessing the data reuse cache while allowing likely hits. The filtered out load instructions bypass the data reuse cache, avoiding performance penalties.

The access filter, for example, is enhanced with recurrency tracking capability to serve as a training feature for speculative memory renaming. In addition to controlling access to the data reuse cache using a hit counter, which increments under specific conditions to track the likelihood of an instruction resulting in a data reuse cache hit or miss, the access filter is further configured as a stability tracker that allows access when the hit counter increments to indicate an unchanging cache line or unchanged data. The access filter allows the hit counter to increment when aspects of the corresponding data reuse cache line (e.g., cache line index, way, and address offset) remain unchanged from a previous hit. The access filter refrains from incrementing the hit counter (e.g., the hit counter resets to zero) to indicate a change, e.g., when one or more of aspects of the data reuse cache line change. The access filter allows the hit counter to increment towards a stability threshold as long as the data reuse cache line maintains stability and is unchanged from one hit to the next. Upon satisfying the stability threshold, the data reuse cache line is identified as being unchanged and marked as eligible for register promotion.

Data reuse cache line promotion to registers improves performance when successive load instructions cause repeated hits to a same data reuse cache line, which remains unchanged (e.g., same cache line index, same cache line way, same cache line address offset) from hit to hit. In at least one example, the load instructions represent repeated load instructions, including same operands and parameters in variations, for repeatedly loading an unchanging data value. In at least one other example, the load instructions include variations from one instance to the next, for repeatedly loading an unchanging data value from a same data reuse cache line. When the same data reuse cache line experiences repeated hits during a time window in which that data reuse cache line does not change, the cache line is identified as an unchanging data reuse cache line to be promoted to a register of the processor core. As used herein, an architectural register refers to a register defined by the instruction set architecture (ISA) that is visible to a programmer and compiler associated with the execution unit. The architectural register represents the original destination register specified in load instructions before renaming occurs. The execution unit is configured to process the reusable data from a physical register, for example, after register renaming an architectural register to an allocated logical register through a register map table. A physical register as used herein refers to an actual hardware register in the processor where data is stored and accessed and is mapped to logical registers through the register renaming process. A logical register, as used herein, represents an intermediate register used in the memory renaming process, specifically identifiable as a Load Register Number (LRN), which serves as a bridge between architectural registers and physical registers in the speculative renaming process. The term load register number, LRN, and logical register are used interchangeably throughout this disclosure.

Promoting a repeatedly used data from an unchanging data reuse cache line to a corresponding logical register (e.g., a corresponding LRN) of the execution unit configures the reusable data to be accessed with a lower latency than from the data reuse cache. For example, the execution unit processes a load instruction without incurring a delay penalty otherwise caused by reloading the data for processing from the data reuse cache or the cache system. In practice, the next instance of the load instruction is bypassed by accessing the unchanged data directly from the logical register (e.g., the corresponding LRN). The two cycles that are typically used to execute the load instruction and access the reusable data from the data reuse cache are avoided, including in some cases, reducing the data access latency to one cycle or zero cycles, thereby improving core operations as a whole.

In variations, load instructions to a register promoted cache line are memory renamed to an LRN. Speculative memory renaming is implemented to predict and proactively map future instances of load instructions to LRNs, further reducing access latency. Speculatively memory renaming promotes a near-zero access latency to reused data by automatically redirecting hits at a data reuse cache line to a corresponding LRN.

A marking is applied to a promoted data reuse cache line to designate the cache line having been designated as eligible for register promotion. For promoted cache lines with this marking, a temporary LRN is allocated from a pool of available LRNs. The filter module determines eligibility for promotion based on a program counter (PC) or an instruction pointer (IP) of the load instruction, and maps the load instruction, if eligible, to an LRN. Memory renaming maps the load instruction to an allocated LRN using a memory rename table. Later, in response to detecting the marking, the physical register destination of that load instruction is automatically mapped to the allocated LRN through register renaming, which maps the LRN to a physical register number (PRN) using a register map. The promotion process includes replacing architectural register destinations with LRNs for eligible loads and mapping LRNs to physical registers in response to confirming data is unchanging between loads by tracking cache line parameters and verifying the presence and integrity of data for subsequent renamed loads.

If the speculation is successful, future load instructions are bypassed and data is directly accessed from the renamed register, skipping the data reuse cache and other cache levels altogether. If the speculation fails (e.g., aspects of the data reuse cache line change), a pipeline flush or other recovery feature is triggered to clear that data reuse cache line. Through register promotion of data reuse cache lines, efficiency and performance is improved, without causing significant changes or complexity to existing data reuse cache implementations.

Described below are further details about tracking and identifying unchanged and reusable cache lines of a data reusable cache for promoting cache lines to registers including example features for speculative memory renaming. A variety of other instances are also contemplated, examples of which are described in the following discussion and shown using corresponding figures.

In some aspects, the techniques described herein relate to a method including: processing, at an execution unit, first instances of a load instruction by accessing data from a load response obtained from a load-store unit, storing the data to a data reuse cache, responsive to processing second instances of the load instruction by accessing the data from the data reuse cache, promoting the data from the data reuse cache to a load register number of the execution unit, and processing, at the execution unit, third instances of the load instruction at the execution unit by accessing the data from the register.

In some aspects, the techniques described herein relate to a method, wherein promoting the data from the data reuse cache to the register includes using an access filter to determine when to promote the data.

In some aspects, the techniques described herein relate to a method, wherein promoting the data from the data reuse cache includes renaming a memory address of a corresponding cache line of the data reuse cache based on a load register number identifier of the load register number.

In some aspects, the techniques described herein relate to a method, wherein promoting the data from the data reuse cache includes marking a corresponding cache line of the data reuse cache to indicate a promotion to the register.

In some aspects, the techniques described herein relate to a method, further including: unmarking the corresponding cache line of the data reuse cache to indicate the data is stale.

In some aspects, the techniques described herein relate to a method, wherein accessing the data from the register is in response to verifying the corresponding cache line is marked.

In some aspects, the techniques described herein relate to a method, wherein promoting the data from the data reuse cache includes using an access filter to indicate a confidence that corresponding cache line of the data reuse cache is unchanged between consecutive instances of the load instruction.

In some aspects, the techniques described herein relate to a method, wherein the confidence is based on a hit counter of the access filter.

In some aspects, the techniques described herein relate to a method, further including: incrementing the hit counter when the corresponding cache line is unchanged between the consecutive instances of the load instruction, and zeroing the hit counter when the corresponding cache line is changed between the consecutive instances of the load instruction.

In some aspects, the techniques described herein relate to a method, wherein: the corresponding cache line is unchanged between the consecutive instances of the load instruction when the corresponding cache line maintains one or more of a same cache line index, a same cache line way, and a same cache line address offset between the consecutive instances, and the corresponding cache line is changed between the consecutive instances of the load instruction when the corresponding cache line maintains at least one of a different cache line index, a different cache line way, or a different cache line address offset between the consecutive instances.

In some aspects, the techniques described herein relate to a method, wherein storing the data to the data reuse cache includes promoting the data from a cache level of a cache system that is separate from the data reuse cache.

In some aspects, the techniques described herein relate to a system including: a cache system, a load-store unit configured to generate a load response from the cache system for processing first instances of a load instruction, a data reuse cache configured to store data of the load response, and an execution unit including a load register number, and configured to: process second instances of the load instruction by accessing the data from the data reuse cache, and responsive to promoting the data from the data reuse cache to the load register number, process third instances of the load instruction by accessing the data from the load register number.

In some aspects, the techniques described herein relate to a system, wherein the load-store unit is configured to promote the data to the load register number by renaming a corresponding cache line of the data reuse cache to the load register number.

In some aspects, the techniques described herein relate to a system, wherein the execution unit is configured to access the data from a physical register mapped to the load register number.

In some aspects, the techniques described herein relate to a system, wherein the load-store unit is configured to promote the data to the load register number by applying a marking to a corresponding cache line of the data reuse cache to indicate a promotion to the load register number.

In some aspects, the techniques described herein relate to a system, further including an access filter, and the load-store unit is configured to promote the data to the register when the access filter indicates a confidence that a corresponding cache line is unchanged between consecutive instances of the load instruction.

In some aspects, the techniques described herein relate to a system, wherein: a hit counter of the access filter is incremented when the corresponding cache line is unchanged between the consecutive instances of the load instruction, and the hit counter is zeroed when the corresponding cache line is changed between the consecutive instances of the load instruction.

In some aspects, the techniques described herein relate to a device including a processor including at least one core including: a cache system configured to generate a load response for processing first instances of a load instruction, a data reuse cache configured to store data of the load response in a corresponding cache line, an execution unit configured to process second instances of the load instruction by accessing the data from the data reuse cache, and a load-store unit configured to promote the data from the data reuse cache to a load register number of the execution unit for accessing the data to process third instances of the load instruction.

In some aspects, the techniques described herein relate to a device, further including an access filter, wherein the load-store unit is configured to promote the data to the register when the access filter indicates a confidence that a corresponding cache line is unchanged between consecutive instances of the load instruction.

In some aspects, the techniques described herein relate to a device, wherein the load-store unit is configured to promote the data when a hit counter of the access filter satisfies a stability threshold indicating the cache line is unchanged by renaming a memory address of the corresponding cache line to the load register number.

FIG. 1 is a block diagram of a processing system 100 configured to execute one or more applications, such as compute applications (e.g., machine-learning applications, neural network applications, high-performance computing applications, databasing applications, gaming applications), graphics applications, and the like. Examples of devices in which the processing system is implemented include, but are not limited to, a server computer, a personal computer (e.g., a desktop or tower computer), a smartphone or other wireless phone, a tablet or phablet computer, a notebook computer, a laptop computer, a wearable device (e.g., a smartwatch, an augmented reality headset or device, a virtual reality headset or device), an entertainment device (e.g., a gaming console, a portable gaming device, a streaming media player, a digital video recorder, a music or other audio playback device, a television, a set-top box), an Internet of Things (IoT) device, an automotive computer or computer for another type of vehicle, a networking device, a medical device or system, and other computing devices or systems.

In the illustrated example, the processing system 100 includes a central processing unit (CPU) 102, which is also referred to as a “host processor”. In one or more implementations, the CPU 102 is configured to run an operating system (OS) that manages the execution of applications. For example, at least one OS 104 is configured to schedule the execution of tasks (e.g., instructions) for applications, allocate portions of resources (e.g., system memory 106, CPU 102, input/output (I/O) device 108, accelerator unit (AU) 110, which is also referred to as an accelerator processor, storage 112, I/O circuitry 114) for the execution of tasks for the applications, provide an interface to I/O devices (e.g., I/O device 108) for the applications, or any combination thereof.

The CPU 102 includes one or more processor chiplets 116. The processor chiplets 116 are communicatively coupled together by a data fabric 118 in one or more implementations.

Each of the processor chiplets 116, for example, includes one or more processor cores 120, 122 configured to concurrently execute one or more series of instructions, also referred to herein as “threads,” for an application. Further, the data fabric 118 communicatively couples each processor chiplet 116-N of the CPU 102 such that each processor core (e.g., processor cores 120) of a first processor chiplet (e.g., 116-1) is communicatively coupled to each processor core (e.g., processor cores 122) of one or more other processor chiplets 116. Though the example presented in FIG. 1 shows a first processor chiplet (116-1) having three processor cores (120-1, 120-2, 120-K) representing a K number of processor cores 122 and a second processor chiplet (116-N) having three processor cores (e.g., 122-1, 122-2, 122-L) representing an L number of processor cores 122, in other implementations (L being an integer number greater than or equal to one), each processor chiplet 116 in variations has any number of processor cores 120, 122. For example, each processor chiplet 116 has the same number of processor cores 120, 122 as one or more other processor chiplets 116, a different number of processor cores 120, 122 as one or more other processor chiplets 116, or both.

Examples of connections which are usable to implement the data fabric 118 include but are not limited to, buses (e.g., a data bus, a system, an address bus), interconnects, memory channels, through silicon vias, traces, and planes. Other example connections include optical connections, fiber optic connections, and/or connections or links based on quantum entanglement.

In this example, a data reuse cache 124 and a filter module 126 are depicted in the processor cores 120, 122. In variations, however, the data reuse cache 124 and the filter module 126 are included in and/or is implemented by one or more different components of the processing system 100, such as the CPU 102, the memory 106, the I/O device 108, the AU 110, the storage 112, the I/O circuitry 114, and so forth. In at least one implementation, the data reuse cache 124 and the filter module 126 or portions of the data reuse cache 124 and the filter module 126 are included in at least two of the depicted components of the processing system 100. By way of example, the data reuse cache 124 and the filter module 126 are included in or otherwise implemented by at least the CPU 102 and the AU 110.

Additionally, within the processing system 100, the CPU 102 is communicatively coupled to an I/O circuitry 114 by a connection circuitry 128. For example, each processor chiplet 116 of the CPU 102 is communicatively coupled to the I/O circuitry 114 by the connection circuitry 128. The connection circuitry 128 includes, for example, one or more data fabrics, buses, buffers, queues, and the like. The I/O circuitry 114 is configured to facilitate communications between two or more components of the processing system 100 such as between the CPU 102, system memory 106, display 130, universal serial bus (USB) devices, peripheral component interconnect (PCI) devices (e.g., I/O device 108, AU 110), storage 112, and the like.

As an example, system memory 106 includes any combination of one or more volatile memories and/or one or more non-volatile memories, examples of which include dynamic random-access memory (DRAM), static random-access memory (SRAM), non-volatile RAM, and the like. To manage access to the system memory 106 by CPU 102, the I/O device 108, the AU 110, and/or any other components, the I/O circuitry 114 includes one or more memory controllers 132. These memory controllers 132, for example, include circuitry configured to manage and fulfill memory access requests having memory translations and memory translation parameters, which are issued from the CPU 102, the I/O device 108, the AU 110, or any combination thereof. Examples of such requests and memory translations include memory translations to perform read requests, write requests, fetch requests, pre-fetch requests, or any combination thereof. That is to say, these memory controllers 132 are configured to manage access to the data stored at one or more memory addresses within the system memory 106, such as by CPU 102, the I/O device 108, and/or the AU 110.

When an application is to be executed by the processing system 100, the OS 104 running on the CPU 102 is configured to load at least a portion of program code 134 (e.g., an executable file) associated with the application from, for example, a storage 112 into system memory 106. This storage 112, for example, includes a non-volatile storage such as a flash memory, solid-state memory, hard disk, optical disc, or the like configured to store the program code 134 for one or more applications.

To facilitate communication between the storage 112 and other components of processing system 100, the I/O circuitry 114 includes one or more storage connectors 136 (e.g., universal serial bus (USB) connectors, serial AT attachment (SATA) connectors, PCI Express (PCIe) connectors) configured to communicatively couple storage 112 to the I/O circuitry 114 such that I/O circuitry 114 is capable of routing signals to and from the storage 112 to one or more other components of the processing system 100.

In association with executing an application, in one or more scenarios, the CPU 102 is configured to issue one or more instructions (e.g., threads) to be executed for an application to the AU 110. The AU 110 is configured to execute these instructions by operating as one or more vector processors, coprocessors, graphics processing units (GPUs), general-purpose GPUs (GPGPUs), non-scalar processors, highly parallel processors, artificial intelligence (AI) processors (also known as neural processing units, or NPUs), inference engines, machine-learning processors, other multithreaded processing units, scalar processors, serial processors, programmable logic devices (e.g., field-programmable logic devices (FPGAs)), or any combination thereof.

In at least one example, the AU 110 includes one or more compute units that concurrently execute one or more threads of an application and store data resulting from the execution of these threads in AU memory 138. This AU memory 138, for example, includes any combination of one or more volatile memories and/or non-volatile memories, examples of which include caches, video RAM (VRAM), or the like. In one or more implementations, these compute units are also configured to execute these threads based on the data stored in one or more physical registers 140 of the AU 110.

To facilitate communication between the AU 110 and one or more other components of processing system 100, the I/O circuitry 114 includes or is otherwise connected to one or more connectors, such as PCI connectors 142 (e.g., PCIe connectors) each including circuitry configured to communicatively couple the AU 110 to the I/O circuitry such that the I/O circuitry 114 is capable of routing signals to and from the AU 110 to one or more other components of the processing system 100. Further, the PCIe connectors 142 are configured to communicatively couple the I/O device 108 to the I/O circuitry 114 such that the I/O circuitry 114 is capable of routing signals to and from the I/O device 108 to one or more other components of the processing system 100.

By way of example and not limitation, the I/O device 108 includes one or more keyboards, pointing devices, game controllers (e.g., gamepads, joysticks), audio input devices (e.g., microphones), touch pads, printers, speakers, headphones, optical mark readers, hard disk drives, flash drives, solid-state drives, and the like. Additionally, the I/O device 108 is configured to execute one or more operations, tasks, instructions, or any combination thereof based on one or more physical registers 144 of the I/O device 108. In one or more implementations, such physical registers 144 are configured to maintain data (e.g., operands, instructions, values, variables) indicating one or more operations, tasks, or instructions to be performed by the I/O device 108.

To manage communication between components of the processing system 100 (e.g., AU 110, I/O device 108) that are connected to PCI connectors 142, and one or more other components of the processing system 100, the I/O circuitry 114 includes PCI switch 146. The PCI switch 146, for example, includes circuitry configured to route packets to and from the components of the processing system 100 connected to the PCI connectors 142 as well as to the other components of the processing system 100. As an example, based on address data indicated in a packet received from a first component (e.g., CPU 102), the PCI switch 146 routes the packet to a corresponding component (e.g., AU 110) connected to the PCI connectors 142.

Based on the processing system 100 executing a graphics application, for instance, the CPU 102, the AU 110, or both are configured to execute one or more instructions (e.g., draw calls) such that a scene including one or more graphics objects is rendered. After rendering such a scene, the processing system 100 stores the scene in the storage 112, displays the scene on the display 130, or both. The display 130, for example, includes a cathode-ray tube (CRT) display, liquid crystal display (LCD), light emitting diode (LED) display, organic light emitting diode (OLED) display, or any combination thereof. To enable the processing system 100 to display a scene on the display 130, the I/O circuitry 114 includes display circuitry 148. The display circuitry 148, for example, includes high-definition multimedia interface (HDMI) connectors, DisplayPort connectors, digital visual interface (DVI) connectors, USB connectors, and the like, each including circuitry configured to communicatively couple the display 130 to the I/O circuitry 114. Additionally or alternatively, the display circuitry 148 includes circuitry configured to manage the display of one or more scenes on the display 130 such as display controllers, buffers, memory, or any combination thereof.

Further, the CPU 102, the AU 110, or both are configured to concurrently run one or more virtual machines (VMs), which are each configured to execute one or more corresponding applications. To manage communications between such VMs and the underlying resources of the processing system 100, such as any one or more components of processing system 100, including the CPU 102, the I/O device 108, the AU 110, and the system memory 106, the I/O circuitry 114 includes memory management unit (MMU) 150 and input-output memory management unit (IOMMU) 152. The MMU 150 includes, for example, circuitry configured to manage memory requests, such as indicating memory translations from the CPU 102 to the system memory 106. For example, the MMU 150 is configured to handle memory requests issued from the CPU 102 and associated with a VM running on the CPU 102. These memory requests, for example, request access to read, write, fetch, or pre-fetch data residing at one or more virtual addresses (e.g., guest virtual addresses) each indicating one or more portions (e.g., physical memory addresses) of the system memory 106. Based on receiving a memory request from the CPU 102, the MMU 150 is configured to perform a memory translation to translate the virtual address indicated in the memory request to a physical address in the system memory 106 and by fulfilling the memory translation, then fulfill the memory request. The IOMMU 152 includes, for example, circuitry configured to manage memory requests (memory-mapped I/O (MMIO) requests) from the CPU 102 to the I/O device 108, the AU 110, or both, and to manage memory requests (direct memory access (DMA) requests) from the I/O device 108 or the AU 110 to the system memory 106. For example, to access the registers 144 of the I/O device 108, the registers 140 of the AU 110, and/or the AU memory 138, the CPU 102 issues one or more MMIO requests. Such MMIO requests each request access to read, write, fetch, or pre-fetch data residing at one or more virtual addresses (e.g., guest virtual addresses) which each represent at least a portion of the registers 144 of the I/O device 108, the registers 140 of the AU 110, or the AU memory 138, respectively. As another example, to access the system memory 106 without using the CPU 102, the I/O device 108, the AU 110, or both are configured to issue one or more DMA requests. Such DMA requests each request access to read, write, fetch, or pre-fetch data residing at one or more virtual addresses (e.g., device virtual addresses) which each represent at least a portion of the system memory 106. Based on receiving an MMIO request or DMA request, the IOMMU 152 is configured to translate the virtual address indicated in the MMIO or DMA request to a physical address and fulfill the request.

In variations, the processing system 100 includes any combination of the components depicted and described. For example, in at least one variation, the processing system 100 does not include one or more of the components depicted and described in relation to FIG. 1. Additionally or alternatively, in at least one variation, the processing system 100 includes additional and/or different components from those depicted. The 100 is configurable in a variety of ways with different combinations of components in accordance with the described techniques.

FIG. 2 is a block diagram of a non-limiting example device 200 configured to employ cache line promotion to register techniques. The device 200 includes aspects of the processing system 100, including a processor 202 as an example of the CPU 102 and the AU 110. A processor core 204 is depicted in the processor 202 as an example of the processor cores 120, 122. The processor core 204 of the processor 202 is operatively coupled to the memory 106 and the storage 112.

The processor core 204 includes an execution unit 206, a load-store unit 208, and a cache system 210. The execution unit 206 is representative of functionality of the processor core 204 implemented in hardware that performs operations, e.g., based on instructions received through execution of software. The execution unit 206 includes registers 212 (e.g., including examples of the physical registers 144) that are configured to maintain data for processing and evaluation by a processing circuit of the execution unit 206. The execution unit 206, for instance, is implemented by a circuit configured to perform arithmetic and logic operations.

The registers 212 include one or more physical registers, each representing an individual storage circuit implemented in hardware to maintain data actively being processed and evaluated by the processing circuit of the execution unit 206 to execute an instruction. In addition to physical registers, the execution unit 206 maintains a pool of Load Register Numbers (LRNs). LRNs are register identifiers used in the memory renaming process, serving as an intermediate step between architectural registers specified in load instructions and the actual physical registers where data is stored. The LRNs occupy storage integrated within the execution unit 206 to efficiently maintain data in a ready-state for being moved into a corresponding physical register when a subsequent instruction referencing an architectural register mapped to that LRN is executed. An access latency for data maintained in the registers 212 is less than a supported access latency of the cache system 210 and less than a respective access latency supported by the data reuse cache 124.

The load-store unit 208 is representative of functionality of the processor core 204 to execute load and store instructions, for example, load and store instructions obtained from the memory 106 (e.g., instructions of the program code 134). Load instructions and corresponding operations involve loading data from the cache system 210, the memory 106 (e.g., physical volatile memory), and/or the storage 112 (e.g., persistent storage) to the registers 212 of the execution unit 206 for processing. Store instructions and corresponding operations include storing data from the registers 212 (e.g., after processing by the execution unit 206) back to the cache system 210, the memory 106, and/or the storage 112.

The load-store unit 208, for instance, is configured to support use of virtual memory by translating virtual memory addresses used by software to physical memory addresses. Virtual memory is a technique to manage use of shared physical memory. Virtual memory supports a variety of different functionality. Examples of this functionality include expansion of an amount of storage made available to applications beyond that which is actually available in the physical memory, offload memory management from applications and operating systems, use of a variety of different types of memory without the applications being made aware, support memory optimization, address memory fragmentation, and so forth as further described in relation to FIG. 5.

The cache system 210 includes a plurality of cache levels 214, examples of which are illustrated as a level 1 cache 216(1) through a level “N” cache 216(N). Configuration of the cache levels 214 is utilized to take advantage of a variety of locality factors. Spatial locality is used to improve operation in situation in which data is requested that is stored physically close to data that is a subject of a previous request. Temporal locality is used to address scenarios in which data that has already been requested will be requested again.

In cache operations implemented by the cache system 210, a “hit” occurs to one of the cache levels 214 when data that is subject of a load operation is available via that cache level, and a “miss” occurs when the subject data is not available via that cache level. When employing multiple successive cache levels, requests proceed successively through the cache levels 214 until the data is located. The cache system 210 is configurable in a variety of ways (e.g., in hardware) to address a variety of processor core 204 configurations, such as a central processing unit cache, a graphics processing unit cache, a parallel processor unit cache, a machine-learning processor cache, a digital signal processor cache, a system-on-chip cache, an application specific integrated circuit, and so forth.

The processor core 204 also includes the data reuse cache 124. The data reuse cache 124 is a specialized cache circuit located within the processor core 204, physically closer to the execution unit 206 than other cache levels or memory components, designed to store and quickly serve frequently accessed data from load instructions, thereby reducing latency and improving performance by minimizing the need to reload data from higher-level caches or memory.

To improve performance and reduce latency between the data reuse cache 124 and the execution unit 206, the data reuse cache 124 is located within the processor core 204 (e.g., on hardware circuitry or an integrated circuit) to be physically closer to the execution unit 206 than the load-store unit 208 or other part of the processor core 204. For example, the execution unit 206 is positioned on one side of the data reuse cache 124, and the load-store unit 208 and the cache system 210 are positioned on an opposite side of the data reuse cache 124 to be further from the execution unit 206 than the data reuse cache 124. In variations, one or more of the data reuse cache 124, the cache system 210, and the memory 106 are stacked and arranged vertically relative the processor core 204 or the execution unit 206. A plurality of substrates configured to support separate circuit layers is configured as a stacked cache, for instance, including the data reuse cache 124 and the cache system 210 integrated in one or more planes vertically arranged above or below a horizontal plane of a substrate that integrates the execution unit 206 with the other components of the processor core 204. The data reuse cache 124 is configured to leverage scenarios in which data of a load instruction being loaded by the load-store unit 208 is reused, e.g., accessed repeatedly in succession, by itself or other instructions. Keeping this data close to the execution unit 206 for faster reuse, including stored vertically relative the execution unit 206 in variations, reduces a cost incurred in repeatedly reloading the data from the cache levels 214, e.g., the level 1 cache 216(1). In one example, the data reuse cache 124 is accessible in parallel with the cache system 210 through the load-store unit 208, e.g., with a level 1 data cache as further described in relation to FIG. 3.

The data reuse cache 124 is configurable to be “filled” based on load responses generated by the load-store unit 208. In one example, the data reuse cache 124 is configured, solely, for data reuse. A load response from the load-store unit 208 is usable to fill the data reuse cache 124, e.g., from cache levels 214 of the cache system 210, the memory 106, the storage 112, and so forth. In an implementation, complex memory data communication is delegated to the load-store unit 208, thereby increasing operational efficiency as further described in relation to FIG. 5 below. In this way, a likelihood that data stored in the data reuse cache 124 is relevant to subsequent load instructions is increased, thereby reducing a probability of a cache miss.

In another example of techniques usable to reduce cache misses, the filter module 126 and an access filter 218 are employed to manage load operations. The filter module 126 employs the access filter 218 to control access by load instructions to the data reuse cache 124. The access filter 218 refers to a hardware circuit within the filter module 126 that controls access to the data reuse cache 124 by selectively allowing or restricting load instructions based on their likelihood of resulting in a cache hit, thereby improving cache efficiency and reducing performance penalties associated with cache misses. Load instructions that have a lower than a threshold amount of likelihood of resulting in a hit to the data reuse cache 124, for instance, are restricted from accessing the data reuse cache 124. Instead, these load instructions are targeted directly to the cache levels 214 through the load-store unit 208. Load instructions with likelihoods of hitting the data reuse cache 124 that satisfy the threshold amount of likelihood are allowed access to the data reuse cache 124. As a result, a performance penalty otherwise encountered by a cache miss to the data reuse cache 124 is avoided, thereby supporting implementation of smaller caches, which have increased access efficiency, e.g., speed.

To enhance performance of the processor core 204, LRNs of the registers 212 are configured to store reusable data of data reuse cache lines, which are promoted from the data reuse cache 124 after repeatedly experiencing hits while the data reuse cache lines remain unchanged (e.g., cache line indices, cache line ways, and cache line address-offsets do not change between hits). As used herein, a corresponding cache line is unchanged and stable between consecutive instances of a load instruction when a corresponding cache line maintains one or more of a same cache line index, a same cache line way, and a same cache line address offset between the consecutive instances. Alternatively, the corresponding cache line is changed and unstable between the consecutive instances of the load instruction when the corresponding cache line maintains at least one of a different cache line index, a different cache line way, or a different cache line address offset between the consecutive instances. By promoting the reusable data from the data reuse cache 124 to an LRN of the registers 212, the reusable data is configured to be available quicker for processing than from the data reuse cache 124. The reusable data is movable from the LRN into a physical register of the registers 212 with a near-zero latency to enable efficient processing by the execution unit 206.

In at least one example, the processor 202 executes two different threads on the processor core 204. First and second threads share execution time on the processor core 204, which causes the execution unit 206 to alternate between executing the first thread and the second thread. Each of the threads includes at least one instruction that references or relies on data that is processed or evaluated using a physical register. To enable shared use of the physical register as the processor core 204 switches back and forth between the different threads, the registers 212 include a pool of LRNs each mappable to one or more physical registers of the registers 212. Using LRNs and LRN pools configures the processor core 204 to execute each thread to load and store using different LRNs or different pools of LRNs. When a first LRN is referenced by a first thread, the execution unit 206 loads the physical register with first data moved from the first LRN. Later, the execution unit 206 loads the physical register with second data moved from a second LRN referenced by a second thread. The execution unit 206 securely switches back and forth between using the first LRN (or first LRN pool) to execute instructions of the first thread and using the second LRN (or second LRN pool) when executing the second thread, without corrupting the first and second data. The execution unit 206 controls the state of the physical register to alternate between the first data or the second data based on a load register number identifier (LRN ID) used in a load instruction referencing either the first LRN or the second LRN.

Other examples include use of virtual memory addresses by the data reuse cache 124, use of a self-broadcast to wake-up dependent operations rather than employ a conventional broadcast and leveraging logic in the load-store unit 208 to verify data correctness, such as ordering violation and data integrity. Further discussion of these and other examples is included in the following discussion with reference to the other figures.

FIG. 3 is a block diagram of a non-limiting example system 300 configured to employ cache line promotion to register techniques in a multi-core processor architecture with a split cache. The system 300 illustrates an example of the processor core 204 introduced above, which is depicted in FIG. 3 as a single integrated circuit having a plurality of cores 204(1) through 204(N). The processor core 204(1) is illustrated in greater detail and includes the execution unit 206 and the load-store unit 208, which are respective examples of the execution unit 206 and the load-store unit 208, as previously described. Although details of the processor core 204(N) are omitted for clarity in FIG. 3, the processor core 204(N) is configurable to include similar components and perform similar respective functions as the processor core 204(1).

The processor core 204(1) includes aspects of the cache system 210, including the level 1 cache 216(1) and a level 2 cache 216(2) included as part of the processor core 204(1). The level 1 cache 216(1) is implemented using a split cache architecture that is maintained as two separate level 1 caches, e.g., a level 1 instruction cache 302 and a level 1 data cache 304. A level 3 cache 216(3) of the cache system 210 is shared by the processor core 204(1) and the processor core 204(N). This architecture supports numerous technical features, including simultaneous operation in which data is read from the level 1 data cache 304 in parallel while loading instructions from the level 1 instruction cache 302. Other examples are also contemplated, e.g., in which the level 2 cache 216(2) is shared by the processor core 204(1) and the processor core 204(N), inclusion of a level 4 cache, and so forth.

Each of the plurality of cores 204(1) through 204(N) include the data reuse cache 124. The data reuse cache 124 is implemented in the processor core 204(1) to be located physically closer than the load-store unit 208 to the execution unit 206, and as such is physically closer to the execution unit 206 than each of the level 1 cache 216(1), the level 2 cache 216(2), the level 3 cache 216(3), and so forth. The data reuse cache 124 is accessible within the processor core 204(1) in parallel with the level 1 data cache 304 in this example through the load-store unit 208. The data reuse cache 124 at each of the plurality of processor cores 204(1) through 204(N) is “filled” using data communicated in a load response, e.g., in response to a “hit” to any of the cache levels 214 or other memory as further described in relation to the following discussion and corresponding figure. A variety of other examples are also contemplated.

FIG. 4 is a block diagram of a processing system 400 configured to employ cache line promotion to register techniques. In the illustrated example, the processing system 400 includes the execution unit 206, the load-store unit 208, the cache system 210, and the data reuse cache 124, as mentioned above.

The processing system 400 is configured to employ data reuse cache techniques to fill the data reuse cache 124 using load responses originating from the load-store unit 208 as virtual memory addresses. The processing system 400 is further configured to employ data reuse cache line promotion techniques to fill the registers 212 with data repeatedly accessed from unchanging data reuse cache lines of the data reuse cache 124. To understand how to fill the registers 212 by promoting recurrently hitting data reuse cache lines from the data reuse cache 124, it is useful to understand how the data reuse cache 124 is filled from the cache system 210 for processing the reused data.

In this example, data is already stored by the cache system 210 (e.g., at the level 1 data cache 304 of the cache levels 214). The data is loaded from the cache system 210 initially to process a load instruction 402 at the execution unit 206. The load instruction 402 represents a processor instruction that retrieves data from the memory 106, the cache system 210, or the data reuse cache 124 to be loaded into a register 212 for use by the execution unit 206. Load instructions 402 typically specify a memory address or cache location from which to fetch the data and a destination register where the retrieved data should be stored. Load instructions move data from memory hierarchies into the processor registers 212, enabling subsequent computational operations on that data by the execution unit 206. The load instruction 402 is received by the load-store unit 208 (e.g., from the execution unit 206) and used to access the cache system 210 to provide a load response 404, e.g., from the level 1 data cache 304. The load response 404 from the load-store unit 208 is then returned to the execution unit 206 (e.g., for loading to the registers 212), which is also leveraged to fill the data reuse cache 124. As explained below, existing load response buses from the load-store unit 208 are also usable to fill the data reuse cache 124, thereby conserving power and without employing additional hardware circuitry. A cache line size is configured, in one example, to match a width of these load response buses.

Data is served from the data reuse cache 124 faster than the load-store unit 208 is able to serve the data from the cache system 210. Through bypassing the load response 404 from the load-store unit 208, for example, the execution unit 206 is operable to fill the registers 212 based on data obtained directly from the data reuse cache 124. In an implementation, data is accessible to the execution unit 206 via the data reuse cache 124 in a fewer number of cycles than is achievable by serving the data from the cache system 210. Generating the load response 404 in reply to the load instruction 402 by loading data from the cache system 210 to the execution unit 206, for example, is typically performed in four cycles. However, loading the data from the data reuse cache 124 for processing by the execution unit 206 in response to a next instance of the load instruction 402 is performable in two cycles.

The data reuse cache 124 is illustrated as being configured to utilize virtual memory addresses 406 to locate corresponding data in the data reuse cache 124, as physical addresses are not always immediately available. Physical memory addresses of the load instruction 402 are not available in some instances until a translation lookaside buffer (TLB) translation is performed by the load-store unit 208. Accordingly, the virtual memory addresses 406 are utilized using respective physical tags 408 and data blocks 410, thereby improving efficiency.

In cases of aliasing, where multiples of the virtual memory addresses 406 point to the same physical location, the load instruction 402 potentially causes a miss at the data reuse cache 124 despite the data being available under a different virtual address. In response to data reuse cache misses, the load-store unit 208 serves the data from the cache levels 214 using the physical tags 408. Further, in an implementation the data reuse cache 124 supports load operations that align with a cache line boundary. Load operations that span more than one cache line are treatable as a miss and instead involve routing to the load-store unit 208 for servicing through the cache system 210, the memory 106, and so forth.

In one or more examples, reusable data maintained by regularly reused cache lines of the data reuse cache 124 is promotable to the registers 212, potentially reducing load-to-use latency to fewer cycles (e.g., one or fewer cycles) than typically used to load the data from the data reuse cache 124. In the illustrated example, the load-store unit 208 includes a data verification module 412 and the execution unit 206 includes a renaming module 414. In variations, aspects of the data verification module 412 and/or the renaming module 414 are implemented within the execution unit 206, within the data reuse cache 124, within the load-store unit 208, or distributed within a combination of the load-store unit 208, the execution unit 206, and the data reuse cache 124. The processing system 400 includes the filter module 126 embedded in the execution unit 206, which has the access filter 218. The filter module 126 is separate from but interfaces with other logic of the execution unit 206 and the data reuse cache 124.

The renaming module 414 manages two distinct but related processes: memory renaming and register renaming. Memory renaming involves mapping load instructions to LRNs, while register renaming maps LRNs to physical registers. This two-step process allows for efficient speculative execution and data reuse by providing an intermediate layer of indirection between load instructions and physical registers. The renaming module 414 is configured to map load instructions to LRNs when promoting data from the data reuse cache 124 to the registers 212. Specifically, when a load instruction is identified for promotion, the renaming module 414 first allocates an LRN from an available pool of LRNs and updates a memory rename table to associate the load instruction with that LRN. Subsequently, the LRN is mapped to an available physical register through the register renaming process.

The data verification module 412 is responsible for ensuring data stability and correctness (e.g., that the data is unchanged from one load instruction to a next load instruction) when promoting cache lines from the data reuse cache 124 to registers 212. Whether a data reuse cache line is promotable is verified by the data verification module 412 by checking for potential invalidations, such as stores to the same address or cache line evictions. The data verification module 412 is configurable to trigger pipeline flushes or other recovery techniques if changes are detected, e.g., due to changing cache line data. The data verification module 412, in at least one example, also handles cases where promoted data becomes stale or invalid. For example, when a store instruction modifies data of a load instruction that has been promoted from the data reuse cache 124 to an LRN, the data verification module 412 invalidates the promotion (e.g., by causing the hit counter 418 to reset to zero, applying a marking to that cache line, and so forth) and the processing system 400 reverts to accessing the data from the cache system 210 and memory hierarchy. This involves causing the access filter 218 and the renaming module 414 to update the memory rename table and clear other data maintained on behalf of the filter module 126 for the demoted or invalidated load instruction.

Training information 416 is used by the filter module 126 to identify load instructions that regularly hit the same cache line in the data reuse cache 124. This information indicates, as some non-limiting examples, access patterns, hit/miss history, and cache line stability. For example, consecutive instances of a load instruction are stable when a corresponding data reuse cache line maintains one or more of a same cache line index, a same cache line way, and a same cache line address offset between the consecutive instances. Consecutive instances of a load instruction are not stable when a corresponding data reuse cache line maintains at least one of a different cache line index, a different cache line way, or a different cache line address offset between the consecutive instances. The training information 416 is used for determining which data reuse cache lines in the data reuse cache 124 are unchanging (e.g., over a time window) and therefore suitable candidates for promotion to registers.

The filter module 126 uses the hit counter 418 in conjunction with a stability threshold to determine when a data reuse cache line is to be promoted to the registers 212. The stability threshold, for instance, is a configurable value that represents the minimum number of consecutive unchanged hits before considering a cache line for promotion. The stability threshold is configurable based on empirical data and is adjustable dynamically based on system performance metrics in variations. For example, the stability threshold is initially set to eight indicating that a cache line that hits unchanged eight consecutive times is the criteria before the data reuse cache line is considered for promotion. If the hit counter 418 reaches or exceeds the stability threshold, the cache line is deemed a candidate for register promotion.

The stability threshold is dynamically adjustable based on various factors, such as cache pressure, promotion success rate, performance metrics, workload characteristics, and so forth. If the data reuse cache 124 is experiencing high pressure (e.g., frequent evictions), the stability threshold is increased to ensure stable lines are promoted. If promoted lines are frequently invalidated, the stability threshold is increased to improve prediction accuracy. If the system 400 is not achieving desired performance gains, the stability threshold is lowered to promote more aggressively. Different types of workloads benefit from different stability thresholds. The system 400 adjusts the stability threshold based on detected workload patterns corresponding to the different types of workloads.

In variations, the filter module 126 implements a sliding window approach to calculate the stability metric that is based on the hit counter 418 but adjusted for changing performance. For instance, a ratio of unchanged hits to total accesses within the last N accesses, where N is a configurable window size is evaluated against a comparable stability threshold for that window. The system 400 is operable to adapt to changing access patterns quickly.

The system 400 implements multiple stability thresholds in variations for different levels of promotion confidence. The different stability thresholds include, for instance, a lower threshold for initial promotion to an LRN, a higher threshold for direct promotion to a physical register, and an even higher threshold for long-term retention in a promoted state. Multi-level threshold allow for more nuanced promotion decisions, balancing aggressive optimization with avoiding frequent mispredictions.

The tag 420 is used to identify specific entries in the filter module 126. The tag 420 is derivable from the program counter of the load instruction or other unique identifiers. The tag 420 enables the filter module 126 to associate the training information 416 and the hit counter 418 with a particular load instruction.

The access filter 218 is configurable to use the training information 416, the hit counter 418, and the tag 420 to make decisions about allowing or restricting access to the data reuse cache 124. The access filter 218 is enhanced to include stability tracking capability to serve as a training feature for speculative memory renaming. In addition to controlling access to the data reuse cache 124 using the hit counter 418, the access filter 218 is configured as a stability tracker that restricts when the hit counter 418 increments to indicate stability. The access filter 218 allows the hit counter 418 to increment when aspects of the corresponding data reuse cache line (e.g., cache line index, way, and address offset) remain unchanged from a previous hit. The access filter 218 refrains from incrementing the hit counter 418 (e.g., the hit counter resets to zero) to indicate stability when one or more aspects of the data reuse cache line change. In at least one example, when instability is detected, the corresponding cache line of the data reuse cache is unmarked to indicate the data is stale. Unmarking the corresponding cache line causes a subsequent instance of the load instruction to be processed by accessing the data from the cache system 210 or the memory 106, as the data is evicted from the data reuse cache 124 and the registers 212. By filtering out load instructions that are unlikely to hit in the data reuse cache 124, unnecessary access attempts are avoided, which improves overall efficiency.

The data reuse cache to register promotion process performed by the system 400 encompasses several steps that enable efficient speculative execution while maintaining data integrity. Initially, the filter module 126 identifies load instructions eligible for promotion by evaluating stability (e.g., whether changes or no changes occur) and hit rate in the data reuse cache 124. The filter module 126 determines eligibility for promotion from the data reuse cache 124 based on a PC or IP of the load instruction 402. Once eligible instructions are identified, the renaming module 414 allocates an appropriate LRN from the available pool and updates the memory rename table accordingly. The renaming module 414 furthers the promotion by replacing architectural register destinations with LRNs for promotable loads and mappings of the allocated LRNs to physical registers to process subsequent occurrences of the loads. The renaming module 414 maps eligible load instructions to LRNs of the registers 212, which establishes a link between the load instruction 402 and a corresponding LRN.

Following the allocation, the data verification module 412 ensures the stability of the promoted data. This verification step maintains data integrity throughout the promotion process. Upon successful verification, the renaming module 414 completes the promotion by mapping the allocated LRN to a physical register through the register renaming process. This final mapping step enables the execution unit 206 to access the promoted data directly from the physical register.

By implementing this multi-step promotion process, the processing system 400 achieves a balance between speculative execution for improved performance and the ability to recover from potential mispredictions or data inconsistencies. This approach enhances overall efficiency while maintaining robustness for reliable processor operation.

In some cases, the renaming module 414 implements speculative memory renaming, where for future instances of a load instruction that are predicted to access the same data, the renaming module 414 proactively maps the instruction to an LRN. This speculation is trainable and verifiable using the data verification module 412 and the access filter 218.

The processing system 400, in variations, also implements a marking feature for promoted data reuse cache lines. When a cache line is identified as eligible for register promotion, the renaming module 414 applies a marking to designate this status. For promoted cache lines with this marking, the renaming module 414 allocates a temporary LRN from a pool of available LRNs within the registers 212. The data verification module 412 is configured to assist in verifying the eligibility of cache lines for promotion and ensuring the stability of the marked cache lines. The renaming module 414 maps the load instruction 402 to the allocated LRN using the memory rename table.

In response to detecting the marking on a subsequent access, the renaming module 414 automatically maps the physical register destination of that load instruction to the allocated LRN through register renaming. This process uses a register map within the renaming module 414 to map the LRN to a physical register number in the registers 212. If the speculation is successful, the execution unit 206 bypasses future load instructions, and directly accesses data from the renamed register in the registers 212, potentially reducing access latency to one cycle or even zero cycles.

If the speculation fails (e.g., aspects of the data reuse cache line change), the data verification module 412 triggers a pipeline flush or other recovery feature to clear that data reuse cache line. The renaming module 414 and the filter module 126 then update their respective tables and entries to reflect this change. Through register promotion of data reuse cache lines, the processing system 400 improves efficiency and performance without causing significant changes or complexity to existing data reuse cache 124 implementations.

FIG. 5 illustrates an instruction sequence 500 demonstrating instructions executed when implementing cache line promotion to register techniques. The instruction sequence 500 is described in the context of FIG. 4.

The instruction sequence 500 begins with a training phase. A load instruction (Ld rdi, []) maps the architectural register rdi to physical register prn100. This is followed by an add instruction that combines rax and rdi. During this phase, the filter module 126 and access filter 218 from FIG. 4 are monitoring the access patterns of the data reuse cache 124 and updating the hit counter 418 for this particular load instruction.

As the hit counter 418 reaches a stability threshold indicating recurring access to the same (e.g., unchanging) cache line in the data reuse cache 124, the system 400 initiates the promotion process. This is represented by the second load instruction (Ld lrn1, rdi, []), where the renaming module 414 from FIG. 4 performs memory renaming by mapping the load instruction to LRN1 using a program counter-based memory rename table. Then, the renaming module 414 performs register renaming by mapping LRN1 to physical register prn102 and then, each time the promoted cache line data is loaded the data from the LRN1 is moved into physical register prn102.

The subsequent add instruction (Add rax, rdi) now operates using the promoted data from LRN1 and prn102. Promotions to LRNs and LRN pools enables the execution unit 206 to directly access the data from the physical register 212 without going through the data reuse cache 124 or the cache system 210.

Following the promotion, multiple instances of the same load instruction (Ld rdi, [], lrn1) are executed. For each of these, the processing system 400 reads the memory rename table and register map at dispatch to maintain the mapping of rdi to prn102. In the background, the data verification module 412 ensures that the promoted data remains valid and stable (e.g., unchanging).

Each load is followed by an add instruction that uses the promoted data, with the physical registers incrementing sequentially from prn103 to prn107. The instruction sequence 500 illustrates how the processing system 400 continues to benefit from the promoted data over multiple iterations.

As explained in the comments in the instruction sequence 500, after promotion, the previous instances of the load are bypassed. Instead of loading from memory 106, the cache system 210, or the data reuse cache 124 for each iteration, the data is accessed directly from the physical register prn102. This bypass feature enables the data reuse cache line promotion techniques to significantly reduce data access latency.

Throughout this example, the filter module 126 continues to monitor access patterns, updating the training information 416 and hit counter 418. The tag 420 is used to associate these statistics with the specific load instruction. This process forms the basis for speculative memory renaming, where future instances of the load instruction are predicted to access the same data and are proactively mapped to an LRN. For example, if inconsistencies or instabilities are detected, such as a store to the same address, the data verification module 412 triggers a recovery mechanism, potentially reverting to standard cache access techniques involving the cache system 210. This recovery process includes updating the memory rename table and clearing associated entries in the filter module 126. This example demonstrates how execution of the instruction sequence 500 causes the various components described in FIG. 4 to implement data reuse cache line promotion to registers, resulting in more efficient data access and improved overall system performance.

FIG. 6 is a flow diagram depicting a procedure 600 in a non-limiting example implementation of a method for performing operations of a data reuse cache implementing cache line promotion to register techniques. For example, the procedure 600 is an example implementation of operations of the data reuse cache 124. The procedure 600 is depicted as a series of steps, referred to as Block 602 through Block 614, and represents one example of the procedure 600. In variations, one or more of the steps are omitted, replaced, duplicated, or rearranged among the other steps of the procedure 600. The procedure 600 is executable across one or more processor cores 120, 122 by the central processing unit 102 or accelerator unit 110.

The procedure 600 incorporates speculative memory renaming, where the renaming module 414 predicts and proactively maps future load instructions to LRNs using training information 416 and hit counters 408. The data verification module 412 verifies this speculation by checking for invalidations or changes in promoted data. Through multiple steps of the procedure 600, speculative execution is balanced with misprediction recovery, reducing access latency, and enhancing overall processing performance.

At Block 602, the procedure 600 begins with the load-store unit 208 obtaining a first instance of a load instruction 402. For example, the load instruction 402 originates from the execution unit 206 or from the program code 134 stored in system memory 106.

Block 604 involves storing data for a load response 404 to the load instruction 402 in one or more cache levels 214 of the cache system 210. The data is stored in the level 1 cache 216(1), for instance, which is divisible into an instruction cache 302 and a data cache 304 as shown in FIG. 3.

At Block 606, the execution unit 206 processes second instances of the load instruction by accessing the data from the cache levels 214. The data is accessed from the cache levels 214 repeatedly during a time window, for example.

At Block 608, the data is promoted from the cache levels 214 to the data reuse cache 124. The promotion is managed by the filter module 126 and the access filter 218, and in aspects the data verification module 412, including using the training information 416 and the hit counter 418 to determine whether the data is a candidate for promotion. The procedure 600 enables efficient speculative execution while maintaining data integrity. At this point, the filter module 126 initially identifies load instructions eligible for promotion based on stability and hit rate in the data reuse cache 124.

At Block 610, the execution unit 206 processes third instances of the load instruction by accessing the data from the data reuse cache 124. The frequently accessed data is stored closer to the execution unit for faster access than from the cache levels 214. The third instances represent consecutive instances of the load instruction, where a corresponding cache line of the data reuse cache remains unchanged from one instance to the next.

At Block 612, the data is promoted from the data reuse cache 124 to the registers 212 of the execution unit 206. This promotion process involves two steps. First, the renaming module 414 allocates an LRN and associates it with the load instruction in the memory rename table. Then, it maps this LRN to an available physical register. For eligible instructions, the renaming module 414 performs memory renaming by allocating an LRN and updating the memory rename table. Subsequently, the renaming module 414 performs register renaming by mapping the LRN to a physical register.

After the data verification module 412 ensures the stability of the promoted data, then, at Block 614, the execution unit 206 processes fourth instances (e.g., subsequent instances) of the load instruction by accessing the data from a physical register that has been mapped to the LRN. This two-step mapping (load instruction to LRN, then LRN to physical register) allows for flexible and efficient data access while maintaining the ability to track and verify data stability.

This mapping is maintained by the renaming module 414 and verified by the data verification module 412. The fourth instances represent consecutive instances of the load instruction, where the data maintained in the LRN remains unchanged from one instance to the next. The central processing unit 102 and/or the accelerator unit 110, for example, progressively promotes data from the cache system 210 to the data reuse cache 124, and finally to the registers 212 (Blocks 602-614) for achieving high performance and efficient processing.

Although features and elements are described above in particular combinations, each feature or element is usable alone without the other features and elements or in various combinations with or without other features and elements. Many variations are possible based on the disclosure herein. While the systems and techniques have been described in language specific to structural features and/or methodological acts, it is to be understood that the systems and techniques defined in the appended claims are not limited to the specific features or acts described. Rather, the specific features and acts are disclosed as example forms of implementing the claimed subject matter.

Claims

1. A method comprising:

processing, at an execution unit, first plurality of instances of a load instruction by accessing data from a load response obtained from a load-store unit;
storing the data to a data reuse cache;
responsive to processing a second plurality of instances of the load instruction by accessing the data from the data reuse cache, promoting the data from the data reuse cache to a register based on a load register number of the execution unit; and
processing, at the execution unit, a third plurality of instances of the load instruction at the execution unit by accessing the data from the register based on the load register number.

2. The method of claim 1, wherein promoting the data from the data reuse cache to the register includes using an access filter to determine when to promote the data.

3. The method of claim 1, wherein promoting the data from the data reuse cache to the register includes renaming a memory address of a corresponding cache line of the data reuse cache based on a load register number identifier of the load register number.

4. The method of claim 1, wherein promoting the data from the data reuse cache to the register includes marking a corresponding cache line of the data reuse cache to indicate a promotion to the register.

5. The method of claim 4, further comprising:

unmarking the corresponding cache line of the data reuse cache to indicate the data is stale.

6. The method of claim 4, wherein accessing the data from the register is in response to verifying the corresponding cache line is marked.

7. The method of claim 1, wherein promoting the data from the data reuse cache to the register includes using an access filter to indicate a confidence that corresponding cache line of the data reuse cache is unchanged between consecutive instances of the load instruction.

8. The method of claim 7, wherein the confidence is based on a hit counter of the access filter.

9. The method of claim 8, further comprising:

incrementing the hit counter when the corresponding cache line is unchanged between the consecutive instances of the load instruction; and
zeroing the hit counter when the corresponding cache line is changed between the consecutive instances of the load instruction.

10. The method of claim 7, wherein:

the corresponding cache line is unchanged between the consecutive instances of the load instruction when the corresponding cache line maintains one or more of a same cache line index, a same cache line way, and a same cache line address offset between the consecutive instances; and
the corresponding cache line is changed between the consecutive instances of the load instruction when the corresponding cache line maintains at least one of a different cache line index, a different cache line way, or a different cache line address offset between the consecutive instances.

11. The method of claim 1, wherein storing the data to the data reuse cache comprises promoting the data from a cache level of a cache system that is separate from the data reuse cache.

12. A system comprising:

a cache system;
a load-store unit configured to generate a load response from the cache system for processing a first plurality of instances of a load instruction;
a data reuse cache configured to store data of the load response; and
an execution unit including a load register number, and configured to: process a second plurality of instances of the load instruction by accessing the data from the data reuse cache; and responsive to promoting the data from the data reuse cache to the load register number, process a third plurality of instances of the load instruction by accessing the data from the load register number.

13. The system of claim 12, wherein the load-store unit is configured to promote the data to the load register number by renaming a corresponding cache line of the data reuse cache to the load register number.

14. The system of claim 12, wherein the execution unit is configured to access the data from a physical register mapped to the load register number.

15. The system of claim 12, wherein the load-store unit is configured to promote the data to the load register number by applying a marking to a corresponding cache line of the data reuse cache to indicate a promotion to the load register number.

16. The system of claim 12, further comprising an access filter, and the load-store unit is configured to promote the data to the load register number when the access filter indicates a confidence that a corresponding cache line is unchanged between consecutive instances of the load instruction.

17. The system of claim 16, wherein:

a hit counter of the access filter is incremented when the corresponding cache line is unchanged between the consecutive instances of the load instruction; and
the hit counter is zeroed when the corresponding cache line is changed between the consecutive instances of the load instruction.

18. A device comprising a processor including at least one core including:

a cache system configured to generate a load response for processing a first plurality of instances of a load instruction;
a data reuse cache configured to store data of the load response in a corresponding cache line;
an execution unit configured to process a second plurality of instances of the load instruction by accessing the data from the data reuse cache; and
a load-store unit configured to promote the data from the data reuse cache to a load register number of the execution unit for accessing the data to process a third plurality of instances of the load instruction.

19. The device of claim 18, further comprising an access filter, wherein the load-store unit is configured to promote the data to the load register number when the access filter indicates a confidence that a corresponding cache line is unchanged between consecutive instances of the load instruction.

20. The device of claim 19, wherein the load-store unit is configured to promote the data to the load register number when a hit counter of the access filter satisfies a stability threshold indicating the cache line is unchanged by renaming a memory address of the corresponding cache line to the load register number.

Patent History
Publication number: 20260377181
Type: Application
Filed: May 23, 2025
Publication Date: Nov 26, 2026
Applicant: Advanced Micro Devices, Inc. (Santa Clara, CA)
Inventors: Alok Garg (Maynard, MA), Matthew T. Sobel (Boxborough, MA), Scott Thomas Bingham (Sunnyvale, CA)
Application Number: 19/217,648
Classifications
International Classification: G06F 9/30 (20180101); G06F 9/32 (20180101); G06F 12/0811 (20160101);