290 likes | 463 Views
Integer Linear Programming approach to Scheduling. Sune Fallgaard Nielsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building 322 DK2800 Lyngby, Denmark. Outline. Introduction - The new approach & objective
E N D
Integer Linear Programmingapproach to Scheduling Sune Fallgaard Nielsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building 322 DK2800 Lyngby, Denmark
Outline • Introduction - The new approach & objective - Automated data path synthesis • ILP Formulation • Example • Generalizations • Experimental Results • Conclusion [M-1] High-Level Synthesis
The New Approach • Solve scheduling problem 1) ASAP -> start time 2) ALAP -> require time 3) ILP (Integer Linear Programming) [M-1] High-Level Synthesis
Objective • Fully utilize the hardware resources i.e. minimize the requirement of function units under a given timing constraint [M-1] High-Level Synthesis
Support different kinds of data path • Multicycle operations • Multiple operations per cycle • Pipelined data paths • Mutually exclusive operations • Variables’ lifetime consideration [M-1] High-Level Synthesis
Automated Data Path Synthesis • Scheduling • Allocation Tightly interdependent [M-1] High-Level Synthesis
Scheduling • ** very important • FIX 1) number & types of function units 2) lifetime of variables 3) timing constraints [M-1] High-Level Synthesis
The New Approach 1) ASAP 2) ALAP 3) ILP (Integer Linear Programming) Function Units: • Fully utilized • minimize maximal no. [M-1] High-Level Synthesis
The ILP Formulation 2 Assumptions: • Each operation – 1 cycle propagation delay • Consider non-pipelined data path [M-1] High-Level Synthesis
Data Flow Graph • n operations • s steps • oi– each operation 1 ≤ i ≤ n • oi oj– precedence relation oi immediate predecessor of oj • m types of function units [M-1] High-Level Synthesis
Si – start time (ASAP) • Li – require time (ALAP) • Cti– cost of function unit of type ti (FUti) • Mti – number of function unit of type ti • xi,j – 1: if oi is scheduled into step j 0: otherwise [M-1] High-Level Synthesis
OiЄ FUtk Formulas (1,2) • Minimize total function unit cost • No control step should contain more than Mtkfunction unit of type tk for 1 ≤ j ≤ s, 1 ≤ k ≤ m [M-1] High-Level Synthesis
Formulas (3,4) • oi can only be scheduled into a step between Si & Li for 1 ≤ i ≤ n • Ensure the precedence relations of DFG will be preserved for all oi ok [M-1] High-Level Synthesis
Example • Available function units: ~ multipliers (FUt1) ~ ALUs (FUt2) • Cost: ~ Ct1 = 5 ~ Ct2 = 1 [M-1] High-Level Synthesis
OiЄ FUtk Example • Integer programming formulation (formulas 1,2) minimize 5Mt1 + Mt2 [M-1] High-Level Synthesis
Example • Integer programming formulation (formulas 3,4) O6 O7 O8 O9 O10 O11 [M-1] High-Level Synthesis
Example • Scheduling result -- optimal this formulation variables x1,1, x2,1, x3,2, x4,3, x5,4, x7,3, x8,3, x9,4, x10,1 & x11,2 => 1 2 multipliers & 2 ALUs [M-1] High-Level Synthesis
Generalizations • Multicycle operations • Multiple operations per cycle • Pipelined data paths • Mutually exclusive operations • Variables’ lifetime consideration [M-1] High-Level Synthesis
- di Multicycle Operations • oi– operation • di– delay for 1 ≤ j ≤ s, 1 ≤ k ≤ m for all oi ok [M-1] High-Level Synthesis
0 Multiple Operations per Cycle • New precedence relation • oi => oj -- oj is the nearest successor of oi for all oi ok for all oi=> ok [M-1] High-Level Synthesis
Pipelined Data Paths • l:fixed latency (integer multiple of a clock cycle) • | si – sj |: integer multiple of l [M-1] High-Level Synthesis
Mutually Exclusive Operations • If oi, oj – two mutually exclusive operations, X(oi, oj) = 1 otherwise X(oi, oj) = 0 • Both scheduled in control step k • Count function unit cost as 1, not 2 • New 0/1 integer variable yk -- 0 if xi,k = xj,k = 0 -- 1 if otherwise • xi,k + xj,k = yk in constraint (2) [M-1] High-Level Synthesis
Variables’ Lifetime Consideration • Function unit cost for both schedules are the same, but fewer number of registers needed in Fig(a) [M-1] High-Level Synthesis
Variables’ Lifetime Consideration • SLKi,j – difference between the assigned control steps of oi, oj(oi oj) • Minimize total step differences minimize [M-1] High-Level Synthesis
Experimental Results [M-1] High-Level Synthesis
Experimental Results • Fifth order wave filter • Containing 26 addition (1 cycle) &8 multiplication (2 cycles) operations [M-1] High-Level Synthesis
Conclusion • Integer Linear Programming formulation (ILP) minimize the function unit cost • Quite acceptable for practical synthesis • Always find the optimal solution • Different kinds of data path are taken into account [M-1] High-Level Synthesis
THE END Thanks