![Page 1: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/1.jpg)
fakultät für informatikinformatik 12
technische universität dortmund
Optimum Scheduling, Allocation, and Resource binding (OSCAR)
Peter MarwedelTU DortmundInformatik 12
2008/06/08
![Page 2: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/2.jpg)
- 2 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Überwindung der Trennung in 3 Phasen
Trennung in 3 Phasen lässt potenziell die optimale Lösung verpassen
Wir koppeln scheduling, allocation und assignment.
![Page 3: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/3.jpg)
- 3 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Integration von Scheduling, Allokation und Assignment in OSCAR
OSCAR = optimum scheduling, allocation, and resource binding
Gegeben: Datenfluss-Graph mit Operationen
Bausteinbibliothek
Quellen: B. Landwehr, P. Marwedel, R. Dömer: OSCAR: Optimum Simultaneous
Scheduling, Allocation and Resource Binding Based on Integer Programming, Proc. Euro-DAC, 1994, S. 90-95
B. Landwehr, P. Marwedel: A New Optimization Technique for Improving Resource Exploitation and Critical Path Minimization, 10th International Symposium on System Synthesis (ISSS), Antwerpen, 1997
+
-
![Page 4: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/4.jpg)
- 4 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Entscheidungsvariablen im IP-Modell
Zentrale Entscheidungsvariable:
=sonst,0
startet Exemplar auf hrittKontrollsc im Operation wenn,1,,
kijx kji
=
sonst ,0 wirdbenötigt stanzBausteinin die falls,1 k
bk
Hilfsvariable:
![Page 5: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/5.jpg)
- 5 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Beschränkungen (constraints) (1)
Operation assignment constraints:Jede Operation an exakt einen Kontrollschritt und an einen Hardware-Baustein zu binden:∀ j ∈ J: ∑i ∈ R(j) ∑ k ∈ K, j executable_on k xi,j,k = 1
Resource assignment constraints:Jede Komponente k kann höchstens alle ℓ(k) Kontrollschritte eine neue Operation starten. ∀ k∈K: ∀i∈I: ∑j∈J ∑i‘∈[i-ℓ (k)+1..i ] xi',j,k ≤ bk
∑i ≤ bk
i-ℓ (k)+1
i
![Page 6: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/6.jpg)
- 6 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
∑k ∑i' ≤ i, i' ∈ R(j2) xi‘‚j2,k + ∑k ∑i' ≥ i, i' ∈ R(j1) xi‘‚j1,k ≤ 1
Beschränkungen (constraints) (2)
Precedence constraints: Zuerst müssen die Argumente berechnet werden.Sei j2 datenabhängig von Operation j1.
R(j1), R(j2): mögliche Kontrollschritt-Bereiche.j2
j1
Für alle Paare (j1, j2) daten-abhängiger Operationen:R(j2)
R(j1)
ii‘∀ i ∈R(j1) ∩ R(j2) : j2 darf nicht vor oder in i
und j1 nicht nach oder in i ausgeführt werden.
i‘
∀i∈R(j1)∩R(j2):
![Page 7: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/7.jpg)
- 7 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Reservierung von Indices
Reservierung von Indices für potenzielle Bausteine k.Strukturierte Methode: Treppenfunktion für die Funktion type.Beispiel: Reservierung von max. 2 Indices pro Bausteintyp:
![Page 8: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/8.jpg)
- 8 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Vermeidung isomorpher Lösungen
Beispiel:bk+1 ≤ bk für type(k)=type(k+1)
IP-Verfahren benötigen ggf. viel Zeit, um Optimalität einer Lösung nachzuweisen Isomorphe* Lösungen möglichst vermeiden! Zusätzliche Constraints: Bausteine mit kleinerem k immer zuerst benutzen.
*Lösungen, die sich nur durch Umbenennung der Bausteine unterscheiden
B. Landwehr, P. Marwedel, I. Markhof, R. Dömer: Exploiting Isomorphism for Speeding-Up Instance-Binding in an Integrated Scheduling, Allocation and Assignment Approach to Architectural Synthesis, CHDL-97
![Page 9: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/9.jpg)
- 9 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Kostenfunktion
Def. cm: Kosten des Bausteintyps m ck1,k2: Kosten für Verbindung von k1 nach k2
=sonst 0,
ist verbunden 2 mit 1 Baustein falls,12,1
kkw kk
Dann ergeben sich die Gesamtkosten als:
( )∑ ∑ ∑∈
=∈
∗+∗=Mm
mktypeMk kk
kkkkkm wcbcC
)(2,1
2,12,1
![Page 10: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/10.jpg)
- 10 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Ein einfaches Beispiel
Gegeben: s := (u+v) * (w+x); t:=y*z;
ASAP/ALAP-Kontrollschritt-Bereiche:R(a) = [1,2]; R(b) = [1,2];R(c) = [1,4]; R(d) = [2,3];
Für die erste Zuweisung seien drei, für die zweite vier Kontrollschritte zulässig.
![Page 11: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/11.jpg)
- 11 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Bausteinbibliothek:
Ergebnisse in einem Kontrollschritt verfügbar: ∀ k: ℓ(k)=1.
Gleiche Kosten aller Bausteine: ∀ m: cm=1.
+,*3*2+1OperationenTyp
![Page 12: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/12.jpg)
- 12 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Zielfunktion für Maximierung
wi,j nur für chaining* () benötigt;Annahme: kein chaining (immer Register zwischen arithmetischen Einheiten).
Zielfunktion für Maximierung:C = -b1 -b2 -b3 -b4 -b5 -b6
-w1,3 -w1,4 -w1,5 -w1,6 -w2,3 -w2,4 -w2,5 -w2,6 -w5,3 -w5,4 -w5,6 -w6,4 -w6,5
* Hintereinander geschaltete arithmetische Einheiten, die in demselben Kontrollschritt arbeiten
![Page 13: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/13.jpg)
- 13 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Operation assignment constraints (1)
∀ j ∈ J: ∑i ∈ R(j) ∑ k ∈ K, j executable_on k xi,j,k = 1
1. x1a1+x1a2+x1a5+x1a6+x2a1+x2a2+x2a5+x2a6=1
(die Operation a muss in Schritt 1 oder in Schritt 2 ausgeführt werden und an einen zur Addition fähigen Baustein gebunden werden);
2. Wie 1, jedoch für Operation b;
![Page 14: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/14.jpg)
- 14 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Operation assignment constraints (2)
∀ j ∈ J: ∑i ∈ R(j) ∑ k ∈ K, j executable_on k xi,j,k = 1
![Page 15: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/15.jpg)
- 15 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Resource assignment constraints
Für k=1,2 (Addierer)
Für k=3,4 (Mult.)
Für k=5 (Kombin.)
Für k=6 (Kombin.)
∀ k∈K: ∀i∈I: ∑j∈J ∑i‘∈[i-ℓ (k)+1..i ] xi',j,k ≤ bk
![Page 16: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/16.jpg)
- 16 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Precedence constraints
∀i∈R(j1)∩R(j2): ∑k ∑i' ≤ i, i' ∈ R(j2) xi‚j2,k + ∑k ∑i' ≥ i, i' ∈ R(j1) xi‚j1,k ≤ 1
![Page 17: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/17.jpg)
- 17 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Lösung
Lösung:Operation c: Schritt 4Operation d: Schritt 3Operation a und b: Schritte 1 und 2.
![Page 18: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/18.jpg)
- 18 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Beschleunigungdurch Vermeidung von Isomorphie (2)
Beispiel: 3x3 DeterminantenSpeed
up
![Page 19: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/19.jpg)
- 19 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Beschleunigungdurch Vermeidung von Isomorphie
Beispiel: Elliptical Wave FilterSpeed
up
![Page 20: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/20.jpg)
- 20 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Ergebnis der Nutzung algebraischer Regeln(Elliptical Wave Filter)
(Ohne algebraische Regeln) „optimale“ Lösung : 14 Kontrollschritte.Ausnutzung der algebraischen Regeln erlaubt die Reduktion des Hardware-Aufwandes bei gleicher Kontrollschritt-Zahl und die Reduktion der Kontrollschritt-Zahl.
2a1m, 2a2a1m, 3a152a1m, 3a3a2m(ult.), 3a143a2m, 3a3a-133a3m, 3a3a-123a-4a(ddierer)-114a---104a---9
Ausnutzung der Assoziativität & von Schiebeoperationen
Ausnutzung der Assoziativität
Ersetzung von * durch Schiebe-operationen
Ohne Opti-mierung
Kontroll-schritte
![Page 21: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/21.jpg)
- 21 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Charakteristische Eigenschaftenvon IP-basierten Verfahren
Es kann Optimalität bezüglich des gewählten Kostenmodells garantiert werden,
es liegt ein präzises mathematisches Modell der zu lösenden Aufgabe vor,
es kann formal nachgewiesen werden, welche Eigenschaften eine synthetisierte Implementierung besitzt,
zusätzliche Bedingungen können verhältnismäßig leicht integriert werden.
IP ist NP-vollständig, für große Beispiele Heuristiken erforderlich.
IP-Modell gut als Ausgangsmodell für andere Methoden geeignet.
![Page 22: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/22.jpg)
- 22 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Charakteristische Eigenschaftenvon OSCAR
Kopplung an kommerzielle Software. nutzt komplexe Baustein-Bibliotheken aus, unterstützt Bausteine mit unterschiedlichen
Geschwindigkeiten. entscheidet, ob chaining sinnvoll ist, erlaubt die Angabe von Zeitbedingungen, nutzt algebraische Regeln aus. benutzt genetischen Algorithmus zur Wahl einer
Kombination von Regeln.
![Page 23: Optimum Scheduling, Allocation, and Resource binding (OSCAR) · Optimum Scheduling, Allocation, and Resource binding (OSCAR) Peter Marwedel TU Dortmund Informatik 12 2008/06/08](https://reader030.vdocuments.us/reader030/viewer/2022040105/5e1580e5f2af3e559077690a/html5/thumbnails/23.jpg)
- 23 -technische universitätdortmund
fakultät für informatik
p.marwedel, informatik 12, 2008
TU Dortmund
Zusammenfassung
OSCAR Integration von scheduling, allocation und assignmentModellierung als Modell der Ganzzahligen
ProgrammierungNutzung algebraischer Regeln