Reducing Hardware Complexity of Linear DSP Systems by Iteratively Eliminating Two- Term Common Subexpressions IEEE/ACM Asia South Pacific Design Automation Conference (ASP-DAC), Shanghai, 2005 Anup Hosangadi Ryan Kastner ECE Department, UCSB Farzan Fallah Advanced CAD Research Fujitsu Labs of America
31
Embed
IEEE/ACM Asia South Pacific Design Automation Conference (ASP-DAC), Shanghai, 2005
Reducing Hardware Complexity of Linear DSP Systems by Iteratively Eliminating Two-Term Common Subexpressions. IEEE/ACM Asia South Pacific Design Automation Conference (ASP-DAC), Shanghai, 2005. Anup Hosangadi Ryan Kastner ECE Department, UCSB. Farzan Fallah Advanced CAD Research - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Reducing Hardware Complexity of Linear DSP Systems by Iteratively Eliminating Two-Term Common Subexpressions
IEEE/ACM Asia South Pacific Design Automation Conference (ASP-DAC), Shanghai, 2005
Anup Hosangadi
Ryan Kastner
ECE Department, UCSB
Farzan Fallah
Advanced CAD Research
Fujitsu Labs of America
Outline
Introduction Related Work Polynomial transformation Common Subexpression
elimination Results Conclusions
Introduction
Multiplications by constants encountered in many application areas DSP transforms in Audio, Video, Image
processing (DFT, DCT, IDCT etc..) Filtering operations in Communication
Introduction Multiplication is expensive in hardware Decompose constant multiplications into shifts and
additions 13*X = (1101)2*X = X + X<<2 + X<<3
Signed digits can reduce the number of additions/subtractions
Canonical Signed Digits (CSD) (Knuth’74) (57)10 = (0110111)2 = (100-1001)CSD
Further reduction possible by common subexpression elimination
Upto 50% reduction (R.Hartley TCS’96)
Introduction Common subexpressions = common digit patterns
F1 = 7*X = (0111)*X = X + X<<1 + X<<2 F2 = 13*X = (1101)*X = X + X<<2 + X<<3
D1 = X + X<<2 F1 = D1 + X<<1 F2 = D1 + X<<3
Good for single variable: FIR filters (transposed form)
Multiple variable? (DFT, DCT etc..??)
“0101”
=> X + X<<23+, 3<<
4+, 4<<
Related Work Simple Bipartite matching (Potkonjak et. al
TCAD’95) (10101) and (01101) => common pattern = “101” (10010) and (010010) => cannot detect pattern “1001”
Recursive Shift and Add (RESANDS) (H.Nguyen et. Al, TVLSI 2000)
(10010) and (010010) => common pattern “1001”
Exhaustive enumeration of all digit patterns (Pasko et. Al. TCAD’99)
(1011) => “0011”, “1001”, “1010”, “0101”, “1011”
Related Work Extending techniques for multiple variables
Y1 a11 a12 a13 X1
Y2 = a21 a22 a23 x X2
Y3 a31 a32 a33 X3
k
kikjj
iji DCXSY k
kikjj
iji DCXSY
1 0 1 1 0 0
0 1 1 1 0 1
1 0 0 1 0 1
All Distinct SAll Distinct SijijXXjj and C and CikikDDkk
Y1
Y2
Y3
Potkonjak et. al. TCAD’95
Related Work Multiple Variable Common
Subexpression elimination (A.Hosangadi et. al ASAP’04) Polynomial transformation of linear systems. Use rectangular covering methods
Cannot find subexpressions with reversed signs eg. (X1 – X2<<1) ≠ (X2<<1 – X1) Common occurrence when signed digits are
used Rectangle covering has exponential complexity
Method to overcome these limitations ?
Related Work Algebraic methods in
multi-level logic synthesis (MLLS)
Reducing literal count in a set of Boolean expressions
Factoring, decomposition: Established algebraic techniques
Typically used for thousands of variables and literals
Apply these methods to optimize linear systems?
D1 = X1+ X2<<2
Y1 = D1 + D1<<3 + X1<<3
Y2 = D1 + X2<<2
Linear systems and polynomial transformation
View linear systems as set of arithmetic expressions Expressions consisting of +,-,<< operators Develop methodology for extracting common
subexpressions
Polynomial formulationC × X = (±X×Li)(14)10 × X = (1110)2 × X = X<<3 + X<<2 + X<<1 = XL3 + XL2 + XL1
= (100-10)CSD × X = XL4 – XL1
Linear Systems and polynomial transformation
Y0 1 1 1 1 X0
Y1 = 2 1 -1 -2 X1
Y2 1 -1 -1 1 X2
Y3 1 -2 2 -1 X3
Decomposing constant multiplications
Y0 = X0 + X1 + X2 + X3
Y1 = X0<<1 + X1 - X2 - X3<<1
Y2 = X0 - X1 - X2 + X3
Y3 = X0 - X1<<1 + X2<<1 - X3
Y0 = X0 + X1 + X2 + X3
Y1 = X0<<1 + X1 - X2 - X3<<1
Y2 = X0 - X1 - X2 + X3
Y3 = X0 - X1<<1 + X2<<1 - X3 12+, 4<<12+, 4<<
H.264 Integer Transform
Linear Systems and polynomial transformation
Y0 1 1 1 1 X0
Y1 = 2 1 -1 -2 X1
Y2 1 -1 -1 1 X2
Y3 1 -2 2 -1 X3
Polynomial transformation
Y0 = X0 + X1 + X2 + X3
Y1 = X0L + X1 - X2 - X3L
Y2 = X0 - X1 - X2 + X3
Y3 = X0 - X1L + X2L - X3
Y0 = X0 + X1 + X2 + X3
Y1 = X0L + X1 - X2 - X3L
Y2 = X0 - X1 - X2 + X3
Y3 = X0 - X1L + X2L - X3 12+, 4<<12+, 4<<
H.264 Integer Transform
Fx algorithm
Concurrent Decomposition and Factorization of Boolean Expressions (J.Rajski et. al TCAD’92) Popular as Fast-Extract (Fx) algorithm Expression f = gh + r
g = (ab + c) => Double cube divisor g = ab => Single cube divisor
Fx algorithm for Linear systems?
Two-term divisors Obtained from every pair of terms in each
expression Divide by the minimum exponent of L
eg. F = X1 + X2L + X3L3
{ +X2L, +X3L3}: Divide by L => (X2 + X3L2)
Divisors = (X1 + X2L), (X1 + X3L3), (X2 + X3L2)
Two divisors intersect if The terms involved are distinct (X1 – X2L) ∩ (X1 - X2L) = φ
{Divisors} = Set of all 2-term divisors; while( intersections present) { Find Best_Divisor in {Divisors} ; {T} = Set of terms involved in intersection; {D} = Set of divisors involving any term in
Algorithm (Step 1) Creating set of divisors {Divisors}; {Divisors} = φ; for each expression Pi { {Dnew} = Divisors for Pi; {Divisors} = {Divisors} ∩ {Dnew}; Update frequency statistics of
{Divisors} = Set of all 2-term divisors; while( intersections present) { Find Best_Divisor in {Divisors} ; {T} = Set of terms involved in intersection; {D} = Set of divisors involving any term in