Variable-Length Instruction Encoding Using Predictive Word Masks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for encoding and decoding instructions from an instruction set face challenges in achieving high code density and flexibility, particularly when using variable length instruction words, which can increase hardware complexity and make it difficult to add new instructions without reducing code density and efficiency.

Innovation Solution

The method involves re-ordering and grouping bits in instructions into variable-length instruction words based on empirical or simulation data, omitting words that match predicted values to create a compressed version, allowing for different instructions to use different numbers of words, and using a mask to selectively remove words, thereby improving code density and flexibility.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If variable length instruction words are used to increase code density, then code density is improved, but hardware complexity increases

Engineering Contradiction:
Improvecode densityVSAvoidhardware complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The instruction is divided into multiple fixed-length words (e.g., 32-bit words) that can be selectively omitted. Instead of using truly variable-length encoding, the patent segments the instruction into fixed-size units and uses a compact representation that indicates which segments are present, thereby reducing hardware complexity while maintaining code density improvements.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent uses a partial action approach by selectively omitting certain instruction words based on a compact mask or encoding scheme. Not all possible words are included in every instruction, allowing the hardware to process only the necessary portions, which reduces the complexity of handling fully variable-length instructions while still achieving compression.

Inventive Principle:
Principle #16Partial or excessive action

2Quantity of substance

If variable length instruction words are used to improve code density, then code density is improved, but difficulty in adding new instructions increases

Engineering Contradiction:
Improvecode densityVSAvoidease of adding new instructions
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

By segmenting instructions into fixed-length words with a systematic encoding scheme, the patent creates a modular structure that makes it easier to add new instructions. New instructions can be constructed by combining different segments or modifying existing ones without requiring complete redesign of the variable-length encoding system.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The encoding scheme is designed to be universal, supporting both common and less common instructions through the same mechanism. The compact representation and selective omission approach works for all instruction types, providing a unified framework that facilitates adding new instructions without creating special cases.

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

3Quantity of substance

If shorter instruction words are used to increase code density, then code density is improved, but functionality of the instruction set is limited

Engineering Contradiction:
Improvecode densityVSAvoidinstruction set functionality
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The patent uses segmentation to overcome the functionality limitation of short instruction words. By dividing instructions into multiple fixed-length segments, the system can represent complex functionality across multiple segments while maintaining compact individual word sizes. This allows the instruction set to retain full functionality without requiring each individual word to be long.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11868775B2Encoding and decoding variable length instructions
Publication Date: 2024.01.09 IMAGINATION TECH LTD
  • US11868775B2 patent drawing
  • US11868775B2 patent drawing
  • US11868775B2 patent drawing

AI summary

Methods of encoding and decoding are described which use a variable number of instruction words to encode instructions from an instruction set, such that different instructions within the instruction set may be encoded using different numbers of instruction words. To encode an instruction, the bits within the instruction are re-ordered and formed into instruction words based upon their variance as determined using empirical or simulation data. The bits in the instruction words are compared to corresponding predicted values and some or all of the instruction words that match the predicted values are omitted from the encoded instruction.