Circular Ordering Ring for Strong Load Ordering in Processors

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Out-of-order processors lack native hardware support for strong load ordering, leading to potential incorrect data observations when memory operations are executed out-of-order, which can result in faulty software execution and increased development time due to the need for manual insertion of memory barrier instructions.

Innovation Solution

A system comprising an ordering ring, scanning logic, and recovery logic that stores and manages in-flight memory instructions to detect and correct ordering violations, allowing load instructions to complete while flushing younger instructions and restarting execution to ensure data consistency with program order, thus enforcing strong load ordering without native hardware support.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If out-of-order execution is used to improve processor performance, then execution speed is improved, but memory ordering correctness deteriorates

Engineering Contradiction:
Improveexecution speedVSAvoidmemory ordering correctness
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent introduces an intermediary mechanism (ordering ring with scanning logic) that mediates between the out-of-order execution engine and the memory ordering requirements. This intermediary structure allows the processor to execute instructions out-of-order for performance while ensuring correct memory ordering through detection and recovery operations, effectively resolving the contradiction between speed and correctness.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements feedback mechanisms through scanning logic that continuously monitors the ordering ring for ordering violations. When a violation is detected, the system provides feedback by triggering recovery operations that restore correct ordering. This closed-loop feedback system enables the processor to maintain memory ordering correctness while benefiting from out-of-order execution performance.

Inventive Principle:
Principle #23Feedback

2Reliability

If memory barrier instructions are manually inserted to enforce strong load ordering, then memory ordering correctness is improved, but software development complexity increases

Engineering Contradiction:
Improvememory ordering correctnessVSAvoidsoftware development complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent enables the processor to self-service memory ordering enforcement through hardware-based detection and recovery mechanisms. The ordering ring and scanning logic automatically detect ordering violations and execute recovery operations without requiring software intervention. This self-service capability eliminates the need for manual memory barrier insertion, reducing software development complexity while maintaining correctness.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the mechanical approach of manually inserting memory barrier instructions with an automated hardware-based system. The ordering ring structure with scanning and recovery logic substitutes for software-based ordering enforcement, transferring the complexity from software to hardware where it can be more efficiently managed and maintained.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Reliability

If ordering ring with scanning logic is implemented to detect ordering violations, then memory ordering correctness is improved, but hardware complexity increases

Engineering Contradiction:
Improvememory ordering correctnessVSAvoidhardware complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the memory ordering enforcement function into distinct modular components: the ordering ring for storing instruction information, scanning logic for detection, and recovery logic for correction. This segmentation allows each component to be optimized independently and facilitates easier implementation and maintenance, reducing the overall complexity burden despite adding hardware functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The ordering ring structure serves multiple functions: it stores information about in-flight memory instructions, enables scanning for ordering violations, and facilitates recovery operations. This multi-functionality reduces the need for separate dedicated hardware components, thereby limiting the increase in hardware complexity while achieving comprehensive memory ordering enforcement.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11748109B2System and method for implementing strong load ordering in a processor using a circular ordering ring
Publication Date: 2023.09.05 MARVELL ASIA PTE LTD
  • US11748109B2 patent drawing
  • US11748109B2 patent drawing
  • US11748109B2 patent drawing

AI summary

A system and corresponding method enforce strong load ordering in a processor. The system comprises an ordering ring that stores entries corresponding to in-flight memory instructions associated with a program order, scanning logic, and recovery logic. The scanning logic scans the ordering ring in response to execution or completion of a given load instruction of the in-flight memory instructions and detects an ordering violation in an event at least one entry of the entries indicates that a younger load instruction has completed and is associated with an invalidated cache line. In response to the ordering violation, the recovery logic allows the given load instruction to complete, flushes the younger load instruction, and restarts execution of the processor after the given load instruction in the program order, causing data returned by the given and younger load instructions to be returned consistent with execution according to the program order to satisfy strong load ordering.