Chapter 5 Synchronous Sequential Logic 授課教師 : 張傳育 博士 (Chuan-Yu Chang Ph.D.) Tel: (05)5342601 ext.

Slides:



Advertisements
Similar presentations
State-machine structure (Mealy)
Advertisements

EE 5900 Advanced Algorithms for Robust VLSI CAD, Spring 2009 Sequential Circuits.
COE 202: Digital Logic Design Sequential Circuits Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
A. Abhari CPS2131 Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and.
Computer Architecture CS 215
Classification of Digital Circuits  Combinational. Output depends only on current input values.  Sequential. Output depends on current input values and.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Synchronous Sequential Logic
Digital Electronics Chapter 5 Synchronous Sequential Logic.
Sequential circuits The digital circuits considered thus far have been combinational, where the outputs are entirely dependent on the current inputs. Although.
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
Digital System Ch5-1 Chapter 5 Synchronous Sequential Logic Ping-Liang Lai ( 賴秉樑 ) Digital System 數位系統.
Overview Part 1 - Storage Elements and Analysis
1 Sequential Circuits –Digital circuits that use memory elements as part of their operation –Characterized by feedback path –Outputs depend not only on.
Asynchronous Sequential Logic
Circuits require memory to store intermediate data
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 1 – Storage.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
INTRODUCTION TO SEQUENCIAL CIRCUIT
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
Sequential circuit Digital electronics is classified into combinational logic and sequential logic. In combinational circuit outpus depends only on present.
1 Lecture 23 More Sequential Circuits Analysis. 2 Analysis of Combinational Vs. Sequential Circuits °Combinational : Boolean Equations Truth Table Output.
EECC341 - Shaaban #1 Lec # 13 Winter Sequential Logic Circuits Unlike combinational logic circuits, the output of sequential logic circuits.
Asynchronous Sequential Logic
Sequential Circuits. 2 Sequential vs. Combinational Combinational Logic:  Output depends only on current input −TV channel selector (0-9) Sequential.
EE 4271 VLSI Design, Fall 2010 Sequential Circuits.
So far, all of the logic circuits we have studied were basically based on the analysis and design of combinational digital circuits. The other major aspect.
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Digital Computer Design Fundamental
COE 202: Digital Logic Design Sequential Circuits Part 1
1 Chapter 5 Synchronous Sequential Logic 5-1 Sequential Circuits Every digital system is likely to have combinational circuits, most systems encountered.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 9 Sequential.
Chap 4. Sequential Circuits
Synchronous Sequential Logic Chapter 5. Digital Circuits Sequential Circuits Combinational circuits contains no memory elements the outputs depends.
Chap 4. Sequential Circuits
Introduction to Sequential Logic Design Flip-flops FSM Analysis.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Digital Circuits State Reduction and Assignment State Reduction reductions on the number of flip-flops and the number of gates a reduction in the.
1 Synchronous Sequential Logic Sequential Circuits Every digital system is likely to have combinational circuits, most systems encountered in practice.
C HAPTER F IVE S YNCHRONOUS S EQUENTIAL L OGIC 1.
Princess Sumaya University
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
Synchronous Sequential Logic Part I
5 Chapter Synchronous Sequential Circuits 1. Logic Circuits- Review 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates.
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram.
Chapter5: Synchronous Sequential Logic – Part 1
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
Digital Design: With an Introduction to the Verilog HDL, 5e M. Morris Mano Michael D. Ciletti Copyright ©2013 by Pearson Education, Inc. All rights reserved.
2018/5/2 EE 4271 VLSI Design, Fall 2016 Sequential Circuits.
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
2018/8/29 EE 4271 VLSI Design, Fall 2013 Sequential Circuits.
Synchronous Sequential Circuits
Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and so on require.
ECE Digital logic Lecture 16: Synchronous Sequential Logic
CENG 241 Digital Design 1 Lecture 11
Chapter 5 Synchronous Sequential Logic 5-1 Sequential Circuits
Synchronous Sequential Circuits
INTRODUCTION TO LOGIC DESIGN Chapter 5 Synchronous Sequential Logic
Synchronous sequential
Synchronous Sequential
Sequential Circuits UNIT- IV
Chapter 5 Sequential Circuits.
SEQUENTIAL CIRCUITS __________________________________________________
2019/9/26 EE 4271 VLSI Design, Fall 2012 Sequential Circuits.
Presentation transcript:

Chapter 5 Synchronous Sequential Logic 授課教師 : 張傳育 博士 (Chuan-Yu Chang Ph.D.) Tel: (05) ext Office: EB212

Digital Circuits Introduction Combinational circuits contains no memory elements the outputs depends on the inputs

Digital Circuits Sequential Circuits ■ Sequential circuits Sequential circuits consist of a feedback path The binary information stored in these elements at any given time defines the state of the sequential circuit (inputs, current state)  (outputs, next state) synchronous: the transition happens at discrete instants of time asynchronous: at any instant of time

Digital Circuits 5-4 Synchronous sequential circuits a master-clock generator to generate a periodic train of clock pulses the clock pulses are distributed throughout the system Also called clocked sequential circuits most commonly used no instability problems the memory elements: flip-flops binary cells capable of storing one bit of information two outputs: one for the normal value and one for the complement value maintain a binary state indefinitely until directed by an input signal to switch states 5-2 Sequential Circuits (cont.)

Digital Circuits 5-5 Fig. 5.2 Synchronous clocked sequential circuit 5-2 Sequential Circuits (cont.) 多了時脈訊號

Digital Circuits Latches Latches Storage elements that operate with single level. level sensitive devices Flip-Flops Controlled by a clock transition. Edge sensitive devices

Digital Circuits Latches Basic flip-flop circuit two NOR gates more complicated types can be built upon it directed-coupled RS flip-flop: the cross-coupled connection an asynchronous sequential circuit (S,R)= (0,0): no operation (S,R)=(0,1): reset (Q=0, the clear state) (S,R)=(1,0): set (Q=1, the set state) (S,R)=(1,1): indeterminate state (Q=Q'=0)

Digital Circuits 5-8 SR latch with NAND gates Fig. 5.4 SR latch with NAND gates 5-3 Latches (cont.)

Digital Circuits 5-9 SR latch with control input E n =0, no change E n =1, information from the S or R input is allowed to affect the latch. Fig. 5.5 SR latch with control input 5-3 Latches (cont.) The set state is reached with En=1, S=1, R=0 To change to the reset state, En=1, S=0, R=1 When En=0, the circuit remains in its current state. An indeterminate condition occurs when all three inputs are equal to 1 S- R-

Digital Circuits 5-10 D Latch eliminate the undesirable conditions of the indeterminate state in the RS flip-flop D: data gated D-latch D  Q when E n =1; no change when E n =0 Fig. 5.6 D latch S_ R_ 0/1 1/D' 1/D 5-3 Latches (cont.)

Digital Circuits 5-11 Fig. 5.7 Graphic symbols for latches 5-3 Latches (cont.) 當 NAND gate 的輸入端為 1 時,輸出的狀態由另一個輸 入端決定。 當 NAND gate 的輸入端為 0 時,輸出端必為 1 。 因此, NAND gate 屬於低態動作 (active low) 。所以在輸入端 加上小圈圈。 NOR 組成之 RS Flip-Flop NAND 組成之 RS Flip-Flop

Digital Circuits Flip-Flops A trigger The state of a latch or flip-flop is switched by a change of the control input Level triggered – latches Edge triggered – flip-flops Fig. 5.8 Clock response in latch and flip-flop

Digital Circuits 5-13 If level-triggered flip-flops are used the feedback path may cause instability problem To solve the instability problem Master-Slave Flip-Flops Edge-triggered flip-flops the state transition happens only at the edge eliminate the multiple-transition problem 5-4 Flip-Flops (cont.)

Digital Circuits 5-14 Edge-triggered D flip-flop Master-slave D flip-flop two separate flip-flops a master flip-flop (positive-level triggered) a slave flip-flop (negative-level triggered) Fig. 5.9 Master-slave D flip-flop Clk =0, slave D latch Enable, Q=Y master D latch Disable Clk =1, master D latch Enable, Y=D slave D latch Disable, Q=Y Clk =0, slave D latch Enable, Q=D master D latch disable

Digital Circuits 5-15 CP = 1: (S,R)  (Y,Y'); (Q,Q') holds CP = 0: (Y,Y') holds; (Y,Y')  (Q,Q') (S,R) could not affect (Q,Q') directly the state changes coincide with the negative-edge transition of CP 第三版內容,參考用 !

Digital Circuits 5-16 Edge-triggered flip-flops the state changes during a clock-pulse transition A D-type positive-edge-triggered flip-flop Fig D-type positive-edge- triggered flip-flop When Clk =0, S and R are maintained at the logic-1 level. => 輸出維持現態。 Clk=1, D=0 => R=0, => Q=0

Digital Circuits 5-17 three basic flip-flops (S,R) = (0,1): Q = 1 (S,R) = (1,0): Q = 0 (S,R) = (1,1): no operation (S,R) = (0,0): should be avoided Fig D-type positive-edge- triggered flip-flop

Digital Circuits 第三版內容, 參考用 !

Digital Circuits 5-19 The setup time D input must be maintained at a constant value prior to the application of the positive Clk pulse = the propagation delay through gates 4 and 1 data to the internal latches The hold time D input must not changes after the application of the positive Clk pulse = the propagation delay of gate 3 clock to the internal latch The propagation delay time The interval between the trigger edge and the stabilization of the output to a new state.

Digital Circuits 5-20 Summary Clk =0: (S,R) = (1,1), no state change Clk =  : state change once Clk =1: state holds eliminate the feedback problems in sequential circuits All flip-flops must make their transition at the same time

Digital Circuits 5-21 Other Flip-Flops The edge-triggered D flip-flops The most economical and efficient Positive-edge and negative-edge Fig Graphic symbols for edge- triggered D flip-flop

Digital Circuits 5-22 JK flip-flop D=JQ'+K'Q J=0, K=0 : D=Q, no change J=0, K=1: D=0  Q =0 J=1, K=0: D=1  Q =1 J=1, K=1: D=Q'  Q =Q' Fig JK flip-flop

Digital Circuits 5-23 T flip-flop D = T ⊕ Q = TQ'+T'Q T=0: D=Q, no change T=1: D=Q'  Q=Q' Fig T flip-flop

Digital Circuits 5-24 Characteristic tables

Digital Circuits 5-25 Characteristic equations D flip-flop Q ( t +1) = D JK flip-flop Q ( t +1) = JQ'+K'Q T flop-flop Q ( t +1) = T ⊕ Q

Digital Circuits 5-26 Direct inputs asynchronous set and/or asynchronous reset S_ reset_ Fig D flip-flop with asynchronous reset

Digital Circuits Analysis of Clocked Sequential Circuits A sequential circuit Clocked sequential circuit (inputs, current state)  (output, next state) 推得 a state transition table or state transition diagram Fig Example of sequential circuit

Digital Circuits 5-28 State equations A(t+1) = A(t)x(t) + B(t)x(t) B(t+1) = A'(t)x(t) A compact form A ( t+1 ) = Ax + Bx B ( t+1 ) = A’x The output equation y ( t ) = ( A ( t )+ B ( t )) x '( t ) y = ( A+B ) x '

Digital Circuits 5-29 State table State transition table = state equations

Digital Circuits 5-30 State equation A(t + 1) =Ax + Bx B(t + 1) = Ax y = Ax + Bx 由 Table 5.2 ,以卡諾圖畫簡可得 state equation State Table 也可表示成下表

Digital Circuits 5-31 State diagram State transition diagram a circle: a state a directed lines connecting the circles: the transition between the states Each directed line is labeled 'inputs/outputs‘ a logic diagram  a state table  a state diagram Fig State diagram of the circuit of Fig. 5.15

Digital Circuits 5-32 Flip-flop input equations Flip-flop input equation The part of circuit that generates the inputs to flip- flops Also called excitation functions D A = Ax +Bx D B = A'x The output equations The part of the combinational circuit that generates external outputs is described algebraically by a set of Boolean functions to fully describe the sequential circuit y = (A+B)x'

Digital Circuits 5-33 Analysis with D flip-flops The input equation D A = A ⊕ x ⊕ y The state equation A ( t+1 )= A ⊕ x ⊕ y Fig Sequential circuit with D flip-flop

Digital Circuits 5-34 Analysis with JK flip-flops Determine the flip-flop input function in terms of the present state and input variables Used the corresponding flip-flop characteristic table to determine the next state Fig Sequential circuit with JK flip-flop

Digital Circuits 5-35 J A = B, K A = Bx' J B = x', K B = A'x + Ax’ derive the state table Or, derive the state equations using characteristic eq. Analysis with JK flip-flops (cont.)

Digital Circuits 5-36 State transition diagram Fig State diagram of the circuit of Fig State equation for A and B: Analysis with JK flip-flops (cont.)

Digital Circuits 5-37 Analysis with T flip-flops The characteristic equation Q ( t+1 )= T ⊕ Q = TQ'+T'Q Fig Sequential circuit with T flip-flop

Digital Circuits 5-38 Analysis with T flip-flops (cont.) The input and output functions T A =Bx T B = x y = AB The state equations A(t+1) = (Bx)'A+(Bx)A' =AB'+Ax'+A'Bx B ( t+1 ) = x ⊕ B

Digital Circuits 5-39 State Table Analysis with T flip-flops (cont.)

Digital Circuits 5-40 Mealy and Moore models The Mealy model: the outputs are functions of both the present state and inputs (Fig. 5-15) the outputs may change if the inputs change during the clock pulse period the outputs may have momentary false values unless the inputs are synchronized with the clocks The Moore model: the outputs are functions of the present state only (Fig. 5-18, 5-20) The outputs are synchronous with the clocks

Digital Circuits 5-41 Mealy and Moore models (cont.) Fig Block diagram of Mealy and Moore state machine

Digital Circuits State Reduction and Assignment State Reduction reductions on the number of flip-flops and the number of gates a reduction in the number of states may result in a reduction in the number of flip-flops a example state diagram Fig State diagram

Digital Circuits 5-43 state a a b c d e f f g f g a input output only the input-output sequences are important two circuits are equivalent have identical outputs for all input sequences the number of states is not important Fig State diagram

Digital Circuits 5-44 Equivalent states Two states are said to be equivalent for each member of the set of inputs, they give exactly the same output and send the circuit to the same state or to an equivalent state one of them can be removed

Digital Circuits 5-45 Reducing the state table e=g d=? ( 狀態 g 已經被狀態 e 所取代 )

Digital Circuits 5-46 the reduced finite state machine statea a b c d e d d e d e a input output ( 狀態 f 已經被狀態 d 所取代 )

Digital Circuits 5-47 the checking of each pair of states for possible equivalence can be done systematically (9-5) the unused states are treated as don't-care condition  fewer combinational gates Fig Reduced State diagram

Digital Circuits 5-48 State assignment to minimize the cost of the combinational circuits three possible binary state assignments

Digital Circuits 5-49 State assignment any binary number assignment is satisfactory as long as each state is assigned a unique number use binary assignment 1

Digital Circuits Design Procedure From the word description of the circuit behavior, derive a state diagram for the circuit. State reduction if necessary Assign binary values to the states Obtain the binary-coded state table Choose the type of flip-flops Derive the simplified flip-flop input equations and output equations Draw the logic diagram

Digital Circuits 5-51 Synthesis using D flip-flops An example state diagram and state table Detects a sequence of three or more consecutive 1’s in a string of bits coming through an input line. Fig State diagram for sequence detector

Digital Circuits 5-52 The flip-flop input equations A(t+1) = D A (A,B,x) =  (3,5,7) B(t+1) = D B (A,B,x) =  (1,5,7) The output equation y(A,B,x) =  (6,7) Logic minimization using the K map D A = Ax + Bx D B = Ax + B'x y = AB Synthesis using D flip-flops

Digital Circuits 5-53 Fig Maps for sequence detector

Digital Circuits 5-54 Sequence detector The logic diagram Fig Logic diagram of sequence detector

Digital Circuits 5-55 Excitation tables A state diagram  flip-flop input functions straightforward for D flip-flops we need excitation tables for JK and T flip-flops

Digital Circuits 5-56 Synthesis using JK flip-flops The state table and JK flip-flop inputs

Digital Circuits 5-57 J A = Bx'; K A = Bx J B = x; K B = (A ⊕ x)‘ y = ? Fig Maps for J and K input equations

Digital Circuits 5-58 Fig Logic diagram for sequential circuit with JK flip-flops

Digital Circuits 5-59 Synthesis using T flip-flops A n -bit binary counter the state diagram no inputs (except for the clock input) Fig State diagram of three- bit binary counter

Digital Circuits 5-60 The state table and the flip-flop inputs

Digital Circuits 5-61 Fig Maps of three-bit binary counter

Digital Circuits 5-62 Logic simplification using the K map T A2 = A 1 A 2 T A1 = A 0 T A0 = 1 The logic diagram Fig Logic diagram of three-bit binary counter

Digital Circuits Synthesizable HDL Models of Sequential Circuits Behavioral Modeling Example: Two ways to provide free-running clock Example: Another way to describe free-running clock

Digital Circuits 5-64 Behavioral Modeling  always statement Examples: Two procedural blocking assignments:Two nonblocking assignments:

Digital Circuits 5-65 Flip-Flops and Latches ■ HDL Example 5.1

Digital Circuits 5-66 Flip-Flops and Latches ■ HDL Example 5.2

Digital Circuits 5-67 Characteristic Equation Q(t + 1) = Q ⊕ T Q(t + 1) = JQ + KQ For a T flip-flop For a JK flip-flop ■ HDL Example 5.3

Digital Circuits 5-68 HDL Example 5-3 (Continued)

Digital Circuits 5-69 HDL Example 5-4  Functional description of JK flip-flop

Digital Circuits 5-70 State Diagram ■ HDL Example 5.5: Mealy HDL model

Digital Circuits 5-71 HDL Example 5-5 (Continued)

Digital Circuits 5-72 HDL Example 5-5 (Continued)

Digital Circuits 5-73 Mealy_Zero_Detector Fig Simulation output of Mealy_Zero_Detector

Digital Circuits 5-74 HDL Example 5-6: Moore Model FSM

Digital Circuits 5-75 Simulation Output of HDL Example 5-6 Fig Simulation output of HDL Example 5.6

Digital Circuits 5-76 Structural Description of Clocked Sequential Circuits ■ HDL Example 5.7: State-diagram-based model

Digital Circuits 5-77 HDL Example 5-7 (Continued)

Digital Circuits 5-78 HDL Example 5-7 (Continued)

Digital Circuits 5-79 HDL Example 5-7 (Continued)

Digital Circuits 5-80 HDL Example 5-7 (Continued)

Digital Circuits 5-81 Simulation Output of HDL Example 5-7 Fig Simulation output of HDL Example 5.7