Synchronous Elastic Systems Mike Kishinevsky and Jordi Cortadella - - PowerPoint PPT Presentation

synchronous elastic systems
SMART_READER_LITE
LIVE PREVIEW

Synchronous Elastic Systems Mike Kishinevsky and Jordi Cortadella - - PowerPoint PPT Presentation

Synchronous Elastic Systems Mike Kishinevsky and Jordi Cortadella Intel Universitat Politecnica Strategic CAD Labs de Catalunya Hillsboro, USA Barcelona, Spain DAC Summer School July 26, 2009 Contributors to SELF research


slide-1
SLIDE 1

Synchronous Elastic Systems

Mike Kishinevsky and Jordi Cortadella

Universitat Politecnica de Catalunya Barcelona, Spain Intel Strategic CAD Labs Hillsboro, USA DAC Summer School July 26, 2009

slide-2
SLIDE 2

Contributors to SELF research

Micro-architectural pipelining, speculation Marc Galceran Oms, Timothy Kam Design experiments: Alexander Gotmanov Performance analysis: Jorge Júlvez Theory of elastic machines: Sava Krstic and John O’Leary Optimization: Dmitry Bufistov, Josep Carmona Bill Grundmann

2

slide-3
SLIDE 3

Agenda

I.

Basics of elastic systems

II.

Why to study

III.

Early evaluation and performance analysis

IV.

Correct-by-construction pipelining

V.

Communication fabrics

VI.

Open problems 3

slide-4
SLIDE 4

Token (of data)

Synchronous Stream of Data

1 4 7

Clock cycle 1 2

4

slide-5
SLIDE 5

Token

Synchronous Elastic Stream

1 4 7

1 2

4 1 7

1 2

3 4 5 Clock cycle Clock cycle

Bubble (no data) 5

slide-6
SLIDE 6

Synchronous Circuit

+ …

1 4 7

3 4 8 2 1

Latency = 0

6

slide-7
SLIDE 7

Synchronous Elastic Circuit

+

Latency = 0

1 4 7

+

Latency can vary e

3 4 8 2 1

3 4 8

1 4 7

2 1

7

slide-8
SLIDE 8

Ordinary Synchronous System

A C D B A C D B

=

Changing latencies changes behavior

8

slide-9
SLIDE 9

Synchronous Elastic (characteristic property)

A C D B A C D B

=

Changing latencies does NOT change behavior = time elasticity

e e e e e e e e e 9

slide-10
SLIDE 10

Elasticity?

Elasticity refers to elasticity of time, i.e. tolerance to changes in timing parameters, not properties of materials Luca Carloni et al. in the first systematic study of such systems called them Latency Insensitive Systems Other used names: – Latency tolerant systems – Synchronous emulation of asynchronous systems – Synchronous handshake circuits We use term “synchronous elastic” to link to asynchronous elastic systems that have been developed before e.g., David Muller’s pipelines of late 1950s Ivan Sutherland’s micro-pipelines 1989 Tolerate the variability of input data arrival and computation delays Asynchronous elastic tolerate changes in continuous time S h l ti i di t ti

10

slide-11
SLIDE 11

Why

Scalable Modular (Plug & Play) Potential for better energy-delay trade-offs

– design for typical case instead of worst case – can separate performance critical parts from non-critical and

  • ptimize in isolation

New micro-architectural opportunities in digital design Not asynchronous: use existing design experience, CAD tools and flows... but have some advantages of asynchronous

11

slide-12
SLIDE 12

What can we do with synchronous elastic systems?

12

slide-13
SLIDE 13

Variable latency units

L = 1 L = 3 L = 2 L = 1 ALU ALU start done

13

slide-14
SLIDE 14

# adds

Benchmark “Patricia” from Media Bench

Statistics

  • f operand

sizes bits of adder used

# adds

12 bits of an adder do 95% of additions 14

slide-15
SLIDE 15

Power-delay for an adder

1 1.25 1.5

Compare 64 bits VLA and prefix adder

relative delay

15

slide-16
SLIDE 16

Variable-latency cache hits

2-way associative 32KB 2-cycle hit

1-cycle hit

12-cycle miss L1-cache L2-cache

suggested by Joel Emer for ASIM experiment

16

slide-17
SLIDE 17

Variable-latency cache hits

Pseudo-associative 32KB {1-2} cycle hit

1-cycle hit

12-cycle miss L1-cache L2-cache

Sequential access: if hit in first access L = 1, if not – L=2 Trade-off: faster, or larger, or less power cache

17

slide-18
SLIDE 18

Variable-latency cache hits

Pseudo-associative 64KB {2-3} cycle hit

1-cycle hit

12-cycle miss L1-cache L2-cache

Sequential access: if hit in first access L = 1, if not – L=2 Trade-off: faster, or larger, or less power cache

18

slide-19
SLIDE 19

Motivation example

19

9 8 6 4 4 3 9 10 4 10 - Combinational block

with delay 10

  • Initialized register (dot)

Cycle time is Throughput is 1 Effective cycle time is 21 21 19 16 Retiming can not do better! Retiming and Recycling (R&R) can Effective cycle time is 19 Effective cycle time is 16 Throughput is 4/5 Effective cycle time is 15 12 Find a minimal effective cycle time of the circuit represented as retiming graph (RG)! The longest combinational path delay The number of valid data/clock cycle cycle time/throughput Retiming graph

5 registers, 4 tokens

slide-20
SLIDE 20

Correct-by-construction automatic pipelining in presence of iteration dependencies

Transforms:

– bypass – retiming – elasticize – early enabling – insert buffers and negative tokens – size elastic buffer capacity

ID E1 E2 RF

  

ID E1 E2 RF

      

1 1
  • 1

SPEC IMP Correct-by-construction

20 and correct-by-construction speculation

slide-21
SLIDE 21

21

How to Design Synchronous Elastic Systems Example of the implementation: SELF = Synchronous Elastic Flow Other implementations are possible

slide-22
SLIDE 22

22

Pipelined communication

sender receiver Data Data

What if the sender does not always send valid data?

slide-23
SLIDE 23

23

The Valid bit

sender receiver Data Data Valid Valid

What if the receiver is not always ready ?

slide-24
SLIDE 24

24

The Stop bit

sender Data Valid Stop receiver Data Valid Stop

slide-25
SLIDE 25

25

The Stop bit

1 1

sender Data Valid Stop receiver Data Valid Stop

slide-26
SLIDE 26

26

The Stop bit

1 1 1

sender Data Valid Stop receiver Data Valid Stop

slide-27
SLIDE 27

27

The Stop bit

1 1 1 1 1

sender Data Valid Stop receiver Data Valid Stop

Back-pressure

slide-28
SLIDE 28

28

The Stop bit

1

sender Data Valid Stop receiver Data Valid Stop

Long combinational path

slide-29
SLIDE 29

29

Cyclic structures

Data Valid Stop

Combinational cycle

One can build circuits with combinational cycles (constructive cycles by Berry), but synthesis and timing tools do not like them

slide-30
SLIDE 30

30

Example: pipelined linear communication chain with transparent latches

sender receiver

H L H L ½ cycle ½ cycle

Master and slave latches with independent control

slide-31
SLIDE 31

31

Shorthand notation (clock lines not shown)

D Q clk En En

slide-32
SLIDE 32

32

SELF (linear communication)

sender receiver

V V V V S S S S En En En En 1 1 Data Valid Stop Data Valid Stop 1 1

slide-33
SLIDE 33

33

SELF

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

1

slide-34
SLIDE 34

34

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

1

SELF

slide-35
SLIDE 35

35

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

1

SELF

slide-36
SLIDE 36

36

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

1

SELF

slide-37
SLIDE 37

37

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

1

SELF

slide-38
SLIDE 38

38

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

SELF

slide-39
SLIDE 39

39

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

SELF

slide-40
SLIDE 40

40

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

SELF

slide-41
SLIDE 41

41

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

SELF

slide-42
SLIDE 42

42

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

SELF

slide-43
SLIDE 43

43

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

1 1

SELF

slide-44
SLIDE 44

44

sender receiver

V V V V S S S S En En En En Data Valid Stop

1 1

Data Valid Stop

SELF

slide-45
SLIDE 45

45

sender receiver

V V V V S S S S En En En En Data Valid Stop

1 1

Data Valid Stop

SELF

slide-46
SLIDE 46

46

sender receiver

V V V V S S S S En En En En Data Valid Stop

1 1

Data Valid Stop

SELF

slide-47
SLIDE 47

47

sender receiver

V V V V S S S S En En En En Data Valid Stop

1 1

Data Valid Stop

SELF

slide-48
SLIDE 48

48

sender receiver

V V V V S S S S En En En En Data Valid Stop

1 1

Data Valid Stop

SELF

slide-49
SLIDE 49

49

sender receiver

V V V V S S S S En En En En Data Valid Stop

1 1

Data Valid Stop

SELF

slide-50
SLIDE 50

50

sender receiver

V V V V S S S S En En En En Data Valid Stop

1 1

Data Valid Stop

SELF

slide-51
SLIDE 51

51

sender receiver

V V V V S S S S En En En En Data Valid Stop

1 1

Data Valid Stop

SELF

slide-52
SLIDE 52

52

sender receiver

V V V V S S S S En En En En Data Valid Stop

1

Data Valid Stop

SELF

slide-53
SLIDE 53

53

sender receiver

V V V V S S S S En En En En

1

Data Valid Stop Data Valid Stop

SELF

slide-54
SLIDE 54

54

sender receiver

V V V V S S S S En En En En

1

Data Valid Stop Data Valid Stop

SELF

slide-55
SLIDE 55

55

sender receiver

V V V V S S S S En En En En

1

Data Valid Stop Data Valid Stop

SELF

slide-56
SLIDE 56

56

sender receiver

V V V V S S S S En En En En

1

Data Valid Stop Data Valid Stop

SELF

slide-57
SLIDE 57

57

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

1

SELF

slide-58
SLIDE 58

58

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

1

SELF

slide-59
SLIDE 59

59

sender receiver

V V V V S S S S En En En En Data Valid Stop Data Valid Stop

1

SELF

slide-60
SLIDE 60

60

Elastic channel and its protocol

Idle Retry Transfer

Valid * not Stop not Valid Valid * Stop

Sender Receiver

Data Valid Stop

slide-61
SLIDE 61

61 Retry

Transfer

Elastic channel protocol

Sender Receiver Data

Valid Stop

Data

Valid Stop

* D D * C C C B * A 0 1 1 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 0 Idle

slide-62
SLIDE 62

62

Basic VS block

Si Eni Vi Si-1 Vi-1

VS

Si Eni Vi Si-1 Vi-1 VS block + data-path latch = elastic HALF-buffer (EHB) EHB + EHB = elastic buffer with capacity 2

slide-63
SLIDE 63

Control specification of the EB

63

slide-64
SLIDE 64

Two implementations

64

slide-65
SLIDE 65

65

Elastic buffer keeps data while stop is in flight

W1R1 W2R1 W1R2 W2R2 W1R1 Cannot be done with Single Edge Flops without double pumping Can use latches inside Master-Slave as shown before

EBs = FIFOs with two parameters:

Forward latency Capacity Backward latency for stop propagation assumed (but need not be) equal to fwd latency Typical case: (1,2) - 1 cycle forward latency with capacity of 2 Replaces “normal” registers Decoupling buffers

slide-66
SLIDE 66

66

Join

VS

+

V1 V2 S1 S2 V S VS VS

slide-67
SLIDE 67

67

(Lazy) Fork

V1 V2 S1 S2 V S

slide-68
SLIDE 68

68

Eager Fork

V1 V2 S1 S2

^ ^

V S

slide-69
SLIDE 69

69

Eager fork (another implementation)

VS VS VS VS VS

slide-70
SLIDE 70

70

Variable Latency Units

[0 - k] cycles V/S V/S done go clear

slide-71
SLIDE 71

Coarse grain control

71

slide-72
SLIDE 72

72

Elasticization

Synchronous Elastic

slide-73
SLIDE 73

73

CLK

slide-74
SLIDE 74

74

CLK

PC IF/ID ID/EX EX/MEM MEM/WB J O I N J O I N F O R K FORK

slide-75
SLIDE 75

75

V S

CLK

V S V S V S V S J O I N J O I N F O R K FORK

slide-76
SLIDE 76

76

1

CLK

1 1 1 1 J O I N J O I N F O R K FORK

slide-77
SLIDE 77

77

1 1 1 1 1

Elastic control layer Generation of gated clocks

CLK

slide-78
SLIDE 78

Equivalence

D: a b c d e d f g h i j …

Synchronous: stream of data SELF: elastic stream of data

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 … 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

78

slide-79
SLIDE 79

79

Marked Graph models

  • f elastic systems
slide-80
SLIDE 80

80

Modelling elastic control with Petri nets

data-token bubble data-token bubble

slide-81
SLIDE 81

81

Modelling elastic control with Petri nets

data-token bubble 2 data-tokens

Hiding internal transitions of elastic buffers

slide-82
SLIDE 82

82

Modelling elastic control with Marked Graphs

slide-83
SLIDE 83

83

Forward (Valid or Request) Backward (Stop or Acknowledgement)

Modelling elastic control with Marked Graphs

slide-84
SLIDE 84

84

Elastic control with Timed Marked Graphs. Continuous time = asynchronous

d=250ps d=151ps 250 151 Delays in time units

slide-85
SLIDE 85

85

Elastic control with Timed Marked Graphs. Discrete time = synchronous elastic

d=1 d=1 1 1 Latencies in clock cycles

slide-86
SLIDE 86

86

Elastic control with Timed Marked Graphs. Discrete time. Multi-cycle operation

d=2 d=1 2 1

slide-87
SLIDE 87

87

Elastic control with Timed Marked Graphs. Discrete time. Variable latency operation

d {1,2} d=1 {1,2} 1 e.g. discrete probabilistic distribution: average latency 0.8*1 + 0.2*2 = 1.2

slide-88
SLIDE 88

88

Modeling forks and joins

d=1 1

slide-89
SLIDE 89

89

Modelling combinational elastic blocks

d=1 d=0 1

slide-90
SLIDE 90

90

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’ (M0(a)+M0(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)

slide-91
SLIDE 91

91

Reminder: Performance analysis of Marked graphs

Efficient algorithms: (Karp 1978), (Dasdan,Gupta 1998)

A B C Th(C)=2/5 Th(B)=3/5 Th(A)=3/7

Th=min(Th(A), Th(B), Th(C))=2/5

Th = operations / cycle = number of firings per time unit

The throughput is given by the minimum mean-weight cycle

slide-92
SLIDE 92

92

Early evaluation

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

slide-93
SLIDE 93

93

Examples of early evaluation

MULTIPLIER a b c

if a = 0 then c := 0 -- don’t wait for b

*

MULTIPLEXOR a b c s

if s = T then c := a -- don’t wait for b else c := b -- don’t wait for a

T F

slide-94
SLIDE 94

94

Related work

Petri nets

– Extensions to model OR causality Kishinevsky et al. Change Diagrams [e.g. book of 1994] Yakovlev et al. Causal Nets 1996

Asynchronous systems

– Reese et al 2002: Early evaluation – Brej 2003: Early evaluation with anti-tokens – Ampalan & Singh 2006: preemption using anti-tokens

slide-95
SLIDE 95

95

Dual Marked Graph

Marking: Arcs (places) −> Z (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

slide-96
SLIDE 96

96

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

slide-97
SLIDE 97

97

Dual Marked Graph model

  • 1

Enabled !

  • 1
  • 1
  • 1
  • 1
slide-98
SLIDE 98

98

Passive anti-token

Passive DMG = version of DMG without negative enabling Negative tokens can only be generated due to early enabling, but cannot propagate Let D be a strongly connected DMG such that all cycles have positive cumulative marking Let Dp be a corresponding passive DMG. If environment (consumers) never generate negative tokens, and there are no multi-cycle operations then throughput (D) = throughput (Dp)

– If capacity of input places for early enabling transitions is unlimited, then active anti-tokens do not improve performance – Active anti-tokens reduce activity in the data-path (good for power reduction)

slide-99
SLIDE 99

99

Properties of DMGs

Firing invariant: Let node n be simultaneously positive (early) and negative enabled in marking M. Let M1 be the result of firing n from M due to positive (early) enabling. Let M2 be the result of firing n from M due to negative enabling. Then, M1 = M2 Token preservation. Let c be a cycle of a strongly connected DMG with initial marking M0. For every reachable marking M : M(c) = M0(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

slide-100
SLIDE 100

100

Implementing early enabling

slide-101
SLIDE 101

101

How to implement anti-tokens ?

Positive tokens Negative tokens

slide-102
SLIDE 102

102

How to implement anti-tokens ?

Positive tokens Negative tokens

slide-103
SLIDE 103

103

How to implement anti-tokens ?

Valid+ Valid+ Valid– Valid+ Stop+ Stop+ Valid– Stop– Stop–

+

slide-104
SLIDE 104

104

Controller for elastic buffer

V S V S Data

H H L L L H

V S V S En En

slide-105
SLIDE 105

105

Dual controller for elastic buffer

S+ V+ V- S- S+ V+ V- S- En En

slide-106
SLIDE 106

Dual Join and Fork

106

slide-107
SLIDE 107

Join with early evaluation

107

slide-108
SLIDE 108

Condition on Early Evaluation Function

Early evaluation function makes decision based on presence

  • f 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) 108

slide-109
SLIDE 109

109

Passive anti-token (capacity one)

Bigger capacity can be achieved by “injecting” anti-token up-down counters on elastic channels

slide-110
SLIDE 110

Properties of elastic channels

Invariants: mutually exclusive Kill (V -) and Stop (S +) Valid (V +) and retain of a kill (S -)

110

slide-111
SLIDE 111

111

Conclusions

Early evaluation can increase performance beyond the min cycle ratio The duality between positive and negative tokens suggests a clean and effective implementation Dual Marked Graphs is a formal model for analytical analysis and optimization methods

slide-112
SLIDE 112

Performance analysis with early evaluation

112

slide-113
SLIDE 113

113

Revisit Performance Analysis of Marked Graphs

∞ →

=

t p t t p

)d ( m m

1

lim τ τ

The throughput can also be computed by means of linear programming

Average marking

p p m

th min =

Throughput

) , min(

2 1 p p m

m th =

t1 t2 t3 p1 p2

[Campos, Chiola, Silva 1991]

slide-114
SLIDE 114

114 a b d c p1 p2 p3 p4 p5

max th

mp1 = 1 + tb – ta mp2 = 0 + ta – tb mp3 = 1 + td – ta mp4 = 0 + ta – tc mp5 = 1 + tc – td

Th = 0.5

reachability

th ≤ mp2 // transition b th ≤ mp4 // transition c th ≤ mp5 // transition d th ≤ min(mp1, mp3) // transition a

th constraints

Revisit Performance Analysis of Marked Graphs

slide-115
SLIDE 115

115

GMG = Multi-guarded Dual Marked Graph

Refinement of passive DMGs Every node has a set of guards Every guard is a set of input places (arcs) Example:

t1 t2 t4 p1 p2 t3 p3

G(t4)={{p1,p3},{p2,p3}}

slide-116
SLIDE 116

116

Early evaluation

α 1-α β 1-β

slide-117
SLIDE 117

117

Early evaluation

α 1−α β 1−β α β

(0.43) (0.60) (0.40)

0.60 0.60 0.54 0.54 0.49 0.49 0.46 0.46 0.44 0.44 0.43 0.43 1.0 1.0 0.54 0.54 0.51 0.51 0.48 0.48 0.46 0.46 0.44 0.44 0.43 0.43 0.8 0.8 0.49 0.49 0.48 0.48 0.47 0.47 0.45 0.45 0.44 0.44 0.43 0.43 0.6 0.6 0.45 0.45 0.45 0.45 0.45 0.45 0.44 0.44 0.44 0.44 0.43 0.43 0.4 0.4 0.43 0.43 0.43 0.43 0.42 0.42 0.42 0.42 0.42 0.42 0.42 0.42 0.2 0.2 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.0 0.0 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 0.60 0.60 0.54 0.54 0.49 0.49 0.46 0.46 0.44 0.44 0.43 0.43 1.0 1.0 0.54 0.54 0.51 0.51 0.48 0.48 0.46 0.46 0.44 0.44 0.43 0.43 0.8 0.8 0.49 0.49 0.48 0.48 0.47 0.47 0.45 0.45 0.44 0.44 0.43 0.43 0.6 0.6 0.45 0.45 0.45 0.45 0.45 0.45 0.44 0.44 0.44 0.44 0.43 0.43 0.4 0.4 0.43 0.43 0.43 0.43 0.42 0.42 0.42 0.42 0.42 0.42 0.42 0.42 0.2 0.2 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.40 0.0 0.0 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0

slide-118
SLIDE 118

118

LP formulation for an upper bound of a throughput (by example)

Th = (2 - α) / (3 - α)

α 1-α

a b d c p1 p2 p3 p4 p5

max th

mp1 = 1 + tb – ta mp2 = 0 + ta – tb mp3 = 1 + td – ta mp4 = 0 + ta – tc mp5 = 1 + tc – td th ≤ mp2 th ≤ mp4 th ≤ mp5 th = α mp1 + (1-α) mp3

slide-119
SLIDE 119

119

Averaging cycle throughput or cycle times does not work

Th = (2 - α) / (3 - α)

α 1-α

a b d c p1 p2 p3 p4 p5

1/2 2/3

Th’ = α 1/2 + (1- α) 2/3 = (4 - α) / 6 1/Th” = 2α + (1- α) 3/2 = (3 + α) / 2 Th” = 2/(3+ α) Averaging throughput of individual cycles Averaging effective cycle times

  • f individual cycles
slide-120
SLIDE 120

Correct-by-construction pipelining

121

slide-121
SLIDE 121

Notation for elastic systems

Elastic buffer (latency=1, capacity=2) with one token of information Empty elastic buffer (latency=1, capacity=2) Channel with an injector of k negative tokens

  • k

Empty elastic buffer (latency=0, capacity=m) m

slide-122
SLIDE 122

Elastic transforms

=

m

= =

  • 1
  • 1
  • 2
  • 1

=

  • k

=

... k ... k

slide-123
SLIDE 123

W R wa ra wd rd = W R wa ra = rd wd 1

Bypass transform

Classic transform. Works for elastic systems

slide-124
SLIDE 124

Pipelining by example

ra wa F2 F1 F4 F3 RF Convert to elastic form

slide-125
SLIDE 125

Pipelining by example

ra wa F2 F1 F4 F3 RF Handshakes added to the environment Handshakes added to the environment

slide-126
SLIDE 126

Pipelining by example

ra wa F2 F1 F4 F3 RF Bypass 4 times

slide-127
SLIDE 127

Pipelining by example

ra wa F2 F1 F4 F3

=

Early evaluation elastic multiplexer Only waits for the branch that is needed

slide-128
SLIDE 128

Pipelining by example

ra wa F2 F1 F4 F3

=

To simplify the presentation: Assume only dependencies of depth 1 Prune away unneeded bypasses

slide-129
SLIDE 129

Pipelining by example

ra wa F2 F1 F4 F3

=

slide-130
SLIDE 130

Pipelining by example

ra wa F2 F1 F4 F3

=

Insert empty buffers

slide-131
SLIDE 131

Pipelining by example

ra wa F2 F1 F4 F3

=

Cannot retime!

slide-132
SLIDE 132

Pipelining by example

ra wa F2 F1 F4 F3

=

Insert empty buffers. To enable retiming use a form with negative tokens

slide-133
SLIDE 133

Pipelining by example

ra wa F2 F1 F4 F3

=

  • 3
slide-134
SLIDE 134

Pipelining by example

ra wa F2 F1 F4 F3

=

  • 3

Retime Assume for now retiming is done like in normal synchronous designs Will come back to this later

slide-135
SLIDE 135

Pipelining by example

ra wa F2 F1 F4 F3

=

  • 3
slide-136
SLIDE 136

Pipelining by example

ra wa F2 F1 F4 F3

=

  • 3

Deadlock!

slide-137
SLIDE 137

Why deadlock?

  • 3
slide-138
SLIDE 138

Why deadlock?

  • 3

Positively live system  all cycles have positive marking

Cycle with sum of tokens = -2

slide-139
SLIDE 139

Transformations

Correct designs

?

slide-140
SLIDE 140

Retiming of Elastic Buffers

F

  • 1

F

  • 1

A A

slide-141
SLIDE 141

F

  • 1

Deadlock!

F

  • 1

A

Retiming of Elastic Buffers

Retiming move removed required buffer capacity from the old location

slide-142
SLIDE 142

How to fix deadlock

  • 3

Extra capacity

slide-143
SLIDE 143

Pipelining by example

ra wa F2 F1 F4 F3

=

  • 3

Size buffers (by adding (0,k) buffers)

slide-144
SLIDE 144

Pipelining by example

ra wa F2 F1 F4 F3

=

  • 3

3 Correct fully pipelined design

slide-145
SLIDE 145

Transformations

Correct designs upsize

slide-146
SLIDE 146

F

  • 1

F

  • 1

1

A

Retiming of Elastic Buffers

Would require solving capacity sizing problem for every retiming move

slide-147
SLIDE 147

F

  • 1

F

  • 1

1 2

A

2

Retiming of Elastic Buffers

Conservatively preserve previous capacity

slide-148
SLIDE 148

Transformations

Correct designs upsize downsize conservatively preserve capacity

slide-149
SLIDE 149

150

Correctness (short story)

Developed theory of elastic machines (for late evaluation) Verify correctness of any elastic implementation = check conformance with the definition of elastic machine All SELF controllers are verified for conformance Elasticization is correct-by-construction Theory for early evaluation and negative delays is more challenging

– Sketch of a theory, but no fully satisfactory compositional properties found yet – Verification done on concrete systems and controllers

slide-150
SLIDE 150

What is a Communication Fabric?

Part of the design that pushes data around Glue between different IP blocks Include not only wires, but also…

– switches, arbiters, routers, buffers and queues, addressing logic, logic managing credits, logic for cache coherency, starvation and deadlock prevention, clock and power down logic etc.

Often has regular parts (e.g. ring or mesh topology), but need not be Elasticity is a natural requirement, but different notion of equivalence: only relative order matters

slide-151
SLIDE 151

Many Communication Fabrics

High-end interconnect – Connects cores in high-end chips – Implements cache coherence IO/Mem fabrics – PC MCH (Memory Control Hub), PCH, SCH Implements PCI-compatible memory- mapped IO – SOC chips System Interconnect Memory Controller Often simpler than PCI: no configuration, etc. Message fabrics – Power messages, sideband wires, etc. in most designs – Don’t care about performance

Core i7-based Platform Atom-based Platform

slide-152
SLIDE 152

Tree topology NoC

R R R R R

AGENT AGENT AGENT AGENT AGENT AGENT AGENT

[In collaboration with Ken Stevens, Charles Dike, Bill Grundmann] 153

slide-153
SLIDE 153

Router node interface

Router A B C

154

slide-154
SLIDE 154

NoC Router EHB

M S A

EHB EHB

S M S M C B

Relative order of tokens between agents is preserved 155

slide-155
SLIDE 155

Switch and Merge

156

slide-156
SLIDE 156

Some open problems

Better performance analysis (bounds) for system with early evaluation Given: The number and sizes of IP blocks & communication requirements & message ordering constraints & flow control rates Find: Optimal floorplans & communication fabrics in (perf, area, energy) space Compositional theory of elastic machines with early evaluation Given: a class of communication fabric & message ordering constraints & flow control details Prove: no deadlocks, every message gets delivered

slide-157
SLIDE 157

Summary SELF gives a low cost implementation of elastic machines Functionality is correct when latencies change New micro-architectural opportunities and new automatuion methods Compositional theory proving correctness Early evaluation - mechanism for performance and power

  • ptimization

Applications to design of NoCs and communication fabrics 158

slide-158
SLIDE 158

See reference list for some relevant publications

159

slide-159
SLIDE 159

Bibliography on Synchronous Elastic (aka Latency Insensitive) Systems

July 20, 2009 Latency insensitive designs

[CMSV01,CSV02,CSV03,CM04,BMdS06a,Sve04,VA09]

SELF implementation and compilation to elastic designs

[CKG06,CK07,HB08]

Interlock pipelines

[JKB+02]

Synchronous translation of CSP

[OB97,PvB01]

Performance analysis

[JCK06]

Optimization

[LK03,BCKS07,CKC+08,CSV03,BMdS06b,BJC08]

Slack matching

[MM98]

Theory

[GTL03,KCKO06,CMSV01]

Variable latency units

[BMP97,BML+99,BCK09] 1

slide-160
SLIDE 160

Petri Nets

[Mur89]

Early evaluation and event models with early evaluation

[BG03,CK07,TFRT02,RTTH05,AS06,KKTV94,YKK+96]

Microarchitectural transformations

[HE96,KKCGO08,GOCK09]

Desynchronization

[VM02,CKLS06]

Communication Fabrics & NoCs

[MOP+09]

References

[AS06] Manoj Ampalam and Montek Singh. Counterflow pipelining: Architectural support for preemption in asynchronous systems using anti-tokens. In Proc. International

  • Conf. Computer-Aided Design (ICCAD), pages 611–618, 2006.

[BCK09]

  • D. Baneres, J. Cortadella, and M. Kishinevsky. Variable-latency design using function
  • speculation. In Proc. Design, Automation and Test in Europe (DATE), April 2009.

[BCKS07] Dmitry Bufistov, Jordi Cortadella, Mike Kishinevsky, and Sachin Sapatnekar. A gen- eral model for performance optimization of sequential systems. In ICCAD ’07: Pro- ceedings of the 2007 IEEE/ACM international conference on Computer-aided design, pages 362–369, 2007. [BG03] C.F. Brej and J.D. Garside. Early output logic using anti-tokens. In Int. Workshop

  • n Logic Synthesis, pages 302–309, May 2003.

[BJC08]

  • D. Bufistov, J. J´

ulvez, and J. Cortadella. Performance optimization of elastic systems using buffer resizing and buffer insertion. In Proc. International Conf. Computer- Aided Design (ICCAD), pages 442–448, November 2008. [BMdS06a]

  • J. Boucaron, J. Millo, and R. de Simone. Another glance at relay stations in latency-

insensitive design. Electr. Notes Theor. Comput. Sci., 146(2):41–59, 2006. [BMdS06b]

  • J. Boucaron, J. Millo, and R. de Simone. Latency-insensitive design and central repet-

itive scheduling. In IEEE-ACM International Conference MEMOCODE’06, pages 175–183, 2006. 2

slide-161
SLIDE 161

[BML+99]

  • L. Benini, G. De Micheli, A. Lioy, E. Macii, G. Odasso, and M. Poncino. Automatic

synthesis of large telescopic units based on near-minimum timed supersetting. IEEE Transactions on Computers, 48(8):769–779, 1999. [BMP97] Luca Benini, Enrico Macii, and Massimo Poncino. Telescopic units: increasing the average throughput of pipelined designs by adaptive latency control. In DAC ’97: Proceedings of the 34th annual conference on Design automation, pages 22–27, New York, NY, USA, 1997. ACM Press. [CK07]

  • J. Cortadella and M. Kishinevsky. Synchronous elastic circuits with early evaluation

and token counterflow. In Proc. ACM/IEEE Design Automation Conference, pages 416–419, June 2007. [CKC+08] Jordi Cortadella, Mike Kishinevsky, Josep Carmona, Dmitry Bufistov, and Jorge

  • Julvez. Elasticity and Petri nets. LNCS Transactions on Petri Nets and Other Models
  • f Concurrency (ToPNoC), 1:221 – 249, February 2008.

[CKG06]

  • J. Cortadella, M. Kishinevsky, and B. Grundmann. Synthesis of synchronous elastic
  • architectures. In Proc. ACM/IEEE Design Automation Conference, pages 657–662,

July 2006. [CKLS06] Jordi Cortadella, Alex Kondratyev, Luciano Lavagno, and Christos Sotiriou. Desyn- chronization: Synthesis of asynchronous circuits from synchronous specifications. IEEE Transactions on Computer-Aided Design, 25(10):1904–1921, 2006. [CM04] M.R. Casu and L. Macchiarulo. A new approach to latency insensitive design. In

  • Proc. Digital Automation Conference (DAC), pages 576–581, June 2004.

[CMSV01]

  • L. Carloni, K.L. McMillan, and A.L. Sangiovanni-Vincentelli.

Theory of latency- insensitive design. IEEE Transactions on Computer-Aided Design, 20(9):1059–1076, September 2001. [CSV02] L.P. Carloni and A.L. Sangiovanni-Vincentelli. Coping with latency in SoC design. IEEE Micro, Special Issue on Systems on Chip, 22(5):12, October 2002. [CSV03]

  • L. Carloni and A.L. Sangiovanni-Vincentelli. Combining retiming and recycling to
  • ptimize the performance of synchronous circuits. In 16th Symp. on Integrated Circuits

and System Design (SBCCI), pages 47–52, September 2003. [GOCK09] Marc Galceran-Oms, Jordi Cortadella, and Mike Kishinevsky. Speculation in elastic

  • systems. In Proc. International Workshop on Logic Synthesis, July 2009.

[GTL03]

  • P. Le Guernic, J.-P. Talpin, and J.-Ch. Le Lann.

Polychrony for system design. Journal of Circuits, Systems and Computers, 12(3):261–304, April 2003. [HB08] Greg Hoover and Forrest Brewer. Synthesizing synchronous elastic flow networks. In DATE ’08: Proceedings of the conference on Design, automation and test in Europe, pages 306–311, 2008. 3

slide-162
SLIDE 162

[HE96]

  • S. Hassoun and C. Ebeling. Architectural retiming: Pipelining latency-constrained
  • circuits. In Proc. ACM/IEEE Design Automation Conference, pages 708–713, June

1996. [JCK06]

  • J. J´

ulvez, J. Cortadella, and M. Kishinevsky. Performance analysis of concurrent systems with early evaluation. In Proc. International Conf. Computer-Aided Design (ICCAD), November 2006. [JKB+02] Hans M. Jacobson, Prabhakar N. Kudva, Pradip Bose, Peter W. Cook, Stanley E. Schuster, Eric G. Mercer, and Chris J. Myers. Synchronous interlocked pipelines. In

  • Proc. International Symposium on Advanced Research in Asynchronous Circuits and

Systems, pages 3–12, April 2002. [KCKO06] Sava Krstic, Jordi Cortadella, Michael Kishinevsky, and John O’Leary. Synchronous elastic networks. In FMCAD, pages 19–30. IEEE Computer Society, 2006. [KKCGO08] T. Kam, M. Kishinevsky, J. Cortadella, and M. Galceran-Oms. Correct-by- construction microarchitectural pipelining. In Proc. International Conf. Computer- Aided Design (ICCAD), pages 434–441, November 2008. [KKTV94] Michael Kishinevsky, Alex Kondratyev, Alexander Taubin, and Victor Varshavsky. Concurrent Hardware: The Theory and Practice of Self-Timed Design. Series in Parallel Computing. John Wiley & Sons, 1994. [LK03]

  • R. Lu and C.-K. Koh.

Performance optimization of latency insensitive systems through buffer queue sizing of communication channels. In Proc. International Conf. Computer-Aided Design (ICCAD), pages 227–231, November 2003. [MM98]

  • R. Manohar and A. J. Martin. Slack elasticity in concurrent computing. In Proc.

4th Int. Conf. on the Mathematics of Program Construction, volume 1422 of Lecture Notes in Computer Science, pages 272–285, 1998. [MOP+09] Radu Marculescu, Umit Y. Ogras, Li-Shiuan Peh, Natalie Enright Jerger, and Yatin

  • Hoskote. Outstanding research problems in noc design: System, microarchitecture,

and circuit perspectives. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 28(1):3 – 21, 2009. [Mur89]

  • T. Murata.

Petri Nets: Properties, analysis and applications. Proceedings of the IEEE, pages 541–580, April 1989. [OB97] John O’Leary and Geoffrey Brown. Synchronous emulation of asynchronous circuits. IEEE Transactions on Computer-Aided Design, 16(2):205–209, February 1997. [PvB01] Ad Peeters and Kees van Berkel. Synchronous handshake circuits. In Proc. Inter- national Symposium on Advanced Research in Asynchronous Circuits and Systems, pages 86–95. IEEE Computer Society Press, March 2001. [RTTH05]

  • R. Reese, M. Thornton, C. Traver, and D. Hemmendinger.

Early evaluation for performance enhancement in phased logic. IEEE Transactions on Computer-Aided Design, 24(4):532–550, April 2005. 4

slide-163
SLIDE 163

[Sve04] Christer Svensson. Synchronous latency insensitive design. In 10th International Symposium on Advanced Research in Asynchronous Circuits and Systems (ASYNC 2004), page 3, 2004. [TFRT02]

  • M. Thornton, K. Fazel, R. Reese, and C. Traver. Generalized early evaluation in

self-timed circuits. In Proc. Design, Automation and Test In Europe (DATE), March 2002. [VA09]

  • M. Vijayaraghavan and Arvind. Bounded dataflow networks and latency-insensitive
  • circuits. In Proceedings of the 7th International Conference on Formal Methods and

Models for Codesign (MEMOCODE), July 2009. [VM02] Victor Varshavsky and Vyacheslav Marakhovsky. GALA (globally asynchronous - locally arbitrary) design. In J. Cortadella, A. Yakovlev, and G. Rozenberg, editors, Concurrency and Hardware Design, volume 2549 of Lecture Notes in Computer Sci- ence, pages 61–107. Springer-Verlag, 2002. [YKK+96] Alexandre Yakovlev, Michael Kishinevsky, Alex Kondratyev, Luciano Lavagno, and Marta Pietkiewicz-Koutny. On the models for asynchronous circuit behaviour with OR causality. Formal Methods in System Design, 9(3):189–233, 1996. 5