Processor Reciprocal Instruction Lookup Table Accuracy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing reciprocal and square root reciprocal instructions in processors suffer from relatively low accuracy (2−11) and fail to provide correct results for very small or denormal values, necessitating software workarounds and additional iterations.

Innovation Solution

Implementing user-level instructions (VRCP14 and VRSQRT14) that perform reciprocal and square root reciprocal operations with a relative accuracy of 2−14, using a modified algorithm with a lookup table and full sign elimination, allowing single iteration processing and reduced hardware requirements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing RCP and RSQRT instructions are used, then hardware implementation is simple, but accuracy is low (2^-11) and fails for denormal values

Engineering Contradiction:
Improvereciprocal operation accuracyVSAvoidinstruction implementation complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The reciprocal calculation is divided into two segments: a lookup table providing initial approximation and a correction term. The lookup table handles the bulk of the computation while the correction term refines the result, achieving high accuracy without requiring a completely complex hardware implementation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The lookup table pre-computes reciprocal values for standard ranges, providing a preliminary accurate result before applying correction terms. This preliminary action eliminates the need for complex real-time computation while maintaining high precision.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If additional iterations of algorithm are performed to increase accuracy, then measurement precision improves, but software overhead increases

Engineering Contradiction:
Improvereciprocal operation accuracyVSAvoidsoftware overhead
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent replaces iterative software algorithms with a hardware-based lookup table approach. Instead of performing multiple software iterations to improve accuracy, the hardware directly provides high-precision results through pre-computed tables and correction terms, eliminating software overhead while maintaining precision.

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

Solution Approach 2:

The patent changes the computational parameters by using a lookup table with correction terms instead of iterative algorithms. This parameter change allows achieving high accuracy (2^-14) in a single operation without the time cost of multiple iterations.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If secondary path is used to handle denormal operands, then correctness for denormal values is achieved, but processing speed decreases

Engineering Contradiction:
Improvecorrectness for denormal valuesVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The lookup table is designed to handle all input types universally, including normal and denormal values. By making the table universal, the patent eliminates the need for separate handling paths, achieving both correctness for denormal values and high processing speed in a single unified operation.

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

Data Source

PatentUS8706789B2Performing reciprocal instructions with high accuracy
Publication Date: 2014.04.22 INTEL CORP
  • US8706789B2 patent drawing
  • US8706789B2 patent drawing
  • US8706789B2 patent drawing

AI summary

In one embodiment, the present invention includes a method for receiving a reciprocal instruction and an operand in a processor, accessing an entry of a lookup table based on a portion of the operand and the instruction, generating an encoder output based on a type of the reciprocal instruction and whether the reciprocal instruction is a legacy instruction, and selecting portions of the lookup table entry and input operand to be provided to a reciprocal logic unit based on the encoder output. Other embodiments are described and claimed.