An Operator-based Approach to the Unfolding Transformation
Transcript of An Operator-based Approach to the Unfolding Transformation
An Operator-Based Approach to the
Unfolding Transformation
Marvi Teixeira
Polytechnic University of Puerto Rico
IEEE MWSCAS 2008
Outline
� Definitions
� Applications
� Motivation /Objectives� Motivation /Objectives
� Mathematical Background
� The Role of Stride Permutations in Unfolding Data Flow Graphs of Cyclic Shifts
� An Operator-Based Approach to Unfold DFGs of Cyclic Shifts
� Unfolding DFGs of non-Cyclic shifts.
� Example
� Conclusions/Future Work
Definitions
� Unfolding can be seen as a technique that maps a
DSP program to a new program that describes two
or more iterations of the original program. or more iterations of the original program.
� The number of such iterations is called the unfolding
factor.
� The unfolding transformation can be applied to the
program’s data-flow graph (DFG).
Applications of Unfolding
� Design of high-speed and low-power VLSI architectures.
� Design of parallel architectures with implications regarding throughput increases or power consumption reductions.
� Others
Motivation
� Unfolding algorithms, even if proven to be
correct, appear to be developed ad hoc, may correct, appear to be developed ad hoc, may
have no clear theoretical origins and lack a
simple mathematical notation suitable for
further manipulation.
Objectives
� Ultimate Goal: Provide, within a unified theoretical
framework, an operator-based approach to unfold
DSP programs.DSP programs.
� Tackle first the problem of unfolding data flow graphs
of cyclic and non-cyclic shifts.
� Tackle more complicated DSP programs as future
work.
� The Cyclic Shift Operator:
0 0 0 ... 0 1 0 1 0 0 0 0 x x
Mathematical Background (a)
0 0 0 ... 0 1
1 0 0 ... 0 0
0 1 0 ... 0 0
0 0 1 ... 0 0
. . . .. . . .
0 0 0 ... 1 0
SN
=
0 1
1 2
2 3
3 4
4 5
5 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
1 0 0 0 0 0
56
x x
x x
x x
x x
x x
x x
S x
= =
Length-N, order 1, Cyclic Shift
Operator
Length-6 order 5 Cyclic Shift
Mathematical Background (b)
Data Flow Graph of a Cyclic Shift
0 1
1 2
2 3
3 4
4 5
5 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
1 0 0 0 0 0
56
x x
x x
x x
x x
x x
x x
S x
= =
x0
x1
x2
x3
x4
x5y5 = x0
y0 = x1
y1 = x2
y2 = x3
y3 = x4
y4 = x5
xi yj
Mathematical Background (c)
Blocking Circulant Matrices (a):� Circulant matrices of composite size can be reordered in
blocked form by using stride permutations. The result is a blocked form by using stride permutations. The result is a
Block Pseudocirculant Matrix.
xPPHPyP rNrNNrNrN 0000 ,
1
,,,
−=
1
,, 000
−= rNNrNpr PHPH
�The matrix associated to the cyclic shift operator is circulant and therefore amenable to be written in blocked form.
Mathematical Background (d)
�Blocking Circulant Matrices (b): Example
0 0
'1 2 ' 10
y y
y y yP y P y P H P P x
−
= = = = =
0 3 2 1 0h h h h x
h h h h x
1 2 ' 10
4 ,2 4 ,2 4 ,2 4 4 ,2 4 ,2'2 1 1
3 3
y y yP y P y P H P P x
y y y
y y
− = = = = =
1 0 3 2 11
4 ,2 4 ,2 4 ,2
2 1 0 3 2
3 2 1 0 3
h h h h xP P P
h h h h x
h h h h x
−
=
0 2 3 1 0
'2 0 1 3 2 0 2 1 '0
2'1 3 0 2 1 1 0 1
3 1 2 0 3
p
h h h h x
h h h h x H S H xH x
h h h h x H H x
h h h h x
= = =
1
4,2 4,2
1 0 0 0
0 0 1 0
0 1 0 0
0 0 0 1
P P−
= =
The Role of Stride Permutations in Unfolding the DFG of Cyclic Shifts (a)
{'
' 5 1 '
6 ,3 6 ,3 6 6 ,3 6 ,3
x
y P y P S P P x x−
= = =
p 3
p 3
S
S142 43
0 0
1 3 '
y y
y yy
1 3 '
0
2 1' ' 5 1
6 ,3 6 ,3 1 6 ,3 6 6 ,3 6 ,3
3 4 '
2
4 2
5 5
0
1
21
6 ,3 6 ,3 6 ,3
3
4
5
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
1 0 0 0 0 0
y yy
y yy P y P y P S P P x
y yy
y y
y y
x
x
xP P P
x
x
x
−
−
= = = = =
=
The Role of Stride Permutations in Unfolding DFGs of Cyclic Shifts (b)
0
3 '
2 0
1' ' '
2 1 p3
0 0 1 0 0 0
0 0 0 1 0 00 0
0 0 0 0 1 00 0
x
xI x
xy I x x
= = =
S2 1 p3
4 '
2 2
2
5
0 00 0 0 0 0 1
0 00 1 0 0 0 0
1 0 0 0 0 0
y I x xx
S xx
x
= = =
S
( ) ( ) ( )5 1 26 ,3 6 6 ,3 3 2 2 2 23
' ' ' 'p
y P S P x x S I S I I x−
= = = ⊗ ⊕ ⊕S
' '
2 2 0 2 0
' ' ' '
2 2 1 2 1 p3
' '
2 2 2 2 2
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
22 2 2 3
3 2
I S x I x
y I I x I x x
I I x S x
S I IS I p
= = =
⊕ ⊕⊗
S
S14424431442443 1442443
The Role of Stride Permutations in Unfolding DFGs of Cyclic Shifts (c)
' '
2 2 0 2 0
' ' ' '
2 2 1 2 1 p3
' '
2 2 2 2 2
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
22 2 2 33 2
I S x I x
y I I x I x x
I I x S x
S I IS I p
= = =
⊕ ⊕⊗
S
S14424431442443 1442443
x0
x3
x1
x4
x2
x5
x1
x4
x2
x5
x3
x0
2 2 2S I I⊕ ⊕ 2
3 2S I⊗
'
0y
'
1y
'
2y
'
0x
'
1x
'
2x
1
2 2S S=
2
2 2I S=
2
2 2I S=
22 2 2 33 2
S I IS I p⊕ ⊕
⊗S
( ) ( ) ( )5 1 26 ,3 6 6 ,3 3 2 2 2 23
' ' ' 'p
y P S P x x S I S I I x−
= = = ⊗ ⊕ ⊕S
An Operator Based Approach to Unfold DFGs of Cyclic Shifts (a)
(( )) 1
, ,' ' '
M N
p r N r N N ro o oy x P S P x
−= =S
S
14243p ro
S
( )1 /
(( ))
/0
(( ))
' '/
ro N roM r ooN rr oo i o
i MIn t
ry S I x
N rS
−
=
+
= ⊗
⊕
For M=5, N=6 and r0=3 this equation gives back the equation from previous example.
An Operator Based Approach to Unfold DFGs of Cyclic Shifts (b)
� The operator-based formulation in previous
equation effectively embodies an algorithm to
r0-unfold the DFG of an order-M cyclic shift r0-unfold the DFG of an order-M cyclic shift
acting on a length-N signal.
� A detailed proof by induction will be
published elsewhere.
Unfolding DFGs of non-Cyclic Shifts (a)
� Example: Unfold the DFG of a delay by five.
� y[n] = x[n-5]
� y[3k] = x[3k -5]= x[3(k-2) +1]
y[3k+1]= x[3k+1 -5]= x[3k -4]= x[3(k-2 )+2]� y[3k+1]= x[3k+1 -5]= x[3k -4]= x[3(k-2 )+2]
� y[3k+2] = x[3k+2 -5]= x[3k -3]=x[3(k-1)]
x y5D
'
0x
'
1x
'
2x
'
0y
'
1y
'
2y
1D
2D
2D
Unfolding DFGs of non Cyclic Shifts (b)
� By disregarding the modularity constraint, brought about by the circular reordering imposed by the cyclic shift, and by dropping the tensor formulation we obtain an operator-based expression suitable to unfold DFGs of non-cyclic shifts.suitable to unfold DFGs of non-cyclic shifts.
( )1
(( ))
0' '
roM r oo
ro i
i MInt
ry S xZ
−
=
+−
=
⊕
By letting M=5 and r0 = 3 we can 3-unfold the DFG of a non-cyclic delay by 5.
1 ' 2 '
0 0
' 2 ' 2 ' '
1 1 p3
2 ' 1 '
2 2
0 1 0 0 0 0 0
0 0 1 0 0 0 0
1 0 0 0 0 0 0
2 1 2 233
z x z x
y z x z x x
z x z x
S z z z p
− −
− −
− −
= = =
− − −⊕ ⊕
Z
Z
14243 1442443 1442443
( )1 /
(( ))
/0
(( ))
' '/
ro N roM r ooN rr oo i o
i MInt
ry S I x
N rS
−
=
+
= ⊗
⊕
Unfolding DFGs of non Cyclic Shifts (c)
1 ' 2 '
0 0
' 2 ' 2 ' '
1 1 p3
2 ' 1 '
2 2
0 1 0 0 0 0 0
0 0 1 0 0 0 0
1 0 0 0 0 0 0
z x z x
y z x z x x
z x z x
− −
− −
− −
= = =
Z
14243 1442443 1442443
( )1
(( ))
0' '
roM r oo
ro i
i MInt
ry S xZ
−
=
+−
=
⊕
x y5D
'
0x
'
1x
'
2x
'
0y
'
1y
'
2y
1D
2D
2D
2 21 0 0 0 0 0 0
2 1 2 233
z x z x
S z z z p
− − −⊕ ⊕
Z
14243 1442443 1442443
Unfolding DFGs of non Cyclic Shifts (d)
( )1
(( ))' '
roM r oo
r
i MInt
ry S xZ
−
+−
= ⊕
� The algorithm embodied by this formula was known to the community, but it was nor derived neither formulated in operator notation. Its relation to the problem of unfolding DFGs within the circular context was not made.
( )0
' 'oro i
y S xZ=
=
⊕
Example 2
� 2-unfold a length-6, order-5 cyclic shiftsuch as the one depicted previously:
Using r0=2, N = 6 and M = 5 in our expression Using r0=2, N = 6 and M = 5 in our expression gives:
{(( 5 )) 16
6 ,2 6 ,2 6 6 ,2 6 ,2
2
'
'p
y P y P S P P x
x
−= =
S
14243( )
16 / 2
(( 5 ))26 / 22
0
5(( ))
2' '
6 /2i
iInt
y S I xS=
+ = ⊗
⊕
( ) ( )1 12 0 2
3 3 3 32 3 2 3' ( ) ' ( ) 'y S I S S x S I S I x= ⊗ ⊕ = ⊗ ⊕
Example 2, cont’
' ' '2330 0 03
00 0'
IIy x xSy
= = =
( ) ( )1 12 0 2
3 3 3 32 3 2 3' ( ) ' ( ) 'y S I S S x S I S I x= ⊗ ⊕ = ⊗ ⊕
330 0 032' ' '
3 3 31 1 1
00 0'
0 0 0
IIy x xSy
I I Sy x x
= = =
x0
x2
x4
x1
x3
x5x0
x1
x3
x5
x2
x4
1
2 3S I⊗2
3 3S I⊕
2
3S
3I
'
0x
'
1x
'
0y
'
1y
Example 2, cont’: the non-cyclic case
' ' '2 30 0 0
' ' '3 21 1 1
0 1 0 0'
1 0 0 0
y x xz zy
y x xz z
− −
− −
= = =
2D
3D
'
0x
x y5D
'
1x
'
0y
'
1y
Conclusions and Future Work
� The new operator-based formulations
provide an unified framework and embody an
unfolding algorithm, which quickly leads to unfolding algorithm, which quickly leads to
unfolded DFGs of cyclic and non-cyclic shifts.
� DSP programs of higher complexity will be
the subject of future work.