List Scheduling in Embedded Systems Under Memory Constraints
List-Based Scheduling
description
Transcript of List-Based Scheduling
![Page 1: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/1.jpg)
courseware
List-Based Scheduling
Sune Fallgaard Nielsen
Informatics and Mathematical ModellingTechnical University of Denmark
Richard Petersens Plads, Building 322DK2800 Lyngby, Denmark
![Page 2: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/2.jpg)
[M-1] High-Level Synthesis 2SoC-MOBINET courseware
Overview
Introduction Related work DFG and WPG ASAP, ALAP and Mobility Solution:
Algorithm Selection function Extenstions Time complexity
Results Conclussion
![Page 3: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/3.jpg)
[M-1] High-Level Synthesis 3SoC-MOBINET courseware
Introduction
Given a DFG we want to schedule operations to minimize the number of functional units needed (adders, multiplier, ALUs, etc.)
Input to algorithm DFG Number of cycles.(Not less than shortest path in DFG)
Model must include Pipelined operations Chained operations Multicycle operations
+
*
*
*
![Page 4: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/4.jpg)
[M-1] High-Level Synthesis 4SoC-MOBINET courseware
Related Work
Other algorithms fix operations one by one Tend to find local minima instead of global minima
ILP(Integer Linear programming) Finds global minima Is an exponential time algorithm and are not usable for
large data-sets
This algorithm can escape local minimals by making several iterations. Tend to find global minimaes (But, no guarantee)
![Page 5: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/5.jpg)
[M-1] High-Level Synthesis 5SoC-MOBINET courseware
DFG and WPG
From “Data Flow Graph” to “Weighted Precedence Graph”
![Page 6: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/6.jpg)
[M-1] High-Level Synthesis 6SoC-MOBINET courseware
ASAP Scheduling
Minimum number of cycles with no resource limitation
![Page 7: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/7.jpg)
[M-1] High-Level Synthesis 7SoC-MOBINET courseware
ALAP Scheduling
Minimum number of cycles with no resource limitation
![Page 8: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/8.jpg)
[M-1] High-Level Synthesis 8SoC-MOBINET courseware
Mobility
Mobility tells which steps each operation can be placed
![Page 9: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/9.jpg)
[M-1] High-Level Synthesis 9SoC-MOBINET courseware
Algorithm - overview
Starts from ASAP/ALAP Iteratively moves operations based on selection
function Si(j,k). (Must not violate WPG)
If no ”good” moves are possible, ”bad” ones are taken.
Stops when there are no movable operations Select best solution based on cost function from all
solutions explored. (Fx. number of functional units) Repeat the above iteration while the solution
improves
![Page 10: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/10.jpg)
[M-1] High-Level Synthesis 10SoC-MOBINET courseware
Algorithm - pseudu
repeat{
Count=1
While movable operations{
select tuple(i, k) with maximum Si(j,k)
move Oi to step k
lock tuple(i, k)
gaincount=change in cost when moving Oi to step k
}
find k that maximizes
if(gainmax>0)
Move operations 1 to k
}until(gainmax<=0)
gainmax i 1
kgain i
![Page 11: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/11.jpg)
[M-1] High-Level Synthesis 11SoC-MOBINET courseware
Algorithm - example
![Page 12: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/12.jpg)
[M-1] High-Level Synthesis 12SoC-MOBINET courseware
Algorithm - solution
Solution to running example
![Page 13: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/13.jpg)
[M-1] High-Level Synthesis 13SoC-MOBINET courseware
Selection Function
In each step the selection function Causes most balanced distribution of operations Reduces number of required functional units.
Expresses the gain by moving Oi from step j to k
Proportional with Maximal density at step j and k Change in Density Gradient(DG)
(Density[i] is the number of functional units at step i)
S i j , k max Density j , Density k CDG
![Page 14: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/14.jpg)
[M-1] High-Level Synthesis 14SoC-MOBINET courseware
Selection function
“Change in Density Gradient” (CDG)
CDG equals (Only concerns the 2 affected steps)
2 Number of functional units decreases by 1 0 No change in number of functional units needed -2 Number of functional units increases by 1
CDG DGbefore DG after
CDG Density j Density kDensity j 1 Density k 1
![Page 15: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/15.jpg)
[M-1] High-Level Synthesis 15SoC-MOBINET courseware
Selection function
Examples of Selection function calculations
![Page 16: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/16.jpg)
[M-1] High-Level Synthesis 16SoC-MOBINET courseware
Extensions
Mutually Exclusive(ME) operations Fx. an if-else statement. Operations that are ME can be
placed in the same step on the same functional unit
Chained operations Are already incoporated into the WPG
Multi-cycle operations Are included in the WPG, but selection function must be
expanded.
Pipelined operations I do not understand the articles interpretation of a
pipeline. Shall be treated as a multi-cycle operation.
![Page 17: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/17.jpg)
[M-1] High-Level Synthesis 17SoC-MOBINET courseware
Time complexity
m Number of operations in DFG
S Number of control steps
n Total number of tuples( max=Sm)
After each move update cost O(m*log(m))
This must be done for all tuplesO(nm*log(m))) = (Sm2*log(m))
Practial time complexity (stated by authors)O(n*log(m)) (since n i independant of m)
Number of iterations is assumed independent of problem
![Page 18: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/18.jpg)
[M-1] High-Level Synthesis 18SoC-MOBINET courseware
Results – Example 1
Chained operations with the number of cycles less than 8
![Page 19: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/19.jpg)
[M-1] High-Level Synthesis 19SoC-MOBINET courseware
Results – Example 2
Pipelined 16-point FIR filter. 2 types of functions units (Multiplier and adder)
![Page 20: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/20.jpg)
[M-1] High-Level Synthesis 20SoC-MOBINET courseware
Results – Example 3
5th order elliptic filter with25 additions and 8 multiplications. Multiply is a multicycle operation
![Page 21: List-Based Scheduling](https://reader034.fdocuments.in/reader034/viewer/2022051517/568157ed550346895dc56400/html5/thumbnails/21.jpg)
[M-1] High-Level Synthesis 21SoC-MOBINET courseware
Conclusion
Very fast an effective Can escape local minima Tend to reach optimal solution. (At least for all
experimental results so far) Must faster than than previous approaches. Handles multicycled, chained and pipelined
operations. Possible to use more sophisticated selection
functions.