Χρονική ανάλυση και χρονισμός ψηφιακών κυκλωμάτων Γιώργος Δημητρακόπουλος Δημοκρίτειο Πανεπιστήμιο Θράκης Φθινόπωρο 2013 Συστήματα VLSI 1
What we should learn Συστήματα VLSI 2
Delay Definitions t pdr : rising propagation delay From input to rising output crossing V DD /2 t pdf : falling propagation delay From input to falling output crossing V DD /2 t pd : average propagation delay t pd = (t pdr + t pdf )/2 t r : rise time From output crossing 0.2 V DD to 0.8 V DD t f : fall time From output crossing 0.8 V DD to 0.2 V DD 5: DC and Transient Response 3
RC Delay Model Use equivalent circuits for MOS transistors Ideal switch + capacitance and ON resistance Unit nmos has resistance R, capacitance C Unit pmos has resistance 2R, capacitance C Capacitance proportional to width Resistance inversely proportional to width g d k s g d R/k kc s kc kc g d k s g s kc 2R/k kc kc d 5: DC and Transient Response 4
FLIP-FLOP FLIP-FLOP Analyzing Design Performance Συστήματα VLSI 5
Static timing analysis Συστήματα VLSI 6
Timing analysis: Models Συστήματα VLSI 7
Delay models Συστήματα VLSI 8
Delay models Συστήματα VLSI 9
Delay models Συστήματα VLSI 10
Standard-cell library characterization Συστήματα VLSI 11
Example standard-cell delay values Συστήματα VLSI 12
Static timing analysis example C17 from ISCAS 85 benchmarks I 1 I 2 I 3 I 4 1/2 2/4 1/2 2/4 3/5 7/7 2/3 O 1 9/10 Critical path I 5 I 6 1/2 1/2 1/2 2/4 5/4 O 2 9/11 Arrival Time (AT) rise / Arrival Time (AT) fall AT rise = max (AT fall all inputs) + delay(rise) AT fall = max (AT rise all inputs) + delay(fall) Συστήματα VLSI 13
Slow (critical) and fast paths Path of fastest Change Συστήματα VLSI 14
False paths Static timing analysis discovers the longest or shorter timing paths It does not inform you on which input values trigger those paths to actually evidence a rise or a fall transition There are cases that paths that appear the longest cannot be activated by construction for any possible input value -> False paths Συστήματα VLSI 15
False path Συστήματα VLSI 16
Flip-flop=master-slave latch Ta μη ιδανικά χαρακτηριστικά που σχετίζονται με τη δειγματοληψία της εισόδου αφορούν το master latch Τα μη ιδανικά χαρακτηριστικά που σχετίζονται με την αλλαγή της εξόδου αφορούν το slave latch Γ. Δημητρακόπουλος 17
Το κυνηγητό του setup Γ. Δημητρακόπουλος 18
Αποτυγχάνοντας το setup Γ. Δημητρακόπουλος 19
To κυνηγητό του hold Γ. Δημητρακόπουλος 20
Αποτυγχάνοντας τον περιορισμό hold Γ. Δημητρακόπουλος 21
Περιορισμοί των flip-flops CLK D t setup t hold Περιορισμός χρόνου setup: Ο ελάχιστος χρόνος πριν την ακμή του ρολογιού όπου τα δεδομένα είσοδου πρέπει να του καταχωρητή έχουν σταθεροποιηθεί Περιορισμός χρόνου hold: O ελάχιστός χρόνος μετά την ακμή του ρολογιού που τα δεδομένα εισόδου πρέπει να μείνουν σταθερά (δεν επιτρέπεται να αλλάξουν) t a Γ. Δημητρακόπουλος 22
Καθυστερήσεις του flip-flop Καθυστέρηση διάδοσης: tdcq = ο χρόνος μετά την ακμή του ρολογιού όπου είναι η εγγυημένο πως η έξοδος θα πάρει την τελική της τιμή Καθυστέρηση αντίδρασης: tccq = Ο χρόνος μετά την ακμή του ρολογιού όπου η έξοδος Q μπορεί να αρχίζει να αλλάζει Γ. Δημητρακόπουλος 23
Minimum clock period of a synchronous system Συστήματα VLSI 24
Minimum clock period of a synchronous system Συστήματα VLSI 25
Minimum clock period of a synchronous system Συστήματα VLSI 26
Minimum clock period of a synchronous system earlier than the dashed line Συστήματα VLSI 27
Minimum clock period of a synchronous system Συστήματα VLSI 28
Minimum clock period of a synchronous system Συστήματα VLSI 29
Minimum clock period of a synchronous system Συστήματα VLSI 30
Minimum clock period of a synchronous system Συστήματα VLSI 31
Minimum clock period analysis example The given pipeline has three paths that operate in parallel Data start from registers move through combinational log CL and sink to other registers All three paths operate in parallel and thus create three different timing paths to analyze The worst path constraints the clock period clk1, clk2, clk3 are all the same clock (no skew between them) For finding the minimum clock period we care for the worst case propagation delay of each combinational block (Tp, max) Συστήματα VLSI 32
Timing paths Path A Path B Path C Συστήματα VLSI 33
Minimum clock period For Path A: Tclk >TclkQ + 500ps + Tsetup For Path B: Tclk >TclkQ + 250ps + Tsetup For Path C: Tclk >TclkQ + 250ps +300ps + Tsetup = TclkQ+550ps+Tsetup Path C the most restrictive one requiring the largest clock period Clock is configured to run at a period of 550ps+TclkQ+Tsetup Rest paths compute their outputs earlier and wait for the next clock edge to come Most waiting is experienced in path B that has new data ready on TclkQ+250ps Such delay differences means the pipeline is unbalanced in terms of delay Συστήματα VLSI 34
Hold timing analysis Depends on the minimum delay from register R1 through the combinational logic to R2 The input to register R2 must be stable for at least t hold after the clock edge CLK Q1 D2 CLK R1 Q1 C L D2 CLK R2 t clkq + t min > t hold t min > t hold - t clkq t clkq t min t hold Συστήματα VLSI 35
Παράδειγμα (1/2) CLK A B C D CLK X' X Y' Y Χρονικά χαρακτηριστικά t ccq = 30 ps per gate per flip-fop t dcq = 50 ps t setup = 60 ps t hold = 70 ps t pd = 35 ps t cd = 25 ps t pd = 35 + 35 + 35 ps = 105 ps (A -> Y ) t cd = 25ps (D->Y ) Setup time constraint: T c Tdcq + Tpd + Tsetup = 50 + 105 + 60ps f c = 1/T c = 1/215ps = 4.65 GHz Hold time constraint t ccq + t cd > t hold? 30 + 25 = 55 < 70 ps Γ. Δημητρακόπουλος 36
Παράδειγμα (2/2) Πρόσθεσε buffers στα «μικρά» μονοπάτια: CLK CLK A B C D X' Y' X Y Χρονικά χαρακτηριστικά per gate per flip-fop t ccq = 30 ps t dcq = 50 ps t setup = 60 ps t hold = 70 ps t pd = 35 ps t cd = 25 ps t pd = 35 + 35 + 35 ps = 105 ps (A -> Y ) t cd = 25ps (D->Y ) Setup time constraint: T c Tdcq + Tpd + Tsetup = 50 + 105 + 60ps f c = 1/T c = 1/215ps = 4.65 GHz Hold time constraint: t ccq + t pd > t hold? (30 + 50) ps > 70 ps? Σωστό Γ. Δημητρακόπουλος Γ. 37
Clock distribution Συστήματα VLSI 38
Clock skew Συστήματα VLSI 39
Δίκτυο ρολογιού ολοκληρωμένου κυκλώματος Γ. Δημητρακόπουλος 40
Δίκτυα διαμοίρασης ρολογιού Πλέγμα Τα FF τροφοδοτούνται απ ευθείας από το πλέγμα χωρίς επιπλέον οδηγητές Δένδρο από αντιστροφείς οδηγεί το πλέγμα Γ. Δημητρακόπουλος 41
Χρονική άφιξη ακμών ρολογιού Γ. Δημητρακόπουλος 42
Timing analysis including clock skew Συστήματα VLSI 43
Περιορισμός setup Στη χειρότερη περίπτωση το CLK2 έρχεται νωρίτερα από το CLK1 Είναι σαν να αυξάνει το χρόνο setup από TSETUP σε TSETUP + TSKEW Προσοχή το CLK1 και το CLK2 δεν είναι διαφορετικά ρολόγια!!! ΤCΥC > ΤDCQ + TMAX + T SKEW +TSETUP CLK1 R1 Q1 C L T c D2 CLK2 R2 CLK1 CLK2 Q1 D2 t pcq t pd t setup t skew Γ. Δημητρακόπουλος 44
Minimum clock period with clock skew Συστήματα VLSI 45
Minimum clock period with clock skew Συστήματα VLSI 46
Περιορισμός hold με μη-ιδανικά ρολόγια CLK1 CLK2 CLK1 R1 Q1 C L D2 CLK2 R2 Στη χειρότερη περίπτωση το CLK2 έρχεται αργότερα από το CLK1 Είναι σαν να αυξάνει το παράθυρο του HOLD κατά ένα επιπλέον TSKEW Q1 D2 t ccq t cd t skew t hold ΤCCQ + TMIN > Τ SKEW +ΤHOLD Γ. Δημητρακόπουλος 47
Hold time check with clock skew Συστήματα VLSI 48
L i #i CL #j L j Setup constraint Launch edge arrives at Li (due to clock tree insertion delay). Data should be captured on the next edge that arrives T+Lj later (T is the clock period) L i t CQ t logic, max t setup T L j Hold constraint Launch edge arrives at Li (due to clock tree insertion delay). Data should change for the first time after the hold time of the current edge (not the next) at point j that arrives at Lj L i t CQ,min t logic, min t hold L j skew margin the differences in clock arrival times that guarantees correct operation under a period T and certain hold and setup constraints t CQ,min t logic,min t hold L i L j T t CQ t logic, max t setup
What about interface paths: Input ports? Συστήματα VLSI 50
What about interface paths: Output ports? Συστήματα VLSI 51
Design performance metrics Συστήματα VLSI 52
Optimizations two Συστήματα VLSI 53
Simple rules for consistent pipelining Συστήματα VLSI 54
Simple rules for consistent pipelining Συστήματα VLSI 55
Simple rules for consistent pipelining Συστήματα VLSI 56
Simple rules for consistent pipelining Συστήματα VLSI 57
Simple rules for consistent pipelining Συστήματα VLSI 58
All of these have the same behavior Συστήματα VLSI 59
Simple rules for consistent pipelining Συστήματα VLSI 60
Simple rules for consistent pipelining Συστήματα VLSI 61
Simple rules for consistent pipelining Συστήματα VLSI 62
Simple rules for consistent pipelining Συστήματα VLSI 63
Simple rules for consistent pipelining This cases need careful attention Throughput is increased by stream interleaving (similar to multi-threading) Out-of-scope for this course Συστήματα VLSI 64
Retiming (or register balancing) Συστήματα VLSI 65
Retiming (or register balancing) Συστήματα VLSI 66
Summary of transformations Συστήματα VLSI 67