Code Prefetch Instruction for Lower Fetch Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The latency of fetching data from memory in computer systems decreases performance, and existing prefetching techniques for data can lead to cache pollution and self-modifying code scenarios.

Innovation Solution

Implementing a code prefetch instruction in the instruction set architecture (ISA) to prefetch code to the instruction cache and/or instruction translation lookaside buffer, allowing execution at the fetch stage of the pipeline instead of the execute stage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If data prefetching techniques are used to move data from main system memory to cache, then the time required to fetch data is reduced, but cache pollution and self-modifying code scenarios occur

Engineering Contradiction:
Improvedata fetch timeVSAvoidcache pollution and self-modifying code
Core Design Contradiction:
Loss of timeVSObject-generated harmful factors

Solution Approach 1:

The patent segments the memory hierarchy into separate instruction cache and data cache structures. By implementing distinct prefetch mechanisms for instructions (using instruction cache) versus data (using data cache), the system avoids the cache pollution problem that occurs when data prefetching techniques are applied to code, while still enabling effective prefetching for both purposes simultaneously.

Inventive Principle:
Principle #1Segmentation

2Productivity

If code is fetched during the execute stage, then instruction execution can proceed, but the latency increases and performance decreases

Engineering Contradiction:
Improveinstruction execution throughputVSAvoidinstruction fetch latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent implements code prefetching that retrieves instructions during the fetch stage of the pipeline, performing the prefetch action before the execute stage begins. This preliminary fetching of instructions into the instruction cache eliminates the latency penalty during execution, allowing the processor to maintain high throughput without waiting for memory access during the critical execute phase.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12423075B2Code prefetch instruction
Publication Date: 2025.09.23 INTEL CORP
  • US12423075B2 patent drawing
  • US12423075B2 patent drawing
  • US12423075B2 patent drawing

AI summary

Embodiments of apparatuses, methods, and systems for code prefetching are described. In an embodiment, an apparatus includes an instruction decoder, load circuitry, and execution circuitry. The instruction decoder is to decode a code prefetch instruction. The code prefetch instruction is to specify a first instruction to be prefetched. The load circuitry to prefetch the first instruction in response to the decoded code prefetch instruction. The execution circuitry is to execute the first instruction at a fetch stage of a pipeline.