high-level synthesis-ii
DESCRIPTION
High-Level Synthesis-II. Virendra Singh Indian Institute of Science Bangalore [email protected]. IEP on Digital System Synthesis @ IIT Kanpur. Architectural Synthesis. Architectural Level Abstraction Datapath Controller Architectural Synthesis - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/1.jpg)
High-Level Synthesis-II
Virendra SinghIndian Institute of Science
IEP on Digital System Synthesis @ IIT Kanpur
![Page 2: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/2.jpg)
Dec 18,2007 HLS@iitk 2
Architectural SynthesisArchitectural Level Abstraction
Datapath
Controller
Architectural Synthesis
• Constructing the macroscopic structure of a digital circuit starting from behavioural models that can be captured from Data flow or Sequencing Graph
![Page 3: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/3.jpg)
Dec 18,2007 HLS@iitk 3
Architectural Synthesis
Objective
• Area
• Cycle time
• Latency
• Throughput
Worst case bound
Evaluation
Architectural Exploration
![Page 4: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/4.jpg)
Dec 18,2007 HLS@iitk 4
Architectural Synthesis
Architectural synthesis tool can select an appropriate design point according to some user specific criterion and construct corresponding user specific Datapath and Controller
Circuit Specification for Architectural Synthesis
• Behavioural circuit model
• Details about resources being used and constraints
•Capture by Sequencing Graph
![Page 5: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/5.jpg)
Dec 18,2007 HLS@iitk 5
Architectural Synthesis
Resources
• Functional Resources
• Primitive Resources
• Application Specific Resources
• Memory Resources
• Interface Resources
![Page 6: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/6.jpg)
Dec 18,2007 HLS@iitk 6
Architectural Synthesis
Circuit Specification
• Sequencing Graph
• A set of functional resources, fully characterized in terms of area and execution delay
• A set of constraints
![Page 7: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/7.jpg)
Dec 18,2007 HLS@iitk 7
Architectural Synthesis
Computation: Differential Equation Solver
xl = x + dx
ul = u – (3*x*u*dx) – (3*y*dx)
c = xl < a
Data Flow Graph (DFG): represent operation and data dependencies
![Page 8: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/8.jpg)
Dec 18,2007 HLS@iitk 8
Data Flow Graph
* * * +
*
*
* + <
--
1 2
3
4
5
6
7
8
9
10
11
x
3
u dx 3 yu
dxx dx
u
dx y a
c
xl
yl
ul
![Page 9: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/9.jpg)
Dec 18,2007 HLS@iitk 9
Sequencing Graph
* * * +
*
*
* + <
--
NOP
NOP
1 2
3
4
5
6
7
8
9
10
11
![Page 10: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/10.jpg)
Dec 18,2007 HLS@iitk 10
Hierarchical Sequencing Graph
NOP
*
CALL
+
*
*+
NOP
NOP
NOP
a.0
a.3
a.2
a.1
a.4
a.n
b.0
b.n
b.2b.1
![Page 11: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/11.jpg)
Dec 18,2007 HLS@iitk 11
Architectural Synthesis
Architectural Synthesis and optimization consistes of two stages
1. Placing the operation in time and in space, i.e., determining their time interval of execution and binding to resources
2. Determining detailed interconnection of the datapath and the logic-level specifications of the control unit
![Page 12: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/12.jpg)
Dec 18,2007 HLS@iitk 12
Temporal Domain: Scheduling
Delay D = {di; i = 0,1, 2, ….. n}
Start time T ={ti; i= 0, 1, …., n)
Scheduling: Task of determining the start timing, subject to preceding constraints specified by sequencing graph
Latency λ = tn – t0
![Page 13: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/13.jpg)
Dec 18,2007 HLS@iitk 13
Temporal Domain: Scheduling
A scheduled sequencing graph is a vertex-weighted sequencing graph, where each vertex is labeled by its start time
Operation Start time
V1,V2, v6,v8, v10 1
V3, v7, v9,v11 2
V4 3
V5 4
Chaining
![Page 14: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/14.jpg)
Dec 18,2007 HLS@iitk 14
Temporal Domain: Scheduling
* * * +
*
*
* + <
--
NOP
NOP
1 2
3
4
5
6
7
8
9
10
11
TIME 1
TIME 2
TIME 3
TIME 4
![Page 15: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/15.jpg)
Dec 18,2007 HLS@iitk 15
Temporal Domain: Scheduling
*
*
*
+
*
*
*
+
<
-
-
NOP
NOP
1
2
3
4
5
6
7
8
9
10
11
TIME 1
TIME 2
TIME 3
TIME 4
TIME 5
TIME 6
TIME 7
![Page 16: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/16.jpg)
Dec 18,2007 HLS@iitk 16
Spatial Domain: Binding
A fundamental concept that relates operation to resources is binding
• Resource types
• Resource sharing
Simple case of binding is a dedicated resources
![Page 17: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/17.jpg)
Dec 18,2007 HLS@iitk 17
Spatial Domain: Binding
β(v1) = (1,1)
β(v2) = (1,2)
β(v3) = (1,3)
β(v4) = (2,1)
β(v5) = (2,2)
..
![Page 18: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/18.jpg)
Dec 18,2007 HLS@iitk 18
Spatial Domain: Binding
* * * +
*
*
* + <
--
NOP
NOP
1 2
3
4
5
6
7
8
9
10
11
TIME 1
TIME 2
TIME 3
TIME 4
![Page 19: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/19.jpg)
Dec 18,2007 HLS@iitk 19
Spatial Domain: Binding
A necessary condition for resource binding to produce a valid circuit implementation is that operation corresponding to the shared resource do not execute concurrently
A resource binding can be represented by a labeled hyper-graph, where the vertex set V represents operations and the edge set Eβ represents the binding of the operation to the resources
![Page 20: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/20.jpg)
Dec 18,2007 HLS@iitk 20
Spatial Domain: Binding
* * * +
*
*
* + <
--
NOP
NOP
1 2
3
4
5
6
7
8
9
10
11
TIME 1
TIME 2
TIME 3
TIME 4
n
(1,1) (1,2) (1,3) (1,4)(2,2)
(2,1)
![Page 21: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/21.jpg)
Dec 18,2007 HLS@iitk 21
Spatial Domain: Binding
* * * +
* **+
<
--
NOP
NOP
1 2
3
4
5
6
78
9
10
11
TIME 1
TIME 2
TIME 3
TIME 4
0
n
![Page 22: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/22.jpg)
Dec 18,2007 HLS@iitk 22
Sequencing Graph
* * * +
*
*
* + <
--
NOP
NOP
1 2
3
4
5
6
7
8
9
10
11
![Page 23: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/23.jpg)
Dec 18,2007 HLS@iitk 23
Hierarchical Sequencing Graph
NOP
*
CALL
+
*
*+
NOP
NOP
NOP
a.0
a.3
a.2
a.1
a.4
a.n
b.0
b.n
b.2b.1
(1,2)
(1,1)
(2,1)
![Page 24: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/24.jpg)
Dec 18,2007 HLS@iitk 24
Synchronization
* SYN
+ +
NOP
NOP
0
1a
2 3
n
![Page 25: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/25.jpg)
Dec 18,2007 HLS@iitk 25
Synchronization
*SYN
+ +
NOP
NOP
0
1
a
2 3
n
* SYN
+ +
NOP
NOP
0
1a
2 3
n
![Page 26: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/26.jpg)
Dec 18,2007 HLS@iitk 26
Synchronization
*SYN
+
+
NOP
NOP
0
1
a
2
3
n
![Page 27: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/27.jpg)
Dec 18,2007 HLS@iitk 27
Area/Performance Estimation
Accurate area and performance estimation is not an easy task
Schedule: provides latency
Binding: provides information about the area
![Page 28: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/28.jpg)
Dec 18,2007 HLS@iitk 28
Retiming
+
Host
δ
+
δ
+
δ δ
![Page 29: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/29.jpg)
Dec 18,2007 HLS@iitk 29
Retiming
Vg
Vh
Va
Vf
Vb
Ve
Vc Vd
7 7 70
3 3 3
3
00
0 0
0
00
11 1 1
![Page 30: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/30.jpg)
Dec 18,2007 HLS@iitk 30
Retiming
Vg
Vh
Va
Vf
Vb
Ve
Vc Vd
7 7 70
3 3 3
3
00
0 0
0
00
1 11 1
Delay = 24
![Page 31: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/31.jpg)
Dec 18,2007 HLS@iitk 31
Retiming
Vg
Vh
Va
Vf
Vb
Ve
Vc Vd
7 7 70
3 3 3
3
00
0 0
1
00
11 0 1
![Page 32: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/32.jpg)
Dec 18,2007 HLS@iitk 32
ASAP Scheduling
* * * +
*
*
* + <
--
NOP
NOP
1 2
3
4
5
6
7
8
9
10
11
TIME 1
TIME 2
TIME 3
TIME 4
![Page 33: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/33.jpg)
Dec 18,2007 HLS@iitk 33
ASAP Scheduling
ASAP(Gs(V,E)){
Schedule v0 by setting t0s = 1;
repeat{
select vertex vi whose predecessors are all scheduled;
schedule vi by setting tis = max{tjs+ dj}
} untill (vn is scheduled)
return ts
}
![Page 34: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/34.jpg)
Dec 18,2007 HLS@iitk 34
ALAP Scheduling
* *
*+
*
**+ <
--
NOP
NOP
1 2
3
4
5
6
7 8
9
10
11
TIME 1
TIME 2
TIME 3
TIME 4
![Page 35: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/35.jpg)
Dec 18,2007 HLS@iitk 35
Scheduling under Timing Constraints
Scheduling under latency constraints
Absolute constraints on start time
Relative constraints
Relative timing constraints are positive integers specified for some operation pair vi, vj
A minimum timing constraint lij ≥ 0 requires tj ≥ ti+lij
A maximum timing constraint uij ≤ 0 requires tj
≤ ti+uij
![Page 36: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/36.jpg)
Dec 18,2007 HLS@iitk 36
Constraint Graph
* *
+ +
NOP
NOP
0
13
2 4
n
Min
Time
4Max
Time
3
![Page 37: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/37.jpg)
Dec 18,2007 HLS@iitk 37
Constraint Graph0
4
* *
+ +
NOP
NOP
13
2
n
Min
Time
4
Max
Time
3
* *
+ +
NOP
NOP
13
2
n
4
0
0 04
222- 3
11
![Page 38: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/38.jpg)
Dec 18,2007 HLS@iitk 38
Relative SchedulingScheduling under unbounded delay
The anchors of a constraint graph G(V,E) consists of the source vertex v0and all vertices with unbounded delay
Redundant anchor
![Page 39: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/39.jpg)
Dec 18,2007 HLS@iitk 39
Sequencing Graph
1
3
* SYN
+ +
NOP
NOP
0
a
2
n
![Page 40: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/40.jpg)
Dec 18,2007 HLS@iitk 40
Scheduling with Resource Constraint
Scheduling under resource constraints
• computing area/latency trade-off points
Problems
• Intractable problem
•Area-performance trade-off points are affected by the other factors - non-resource dominated circuits
![Page 41: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/41.jpg)
Dec 18,2007 HLS@iitk 41
Scheduling with Resource Constraint
ILP Formulation
Binary decision variable X = {xil}
1. Start time of each operation is unique
Σl xil = 1
2. Sequencing relations represented by Gs(V,E) must be satisfied
Σl xil ≥ Σl xjl + dj
3. Resource bound must be met at every schedule step
Σk Σm xim ≤ ak
![Page 42: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/42.jpg)
Dec 18,2007 HLS@iitk 42
ILP FormulationAll operation must start only once
x0,1 = 1
x1,1 = 1
x2,1 = 1
x3,2 = 1
x4,3 = 1
x5,4 = 1
x6,1 + x6,2 = 1
x7,2 + x7,3 = 1
x8,1 + x8,2+x8,3 = 1
x9,2 + x9,3+x9,4 = 1
x10,1 + x10,2+x10,3 = 1
x11,2 + x11,3+x11,4 = 1
xn,5 = 1
![Page 43: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/43.jpg)
Dec 18,2007 HLS@iitk 43
ILP FormulationConstraints – based on sequencing
(more than one starting time for at least one operation)
2 x7,2 + 3 x7,3 – x6,1 – 2 x6,2 – 1 ≥ 0
2 x9,2 + 3 x9,3 + 4 x9,4 – x8,1 – 2 x8,2 – 3 x8,3 – 1 ≥ 0
2 x11,2 + 3 x11,3 + 4 x11,4 – x10,1 – 2 x10,2 – 3 x10,3 – 1 ≥ 0
4 x5,4 – 2 x7,2 – 3 x7,3 – 1 ≥ 0
5 xn,5 – 2 x9,2 – 3 x9,3 – 4 x9,4 – 1 ≥ 0
5 xn,5 – 2 x11,2 – 3 x11,3 – 4 x11,4 – 1 ≥ 0
![Page 44: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/44.jpg)
Dec 18,2007 HLS@iitk 44
ILP FormulationResource Constraints
x1,1 + x2,2 + x6,1 + x8,1 ≤ 2
x3,2 + x6,2 + x7,2 + x8,2 ≤ 2
x7,3 + x8,3 ≤ 2
x10,1 ≤ 2
x9,2 + x10,2 + x11,2 ≤ 2
x4,3 + x9,3 + x10,3 + x11,3 ≤ 2
x5,4 + x9,4 +x11,4 ≤ 2
![Page 45: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/45.jpg)
Dec 18,2007 HLS@iitk 45
ILP Formulation
Optimize ΣiΣl l.xil
x6,1 + 2 x6,2 + 3 x7,2 + 3 x7,3 + x8,1 + 2 x8,2 + 3 x8,3
+ 2 x9,2 + 3 x9,3 + 4 x9,4 + x10,1 + 2 x10,2 + 3 x10,3
+ 2 x11,2 + 3 x11,3 + 4 x11,4
![Page 46: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/46.jpg)
Dec 18,2007 HLS@iitk 46
Resource SharingResource sharing: Assignment of resource to more than one operation
Goal: Reduce area
Resource binding: explicit definition of mapping between resources and operation
Binding may imply some resources are shared
![Page 47: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/47.jpg)
Dec 18,2007 HLS@iitk 47
Optimum Schedulingunder Resource Constraint
* *
*
+
*
**+
<
--
NOP
NOP
1 2
3
4
5
6
7 8
9
10
11
TIME 1
TIME 2
TIME 3
TIME 4
![Page 48: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/48.jpg)
Dec 18,2007 HLS@iitk 48
Scheduled Sequencing Graph
* *
*
+
*
**+
<
--
NOP
NOP
1 2
3
4
5
6
7 8
9
10
11
TIME 1
TIME 2
TIME 3
TIME 4
![Page 49: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/49.jpg)
Dec 18,2007 HLS@iitk 49
Compatibility Graph
3
6
1 8
7 2
4
9
10
115
![Page 50: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/50.jpg)
Dec 18,2007 HLS@iitk 50
Conflict Graph
3
6
1 8
7 2
4
9
10
115
![Page 51: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/51.jpg)
Dec 18,2007 HLS@iitk 51
Transitive orientation of Compatibility Graph
3
6
1 8
7 2
4
9
10
115
![Page 52: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/52.jpg)
Dec 18,2007 HLS@iitk 52
Resource Sharing in Non-Hierarchical Seq. Graph
Searching for binding compatible
Σr bir = a
Σbir Σ xim ≤ 1
![Page 53: High-Level Synthesis-II](https://reader030.vdocument.in/reader030/viewer/2022032708/56812d14550346895d91f618/html5/thumbnails/53.jpg)
Dec 18,2007 HLS@iitk 53
Scheduled and Bound Sequencing Graph
* *
*
+
*
**+
<
--
NOP
NOP
1 2
3
4
5
6
7 8
9
10
11
TIME 1
TIME 2
TIME 3
TIME 4
(1,1)
(1,2)
(2,1)
(2,2)