VLSI Signal Processing Spring 2015
In-Cheol Park Dept. of EE, KAIST
- 2 -
- 3 -
Main Textbook:
Keshab K. Parhi, “VLSI Digital Signal Processing Systems: Design and Implementations”, John Wiley & Sons, 1999.
Grade
A: 40 ~ 60%
B: 40 ~ 60%
C: 0 ~ 10%
Grade factors
Homework
Projects
Presentations
Attendance
- 4 -
• Graph Representations
• Iteration Bound
• Pipelining & Parallel Processing
• Retiming
• Unfolding
• Folding
• Systolic Architecture
• Fast convolution
• Algorithmic Strength Reduction
• Low-Power Design
• Numerical Strength Reduction
• Bit-level Arithmetic Architecture
• Redundant Arithmetic
• Etc.
DSP Representations
In-Cheol Park Dept. of EE, KAIST
- 6 -
- 7 -
- 8 -
- 9 -
- 10 -
- 11 -
- 12 -
- 13 -
- 14 -
- 15 -
Shortest Path Algorithms
2015. 03
In-Cheol Park Dept. of EE, KAIST
- 17 -
,
otherwise ,
exists if , edge theoflength the)(
VUVUVUw
ee
e
- 18 -
A single-source shortest path algorithm for a graph with non-negative edge path costs
Published in 1959 by Edsger Dijkstra
O(|V|2) , where |V| is the number of vertices
O(|E|+|V|log|V|) with a min-priority queue, where |E| is the number of edges,
- 19 -
1. Assign a tentative distance value to every node .
zero for the initial node and infinity for all other nodes.
2. Set the initial node as current. Mark all other nodes unvisited. Create the unvisited set.
3. For the current node, consider its unvisited neighbors and calculate their tentative distances. Compare the newly calculated tentative distance to the current value and assign the smaller one.
For example, if the current node A is marked with a distance of 6, and the edge connecting it with a neighbor B has length 2, then the distance to B (through A) will be 6 + 2 = 8. If B was previously marked with a distance greater than 8 then change it to 8. Otherwise, keep the current value.
4. Mark the current node as visited and remove it from the unvisited set.
- 20 -
5. If the destination node has been marked visited, or if the smallest tentative distance among the nodes in the unvisited set is infinity (which occurs when there is no connection between the initial node and remaining unvisited nodes), then stop.
6. Select the unvisited node with the smallest tentative distance, and set it as the new "current node“. Go back to step 3.
- 21 -
- A Single-point shortest path algorithm that finds the shortest path from a chosen node to each node in the graph. - Finds the shortest path if no negative cycles exist. - O(n3) complexity
- 22 -
Shortest paths from U=2;
- 23 -
Shortest paths from U=2;
- 24 -
- An all-points shortest path algorithm that finds the shortest path Between any pair of nodes in the graph. - Finds the shortest path if no negative cycles exist. - O(n3)
- 25 -
- 26 -
Euclidean GCD Algorithm
In-Cheol Park Dept. of EE, KAIST
- 28 -
.032060
360163
60632186
631865993
GCD of (993, 186)
GCD of (993, 186) = 3
- 29 -
• GCD (a, 0) = a
• GCD (a, a) = a
• GCD (a, b) = GCD (b, a-b) when a > b
• GCD (a, b) = GCD (b, a mod b) when a > b
• GCD (a, b)∙ LCM (a, b) = a ∙ b
- 30 -
Theorem (Euclidean GCD Algorithm)
Given 2 positive integers s and r, their GCD can be computed by iteratively
applying the division algorithm. Suppose r < s, the algorithm is continued
iteratively as shown below:
,
,
,
,
,
11
12
3231
212
11
nnn
nnnn
rQr
rrQr
rrQr
rrQr
rrQs
and the process strops whenever the remainder is zero. The last nonzero
remainder rn is the GCD.
- 31 -
.),( brasrsGCD
321
2132
12
)()1(
)(
),(
nnnnn
nnnnn
nnn
n
rQrQQ
rQrQr
rQr
rrsGCD
.186169933
1861)1865993(3
1861633
)632186(163
60163
3)186,993(
GCD
Corollary: For any positive integers s and r,
there exist integers a and b such that
∵
Example,
2 1i i i ir r Q r
- 32 -
)()()()( xrxdxQxc
)()()(
),()()()(
),()()()(
),()()()(
),()()()(
11
12
3231
212
11
xrxQxr
xrxrxQxr
xrxrxQxr
xrxrxQxr
xrxrxQxs
nnn
nnnn
),())(),(( xrxrxsGCD n
Theorem (Division algorithm for polynomials)
For 2 polynomials c(x) and nonzero d(x), there is a unique pair of polynomials
Q(x) and r(x) such that
Theorem (Euclidean GCD algorithm for polynomials)
Given the polynomials s(x) and r(x) over certain field, their GCD can be
computed by applying iteratively the division algorithm. Suppose deg s(x) >=
deg r(x) >= 0, then this computation is carried out iteratively as
and the process stops when the remainder is zero. Then
where α is a scalar.
- 33 -
).()()()())(),(( xrxbxsxaxrxsGCD
3 2 2( ) 1, ( ) 2 1.s x x x x r x x x
( ( ), ( )) 2( 1)GCD s x r x x
Corollary : For any polynomials s(x) and r(x),
there exist polynomials a(x) and b(x) such that
Example,
).22)(2
1
2
1()(
),22()()1()(
xxxr
xxrxxs
)()1()())(),(( xrxxsxrxsGCD
( ) 1 and ( ) ( 1).a x b x x
Scheduling and Allocation Techniques
In-Cheol Park Dept. of EE, KAIST
- 35 -
High-Level Synthesis
is believed to be NP-hard
- 36 -
Scheduling: assigning every node of the DFG to control time steps Resource Allocation: assigning operations to hardware to
minimize the amount of hardware Resource–constrained synthesis (area-constrained) Time-constrained synthesis (performance-constrained) High-level synthesis Low-level optimization
- 37 -
yxuyyxdx
ydy
dx
du
dx
dyyuyyxy
3333
033
2
2
}
;;;
;*
);**3()***3(
;
{while
uluylyxlx
dxuyyl
dxydxuxuul
dxxxl
a) (x
Add the nodes of the DFG to the schedule one node at a time Two simple methods: As Soon as Possible (ASAP), As Late as Possible (ALAP)
Example: Second-order differential equation
- 38 -
- 39 -
Assumption: Unlimited Resources
- 40 -
Assumption: Unlimited Resources
- 41 -
- 42 -
- 43 -
- 44 -
j
j
L
Si
ixiDGjForceSelf )](*)([)(_
25.0
))5.0(*333.2())5.0(*833.2(
))5.00(*333.2())5.01(*833.2(
))2(*)2(())1(*)1((
)2()1()1(_
44
444
xDGxDG
ForceForceForceSelf
MM
25.0
))5.0(*333.2())5.0(*833.2(
))2(*)2(())1(*)1((
)2()1()2(_
44
444
xDGxDG
ForceForceForceSelf
MM
- 45 -
75.0
))5.0(*833.0())5.0(*333.2(
))5.01(*833.0())5.00(*333.2(
))3(*)3(())2(*)2((
)3(_)2(_)2(_
88
884
xDGxDG
ForceSelfForceSelfForceSucc
MM
4 4 4(2) _ (2) _ (2)
0.25 0.75 1.00
Force Self Force Succ Force
- 46 -
- 47 -
2nd-Order IIR Filter (Biquad Filter)
- 51 -
1
minimize ( * )k k
m
t t
k
c M
kti
k
FUo
tji mkTjforMx .1 ,1 ,0,
.1 ,1, niforxi
i
L
Sj
ji
. ,1)*()*( ,, ki
L
Sj
L
Sj
jkji ooxjxji
i
i
i
such that
; Resource Constraints
; Allocation Constraints
; Dependence Constraints
- 52 -
u.t. d c u.t. an cAssume alumult 15
)*1*5( alumult MMMinimize
.0
0
0:
3,53,8
2,52,82,42,3
1,51,41,21,1
mult
mult
mult
Mxx
Mxxxx
MxxxxMultiplier
.0
0
0
0 :
4,104,94,11
3,103,63,93,7
2,102,62,9
1,6
alu
alu
alu
alu
Mxxx
Mxxxx
Mxxx
MxALU
- 53 -
.1 ,1
1 ,1
1 ,1
1 ,1 ,1 ,1 1,
10,410,310,26,36,26,1
9,49,39,25,35,25,1
8,38,24,24,1
11,47,33,22,11,1
xxxxxx
xxxxxx
xxxx
xxxxx
.143232
143232
1322
10,410,310,26,36,26,1
9,49,39,25,35,25,1
8,38,24,24,1
xxxxxx
xxxxxx
xxxx
.1,1,1
,1,1,1,1
,1,1,1,1
11,410,29,4
8,37,36,15,3
4,23,22,11,1
xxx
xxxx
xxxxSolution: