Floating-Point Rounding Circuit with Dynamic Exponent Shifting
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing software-based implementation of the round to integral floating-point operation (FRINT) is slow due to the need for separate instruction fetching, decoding, and execution, and is limited by fixed rounding at the least significant bit of the significand, requiring additional processing cycles for normalization.
Innovation Solution
A hardware-based approach with processing circuitry that shifts a base value by an amount dependent on the exponent to generate a rounding value, adds it to the significand, and applies a mask to clear fractional bits, eliminating the need for subsequent shifts and normalizing the result directly.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a software-based implementation of the FRINT operation is used, then the operation can be performed with flexible rounding modes, but the latency is increased due to separate instruction fetching, decoding, and execution
Solution Approach 1:
The patent replaces the software-based FRINT operation with a hardware-based implementation using processing circuitry. The control circuitry receives a floating-point value and directly generates an integral floating-point result through hardware shifting, adding, and masking operations, eliminating the need for instruction fetching and decoding while maintaining rounding mode flexibility through control signals.
2Device complexity
If fixed rounding at the least significant bit of the significand is used, then the implementation is simpler, but additional processing cycles are required for normalization
Solution Approach 1:
The patent makes the shifting operation dynamic by shifting the base value by an amount dependent on the exponent of the floating-point value. This dynamic shifting approach allows the rounding position to adapt to different exponent values, eliminating the need for subsequent normalization cycles while maintaining implementation simplicity through the use of standard shifting, adding, and masking operations.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Processing circuitry is provided to perform an operation FRINT for rounding a floating-point value to an integral floating-point value. Control circuitry controls the processing circuitry to perform the FRINT operation in response to an FRINT instruction. The processing circuitry includes shifting circuitry for generating a rounding value by shifting a base value, adding circuitry for adding the rounding value to the significand of the floating-point value to generate a sum value, mask generating circuitry for generating a mask for clearing fractional-valued bits of the sum value,and masking circuitry for applying the mask to the sum value to generate the integral floating-point value.