Register State Saving with Temporal Ordering for Hazard Avoidance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing data processing systems face challenges in saving register values during context switches, leading to data dependency hazards, unpredictable and slow exception handling latency, and delayed processing due to incomplete state saving and restoration mechanisms.

Innovation Solution

A data processing apparatus with state saving control circuitry that detects the destination register and selects a temporal order for saving register values to a backup data store, ensuring the result value is written before the state saving process begins, thus avoiding data dependency hazards and maintaining predictable latency without delaying processing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If the state saving operation is started before the currently executing operation completes, then the interrupt latency is reduced, but data dependency hazards occur because the register state may not include the recently calculated result value

Engineering Contradiction:
Improveinterrupt latencyVSAvoiddata dependency hazard
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The register saving operation is segmented into two distinct phases: first saving all registers except the destination register, then saving the destination register after the currently executing operation completes. This segmentation allows the state saving to start early (reducing latency) while ensuring the destination register is saved at the correct time (avoiding data dependency hazards).

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The state saving operation performs preliminary action by saving all registers except the destination register before the currently executing operation completes. This allows the state saving to progress in parallel with the currently executing operation, reducing interrupt latency while the destination register is saved at the appropriate time to avoid data dependency hazards.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the currently executing operation is allowed to complete before starting the state saving operation, then data dependency hazards are avoided, but the interrupt latency becomes unpredictable and increases

Engineering Contradiction:
Improvedata dependency hazardVSAvoidinterrupt latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The register saving operation is segmented into two distinct phases: first saving all registers except the destination register, then saving the destination register after the currently executing operation completes. This segmentation allows the state saving to start early (reducing latency) while ensuring the destination register is saved at the correct time (avoiding data dependency hazards).

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The state saving operation performs preliminary action by saving all registers except the destination register before the currently executing operation completes. This allows the state saving to progress in parallel with the currently executing operation, reducing interrupt latency while the destination register is saved at the appropriate time to avoid data dependency hazards.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If the currently executing instruction is abandoned midway through execution on occurrence of a state saving trigger event, then data dependency hazards are avoided, but the processing speed decreases because the abandoned instruction must be executed again

Engineering Contradiction:
Improvedata dependency hazardVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The register saving operation is segmented into two distinct phases: first saving all registers except the destination register, then saving the destination register after the currently executing operation completes. This segmentation allows the state saving to start early (reducing latency) while ensuring the destination register is saved at the correct time (avoiding data dependency hazards).

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The state saving operation performs preliminary action by saving all registers except the destination register before the currently executing operation completes. This allows the state saving to progress in parallel with the currently executing operation, reducing interrupt latency while the destination register is saved at the appropriate time to avoid data dependency hazards.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8661232B2Register state saving and restoring
Publication Date: 2014.02.25 ARM LTD
  • US8661232B2 patent drawing
  • US8661232B2 patent drawing
  • US8661232B2 patent drawing

AI summary

In a data processing apparatus 1 having registers 6, when a state saving trigger event occurs while a result value of a data processing operation is still to be written to a destination register then saving and restoring control circuitry 12 selects a state saving sequence defining a temporal order for saving register values to a backup data store 10. The sequence is selected to provide the destination register with a position within the sequence corresponding to a time after the result value has been written to the destination register. The register values are then saved to the backup data store 10 in the order of the selected state saving sequence. A similar technique can be used when a state restoring trigger event triggers loading of the data values from the backup data store 10 to the registers 6.