Decode Unit Handling Illegal Jumps to Base Instructions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The ambiguity in program code due to the use of prefix instructions can lead to unpredictable program behavior and errors, especially in secure or safety-critical applications, where illegal jumps can cause unexpected errors and difficulties in debugging.

Innovation Solution

The proposed solution involves using modifier bits to indicate whether an instruction is subject to modification by another instruction, and implementing methods to fetch and decode both current and preceding or following instructions to identify base instructions and invoke exception handling when illegal jumps occur, thereby reducing ambiguity and ensuring predictable program execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If prefix instructions are used to modify base instructions, then code density is improved and instruction richness is enhanced, but program ambiguity increases and reliability deteriorates

Engineering Contradiction:
Improveinstruction richnessVSAvoidprogram predictability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent applies preliminary action by checking whether a prefix instruction immediately precedes a base instruction before execution. The decode unit proactively verifies the presence and validity of modifying instructions in advance, identifying illegal jumps to base instructions before they can cause unpredictable behavior. This preventive approach maintains the flexibility of prefix instructions while eliminating reliability issues by ensuring proper instruction sequencing.

Inventive Principle:
Principle #10Preliminary action

2Quantity of substance

If prefix instructions are used to modify base instructions, then code density is improved, but device complexity increases

Engineering Contradiction:
Improvecode densityVSAvoiddecode unit complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent applies segmentation by dividing the instruction validation process into distinct functional components within the decode unit. The decode unit is segmented to specifically handle prefix instruction detection and validation as a separate function from base instruction decoding. This modular approach manages complexity by organizing the decoding logic into manageable segments that can be independently implemented and verified.

Inventive Principle:
Principle #1Segmentation

3Reliability

If modifier bits are added to instructions to indicate base instruction status, then reliability is improved by reducing ambiguity, but instruction length increases

Engineering Contradiction:
Improveprogram predictabilityVSAvoidinstruction length
Core Design Contradiction:
ReliabilityVSLength of moving object

Solution Approach 1:

The patent applies local quality by adding modifier bits only to specific instruction types that require them - specifically to base instructions that can be modified by prefixes. Not all instructions require these additional bits, only those that are subject to prefix modification. This selective approach improves reliability where needed while minimizing the impact on overall instruction length and code density.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10379861B2Decoding instructions that are modified by one or more other instructions
Publication Date: 2019.08.13 MIPS TECH INC
  • US10379861B2 patent drawing
  • US10379861B2 patent drawing
  • US10379861B2 patent drawing

AI summary

Methods and apparatus are provided for decoding instructions in a computer program wherein the instructions include one or more base instructions that are subject to modification by one or more other instructions. A decoder determines whether a first received instruction was arrived at by a non-incremental change to a program counter (i.e. a jump in the program). If the first instruction was arrived at by a non-incremental change to the program counter the decoder decodes the immediately preceding instruction to determine if the original instruction is a base instruction subject to modification by one or more other instructions. If the preceding instruction indicates that the original instruction is a base instruction an error has occurred and exception handling code is invoked.