14/12/11 1
Latency-preserving software pipelining of predicated reservation tables for distributed hard real-time applications
Thomas Carle – Dumitru Potop-Butucaru INRIA Paris-Rocquencourt, FRANCE Team AOSTE
Latency-preserving software pipelining of predicated reservation - - PowerPoint PPT Presentation
Latency-preserving software pipelining of predicated reservation tables for distributed hard real-time applications Thomas Carle Dumitru Potop-Butucaru INRIA Paris-Rocquencourt, FRANCE 14/12/11 1 Team AOSTE Outline Throughput
14/12/11 1
Thomas Carle – Dumitru Potop-Butucaru INRIA Paris-Rocquencourt, FRANCE Team AOSTE
14/12/11 2
14/12/11 3
14/12/11 4
14/12/11 5
P1 P2 P3 c,v1,v2 f: 1 g: 1;m: 2 h: 1 P1 P2 P3 1 2 f if(c) g if(¬c) m h Computation cycle RAM Time Resource
14/12/11 6
P1 P2 P3 1 2 3 4 5 f if(c) g if(¬c) m h Time Resource Computation cycle f if(c) g if(¬c) m h End to end latency Throughput-1 = latency Latency: number of time units between the beginning and the end of the execution of a cycle Throughput: number of cycles executed in one time unit
14/12/11 7
P1 P2 P3 1 2 3 4 5 f if(c0) g if(¬c0) m h Resource f If(c1) g h if(¬c1) m f if(c1) g if(¬c1) m h f if(c2) g if(¬c2) m ... ... ... ... Throughput-1 End to end latency Prolog Steady- state ≤ latency = latency Throughput-1 unchanged Goal : increase throughput while keeping the system's latency, I/O function, and periodic behaviour Time
14/12/11 8
P1 P2 P3 1 2 3 4 5 f if(c0) g if(¬c0) m h Resource f if(c1) g if(¬c1) m h f if(c2) g if(¬c2) m Kernel Steady- state Prolog Prolog and steady-state are instances of the kernel ... ... ... ...
14/12/11 9
14/12/11 10
14/12/11 11
14/12/11 12
14/12/11 13
Initial non-pipelined scheduling table Pipelined scheduling table Algorithms
Architecture model
14/12/11 14
P1 P2 P3
v1;v2;c
RAM Example:
14/12/11 15
14/12/11 16
14/12/11 17
resource, if Guard(O1) ∧ Guard(O2) ≠ false, then t(O1)≥t(O2)+d(O2) or t(O2)≥t(O1)+d(O1),
writes) v1, then t(O1)≥t(O2)+d(O2) or t(O2)≥t(O1)+d(O1) , or Guard(O1) ∧ Guard(O2) = false,
14/12/11 18
14/12/11 19
f if(C0) g h f if(C1) g h f if(C2) g if(¬C2) m Resource 1 2 3 4 5 Time P1 P2 P3 Prolog Steady- state if(¬C1) m if(¬C0) m
14/12/11 20
f if(C0) g 1 P1 P2 P3 h fst=1 Pipelined table 3 2 5 4 f h if(C1) g if(¬C1) m Pipelined Iteration 0 Pipelined Iteration 1 fst=1 f if(C2) g if(¬C2) m h Pipelined Iteration 2 if(¬C0) m
Resource Time
14/12/11 21
14/12/11 22
14/12/11 23
c:=¬c if(c) v2:=f1(v1) P1 P2 if(¬c) w2:=g1(w1) if(c) v3:=f2(v2) if(¬c) w3:=g2(w2) P3 if(c) v1:=f3(v3) if(¬c) w1:=g3(w3) P4
1 2 3 4 5 6
14/12/11 24
c:=¬c if(c) v2:=f1(v1) P1 P2 if(¬c) w2:=g1(w1) if(c) v3:=f2(v2) if(¬c) w3:=g2(w2) P3 if(c) v1:=f3(v3) if(¬c) w1:=g3(w3) P4 c1:=¬c if(c1) v2:=f1(v1) if(¬c1) w2:=g1(w1) if(c1) v3:=f2(v2) if(¬c1) w3:=g2(w2) if(c1) v1:=f3(v3) if(¬c1) w1:=g3(w3)
1 2 3 4 5 6 7 8
14/12/11 25
c:=¬c if(c) v2:=f1(v1) P1 P2 if(¬c) w2:=g1(w1) if(c) v3:=f2(v2) if(¬c) w3:=g2(w2) P3 if(c) v1:=f3(v3) if(¬c) w1:=g3(w3) P4 c1:=¬c if(c1) v2:=f1(v1) if(¬c1) w2:=g1(w1) if(c1) v3:=f2(v2) if(¬c1) w3:=g2(w2) if(c1) v1:=f3(v3) if(¬c1) w1:=g3(w3) c2:=¬c1 if(c2) v2:=f1(v1) if(¬c2) w2:=g1(w1) if(c2) v3:=f2(v2) if(¬c2) w3:=g2(w2) if(c2) v1:=f3(v3) if(¬c2) w1:=g3(w3) Complete algorithm: the first repetition is fully covered
1 2 3 4 5 6 7 8 9 10 11
14/12/11 26
c:=¬c if(c) v2:=f1(v1) P1 P2 if(¬c) w2:=g1(w1) if(c) v3:=f2(v2) if(¬c) w3:=g2(w2) P3 if(c) v1:=f3(v3) if(¬c) w1:=g3(w3) P4 c1:=¬c if(c1) v2:=f1(v1) if(¬c1) w2:=g1(w1) if(c1) v3:=f2(v2) if(¬c1) w3:=g2(w2) if(c1) v1:=f3(v3) if(¬c1) w1:=g3(w3) c2:=¬c1 if(c2) v2:=f1(v1) if(¬c2) w2:=g1(w1) if(c2) v3:=f2(v2) if(¬c2) w3:=g2(w2) if(c2) v1:=f3(v3) if(¬c2) w1:=g3(w3)
Make the repetition periodic : new_period = max(o1,o2,n)∈DDG ((t(o1)+d(o1)-t(o2))/n) 1 2 3 4 5 6 7 8 9 10 11
14/12/11 27
c:=¬c if(c) v2:=f1(v1) P1 P2 if(¬c) w2:=g1(w1) if(c) v3:=f2(v2) if(¬c) w3:=g2(w2) P3 if(c) v1:=f3(v3) if(¬c) w1:=g3(w3) P4 c1:=¬c if(c1) v2:=f1(v1) if(¬c1) w2:=g1(w1) if(c1) v3:=f2(v2) if(¬c1) w3:=g2(w2) if(c1) v1:=f3(v3) if(¬c1) w1:=g3(w3) c2:=¬c1 if(c2) v2:=f1(v1) if(¬c2) w2:=g1(w1) if(c2) v3:=f2(v2) if(¬c2) w3:=g2(w2) if(c2) v1:=f3(v3) if(¬c2) w1:=g3(w3) new_period := 3
1 2 3 4 5 6 7 8 9 10 11
14/12/11 28
c:=¬c v2:=f1(v1) @c P1 P2 w2:=g1(w1) @¬c v3:=f2(v2) @c w3:=g2(w2) @¬c P3 v1:=f3(v3) if(ci-2) w1:=g3(w3) if(¬ci-2) P4 c:=¬c v2:=f1(v1) @c w2:=g1(w1) @¬c if(ci-1) v3:=f2(v2) if(¬ci-1) w3:=g2(w2) v1:=f3(v3) @c w1:=g3(w3) @¬c ci:=¬ci-1 if(ci) v2:=f1(v1) if(¬ci) w2:=g1(w1) v3:=f2(v2) @c w3:=g2(w2) @¬c v1:=f3(v3) @c w1:=g3(w3) @¬c fst=0 fst=1
Build the kernel
14/12/11 29
h f if(C2) g if(¬C2) m 4 5 P1 P2 P3 Kernel: f if(C) g if(¬C) m h 1 2 P1 P2 P3 Initial cycle Size = 2 h fst=1 Pipelined table
if(¬C) m fst = [old_start_date/new_period] new_start_date = old_start_date - fst*new_period
14/12/11 30
Cycle 1 Cycle 2 Live zone 1 Live zone 2 fst1 lst1 lst2 Time Resources fst2
14/12/11 31
14/12/11 32
Aquisition Filtering Detection Correction ∆ ∆ Samples Aquisition window position
14/12/11 33
Acquisition Device BUF2 BUF1 µC
Config0;Config1;Config2; c
buf2 buf1 RAM
14/12/11 34
book if(c) Acq1 if(¬c) Acq2 if(c) Acq1 if(¬c) Acq2 if(c) FDC1 if(¬c) FDC2 if(c) FDC1 if(¬c) FDC2 1 2 3 4 5 Rotation units AD BUF 1 BUF 2 µC Resources
14/12/11 35
book if(c) Acq1 if(¬c) Acq2 if(c) Acq1 if(¬c) Acq2 if(c) FDC1 if(¬c) FDC2 if(c) FDC1 if(¬c) FDC2 1 2 3 4 5 Rotation units AD BUF 1 BUF 2 µC Resources 6 7 8 book if(¬c1) Acq2 if(c1) Acq1 if(c1) Acq1 if(¬c1) Acq2 if(c1) FDC1 if(¬c1) FDC2 if(c1) FDC1 if(¬c1) FDC2 book if(c2) Acq1 if(¬c2) Acq2 if(c2) Acq1 if(¬c2) Acq2 ... ... ... ...
14/12/11 36
book if(cn) Acq1 if(¬cn) Acq2 if(cn) Acq1 if(¬cn) Acq2 1 2 Rotation units AD BUF 1 BUF 2 µC Resources if(cn-1) FDC1 fst=1 if(¬cn-1) FDC2 fst=1 if(¬cn-1) FDC2 fst=1 if(cn-1) FDC1 fst=1
14/12/11 37
14/12/11 38
14/12/11 39