Piecewise Linear Log Circuits for Single-Cycle Hardware Math
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional systems for logarithmic and antilogarithmic computations on hardware processors rely on look-up tables (LUTs) and multipliers, which are area-intensive and take up to 5-8 clock cycles, limiting processing speed and efficiency.
Innovation Solution
Implementing logarithm and anti-logarithm operations using linear piecewise approximation, eliminating the need for LUTs and multipliers by converting floating-point numbers to log base 2 equivalent fixed-point numbers and back, allowing for single clock cycle latency and reduced area and power consumption.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If look-up tables and multipliers are used for logarithmic computations, then computation accuracy is maintained, but hardware area and processing time increase significantly
Solution Approach 1:
The patent divides the logarithmic computation domain into multiple segments or intervals. Each segment is approximated using a simple linear function with pre-computed coefficients. This segmentation allows the complex logarithmic function to be broken down into multiple simple linear segments, achieving both accuracy (by using enough segments) and speed (by using simple linear calculations instead of complex LUT/multiplier operations).
Solution Approach 2:
The patent transforms the computational parameters by changing from direct logarithmic computation to piecewise linear approximation. By representing the logarithm function as a series of linear segments with different slopes and intercepts, the computation shifts from complex multiplication-based operations to simpler addition and subtraction operations, dramatically improving processing speed while maintaining acceptable accuracy.
2Measurement precision
If look-up tables are used for logarithmic computations, then computation accuracy is maintained, but hardware area consumption increases
Solution Approach 1:
The patent extracts only the essential characteristics of the logarithmic function needed for accurate computation, which are the linear approximation coefficients for each segment. Instead of storing complete LUT entries for all possible input values, the method extracts and stores only the minimal set of coefficients (slopes and intercepts) required to reconstruct the logarithmic values through linear equations, dramatically reducing memory requirements.
Solution Approach 2:
The patent replaces expensive, large LUT structures with cheaper, compact linear coefficient representations. The linear coefficients require minimal storage space compared to full LUT entries, and the computation using these coefficients is much faster and uses less hardware resources, effectively using a 'cheaper' approximation method that achieves the same functional goal.
3Measurement precision
If multipliers are used for logarithmic computations, then computation accuracy is maintained, but processing time and energy consumption increase
Solution Approach 1:
The patent substitutes the mechanical multiplication operation with simpler arithmetic operations. Instead of using multiplier circuits that perform complex binary multiplication, the method uses linear approximation equations that require only addition and subtraction operations. This substitution of the computational mechanism dramatically reduces processing time and energy consumption while maintaining acceptable accuracy for the application.
Data Source
AI summary
Implementations of the disclosure provide logarithm and anti-logarithm operations on a hardware processor based on linear piecewise approximation. An example processor includes a piece wise linear log approximation circuit that receives an input of a floating-point number comprising a sign, an exponent and a mantissa. The piece wise linear log approximation circuit approximates a fractional portion of a fixed point number using a linear approximation of the mantissa of the floating-point number. The piece wise linear log approximation circuit also derives an integer from the exponent.


