- •Contents
- •1 Introduction
- •1.1 Objectives
- •1.2 Overview
- •2 Background
- •2.1 Digital Design for DSP Engineers
- •2.1.2 The Field-Programmable Gate Array
- •2.1.3 Arithmetic on FPGAs
- •2.2 DSP for Digital Designers
- •2.3 Computation Graphs
- •2.4 The Multiple Word-Length Paradigm
- •2.5 Summary
- •3 Peak Value Estimation
- •3.1 Analytic Peak Estimation
- •3.1.1 Linear Time-Invariant Systems
- •3.1.2 Data-range Propagation
- •3.2 Simulation-based Peak Estimation
- •3.3 Hybrid Techniques
- •3.4 Summary
- •4 Word-Length Optimization
- •4.1 Error Estimation
- •4.1.1 Word-Length Propagation and Conditioning
- •4.1.2 Linear Time-Invariant Systems
- •4.1.3 Extending to Nonlinear Systems
- •4.2 Area Models
- •4.3.1 Convexity and Monotonicity
- •4.4 Optimization Strategy 1: Heuristic Search
- •4.5 Optimization Strategy 2: Optimum Solutions
- •4.5.1 Word-Length Bounds
- •4.5.2 Adders
- •4.5.3 Forks
- •4.5.4 Gains and Delays
- •4.5.5 MILP Summary
- •4.6 Some Results
- •4.6.1 Linear Time-Invariant Systems
- •4.6.2 Nonlinear Systems
- •4.6.3 Limit-cycles in Multiple Word-Length Implementations
- •4.7 Summary
- •5 Saturation Arithmetic
- •5.1 Overview
- •5.2 Saturation Arithmetic Overheads
- •5.3 Preliminaries
- •5.4 Noise Model
- •5.4.1 Conditioning an Annotated Computation Graph
- •5.4.2 The Saturated Gaussian Distribution
- •5.4.3 Addition of Saturated Gaussians
- •5.4.4 Error Propagation
- •5.4.5 Reducing Bound Slackness
- •5.4.6 Error estimation results
- •5.5 Combined Optimization
- •5.6 Results and Discussion
- •5.6.1 Area Results
- •5.6.2 Clock frequency results
- •5.7 Summary
- •6 Scheduling and Resource Binding
- •6.1 Overview
- •6.2 Motivation and Problem Formulation
- •6.3 Optimum Solutions
- •6.3.1 Resources, Instances and Control Steps
- •6.3.2 ILP Formulation
- •6.4 A Heuristic Approach
- •6.4.1 Overview
- •6.4.2 Word-Length Compatibility Graph
- •6.4.3 Resource Bounds
- •6.4.4 Latency Bounds
- •6.4.5 Scheduling with Incomplete Word-Length Information
- •6.4.6 Combined Binding and Word-Length Selection
- •6.5 Some Results
- •6.6 Summary
- •7 Conclusion
- •7.1 Summary
- •7.2 Future Work
- •A.1 Sets and functions
- •A.2 Vectors and Matrices
- •A.3 Graphs
- •A.4 Miscellaneous
- •A.5 Pseudo-Code
- •References
- •Index
5.5 Combined Optimization |
101 |
5.5 Combined Optimization
The method presented in Section 5.4 can be used to form an estimate EG(n, p, R) of the error variances incurred through the implementation of computation graph G with word-lengths n, binary point locations p, and input correlation matrix R[τ ] = E{x[t]x[t − τ ]T }, where x is the vector of system primary inputs. This estimate may then be compared to the user-specified bounds E on error variance at each output.
Since both the scaling and the word-length of each signal can have an impact on system error and area, the problem of finding a suitable annotation for the computation graph must now be treated as the combined optimization problem formulated below c.f. the Word-length Optimization Problem from Chapter 4.
Problem 5.10 (Combined Word-length and Scaling Optimization).
Given a computation graph G(V, S) and correlation matrix R, the combined word-length and scaling optimization problem may be defined as to select (n, p) such that AG(n, p) is minimized subject to (5.14).
n N|S| |
(5.14) |
p Z|S| |
|
EG(n, p, R) ≤ E |
|
To solve this optimization problem, it is necessary to modify Algorithm Word-LengthFalling from Section 4.4 to incorporate the optimization of binary point locations. This is performed by Algorithm CombOptAlg, where 1 represents a vector of ones of appropriate size, and k is the scaling factor as described in Section 4.4. Bj is a lower bound on the binary point location of signal j. Typically Bj is set to be a fixed, but reasonably large, number of bits beneath the binary point location implied by 1 scaling. Although Bj is rarely reached in practical designs with realistic error constraints, these bounds are required to theoretically ensure termination of Algorithm CombOptAlg. Reaching pj = Bj is considered equivalent to pj −∞. The interpretation of this value is that it is unnecessary to calculate signal j in order to satisfy the error constraints, and so the entire cone of logic creating signal j may be optimized away.
Unlike the error estimation used in Algorithm Word-LengthFalling, the error estimation subroutine used in Algorithm CombOptAlg contains some computationally expensive calculations, namely the post-adder saturation error and pdf estimation, which involves numerical integration and series approximations [AS70]. However the calls to adder saturation error estimation routines in the above algorithm exhibit a high degree of temporal locality. It is highly probable that a given pj will not change from one iteration to the next, and therefore the same error estimations are often required. Rather than re-calculate these each time, new error estimates for a given adder are only
102 5 Saturation Arithmetic
calculated when the c parameter of either input saturated Gaussian distribution is changed, or the c¯ post-adder saturation nonlinearity cut-o is changed (see Sections 5.4.2 and 5.4.3).
5.5 Combined Optimization |
103 |
Algorithm 5.3
Algorithm CombinedOptHeur Input: A Computation Graph G(V, S)
input correlation matrix R
Output: An Optimized Annotated Computation Graph G (V, S, A), (A = (n, p))
begin
Calculate the variance of each signal and the correlation coe cient between inputs to adders, to be used in all calls to the error estimation subroutine
Set p ← 1 scaling vector (as described in Section 3.1.1)
Determine u, the minimum uniform word-length satisfying EG(u · 1, p, R) ≤ E Set n ← ku · 1
do
Condition the graph G (V, S, A) Set currentcost ← AG(n, p) foreach signal j S do
Set bestmin ← currentcost
Determine w {2, ..., nj }, if such a w exists, such that
EG([n1 . . . nj−1 w nj+1 . . . n|S|]T , p, R) ≤ E and EG([n1 . . . nj−1 (w − 1) nj+1 . . . n|S|]T , p, R) E
If such a w exists, set minval ← AG([n1 . . . nj−1 w nj+1 . . . n|S|]T , p) If no such w exists, set minval ← AG([n1 . . . nj−1 1 nj+1 . . . n|S|]T , p)
if minval < bestmin do
Set bestsig ← j, bestmin ← minval, vartype ←word-length end if
Determine x {Bj + 1, ..., pj − 1, pj }, if such an x exists, such that
EG(n, [p1 . . . pj−1 x pj+1 . . . p|S|]T , R) ≤ E and EG(n, [p1 . . . pj−1 (x − 1) pj+1 . . . p|S|]T , R) E
If such an x exists, set minval ← AG(n, [p1 . . . pj−1 x pj+1 . . . p|S|]T ) If no such x exists, set minval ← AG(n, [p1 . . . pj−1 Bj pj+1 . . . p|S|]T )
if minval < bestmin do
Set bestsig ← j, bestmin ← minval, vartype ←scaling end if
end foreach
if bestmin < currentcost
if vartype = word-length
nbestsig ← nbestsig − 1 else
pbestsig ← pbestsig − 1 while bestmin < currentcost
end