System-on-Chip Design Analysis of Control Data Flow
Hao Zheng Comp Sci & Eng U of South Florida
1
System-on-Chip Design Analysis of Control Data Flow Hao Zheng Comp - - PowerPoint PPT Presentation
System-on-Chip Design Analysis of Control Data Flow Hao Zheng Comp Sci & Eng U of South Florida 1 Overview DF models describe concurrent computa=on at a very high level Each actor describes non-trivial computa=on. Each actor is
1
2
3
4
Control Edges
1 2 3 4 5
int max(int a, b) if (a > b) r = a r = b return r;
5
Data Edges
1 2 3 4 5
a, b b a r r (a>b)
6
7
a b c v2 v1
adder adder
1 2 3 4 1 2 3 4
a, b c v1 v2 Control Edges Data Edges Hardware Implementation
8
9
for (i=0; i < 20; i++) { // body of the loop }
1 2 3
entry 2 exit body 1 3
10
if(a < b) { // true branch } else { // false branch }
entry 1
1
true false exit
11
while (a < b) { // loop body }
1
entry 1 exit body
12
do { // loop body } while (a<b)
1
entry 1 exit body
13
1: int gcd(int a, int b) { 2: while (a != b) { 3: if (a > b) 4: a = a - b; else 5: b = b - a; } 6: return a; }
1 2 3 4 5 6
14
1 2 3 4 5 6
a b a, b (a>b) (a!=b)
1: int gcd(int a, int b) { 2: while (a != b) { 3: if (a > b) 4: a = a - b; else 5: b = b - a; } 6: return a; }
1 2 3 4 5 6
15
1: int gcd(int a, int b) { 2: while (a != b) { 3: if (a > b) 4: a = a - b; else 5: b = b - a; } 6: return a; } 1 2 3 4 5 6
a b b a a a a, b a, b a a b b a, b a, b
16
1
1: int L[3] = {10, 20, 30}; 2: for (int i=1; i<3; i++) 3: L[i] = L[i] + L[i-1];
2a 2b 3 2c exit
2a 2b 2c
17
1 2a 2b 3 2c
i i i L L L[1]
1 2a 2b 3 2c
i i i L[0], L[1], L[2] i i
i i
18
1 2a 2b 3 2c
i i i L L L[1]
1 2a 2b 3 2c
i i i L[0], L[1], L[2] i i
i i
L[2]
19
20
21
22
23
1: int gcd(int a, int b) { 2: while (a != b) { 3: if (a > b) 4: a = a - b; else 5: b = b - a; } 6: return a; }
a b in_a
!= >
flag_while flag_if
upd_a upd_b
b-a a-b
24
s1 s2 s3 s4 s5 s6
_ / run1 flag_while / _ ! flag_if / _ flag_if / _ ! flag_while / _ _ / run5 _ / run4
25
upd_b upd_a instruction
_ run1 run4 run5 a a_in a - b a b b_in b - a b state
Next-state Logic
flag_while flag_if upd_a upd_b command {_, run1, run4, run5}
Datapath
in_a in_b
flag_while flag_if upd_a upd_b
Lookup Table
26
27
28
29
b1 a1 b2 a2
>
flag_while flag_while a3 b3
int gcd(int a1, b1) { while (merge(a1, a2) != merge(b1, b2)) { a3 = merge(a1, a2); b3 = merge(b1, b2); if (a3 > b3) a2 = a3 – b3; else b2 = b3 – a3; } return a; }
30