50
VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST

VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

  • Upload
    lytruc

  • View
    229

  • Download
    1

Embed Size (px)

Citation preview

Page 1: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

VLSI Signal Processing Spring 2015

In-Cheol Park Dept. of EE, KAIST

Page 2: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 2 -

Page 3: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 4: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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.

Page 5: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

DSP Representations

In-Cheol Park Dept. of EE, KAIST

Page 6: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 6 -

Page 7: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 7 -

Page 8: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 8 -

Page 9: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 9 -

Page 10: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 10 -

Page 11: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 11 -

Page 12: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 12 -

Page 13: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 13 -

Page 14: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 14 -

Page 15: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 15 -

Page 16: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

Shortest Path Algorithms

2015. 03

In-Cheol Park Dept. of EE, KAIST

Page 17: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 17 -

,

otherwise ,

exists if , edge theoflength the)(

VUVUVUw

ee

e

Page 18: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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,

Page 19: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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.

Page 20: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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.

Page 21: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 22: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 22 -

Shortest paths from U=2;

Page 23: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 23 -

Shortest paths from U=2;

Page 24: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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)

Page 25: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 25 -

Page 26: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 26 -

Page 27: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

Euclidean GCD Algorithm

In-Cheol Park Dept. of EE, KAIST

Page 28: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 28 -

.032060

360163

60632186

631865993

GCD of (993, 186)

GCD of (993, 186) = 3

Page 29: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 30: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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.

Page 31: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 32: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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.

Page 33: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 34: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

Scheduling and Allocation Techniques

In-Cheol Park Dept. of EE, KAIST

Page 35: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 35 -

High-Level Synthesis

is believed to be NP-hard

Page 36: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 37: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 38: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 38 -

Page 39: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 39 -

Assumption: Unlimited Resources

Page 40: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 40 -

Assumption: Unlimited Resources

Page 41: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 41 -

Page 42: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 42 -

Page 43: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 43 -

Page 44: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 45: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 46: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 46 -

Page 47: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 47 -

2nd-Order IIR Filter (Biquad Filter)

Page 48: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 49: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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

Page 50: VLSI Signal Processing - KAISTics.kaist.ac.kr/ee877_2015s/1_Representations.pdf · VLSI Signal Processing Spring 2015 In-Cheol Park Dept. of EE, KAIST - 2 - - 3 - ... Projects Presentations

- 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: