digital logic design a rigorous approach c
play

Digital Logic Design: a rigorous approach c Chapter 19: - PowerPoint PPT Presentation

Digital Logic Design: a rigorous approach c Chapter 19: Foundations of Synchronous Circuits Guy Even Moti Medina School of Electrical Engineering Tel-Aviv Univ. May 30, 2019 Book Homepage: http://www.eng.tau.ac.il/~guy/Even-Medina 1 /


  1. Digital Logic Design: a rigorous approach c � Chapter 19: Foundations of Synchronous Circuits Guy Even Moti Medina School of Electrical Engineering Tel-Aviv Univ. May 30, 2019 Book Homepage: http://www.eng.tau.ac.il/~guy/Even-Medina 1 / 55

  2. Preliminary questions What is a synchronous circuit? 1 How can we tell if the clock period is not too short? Is it 2 possible to compute the minimum clock period? Is it possible to separate between the timing analysis and 3 functionality in synchronous circuits? How can we initialize a synchronous circuit? 4 2 / 55

  3. Synchronous Circuits building blocks: combinational gates, wires, and flip-flops. the graph G of a synchronous circuit is directed but may contain cycles. use flip-flops, hence the labeling π : V → Γ ∩ IO ∪ { FF } . a flip-flop has two inputs D and clk that play quite different roles. We must make sure that we know the input port of each incoming edge. the clock signal must be fed to the clk input port of each and every flip-flop! definition based on a reduction to a combinational circuit... 3 / 55

  4. Synchronous Circuits Definition A synchronous circuit is a circuit C composed of combinational gates, wires, and flip-flops that satisfies the following conditions: There is an input gate that feeds the clock signal clk . 1 The set of ports that are fed by the clock clk equals the set 2 of clock-inputs of the flip-flops. Let C ′ denote a circuit obtained from C by stripping the 3 flip-flops away. Then, the circuit C ′ is a combinational circuit. 4 / 55

  5. Stripping Flip-Flops Away Definition Delete the input gate that feeds the clock clk and all the 1 wires carrying the clock signal. Remove all the flip-flops. 2 Add an output gate for each D port. 3 Add an input gate for each Q port. 4 5 / 55

  6. Example - stripping FFs away clk clk ff or and 3 ff or and 3 Figure: A synchronous circuit C and the combinational circuit C ′ obtained from C by stripping away the flip-flops. 6 / 55

  7. Remarks: It is easy to check if a given circuit C is a synchronous circuit. Check if there is a clock signal that is connected to all the clock terminals of the flip-flops and only to them. Strip the flip-flops away to obtain the circuit C ′ . Check if C ′ is a combinational circuit. 7 / 55

  8. Cycles in a synchronous circuit Claim Every cycle in a synchronous circuit traverses at least one flip-flop. 8 / 55

  9. The Canonic Form of a Synchronous Circuit comb. circuit OUT λ IN comb. circuit δ S NS Q D clk Figure: A synchronous circuit in canonic form. 9 / 55

  10. Stability interval Definition stability interval of signal X : an interval corresponding to the i th clock cycle during which the signal X is stable. Notation: stable ( X ) i - stability interval of X during clock cycle i . X i - the digital value of X during the interval stable ( X ) i . Stability Interval and Specification: If X is an input, then we are guaranteed that the input will stable during stable ( X ) i . If Y is an output, then we must design the circuit so that Y will be stable during stable ( Y ) i . 10 / 55

  11. Example clk clk combinational Q 0 ( t ) D 1 ( t ) D 0 ( t ) Q 1 ( t ) circuit ff 1 ff 2 C C i A i C i +1 A i +1 clk t su ( FF 1 ) D 0 ( t ) t hold ( FF 1 ) t cont ( FF 1 ) Q 0 ( t ) t pd ( FF 1 ) cont ( C ) pd ( C ) t su ( FF 2 ) D 1 ( t ) t hold ( FF 2 ) 11 / 55

  12. Stability Interval of D 0 We require that the input D 0 ( t ) to flip-flop FF 1 is stable during the critical segments of FF 1 , namely, for every i ≥ 0: △ stable ( D 0 ) i = C i +1 ( FF 1 ) = ( t i +1 − t su ( FF 1 ) , t i +1 + t hold ( FF 2 )) . Note, that the stability interval corresponding to the i th clock cycle of an input of a flip-flop must contain the critical segment C i +1 . Indeed, in the i th clock cycle, the flip-flop samples its input at the end of the cycle, at time t i +1 . 12 / 55

  13. Stability Interval of Q 0 The stability interval of the output Q 0 ( t ) of flip-flop FF 1 is defined by △ stable ( Q 0 ) i = ( t i + t pd ( FF 1 ) , t i +1 + t cont ( FF 1 )) . The rational behind this definition is that if the input D 0 ( t ) is stable during every critical segment C i , then the output Q 0 ( t ) of the flip-flop is stable in the above interval. 13 / 55

  14. Problem!? we have a problem with the guarantee for the stability interval of Q 0 during clock cycle zero. This is not a minor technical issue! How can we argue anything about the output of FF 1 during clock cycle zero?! To solve this problem, we need an initialization assumption... In the meantime, assume that △ stable ( Q 0 ) i = ( t i + t pd ( FF 1 ) , t i +1 + t cont ( FF 1 )) . holds also for i = 0. 14 / 55

  15. Stability Interval D 1 To ensure proper functionality, the input D 1 ( t ) must be stable during the critical segments of flip-flop FF 2 . Therefore, we define the stability interval of D 1 ( t ) as follows: △ stable ( D 1 ) i = C i +1 ( FF 2 ) = ( t i +1 − t su ( FF 2 ) , t i +1 + t hold ( FF 2 )) . 15 / 55

  16. Timing analysis: sufficient conditions A sufficient condition that guarantees that D 1 ( t ) is indeed stable during the stability intervals { stable ( D 1 ) i } i ≥ 0 . Claim The signal D 1 ( t ) is stable during the critical segments of flip-flop FF 2 if ∀ i ≥ 0 : t pd ( FF 1 ) + pd( C ) + t su ( FF 2 ) ≤ t i +1 − t i , and t hold ( FF 2 ) ≤ t cont ( FF 1 ) + cont( C ) . 16 / 55

  17. two important lessons: Minimum clock period: To ensure proper functionality, the clock period cannot be too short. Namely, the time t i +1 − t i between two consecutive rising clock edges must be longer than t pd ( FF 1 ) + pd ( C ) + t su ( FF 2 ). Use simple flip-flops: Inequality t hold ( FF 2 ) ≤ t cont ( FF 1 ) + cont ( C ) . is satisfied if t cont ( FF 1 ) ≥ t hold ( FF 2 ). 17 / 55

  18. The Canonic Form of a Synchronous Circuit comb. circuit OUT λ IN comb. circuit δ S NS Q D clk What about input and output timing constraints ? Constraints for NS? 18 / 55

  19. Input/Output Timing Constraints Simplifying Assumption: Input is an output of a flip-flip. △ stable ( IN ) i = ( t i + pd ( FF IN ) , t i +1 + cont ( FF IN )) . Output is an input of a flip-flip. △ stable ( OUT ) i = ( t i +1 − setup ( FF OUT ) , t i +1 + hold ( FF OUT )) . Benefit: timing constraints same as before. Of course pd ( FF IN ) > cont ( FF IN ). 19 / 55

  20. Timing constraints of internal signals. The only constraint we have for an internal signal is that the signal NS that feeds a flip-flop is stable during the critical segments. Namely, for every i ≥ 0, △ stable ( NS ) i = C i +1 . 20 / 55

  21. Paths in the canonic form When performing a timing analysis of a synchronous circuit in canonic form, we notice that there are only four maximal paths without flip-flops: the path IN → δ → NS , 1 the path S → δ → NS , 2 the path IN → λ → OUT , and 3 the path S → λ → OUT . 4 We regard the signal IN to be the output of a flip-flop, and the signal OUT to be an input to a flip-flop, then we have four paths of the type studied in the simple example. 21 / 55

  22. Sufficient Conditions the timing constraints of NS are satisfied if: ∀ i ≥ 0 : max { pd ( IN ) , t pd ( FF ) } + pd ( δ ) + t su ( FF ) ≤ t i +1 − t i , and min { cont ( IN ) , t cont ( FF ) } + cont ( δ ) ≥ t hold ( FF ) . the timing constraints of OUT are satisfied if: ∀ i ≥ 0 : max { pd ( IN ) , t pd ( FF ) } + pd ( λ ) + setup ( OUT ) ≤ t i +1 − t i , and min { cont ( IN ) , t cont ( FF ) } + cont ( λ ) ≥ hold ( OUT ) . Claim The timing constraints of the signals OUT and NS are satisfied if the above equations hold. 22 / 55

  23. Satisfying the Timing Constrains What do we need to do to make sure that the timing constraints of a synchronous circuit are satisfied? lower bounds on the clock period. use simple flip-flops in which t cont ≥ t hold . 23 / 55

  24. Initialization we require that the output of every flip-flop be defined and stable during the interval ( t 0 + t pd ( FF ) , t 1 + t cont ( FF )). How is the first clock cycle [ t 0 , t 1 ) defined? What is the state of a flip-flop after power on? introduce a reset signal. How is a reset signal generated? Why does a reset signal differ from the the output of the flip-flop? After all, the reset signal might be metastable. no solution to this problem within the digital abstraction. All we can try to do is reduce the probability of such an event. In practice, a special circuit, often called a reset controller, generates a reset signal that is stable during the first clock period with very high probability. In fact, the first clock period of the synchronous circuit is defined by the reset controller. 24 / 55

  25. Specification of the reset signal Assume that the reset signal is output by a flip-flop so that it satisfies two conditions: � 1 if t ∈ ( t 0 + t pd ( FF ) , t 1 + t cont ( FF )), △ reset ( t ) = 0 if t > t 1 + t pd ( FF ). 25 / 55

  26. Using the reset comb. circuit OUT λ IN comb. circuit δ S NS Q D 0 2 : 1- mux 1 sel clk initial state reset Figure: A synchronous circuit in canonic form with reset. 26 / 55

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