synchronous elastic systems synchronous elastic systems
play

Synchronous Elastic Systems Synchronous Elastic Systems Mike - PowerPoint PPT Presentation

Synchronous Elastic Systems Synchronous Elastic Systems Mike Kishinevsky and Jordi Cortadella Mike Kishinevsky and Jordi Cortadella Intel Intel Universitat Politecnica Politecnica Universitat Strategic CAD Labs Strategic CAD Labs de


  1. Elastic channel and its protocol Elastic channel and its protocol not Valid Valid * Stop Retry Idle Sender Sender Receiver Receiver Data Valid * not Stop Valid Transfer Stop 51

  2. Elastic channel protocol Elastic channel protocol Sender Receiver Sender Receiver * D D * C C C B * A * D D * C C C B * A Data Data Data Data 0 1 1 0 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 1 Valid Valid Valid Valid 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 Stop Stop Stop Stop Transfer Transfer Retry Retry Idle Idle 52

  3. Basic VS block Basic VS block En i En i En i En i V i V i V V V i V i V V i- -1 1 i i- -1 1 i VS S i S i S S S i S i S S i- -1 1 i i- -1 1 i VS block + data-path latch = elastic HALF-buffer (EHB) EHB + EHB = elastic buffer with capacity 2 53

  4. Control specification of the EB 54

  5. Two implementations 55

  6. Elastic buffer keeps data while stop is in flight Elastic buffer keeps data while stop is in flight EBs = FIFOs with two parameters: Forward latency Capacity W2R1 Backward latency for stop propagation assumed (but need not be) equal to fwd latency W1R2 Typical case: (1,2) - 1 cycle forward latency with capacity of 2 W2R2 Replaces “normal” registers Decoupling buffers W1R1 Cannot be done with Single Edge Flops without double pumping W1R1 Can use latches inside Master-Slave as shown before 56

  7. Join Join + V 1 V VS S 1 VS S V 2 S 2 VS 57

  8. (Lazy) Fork (Lazy) Fork V V 1 S 1 V 2 S S 2 58

  9. Eager Fork Eager Fork S 1 ^ V 1 ^ V V 2 ^ ^ S S 2 59

  10. Eager fork (another implementation) Eager fork (another implementation) VS VS VS VS VS 60

  11. Variable Latency Units Variable Latency Units [0 - k] [0 - k] cycles cycles done go clear V/S V/S 61

  12. Coarse grain control 62

  13. Elasticization Elasticization Synchronous Elastic 63

  14. CLK CLK 64

  15. FORK FORK IF/ID ID/EX EX/MEM MEM/WB F F J J O O PC O O R R I I J J K K N N O O I I N N CLK CLK 65

  16. FORK J F J V V V V V O O O I I R S S S S S N K N CLK CLK 66

  17. 0 FORK 0 J F J 1 1 1 1 1 O O O I I R 0 0 0 0 0 N K N CLK CLK 67

  18. Elastic control layer 1 1 1 1 1 Generation of gated clocks 0 0 0 0 0 CLK CLK 68

  19. Equivalence Synchronous: stream of data D: a b c d e d f g h i j … … D: a b c d e d f g h i j SELF: elastic stream of data D: a * b * * c d e * d f * g h * * i j … … D: a * b * * c d e * d f * g h * * i j V: 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 … … V: 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 S: 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 … … S: 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 Transfer sub-stream = original stream Called: transfer equivalence, flow equivalence, or latency equivalence 69

  20. Marked Graph models Marked Graph models of elastic systems of elastic systems 70

  21. Modelling elastic control with Petri nets Modelling elastic control with Petri nets data- -token token data bubble bubble data- -token token data bubble bubble 71

  22. Modelling elastic control with Petri nets Modelling elastic control with Petri nets bubble bubble data- -token token data 2 data- -tokens tokens 2 data Hiding internal transitions of elastic buffers 72

  23. Modelling elastic control with Marked Graphs Modelling elastic control with Marked Graphs 73

  24. Modelling elastic control with Marked Graphs Modelling elastic control with Marked Graphs Forward Forward (Valid or Request) (Valid or Request) Backward Backward (Stop or Acknowledgement) (Stop or Acknowledgement) 74

  25. Elastic control with Timed Marked Graphs. Elastic control with Timed Marked Graphs. Continuous time = asynchronous Continuous time = asynchronous d=151ps d=250ps Delays in time units 250 151 75

  26. Elastic control with Timed Marked Graphs. Elastic control with Timed Marked Graphs. Discrete time = synchronous elastic Discrete time = synchronous elastic d=1 d=1 Latencies in clock cycles 1 1 76

  27. Elastic control with Timed Marked Graphs. Elastic control with Timed Marked Graphs. Discrete time. Multi- -cycle operation cycle operation Discrete time. Multi d=1 d=2 2 1 77

  28. Elastic control with Timed Marked Graphs. Elastic control with Timed Marked Graphs. Discrete time. Variable latency operation Discrete time. Variable latency operation ∈ d=1 d {1,2} e.g. discrete probabilistic distribution: average latency 0.8*1 + 0.2*2 = 1.2 {1,2} 1 78

  29. Modeling forks and joins Modeling forks and joins d=1 1 79

  30. Modelling combinational elastic blocks Modelling combinational elastic blocks d=0 d=1 1 0 80

  31. Elastic Marked Graphs Elastic Marked Graphs An Elastic Marked Graph (EMG) is a Timed MG such that for any arc a there exists a complementary arc a’ satisfying the following condition • a = a ’• and • a ’ = a • Initial number of tokens on a and a’ (M 0 (a)+M 0 (a’)) = capacity of the corresponding elastic buffer Similar forms of “pipelined” Petri Nets and Marked Graphs have been previously used for modeling pipelining in HW and SW (e.g. Patil 1974; Tsirlin, Rosenblum 1982) 81

  32. Reminder: : Performance Performance analysis analysis of of Marked Marked graphs graphs Reminder Th = operations / cycle = number of firings per time unit = operations / cycle = number of firings per time unit Th The throughput is given by the Th=min(Th(A), Th(B), Th(C))=2/5 minimum mean-weight cycle Th(A)=3/7 Th(B)=3/5 A B C Th(C)=2/5 Efficient algorithms: (Karp 1978), (Dasdan,Gupta 1998) 82

  33. Early evaluation Early evaluation Naï Na ïve solution: introduce choice places ve solution: introduce choice places – issue tokens at choice node only into one (some) relevant path – issue tokens at choice node only into one (some) relevant path – problem: tokens can arrive to merge nodes out – problem: tokens can arrive to merge nodes out- -of of- -order order later token can overpass the earlier one later token can overpass the earlier one Solution: change enabling rule Solution: change enabling rule – early evaluation – early evaluation – issue negative tokens to input places without tokens, – issue negative tokens to input places without tokens, i.e. keep the same firing rule i.e. keep the same firing rule – Add symmetric sub Add symmetric sub- -channels with negative tokens channels with negative tokens – – Negative tokens kill positive tokens when meet Negative tokens kill positive tokens when meet – Two related problems: Two related problems: Early evaluation and Exceptions (how to kill a data- -token) token) Early evaluation and Exceptions (how to kill a data 83

  34. Examples of of early early evaluation evaluation Examples MULTIPLEXOR a T c if s = T then c := a -- don’t wait for b b F else c := b -- don’t wait for a s MULTIPLIER a c * if a = 0 then c := 0 -- don’t wait for b b 84

  35. Related work Related work Petri nets Petri nets – Extensions to model OR causality Extensions to model OR causality – Kishinevsky et al. Change Diagrams [e.g. book of 1994] Kishinevsky et al. Change Diagrams [e.g. book of 1994] Yakovlev et al. Causal Nets 1996 Yakovlev et al. Causal Nets 1996 Asynchronous systems Asynchronous systems – Reese et al 2002: Early evaluation Reese et al 2002: Early evaluation – – Brej Brej 2003: Early evaluation with anti 2003: Early evaluation with anti- -tokens tokens – – Ampalan Ampalan & Singh 2006: & Singh 2006: preemption preemption using anti using anti- -tokens tokens – 85

  36. Dual Marked Graph Dual Marked Graph Marking: Arcs (places) −> Z Marking: (allow negative markings) Some nodes are labeled as early-enabling Enabling rules for a node: – Positive enabling: M(a) > 0 for every input arc – Early enabling (for early enabling nodes): M(a) > 0 for some input arcs – Negative enabling: M(a) < 0 for every output arc Firing rule: the same as in regular MG 86

  37. Dual Marked Graphs Dual Marked Graphs Early enabling can be associated with an external guard that depends on data variables (e.g., a select signal of a multiplexor) Actual enabling guards are abstracted away (unless needed) Anti-token generation: When an early enabled node fires, it generates anti-tokens in the predecessor arcs that had no tokens Anti-token propagation counterflow: When negative enabled node fires, it propagates the anti-tokens from the successor to the predecessor arcs 87

  38. Dual Marked Graph model Dual Marked Graph model -1 -1 -1 -1 -1 Enabled ! 88

  39. Passive anti- -token token Passive anti Passive DMG = version of DMG without negative enabling Passive DMG = version of DMG without negative enabling Negative tokens can only be generated due to early Negative tokens can only be generated due to early enabling, but cannot propagate enabling, but cannot propagate Let D D be a strongly connected DMG such that all cycles be a strongly connected DMG such that all cycles Let have positive cumulative marking have positive cumulative marking Let D be a corresponding passive DMG . Let p be a corresponding passive DMG D p . If environment (consumers) never generate negative If environment (consumers) never generate negative tokens, then tokens, then throughput ( D ) = throughput ( D ) throughput ( D ) = throughput ( p ) D p – If capacity of input places for early enabling transitions is un If capacity of input places for early enabling transitions is unlimited, limited, – then active anti- -tokens do not improve performance tokens do not improve performance then active anti – Active anti Active anti- -tokens reduce activity in the data tokens reduce activity in the data- -path path – (good for power reduction) (good for power reduction) 89

  40. Properties of DMGs DMGs Properties of Firing invariant: Let node n be simultaneously positive (early) and negative enabled in marking M. Let M 1 be the result of firing n from M due to positive (early) enabling. Let M 2 be the result of firing n from M due to negative enabling. Then, M 1 = M 2 Token preservation. Let c be a cycle of a strongly connected DMG with initial marking M 0 . For every reachable marking M : M(c) = M 0 (c) Liveness. A strongly connected passive DMG is live iff for every cycle c: M(c) > 0. – For DMGs this is a sufficient condition of liveness – It is also a necessary condition for positive liveness Repetitive behavior. In a SC DMG: a firing sequence s from M leads to the same marking iff every node fires in s the same number of times DMGs have properties similar to regular MGs 90

  41. Implementing early enabling Implementing early enabling 91

  42. How to implement anti- -tokens ? tokens ? How to implement anti Positive tokens Negative tokens 92

  43. How to implement anti- -tokens ? tokens ? How to implement anti Positive tokens Negative tokens 93

  44. How to implement anti- -tokens ? tokens ? How to implement anti Valid + Valid + + + Valid Valid Valid + + Valid + Stop + + Stop Stop + + Stop Valid – Valid – – – Valid Valid Stop – – Stop Stop – – Stop 94

  45. Controller for elastic buffer Controller for elastic buffer L H Data En En L H V V V V H L S S S S 95

  46. Dual controller for elastic buffer Dual controller for elastic buffer En En V + V + S + S + V - V - S - S - 96

  47. Dual Join and Fork 97

  48. Join with early evaluation 98

  49. Condition on Early Evaluation Function Early evaluation function makes decision based on presence of valid bits, not on their absence Formally: EE is positive unate with respect to data input Example: legal EE function for a data-path MUX (s – select input) 99

  50. Passive anti- -token (capacity one) token (capacity one) Passive anti Bigger capacity can be achieved by “injecting” anti-token up-down counters on elastic channels 100

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend