# US 2013/0254486 A1 · Speculative cache modification

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

- Number: US 2013/0254486 A1
- Document ID: US20130254486A1
- Status: Published application
- Kind: A1
- Application number: 13/992,354
- Filed: 2011-12-22
- Published: 2013-09-26
- Earliest claimed: 2011-12-22
- Assignees: Intel Corporation
- Inventors: James E. McCormick, JR.
- Web page: https://patentgrep.com/patent/US20130254486A1

## CPC

- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/3834: {Maintaining memory consistency}
- G06F 9/3842: {Speculative instruction execution}
- G06F 9/38585: {with result invalidation, e.g. nullification}
- G06F 9/3861: {Recovery, e.g. branch miss-prediction, exception handling (error detection or correction G06F11/00)}
- G06F 12/0855: Overlapped cache accessing, e.g. pipeline (G06F12/0846 takes precedence)
- G06F 12/0893: Caches characterised by their organisation or structure
- G06F 13/4068: {Electrical coupling}
- G06F 12/0802: Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F 12/0862: with prefetch
- G06F 2212/1016: Performance improvement
- G06F 2212/1028: Power efficiency
- G06F 2212/1041: Resource optimization
- G06F 2212/452: Instruction code
- G06F 2212/507: using speculative control
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

In accordance with embodiments disclosed herein, there are provided methods, systems, mechanisms, techniques, and apparatuses for implementing a speculative cache modification design. For example, in one embodiment, such means may include an integrated circuit having a data bus; a cache communicably interfaced with the data bus; a pipeline communicably interfaced with the data bus, in which the pipeline is to receive a store instruction corresponding to a cache line to be written to cache; caching logic to perform a speculative cache write of the cache line into the cache before the store instruction retires from the pipeline; and cache line validation logic to determine if the cache line written into the cache is valid or invalid, in which the cache line validation logic is to invalidate the cache line speculatively written into the cache when determined invalid and further in which the store instruction is allowed to retire from the pipeline when the cache line is determined to be valid.

## Claims

### Claim 1

An integrated circuit comprising:
a data bus;
a cache communicably interfaced with the data bus;
a pipeline communicably interfaced with the data bus, the pipeline to receive a store instruction corresponding to a cache line to be written to cache;
caching logic to perform a speculative cache write of the cache line into the cache before the store instruction retires from the pipeline; and
cache line validation logic to determine if the cache line written into the cache is valid or invalid, wherein the cache line validation logic to invalidate the cache line speculatively written into the cache when determined invalid and wherein the store instruction is allowed to retire from the pipeline when the cache line is determined valid.

### Claim 2 (depends on 1)

The integrated circuit of claim 1, wherein the integrated circuit comprises a central processing unit for one of a tablet computing device or a smartphone.

### Claim 3 (depends on 1)

The integrated circuit of claim 1:
wherein the store instruction corresponding to the cache line to be written to cache comprises the store instruction to specify a register with an address; and
wherein the cache line to be written to cache is based on the address in the register.

### Claim 4 (depends on 1)

The integrated circuit of claim 1, wherein the integrated circuit to start and complete during two clock cycles of the integrated circuit both:
(a) receiving the store instruction corresponding to the cache line; and
(b) performing the speculative cache write of the cache line into the cache.

### Claim 5 (depends on 4)

The integrated circuit of claim 4:
wherein the pipeline to further receive a read instruction to read the cache line from the cache;
wherein the integrated circuit to start and complete during a single clock cycle of the integrated circuit both:
(a) receiving the read instruction for the cache line, and
(b) fulfilling the read instruction by reading the cache line from the cache; and
wherein the single clock cycle of the integrated circuit follows the two clock cycles of the integrated circuit without any intervening clock cycles on the integrated circuit.

### Claim 6 (depends on 1)

The integrated circuit of claim 1, wherein the cache comprises a Level 1 cache (L1 cache) at a lowest hierarchal cache level for the integrated circuit.

### Claim 7 (depends on 6)

The integrated circuit of claim 6, wherein the L1 cache comprises a single cycle latency L1 cache.

### Claim 8 (depends on 6)

The integrated circuit of claim 6, wherein the L1 cache comprises a 16 K (Kilobyte) 4-way set associative cache for a Central Processor Unit (CPU) embodied by the integrated circuit.

### Claim 9 (depends on 1)

The integrated circuit of claim 1, wherein the cache line validation logic to determine if the cache line written into the cache is valid or invalid comprises one of:
determining the cache line is valid when the store instruction retires from the pipeline;
determining the cache line is invalid when the pipeline is flushed before the store instruction retires;
determining the cache line is invalid when the pipeline processes a late replay for the store instruction corresponding to the cache line; and
determining the cache line is invalid when the pipeline processes a branch misprediction which causes a flush of the store instruction.

### Claim 10 (depends on 1)

The integrated circuit of claim 1, wherein the cache line validation logic further maintains indexing information for cache lines written to the cache via a speculative cache write.

### Claim 11 (depends on 10)

The integrated circuit of claim 10, wherein the indexing information maintains an index and a way for each cache line written to the cache via a speculative cache write.

### Claim 12 (depends on 10)

The integrated circuit of claim 10, further comprising:
a port to the cache capable to receive cache line invalidations; and
wherein the cache line validation logic to invalidate the cache line comprises the cache line validation logic to apply the indexing information for the cache line determined invalid against the port of the cache to invalidate the cache line in the cache.

### Claim 13 (depends on 1)

The integrated circuit of claim 1, further comprising cache line qualification logic to determine whether a second cache line corresponding to a second store instruction received at the pipeline is to be written to the cache via the speculative cache write or disqualified from being written to the cache via the speculative cache write.

### Claim 14 (depends on 13)

The integrated circuit of claim 13, wherein the cache line qualification logic to disqualify the second cache line from being written to the cache via the speculative cache write based on one or more of:
a pipeline flush of the second store instruction before the speculative cache write of the second cache line to the cache;
a branch misprediction involving a branch which includes the second store instruction;
a replay of the second store instruction corresponding to the second cache line; and
the second store instruction being predicated off causing the store instruction not to execute in the pipeline.

### Claim 15 (depends on 1)

The integrated circuit of claim 1, wherein the cache line validation logic to allow the store instruction to retire from the pipeline when the cache line is determined valid comprises retiring the cache line before subsequent instructions affecting the cache line arrive at the pipeline.

### Claim 16 (depends on 15)

The integrated circuit of claim 15, wherein retiring the cache line before subsequent instructions affecting the cache line arrive at the pipeline comprises:
detecting a snoop in the pipeline and responsively causing a replay of subsequent instructions.

### Claim 17 (depends on 1)

The integrated circuit of claim 1:
wherein the cache comprises a write through First Level Data (FLD) cache for a first core on the integrated circuit which is prohibited from storing dirty data and prohibited from operating as a source cache to other processor cores on the integrated circuit; and
wherein next level of cache on the integrated circuit operates as the source cache to other processor cores on the integrated circuit.

### Claim 18

A system comprising:
a display unit; and
an integrated circuit, wherein the integrated circuit comprises:
a data bus,
a cache communicably interfaced with the data bus;
a pipeline communicably interfaced with the data bus, the pipeline to receive a store instruction corresponding to a cache line to be written to cache,
caching logic to perform a speculative cache write of the cache line into the cache before the store instruction retires from the pipeline, and
cache line validation logic to determine if the cache line written into the cache is valid or invalid, wherein the cache line validation logic to invalidate the cache line speculatively written into the cache when determined invalid and wherein the store instruction is allowed to retire from the pipeline when the cache line is determined valid.

### Claim 19 (depends on 18)

The system of claim 18:
wherein the system embodies a tablet or a smartphone;
wherein the display unit comprises a touchscreen interface of the tablet or the smartphone; and
wherein the integrated circuit is incorporated into the tablet or smartphone.

### Claim 20 (depends on 18)

The system of claim 18, further comprising cache line qualification logic to determine whether a second cache line corresponding to a second store instruction received at the pipeline is to be written to the cache via the speculative cache write or disqualified from being written to the cache via the speculative cache write.

### Claim 21

A tablet computing device comprising:
a display unit; and
an integrated circuit, wherein the integrated circuit comprises:
a data bus,
a cache communicably interfaced with the data bus;
a pipeline communicably interfaced with the data bus, the pipeline to receive a store instruction corresponding to a cache line to be written to cache,
caching logic to perform a speculative cache write of the cache line into the cache before the store instruction retires from the pipeline, and
cache line validation logic to determine if the cache line written into the cache is valid or invalid, wherein the cache line validation logic to invalidate the cache line speculatively written into the cache when determined invalid and wherein the store instruction is allowed to retire from the pipeline when the cache line is determined valid.

### Claim 22

A method in an integrated circuit, the method comprising:
receiving a store instruction at a pipeline of the integrated circuit, the store instruction corresponding to a cache line to be written to a cache;
writing the cache line to the cache of the integrated circuit via a speculative cache write before the store instruction retires from the pipeline;
determining if the cache line speculatively written into the cache is valid or invalid;
invalidating the cache line in the cache when the cache line is determined to be invalid; and
allowing the store instruction to retire from the pipeline when the cache line is determined to be valid.

### Claim 23 (depends on 22)

The method of claim 22, wherein determining if the cache line written into the cache is valid or invalid comprises one of:
determining the cache line is valid when the store instruction retires from the pipeline;
determining the cache line is invalid when the pipeline is flushed before the store instruction retires;
determining the cache line is invalid when the pipeline processes a late replay for the store instruction corresponding to the cache line; and
determining the cache line is invalid when the pipeline processes a branch misprediction which causes a flush of the store instruction.

### Claim 24 (depends on 22)

The method of claim 22, further comprising:
receiving a second store instruction at the pipeline of the integrated circuit, the second store instruction corresponding to a second cache line; and
determining whether the second cache line is to be written to the cache via the speculative cache write or disqualified from being written to the cache via the speculative cache write.

### Claim 25 (depends on 24)

The method of claim 24, wherein determining the second cache line is to be disqualified comprises disqualifying the second cache line from being written to the cache via the speculative cache write based on one or more of:
a pipeline flush of the second store instruction before the speculative cache write of the second cache line to the cache;
a branch misprediction which causes a flush of the store instruction;
a replay of the second store instruction corresponding to the second cache line; and
the second store instruction being predicated off causing the store instruction not to execute in the pipeline.
