CSE 140: Components and Design Techniques for Digital Systems

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.
CS 151 Digital Systems Design Lecture 21 Analyzing Sequential Circuits.
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 7 Professor CK Cheng 4/23/02. Part II. Sequential Network (Ch ) 1.Flip-flops SR, D, T, JK, 2.SpecificationState Table 3.Implementation.
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)
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.
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
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)).
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment.
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.
Unit 12 Registers and Counters Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Lecture 8: Sequential Networks and Finite State Machines CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer.
Digital Design Lecture 10 Sequential Design. State Reduction Equivalent Circuits –Identical input sequence –Identical output sequence Equivalent States.
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
1 Lecture #12 EGR 277 – Digital Logic Synchronous Logic Circuits versus Combinational Logic Circuits A) Combinational Logic Circuits Recall that there.
Lecture 9: Sequential Networks: Implementation CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer Science.
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.
Sequential Networks: Timing and Retiming
CSE 140: Components and Design Techniques for Digital Systems Lecture 6: Universal Gates CK Cheng Dept. of Computer Science and Engineering University.
A sequential logic circuit (a.k.a. state machine) consists of both combinational logic circuit(s) and memory devices (flip flops). The combinational circuits.
CSE 140: Components and Design Techniques for Digital Systems Lecture 7: Sequential Networks CK Cheng Dept. of Computer Science and Engineering University.
Synthesis Synchronous Sequential Circuits synthesis procedure –Word description of problem /hardest; art, not science/ –Derive state diagram & state table.
CSE 140: Components and Design Techniques for Digital Systems Lecture 9: Sequential Networks: Implementation CK Cheng Dept. of Computer Science and Engineering.
CSE 140 Lecture 8 Sequential Networks
Sequential Networks and Finite State Machines
Chapter #6: Sequential Logic Design
Lecture 6: Universal Gates
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
ECE 301 – Digital Electronics
CSE 140 MT 2 Review By Daniel Knapp.
CENG 241 Digital Design 1 Lecture 11
Sequential Networks and Finite State Machines
Digital Logic & Design Dr. Waseem Ikram Lecture No. 34.
CSE 140L Discussion Finite State Machines.
Lecture 6: Universal Gates
Recap D flip-flop based counter Flip-flop transition table
Digital Logic & Design Dr. Waseem Ikram Lecture No. 31.
CSE 140 Lecture 10 Sequential Networks: Implementation
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 6: Universal Gates
D Flip-Flop Schematic Block Symbol Truth Table D Q Clk Q Clk D Q(t+1)
Reference: Chapter 5 Sequential Circuits Moris Mano 4th Ediditon
Instructor: Alexander Stoytchev
EGC 442 Introduction to Computer Architecture
SYEN 3330 Digital Systems Chapter 6 – Part 3 SYEN 3330 Digital Systems.
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
CSE 140 Lecture 9 Sequential Networks
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
CS 140L Lecture 6 Professor CK Cheng 11/05/02.
Presentation transcript:

CSE 140: Components and Design Techniques for Digital Systems Lecture 9: Sequential Networks: Implementation CK Cheng Dept. of Computer Science and Engineering University of California, San Diego

Implementation Format and Tool Procedure Excitation Tables Examples Mealy & Moore Machines, Excitation Table Procedure State Table to Logic Diagram Excitation Tables FFs Examples

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

iClicker In the logic diagram below, a D flip-flop has input x and output y. A: x= Q(t), y=Q(t) B: x=Q(t+1), y=Q(t) C: x=Q(t), y=Q(t+1) D: None of the above D y CLK x Q

Understanding Current State and Next State in a sequential circuit “Yesterday is gone. Tomorrow has not yet come. We have only today. Let us begin.” ― Mother Teresa today sunrise

Implementation Format Canonical Form: Mealy & Moore machines State Table  Netlist Tool: Excitation Table x(t) C1 C2 y(t) CLK Q(t) Q(t+1) = g(x(t), Q(t)) Circuit C1 y(t) = f(x(t), Q(t)) Circuit C2

Implementation Tool: Excitation Table Example: State Table id x(t) Q(t) Q(t+1) 1 2 3 x(t) C1 CLK Q(t) Find D, T, (S R), (J K) to drive F-Fs

Implementation Tool: Excitation Table Example: State Table id x(t) Q(t) Q(t+1) 1 2 3 Excitation Table x(t) Q(t) C1 T(t) CLK id x(t) Q(t) T(t) Q(t+1) 1 2 3 Q(t) Example with T flip flop

Implementation Tool: Excitation Table Implement combinational logic C1 D(t), T(t), (S(t) R(t)), (J(t) K(t)) are functions of (x,Q(t)) Example: Excitation Table x(t) C1 CLK Q(t) id x(t) Q(t) T(t) Q(t+1) 1 2 3 Q(t)

Implementation: Procedure State Table => Excitation Table Problem: To implement C1, we need D(t), T(t), (S(t) R(t)), (J(t) K(t)) as functions of (x,Q(t)). 1. From state table, we have NS: Q(t+1) = g(x(t),Q(t)) 2. Excitation Table of F-Fs: The setting of D(t), T(t), (S(t) R(t)), (J(t) K(t)) to drive Q(t) to Q(t+1). 3. Combining 1 and 2, we have excitation table of C1: D(t), T(t), (S(t) R(t)), (J(t) K(t)) = h(x,Q(t)).

Implementation: Procedure F-F State Table <=> F-F Excitation Table DTSRJK PS Q(t) NS Q(t+1) D F-F D(t)= eD(Q(t+1), Q(t)) T F-F T(t)= eT(Q(t+1), Q(t)) SR F-F S(t)= eS(Q(t+1), Q(t)) R(t)= eR(Q(t+1), Q(t)) JK F-F J(t)= eJ(Q(t+1), Q(t)) K(t)= eK(Q(t+1), Q(t)) NS Q(t+1) PS Q(t) DTSRJK

Excitation Table State table of JK F-F: 00 1 01 10 11 Q(t) Q(t+1) JK 1 01 10 11 Q(t) Q(t+1) JK Excitation table of JK F-F: 0- -1 1 1- -0 PS NS Q(t) Q(t+1) JK Ex: If Q(t) is 1, and Q(t+1) is 0, then JK needs to be -1.

Excitation Tables and State Tables Q(t+1) JK 00 1 10 11 Q(t) Q(t+1) NS 01 JK 0- -1 1 1- -0 PS 1 Q(t) SR 0- XY 1 10 -0 PS NS Q(t) Q(t+1) SR 00 1 01 PS SR Q(t) Q(t+1) 10 11 - iClicker XY= -1 XY= 01 XY= 10 XY= 1- None of the above

Excitation Tables and State Tables 1 PS NS Q(t) Q(t+1) T D Q(t+1) D NS D PS 1 PS 1 1 1 Q(t) Q(t) Q(t+1)

Implementation: Procedure State table: y(t)= f(Q(t), x(t)), Q(t+1)= g(x(t),Q(t)) Excitation table of F-Fs: D(t)= eD(Q(t+1), Q(t)); T(t)= eT(Q(t+1), Q(t)); (S, R), or (J, K) From 1 & 2, we derive excitation table of the system D(t)= hD(x(t),Q(t))= eD(g(x(t),Q(t)),Q(t)); T(t)= hT(x(t),Q(t))= eT(g(x(t),Q(t)),Q(t)); (S, R) or (J, K). Use K-map to derive combinational logic implementation. D(t)= hD(x(t),Q(t)) T(t)= hT(x(t),Q(t)) y(t)= f(x(t),Q(t))

Implementation: Example Implement a JK F-F with a T F-F Q Q’ C1 J K T Q Implement a JK F-F: Q(t+1) = h(J(t),K(t),Q(t)) = J(t)Q’(t)+K’(t)Q(t) JK JK PS 00 1 01 10 1 11 1 1 Q(t)

Example: Implement a JK flip-flop using a T flip-flop Excitation Table of T Flip-Flop i.e. Q(t+1)(t) = JQ’(t)+K’Q(t) 1 PS NS Q(t) Q(t+1) State table: y(t)= f(Q(t), x(t)), Q(t+1)= g(x(t),Q(t)) Excitation table of F-Fs: D(t)= eD(Q(t+1), Q(t)); T(t)= eT(Q(t+1), Q(t)); (S, R), or (J, K) From 1 & 2, we derive excitation table of the system D(t)= hD(x(t),Q(t))= eD(g(x(t),Q(t)),Q(t)); T(t)= hT(x(t),Q(t))= eT(g(x(t),Q(t)),Q(t)); (S, R) or (J, K). Use K-map to derive combinational logic implementation. D(t)= hD(x(t),Q(t)) T(t)= hT(x(t),Q(t)) y(t)= f(x(t),Q(t)) Excitation Table of the Design id 1 2 3 4 5 6 7 J(t) K(t) Q(t) Q(t+1) T(t) T(t) = Q(t) XOR ( J(t)Q’(t) + K’(t)Q(t))

Example: Implement a JK flip-flop using a T flip-flop T(J,K,Q): K 0 2 6 4 0 0 1 1 T = K(t)Q(t) + J(t)Q’(t) 1 3 7 5 Q(t) 0 1 1 0 J J Q Q’ T K

iClicker Before state assignment, the relation of its state table and excitation table is One to one One to many Many to one Many to many None of the above

Let’s implement our free running 2-bit counter using T-flip flops State Table S0 S1 S2 S3 PS Next state

Let’s implement our free running 2-bit counter using T-flip flops State Table with Assigned Encoding State Table 0 0 0 1 1 0 1 1 Current 01 10 11 00 S0 S1 S2 S3 Next

Let’s implement our free running 2-bit counter using T-flip flops Excitation table id Q1(t) Q0(t) T1(t) T0(t) Q1(t+1) Q0(t+1) 1 2 3

Let’s implement our free running 2-bit counter using T-flip flops Excitation table id Q1(t) Q0(t) T1(t) T0(t) Q1(t+1) Q0(t+1) 1 2 3

Let’s implement our free running 2-bit counter using T-flip flops Excitation table id Q1(t) Q0(t) T1(t) T0(t) Q1(t+1) Q0(t+1) 1 2 3 T0(t) = T1(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)

Let’s implement our free running 2-bit counter using T-flip flops Excitation table id Q1(t) Q0(t) T1(t) T0(t) Q1(t+1) Q0(t+1) 1 2 3 T0(t) = 1 T1(t) = Q0(t)

Free running counter with T flip flops Q Q’ Q0 Q1 1 T1 T0(t) = 1 T1(t) = Q0(t)

Summary: Implementation Set up canonical form Mealy or Moore machine Identify the next states state diagram ⇨ state table state assignment Derive excitation table Inputs of flip flops Design the combinational logic don’t care set utilization