High-Level%20Synthesis%20an%20introduction - PowerPoint PPT Presentation

About This Presentation
Title:

High-Level%20Synthesis%20an%20introduction

Description:

Starts from an abstract behavioral description. Generates an RTL description ... VHDL/Verilog. What is the target architecture of the ASIC? M-1 High-Level Synthesis ... – PowerPoint PPT presentation

Number of Views:76
Avg rating:3.0/5.0
Slides: 34
Provided by: me6120
Category:

less

Transcript and Presenter's Notes

Title: High-Level%20Synthesis%20an%20introduction


1
High-Level Synthesisan introduction
Prof. Jan Madsen Informatics and Mathematical
Modelling Technical University of Denmark Richard
Petersens Plads, Building 321 DK2800 Lyngby,
Denmark
2
Hardware synthesis
  • Starts from an abstract behavioral description
  • Generates an RTL description
  • Need to restrict the target hardware otherwise
    search space is too large

P1
P2
P3
ASIC
CPU
3
Hardware synthesis
  • How is the behavior specified?
  • Natural languages
  • C/C
  • VHDL/Verilog
  • What is the target architecture of the ASIC?

P1
P2
P3
ASIC
CPU
4
Hardware model - components
  • Most synthesis systems are targeted towards
    synchronous hardware
  • Functional units
  • Can perform one or more computations
  • Addition, multiplication, comparison, ALU, etc.
  • Registers
  • Store inputs, intermediate results and outputs
  • May be organized as a register file

5
Hardware model - interconnection
  • Multiplexers
  • Select one output from several inputs
  • Busses
  • Connection shared between several components
  • Only one component can write data at a specific
    time
  • Exclusive writing may be controlled by tri-state
    drivers

6
Hardware model parameters
  • Clocking strategy
  • Single or multiple phase clocks
  • Interconnect
  • Allowing or disallowing busses
  • Clocking of functional units
  • Multicycle operations
  • Chaining
  • Pipelined units

7
Hardware model example
8
Hardware concepts
  • Data path
  • Network of functional units, registers,
    multiplexers and buses
  • Control
  • Takes care of having the data present at the
    right place at a specific time
  • Takes care of presenting the right instructions
    to a programmable unit
  • Often high-level synthsis concentrates on data
    path synthesis

9
Methodology
10
Input format
  • Input
  • Behavior described in textual form
  • Conventional programming language
  • Hardware description language (HDL)
  • Has to be parsed and transformed into an internal
    representation
  • Conventional compiler techniques are used

11
Internal representation
  • Data-flow graph (DFG)
  • Used by most systems
  • May or may not contain information on control flow

12
Data flow
x a b y c d z x y
13
DFG semantics


x
y
14
Exercise 1 data flow graph of DiffEq
  • Solve the second order differential equation
  • y 3zy 3y 0
  • Iterative solution

While (zlta) z1 z dz u1 u
(3zudz) (3ydz) y1 y (udz) z
z1 u u1 y y1
15
Exercise 1 - result
u
dz
z
y
u
dz
z
dz
3
3

u1
y1
ctrl
16
High-level synthesis
17
High-level synthesis
  • Scheduling
  • Determine for each operation the time at which it
    should be performed such that no precedence
    contraint is violated
  • Allocation
  • Specify the hardware resources that will be
    necessary
  • Assignment
  • Provide a mapping from each operation to a
    specific functional unit and from each variable
    to a register

18
High-level synthesis
  • Scheduling, allocation and assignment are
    strongly interrelated
  • But are often solved separately!
  • Scheduling is NP-complete heuristics have to be
    used!

19
Scheduling
  • Input
  • DFG G(V, E)
  • Library of ressource types R
  • Mapping
  • a V g R, a(vi ) r
  • a given operation may be mapped to different
    ressource type, e.g. may be performed by an
    adder or an ALU
  • execution delay d(vi ) di
  • ressource type cost w(r)

20
Scheduling
  • Start time of operations
  • T ti i 0, 1, , n
  • Scheduling is the task of determining the start
    times subject to the precedence constraints of
    the DFG
  • s V g Z
  • s(vi ) ti such that ti ? tj dj, ? i, j
    (vj, vi ) ? E
  • Latency l tn t0
  • Cost of schedule Sr? R w(r) Nr(s)

21
Scheduling
Mathematical domain
Scheduling algorithm
synthesis
specification
implementation
DFG
Scheduled DFG
C program
implementation
specification
Physical domain
22
Scheduling ASAP
  • Map operations to their earliest possible start
    time not violating the precedence constraints
  • Easy and fast to compute
  • Find longest path in a directed acyclic graph
  • No attemp to optimize ressource cost
  • Gives the fastest possible schedule if unlimited
    amount of resources are available
  • Gives an upper bound on execution speed

23
ASAP algorithm
For each node vi ? V do if pred(vi) Ø then
Ei 1 V V vi else Ei 0
endif endfor
While V ? Ø do for each node vi ? V do if
all_sched(pred(vi),E) then Ei
max(pred(vi),E) 1 V V vi
endif endfor endwhile
24
DiffEq
u
dz
z
y
z
dz
u
dz
3
3

u1
y1
ctrl
25
Exercise 2 latency and resources
  • Assume
  • cycle time 25 ns
  • d, d, d-, dlt 25 ns
  • What is the latency of the schedule?
  • How many resources are needed?
  • How many resources are needed, if we introduce an
    ALU (,-,lt)
  • What is the latency if we have only 1 multiplier?
  • What is the latency if
  • d 25ns and dALU 12ns

26
Exercise 2 result
  • What is the latency of the schedule?
  • 425ns 100ns
  • How many resources are needed?
  • 4, 1, 1-, 1lt
  • How many resources are needed, if we introduce an
    ALU (,-,lt)
  • 4, 2ALU
  • What is the latency if we have only 1 multiplier?
  • 725ns 175ns
  • What is the latency if
  • d 25ns and dALU 12ns
  • 325ns 75ns (operator chaining)

27
Scheduling - ALAP
28
Scheduling ALAP
  • Map operations to their latest possible start
    time not violating the precedence constraints
  • Needs a latency constraint
  • Easy and fast to compute
  • Find longest path in a directed acyclic graph
  • No attemp to optimize ressource cost

29
Scheduling ASAP / ALAP
  • Are ASAP and ALAP useful?
  • sASAP (vi ) Ei
  • sALAP (vi ) Li
  • Operator flexibility Li Ei
  • Also known as mobility
  • Mobility 0
  • operator has to be scheduled at Ei
  • otherwise latency constraint is violated
  • Mobility gt 0 gives scheduling freedom

30
Scheduling list based
  • Generalization of ASAP
  • Priority-list of ready nodes
  • A ready node is an operator that has all
    predecessors already scheduled
  • The priority-list is always sorted with respect
    to a priority function

31
List scheduling algorithm
ins_ready_ops(V,PListr1, PListr2,,
PListrm) Cstep 0 While ((PListr1 ? Ø) or or
((PListrm? Ø)) do Cstep Cstep 1 for k
1 to m do for funit 1 to Nk do if
PListrk ? Ø then schdule_op(first(Plistrk)
,Cstep) Plistrk delete(Plistrk,first(Pl
istrk)) endif endfor endfor
ins_ready_ops(V,PListr1, PListr2,,
PListrm) endwhile
32
DiffEq
u
dz
z
y
z
dz
u
dz
3
3
e,c,d
Plist
a,b,c,d
c,d
f,d

Plist
j
Ø
Plist-
Ø
g
Ø
k
Plistlt
Ø
u1
y1
ctrl
33
List scheduling
  • Priority may be based on other measures than
    mobility
  • Length of longest path to a node with no
    immediate successor
  • Number of immediate successor nodes
  • High number means high priority
Write a Comment
User Comments (0)
About PowerShow.com