CSE 140 Lecture 9 Sequential Networks

Slides:



Advertisements
Similar presentations
ENGIN112 L23: Finite State Machine Design Procedure October 27, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 23 Finite State Machine.
Advertisements

State-machine structure (Mealy)
CS 140 Lecture 10 Sequential Networks: Implementation Professor CK Cheng CSE Dept. UC San Diego 1.
Analysis of Clocked Sequential Circuits
FSM Revisit Synchronous sequential circuit can be drawn like below  These are called FSMs  Super-important in digital circuit design FSM is composed.
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Circuits require memory to store intermediate data
CS 151 Digital Systems Design Lecture 21 Analyzing Sequential Circuits.
1 Lecture 23 More Sequential Circuits Analysis. 2 Analysis of Combinational Vs. Sequential Circuits °Combinational : Boolean Equations Truth Table Output.
Sequential Design Part II. Output A(t+1) =D A = AX + BX B(t+1) =D B = AX Y = AX + BX.
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
CS 140 Lecture 9 Professor CK Cheng 4/30/02. Part II. Sequential Network 1.Memory 2.Specification 3.Implementation S XY s i t+1 = g i (S t, x t )
CS 140 Lecture 8 Professor CK Cheng 4/26/02. Part II. Sequential Network 1.Memory SR, D, T, JK, 2.Specification S XY s i t+1 = g i (S t, X t )
CSE 140 Lecture 8 Sequential Networks Professor CK Cheng CSE Dept. UC San Diego 1.
1 CS 140 Lecture 9 Sequential Networks Professor CK Cheng CSE Dept. UC San Diego.
CS 140 Lecture 8 Sequential Networks Professor CK Cheng CSE Dept. UC San Diego.
Sequential Circuits and Finite State Machines Prof. Sin-Min Lee
Give qualifications of instructors: DAP
CS 140 Lecture 10 Professor CK Cheng 5/02/02. Given the state table, implement with 2 JK flip flops id Q 1 (t) 0 1 Q 0 (t) X(t)
Sequential Circuit Design
CS 140L Lecture 7 Professor CK Cheng 11/12/02. Transformation between Mealy and Moore Machines Algorithm: 1) For each NS, z = S i, j create a state S.
CS 140 Lecture 11 Professor CK Cheng 5/31/02. C1C2 CLK x(t) y(t) Sequential Network Implementation Mealy & Moore machine State Table  Netlist s(t) D(t)
CS 140 Lecture 10 Professor CK Cheng 10/29/02. Part II. Sequential NetworkReminder 1.Flip flops 2.Specification 3.Implement Netlist  State Table  State.
CS 140 Lecture 8 Professor CK Cheng 10/22/02. Part II. Sequential Network 1.Flip-flops SR, D, T, JK, State Table Characteristic Eq. Q(t+1) = f(x(t), Q(t)).
CS 140L Lecture 7 Transformation between Mealy and Moore Machines Professor CK Cheng CSE Dept. UC San Diego.
CS 140 Lecture 9 Professor CK Cheng 10/24/02. Sequential Network 1.Components F-Fs 2.Specification D Q Q’ CLK.
Lecture 8: Sequential Networks and Finite State Machines CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer.
1 COMP541 State Machines Montek Singh Feb 8, 2012.
Sequential Logic Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer Organization and.
Lecture 18 More Moore/Mealy machines.
1 Lecture #12 EGR 277 – Digital Logic Synchronous Logic Circuits versus Combinational Logic Circuits A) Combinational Logic Circuits Recall that there.
CPEN Digital System Design Chapter 5 - Sequential Circuits Sequential Circuit Design C. Gerousis © Logic and Computer Design Fundamentals, 4 rd Ed.,
Lecture 9: Sequential Networks: Implementation CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer Science.
Lecture 5. Sequential Logic 2 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
DLD Lecture 26 Finite State Machine Design Procedure.
Sequential Circuit: Analysis BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Lecture 7: Sequential Networks CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer Science and Engineering.

1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
CSE 140: Components and Design Techniques for Digital Systems Lecture 7: Sequential Networks CK Cheng Dept. of Computer Science and Engineering University.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
CSE 140: Components and Design Techniques for Digital Systems Lecture 9: Sequential Networks: Implementation CK Cheng Dept. of Computer Science and Engineering.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
CSE 140 Lecture 8 Sequential Networks
Lecture 7: Sequential Networks
Sequential Networks and Finite State Machines
Lecture 4. Sequential Logic #2
Mealy Machine x X1 X2 S S1 S2 S3 x X1 X2 S S1 Y1 Y2 S2 Y3 S3 outputs
COMP541 Sequential Logic – 2: Finite State Machines
Digital Design Lecture 9
Assistant Prof. Fareena Saqib Florida Institute of Technology
CSE 140 MT 2 Review By Daniel Knapp.
Sequential Networks and Finite State Machines
ECE 3130 – Digital Electronics and Design
CSE 140 Lecture 10 Sequential Networks: Implementation
CSE 140: Components and Design Techniques for Digital Systems
CSE 370 – Winter Sequential Logic-2 - 1
EE2174: Digital Logic and Lab
CS 140L Lecture 6 Professor CK Cheng 5/05/02.
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
D Flip-Flop Schematic Block Symbol Truth Table D Q Clk Q Clk D Q(t+1)
SYEN 3330 Digital Systems Chapter 6 – Part 3 SYEN 3330 Digital Systems.
Sequential Circuits UNIT- IV
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
CS 140L Lecture 7 Transformation between Mealy and Moore Machines
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 4: Finite State Machines
Presentation transcript:

CSE 140 Lecture 9 Sequential Networks Professor CK Cheng CSE Dept. UC San Diego

Sequential Networks Components F-Fs Specification X Y CLK Combinational CLK A B C D S(t) Components F-Fs Specification Implementation: Excitation Table

Specification Finite State Machine: Circuit: Input Output Relation State Diagram (Transition of States) State Table (Truth Table of Next State and Outputs) Circuit: Logic Diagram Netlist Boolean Expression

Specification Netlist => State Table => State Diagram => Input Output Relation Example 1 with D Flip Flops Example 2 with other Flip Flops

Example 1 with D Flip Flops Q0 Q1 D Q Q’ y D1 D0 CLK y(t) = Q1(t)Q0(t) Q1(t+1) = D1(t) = x(t) + Q0(t) Q0(t+1) = D0(t) = x(t)Q1(t)

Netlist  State Table  State Diagram  Input Output Relation x D1 Q1 Q0 Q D Q’ y Q D Q0 Q1 D0 Q’ CLK y(t) = Q1(t)Q0(t) Q1(t+1) = D1(t) = x(t) + Q0(t) Q0(t+1) = D0(t) = x(t)Q1(t)

Netlist  State Table  State Diagram  Input Output Relation y(t) = Q1(t) Q0(t) Q1(t+1) = D1(t) = x(t) + Q0(t) Q0(t+1) = D0(t) = x(t) Q1(t) State table State Assignment input S0 S1 S2 S3 PS input x=0 x=1 S0, 0 S2, 0 S2, 0 S2, 0 S0, 0 S3, 0 S2, 1 S3, 1 PS x=0 x=1 Let: S0 = 00 S1 = 01 S2 = 10 S3 = 11 0 0 0 1 1 0 1 1 00, 0 10, 0 10, 0 10, 0 00, 0 11, 0 10, 1 11, 1 Q1(t) Q0(t) Q1(t+1) Q0(t+1), y(t) Remake the state table using symbols instead of binary code , e.g. ’00’

Time 1 2 3 4 5 Input - State S0 S2 S3 Output Netlist  State Table  State Diagram  Input Output Relation x/y S1 S2 S3 S0 0,1/0 1/0 0/1 0/0 1/1 S0 S1 S2 S3 PS input x=0 x=1 S0, 0 S2, 0 S2, 0 S2, 0 S0, 0 S3, 0 S2, 1 S3, 1 Example: Output sequence Time 1 2 3 4 5 Input - State S0 S2 S3 Output

Example 2 with T Flip-Flops Q Q’ y Q0 Q1 T0 T1 y(t) = Q1(t)Q0(t) T0(t) = x(t) Q1(t) T1(t) = x(t) + Q0(t)

Logic Diagram => Excitation Table => State Table y(t) = Q1(t)Q0(t) T0(t) = x(t) Q1(t) T1(t) = x(t) + Q0(t) Q0(t+1) = T0(t) Q’0(t)+T’0(t)Q0(t) Q1(t+1) = T1(t) Q’1(t)+T’1(t)Q1(t) Excitation Table: Truth table of the F-F inputs id Q1(t) Q0(t) x T1(t) T0(t) Q1(t+1) Q0(t+1) y 1 2 3 4 5 6 7 All these forms are equivalent. Given one, we can derive the others.

Excitation Table: iClicker In excitation table, the inputs of the flip flops are used to produce The present state The next state

Excitation Table =>State Table => State Diagram id Q1(t) Q0(t) x T1(t) T0(t) Q1(t+1) Q0(t+1) y 1 2 3 4 5 6 7 State Assignment S0 00 S1 01 S2 10 S3 11 1/1 PS\Input X=0 X=1 S0 S0,0 S2,0 S1 S3,0 S2 S1,0 S3 S1,1 S0,1 0/0 0/1 All these forms are equivalent. Given one, we can derive the others. S0 S1 S3 1/0 0, 1/0 1/0 S2 0/0

Time 1 2 3 4 5 Input - State S0 S2 S1 S3 Output Netlist  State Table  State Diagram  Input Output Relation PS\Input X=0 X=1 S0 S0,0 S2,0 S1 S3,0 S2 S1,0 S3 S0,1 0/0 S0 S1 S3 S2 1/1 0/1 0, 1/0 1/0 Example: Output sequence Time 1 2 3 4 5 Input - State S0 S2 S1 S3 Output All these forms are equivalent. Given one, we can derive the others.

Implementation State Diagram => State Table => Logic Diagram Excitation Table (Truth Table of the F-F Inputs) Canonical Form: Mealy and Moore Machines Examples Timing

Implementation: State Diagram => State Table => Netlist Pattern Recognizer: A sequential machine has a binary input x in {a,b}. For x(t-2, t) = aab, the output y(t) = 1, otherwise y(t) = 0. S1 S0 a/0 b/0 b/1 S2

State Diagram => State Table with State Assignment PS\x a b 1 00 01,0 00,0 01 10,0 10 00,1 State Assignment S0: 00 S1: 01 S2: 10 Q1(t+1)Q0(t+1), y a: 0 b: 1

Example 2: State Diagram => State Table => Excitation Table => Netlist id Q1Q0x D1D0 y 000 01 1 001 00 2 010 10 3 011 4 100 5 101 6 110 -- - 7 111 PS\x 1 00 01,0 00,0 01 10,0 10 00,1

Example 2: State Diagram => State Table => Excitation Table => Netlist id Q1Q0x D1D0 y 000 01 1 001 00 2 010 10 3 011 4 100 5 101 6 110 -- - 7 111 0 2 6 4 1 3 7 5 x(t) Q1 0 1 - 1 0 0 - 0 Q0 D1(t): D1(t) = x’Q0 + x’Q1 D0 (t)= Q’1Q’0 x’ y= Q1x

Example 2: State Diagram => State Table => Excitation Table => Netlist Q’1 Q0 D0 Q Q’0 D x’ Q’ Q1 y x’ D1 Q D Q0 Q’ Q1 x D1(t) = x’Q0 + x’Q1 D0 (t)= Q’1Q’0 x’ y= Q1x

Example 2: State Diagram => State Table => Excitation Table => Netlist Q Q’ Q1 Q0 D1 D0 x’ x y Q’1 Q’0 iClicker: The relation between the above state diagram and sequential circuit. One to one. One to many Many to one Many to many None of the above

Canonical Form: Mealy and Moore Machines x(t) Combinational Logic y(t) CLK x(t) C2 y(t) x(t) C1 C2 y(t) C1 CLK CLK

Canonical Form: Mealy and Moore Machines Mealy Machine: yi(t) = fi(X(t), S(t)) Moore Machine: yi(t) = fi(S(t)) si(t+1) = gi(X(t), S(t)) x(t) x(t) C1 C2 y(t) C1 C2 y(t) CLK CLK S(t) S(t) Mealy Machine Moore Machine

Finite State Machine Example Traffic light controller Traffic sensors: TA, TB (TRUE when there’s traffic) Lights: LA, LB

FSM Black Box Inputs: CLK, Reset, TA, TB Outputs: LA, LB

FSM State Transition Diagram Moore FSM: outputs labeled in each state States: Circles Transitions: Arcs

FSM State Transition Diagram Moore FSM: outputs labeled in each state States: Circles Transitions: Arcs

FSM State Transition Table PS Inputs NS TA TB S0 X S1 1 S2 S3

State Transition Table PS Inputs NS Q1(t) Q0(t) TA TB Q1(t +1) Q0(t +1) X 1 State Encoding S0 00 S1 01 S2 10 S3 11 Q1(t+1)= Q1(t)Å Q0(t) Q0(t+1)= Q’1(t)Q’0(t)T’A + Q1(t)Q’0(t)T’B

FSM Output Table PS Outputs Q1 Q0 LA1 LA0 LB1 LB0 1 LA1 = Q1 1 Output Encoding green 00 yellow 01 red 10 LA1 = Q1 LA0 = Q’1Q0 LB1 = Q’1 LB0 = Q1Q0

FSM Schematic: State Register

Logic Diagram

FSM Schematic: Output Logic