CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y...

32
CDFG 2012-04-12 謝謝謝

description

3 PP-Cloud I_P() t1t1 O_P() abc t2t2 t3t3 t4t4 t5t5 y * * * 16 + ← I_P() ←←← >= 64 ←1 ← i system Time constraint (C : 6 unit time) (R : 3* 2+)

Transcript of CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y...

Page 1: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

CDFG

2012-04-12謝政宏

Page 2: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

2PP-Cloud

void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i<64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame; }}

O01: i=1O02: if(i>=64)goto O15O03: a=I_P()O04: b=I_P()O05: c=I_P()O06: t1=0.257*aO07: t2=0.504*bO08: t3=0.098*cO09: t4=t1+t2

O10: t5=t3+16O11: y=t4+t5

O12: O_P()=yO13: i++O14: goto O02O15: nop

I_P()

0.257

t1

O_P()

a b c

t2 t3

t4 t5

y

*

+ +

0.504*

0.098*

16

+

I_P() I_P()

←← ←

01

++

>=64

←1

isystem

CDFG

Page 3: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

3PP-Cloud

I_P()

0.257

t1

O_P()

a b c

t2 t3

t4 t5

y

*

+ +

0.504*

0.098*

16

+

I_P() I_P()

←← ←

01

++

>=64

←1

isystem

Time constraint(C : 6 unit time)(R : 3* 2+)

Page 4: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

4PP-Cloud

I_P()

0.257

O_P()

a b c

*

+

+

0.504*

0.098

*16

+

I_P() I_P()

←← ←

01

++

>=64

←1

isystem

Resource constraint(C : 2* 1+ per unit time)(R : 7 unit time)

Page 5: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

5PP-Cloud

cI_P() I_P()

0.257*

+

+

0.504*

0.098*

16

+

+

O_P()

I_P()a b

status

o1

o5

o2 o8

o3

o6o4

v1 v2

v3

v4 v6

v5

+o6 v7

v8

-64

1

cI_P() I_P()

0.257*

+

+

0.504*

0.098*

16

+

+

O_P()

I_P()a b

state0

o1

o5

o2 o8

o3

o6o4

v1 v2

v3

v4 v6

v5

+o6 v7

v8

-64

1

cI_P() I_P()

0.257*

+

+

0.504*

0.098*

16

+

+

O_P()

I_P()a b

status

o1

o5

o2 o8

o3

o6o4

v1 v2

v3

v4 v6

v5

+o6 v7

v8

-64

1

1

state1

state4

state5

state2

state3

status

state1

state4

state5

state2

state3

state1

state4

state5

state2

state3

Page 6: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

6PP-Cloud

cI_P() I_P()

0.257*

+

+

0.504*

0.098*

16

+

+

O_P()

I_P()a b

status

o1

o5

o2 o8

o3

o6o4

v1 v2

v3

v4 v6

v5

+o6 v7

v8

-64

1

loop body

Page 7: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

7PP-Cloud

Lifetime of values

v1 v2 v3 v4 v5 v6 V7 v8

cycle1

cycle2

cycle3

cycle4

cycle5

Lifetime of operations

o1 o2 o3 o4 o5 o6 o7 o8

cycle1

cycle2

cycle3

cycle4

cycle5

*

+

*

*+

+

+

+

+

*

* mul1 = {o1}

mul2 = {o2, o6}

add1 = {03, 04, 05, 07, 08}

R1 = {v1, v3, v4}

R2 = {v2, v6}

R3 = {v8}

R1

R2

R3

Page 8: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

8PP-Cloud

0.257 0.504

0 1

0.098

+**

R1 R2

R3

0 1sel1

0 1 0 1 2 3

0 1 0 1

sel3sel2

-64 1 16en3

en1 en2

sel5sel4

add1mul2mul1

OP_Y

IP_A IP_B IP_C

==0

status

datapath

Page 9: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

9PP-Cloud

datapathcontroller

sel1sel2sel3sel4sel5en1en2en3

clk

status

rst IP_A IP_B IP_C

OP_Yvalid

system

Page 10: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

10PP-Cloud

psns

sel1 sel2 sel3 sel4 sel5 en1 en2 en3rst=1 or status=1 else

state0 state0 state1 0 0 0 0 0 0 0 0

state1 state0 state2 0 0 0 x x 0 0 0

state2 state0 state3 0 0 1 0 0 1 1 1

state3 state0 state4 1 1 2 1 x 1 0 0

state4 state0 state5 1 1 3 1 0 1 1 0

state5 state0 state1 x 1 2 x x 0 0 0

state table

state table

state0

state1

state3

state2state4

state5

rst=1 or status=1

sel1=0 sel2=0 sel3=0 sel4=x sel5=x en1=0 en2=0 en3=0

sel1=0 sel2=0 sel3=1 sel4=0 sel5=0 en1=1 en2=1 en3=1

sel1=1 sel2=1 sel3=3 sel4=1 sel5=0 en1=1 en2=1 en3=0

sel1=x sel2=1 sel3=2 sel4=x sel5=x en1=0 en2=0 en3=0

sel1=0 sel2=0 sel3=0 sel4=0 sel5=0 en1=0 en2=0 en3=0

sel1=1 sel2=1 sel3=2 sel4=1 sel5=x en1=1 en2=0 en3=0

Page 11: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

11PP-Cloud

datapath (1/3)

Page 12: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

12PP-Cloud

datapath (2/3)

Page 13: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

13PP-Cloud

datapath (3/3)

Page 14: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

14PP-Cloud

controller (1/2)

Page 15: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

15PP-Cloud

controller (2/2)

Page 16: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

16PP-Cloud

testbench (1/2)

Page 17: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

17PP-Cloud

testbench (2/2)

Page 18: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

18PP-Cloud

testbench2 (1/4)

Page 19: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

19PP-Cloud

testbench2 (2/4)

Page 20: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

20PP-Cloud

testbench2 (3/4)

Page 21: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

21PP-Cloud

testbench2 (4/4)

Page 22: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

22PP-Cloud

pre simulation (1/2)

Page 23: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

23PP-Cloud

pre simulation (2/2)

Page 24: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

24PP-Cloud

system

Page 25: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

25PP-Cloud

controller

Page 26: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

26PP-Cloud

datapath

Page 27: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

27PP-Cloud

datapath (zoom in)

Page 28: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

28PP-Cloud

system(synthesis)

Page 29: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

29PP-Cloud

post simulation (1/3)

Page 30: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

30PP-Cloud

post simulation (2/3)

Page 31: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

31PP-Cloud

post simulation (3/3)

Page 32: CDFG 2012-04-12 謝政宏. 2 PP-Cloud void RGB_Y(I_Frame, O_Frame){ int y; for(int i=1; i64; i++){ y = 0.257*a + 0.504*b + 0.098*c + 16; write(y) to O_Frame;

32PP-Cloud