vlsi design
play

VLSI Design Part 2.2.1: Sequential circuit Liang Liu - PowerPoint PPT Presentation

EITF35: Introduction to Structured VLSI Design Part 2.2.1: Sequential circuit Liang Liu liang.liu@eit.lth.se 1 Lund University / EITF35/ Liang Liu Outline Sequential vs. Combinational Synchronous vs. Asynchronous Basic Storage


  1. EITF35: Introduction to Structured VLSI Design Part 2.2.1: Sequential circuit Liang Liu liang.liu@eit.lth.se 1 Lund University / EITF35/ Liang Liu

  2. Outline  Sequential vs. Combinational  Synchronous vs. Asynchronous  Basic Storage Elements  Timing  Folding & Pipeline 2 Lund University / EITF35/ Liang Liu

  3. Sequential vs. Combinational  A combinational circuit: inputs X outputs Y Combinational Circuits  At any time, outputs depend only on present inputs • Changing inputs changes outputs  No regard for previous inputs • No memory (history)  Time is “ignored” ! • Time-independent circuit 3 Lund University / EITF35/ Liang Liu

  4. Sequential vs. Combinational  A sequential circuit: inputs X outputs Y Combinational Circuits next state present state Storage  Outputs depends on inputs and past history of inputs • Previous inputs can be stored into storage elements • Input order matters 4 Lund University / EITF35/ Liang Liu

  5. Sequential vs. Combinational 5 Lund University / EITF35/ Liang Liu

  6. Sequential vs. Combinational: adders   Calculate A A A A B B B B 3 2 1 0 3 2 1 0  Combinational adder • 4 full adders are required • One adder is active at a time slot 6 Lund University / EITF35/ Liang Liu

  7. What we can do with storage elements?  Sequential Adder  Folding! • One full adder • 1-bit memory for carry • Two 4-bit memory for operators  4 clock cycles to get the output 7 Lund University / EITF35/ Liang Liu

  8. Outline  Sequential vs. Combinational  Synchronous vs. Asynchronous  Basic Storage Elements  Timing  Folding & Pipeline 8 Lund University / EITF35/ Liang Liu

  9. Synchronous vs. Asynchronous  Two types of sequential circuits: • Synchronous: The behavior of the circuit depends on the input signal at discrete instances of time (also called clocked ) Combinatio Inputs Outputs nal Circuit Flip-flops Clock • Asynchronous: The behavior of the circuit depends on the input signals at any instance of time Combination Inputs Outputs al Storage Circuit 9 Lund University / EITF35/ Liang Liu

  10. Synchronous vs. Asynchronous  When you have a clock  You know that washer takes 1 hour  You put the laundry in the washer and leave  Dry 1hour later 10 Lund University / EITF35/ Liang Liu

  11. Synchronous vs. Asynchronous  What if you don’t have a clock … 11 Lund University / EITF35/ Liang Liu

  12. Synchronous or Asynchronous?  Sync. Advantages: Simplicity to design, debug, and test • Timing is controlled by one simple clock • No hand-shake circuits • Well supported by EDA tools • Recommended for VLSI  Sync. Disadvantages: • Performance constrained by worst-case: critical path • Overhead for clock network • Less power efficient We will focus on synchronous circuits in this course 12 Lund University / EITF35/ Liang Liu

  13. Power Example 13 Lund University / EITF35/ Liang Liu

  14. Outline  Sequential vs. Combinational  Synchronous vs. Asynchronous  Basic Storage Elements  Timing  Folding & Pipeline 14 Lund University / EITF35/ Liang Liu

  15. Basic storage element  D latch: level sensitive  D flip-flop (D-FF): edge sensitive D latch pos-edge triggered D-FF neg-edge triggered D-FF with reset D-FF 15 Lund University / EITF35/ Liang Liu

  16. Why Reset?  Initial State 16 Lund University / EITF35/ Liang Liu

  17. Why Reset?  Initial State  Some Hints • Efficient sync. design for complicated system • The importance of sync initial state • A good clock is crucial • No timing violation 17 Lund University / EITF35/ Liang Liu

  18. Basic storage element (Timing)  D latch: level sensitive  D flip-flop (D-FF): edge sensitive 18 Lund University / EITF35/ Liang Liu

  19. Problem with Latches  Problem: A latch is transparent; state keep changing as long as the clock remains active  Due to this uncertainty, latches can not be reliably used as storage elements.  What is the output (Q), assume has been reset to 0 DFF Example Q D Q Clock clk 19 Lund University / EITF35/ Liang Liu

  20. Problem with Latches  Problem: A latch is transparent; state keep changing as long as the clock remains active  Due to this uncertainty, latches can not be reliably used as storage elements.  What happens if Clock=1? What will be the value of Q when Clock goes to 0? Latch Example Q D Q Clock C Most EDA software tools have difficulty with latches. 20 Lund University / EITF35/ Liang Liu

  21. Outline  Sequential vs. Combinational  Synchronous vs. Asynchronous  Basic Storage Elements  Timing  Folding & Pipeline 21 Lund University / EITF35/ Liang Liu

  22. Flip Flops Timing Very Important Timing Considerations!  Setup Time (Ts): The minimum time during which D input must be maintained before the clock transition occurs.  Hold Time (Th): The minimum time during which D input must not be changed after the clock transition occurs. 22 Lund University / EITF35/ Liang Liu

  23. Metastability in Digital Logic Metastability 23 Lund University / EITF35/ Liang Liu

  24. How fast can a synchronous circuit run?  RTL (Register Transfer Level)  Timing analysis: • Starting with the clock rising edge at the launch FF, end with the clock rising edge (next period or same period) of the capture FF 24 Lund University / EITF35/ Liang Liu

  25. Setup Time  Setup Timing analysis: R 1 R 2 In COMB D Q D Q • Starting with the clock rising edge at the launch FF, end with t Clk 1 t Clk 2 the clock rising edge (next period) Clk of the capture FF  Data-Path (arrive time): T Combinational logic + FF launch (clk -> Q)  Clock-Path (required time): Clock Period - FF tSetup  Timing constraint : T Combinational logic + FF launch (clk -> Q) < Clock Period - FF tSetup D Slack time Clk t comb t c-q t setup 25 Lund University / EITF35/ Liang Liu

  26. Hold Time D 1 Q 1  Hold Timing analysis: D Q D Q • Starting with the clock rising Clk Clk edge at the launch FF, end with the clock rising edge (same period) of the capture FF  Data-Path (arrive time): T Combinational logic + FF launch (clk -> Q)  Clock-Path (required time): FF tHold  Timing constraint : T Combinational logic + FF launch (clk -> Q)> FF tHold T hold T hold Clk Clk Q 1 Q 1 D 1 D 1 T c-q +T comb T c-q +T comb 26 Lund University / EITF35/ Liang Liu

  27. Clock uncertainty 27 Lund University / EITF35/ Liang Liu

  28. Clock uncertainty 28 Lund University / EITF35/ Liang Liu

  29. Clock tree 29 Lund University / EITF35/ Liang Liu

  30. Outline  Sequential vs. Combinational  Synchronous vs. Asynchronous  Basic Storage Elements  Timing  Folding & Pipeline 32 Lund University / EITF35/ Liang Liu

  31. Pipeline  Acknowledgement: • The following slides have been provided by Prof. Ward in September 2004. • Reformatting of PowerPoint and addition of two more slide done September 2007 by Jens Sparsø. • Slides are used in DTU course 02154 Digital Systems Engineering (fall 2008). • Due to Joachim Rodrigues’ position at DTU, I used some of the slides in EITF35. 33 Lund University / EITF35/ Liang Liu

  32. Pipelining  Start again from laundry room  Small laundry has one washer, one dryer and one folder, it takes 110 minutes to finish one load: • Washer takes 40 minutes • Dryer takes 50 minutes •“Folding” takes 20 minutes  Need to do 4 laundries 34 Lund University / EITF35/ Liang Liu

  33. A not very smart way... Time 40 50 20 40 50 20 40 50 20 40 50 20 1 Laundries 2 3 110 min 4 Total = N*(Washer+ Dryer+Folder) 440 = ___________ mins 35 Lund University / EITF35/ Liang Liu

  34. If we pipelining Time 40 50 50 50 50 20 1 Laundries 2 3 The washer waits for the 4 dryer for 10 minutes Total = Washer+N*Max(Washer,Dryer,Folder)+Folder = ___________ mins 260 36 Lund University / EITF35/ Liang Liu

  35. Pipeline Facts Time  Multiple tasks operating simultaneously  Pipelining doesn’t help latency 40 50 50 50 50 20 of single task, it helps throughput of entire workload 1  Pipeline rate limited by slowest pipeline stage Laundries 2  Unbalanced lengths of pipe stages reduces speedup  Potential speedup ∝ Number 3 of pipe stages 4 37 Lund University / EITF35/ Liang Liu

  36. Some definitions Very Important!  Latency: The delay from when an input is established until the output associated with that input becomes valid. 110 (non-pipeline Laundry = _________ mins) ( pipeline Laundry = _________ mins) 120 40 50 50 50 50 20 1 Laundries 2 3 delay 4 38 Lund University / EITF35/ Liang Liu

  37. Some definitions Very Important!  Throughput: The rate of which inputs or outputs are processed or how frequently a laundry can be loaded 1/110 (non-pipeline Laundry = _________ outputs/min) 1/50 (pipeline Laundry = _________ outputs/min) 40 50 50 50 50 20 1 Laundries 2 3 1/throughput 4 39 Lund University / EITF35/ Liang Liu

  38. Okay, back to circuits…  Combinational logic: F latency = t PD , 15 throughput = 1/t PD . X H P(X)  Can we use the hardware more 25 efficiently? G 20 1/t PD X F(X) G(X) P(X) F & G are “ idle ” , just holding their outputs stable while H performs its computation 40 Lund University / EITF35/ Liang Liu

Recommend


More recommend