CSE 140L Discussion Finite State Machines.

Slides:



Advertisements
Similar presentations
Lab 2: Finite State Machines CS 3410 Spring 2015.
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
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling 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.
DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali.
ECE 331 – Digital System Design
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
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.
Sequential circuit design
Lecture 17 General finite state machine (FSM) design
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Unit 14 Derivation of State Graphs
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
Introduction to Sequential Logic Design Finite State-Machine Design.
ECE 3130 – Digital Electronics and Design Lab 6 State Machines Fall 2012 Allan Guan.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits,
Module : FSM Topic : types of FSM. Two types of FSM The instant of transition from the present to the next can be completely controlled by a clock; additionally,
Fall 2004EE 3563 Digital Systems Design EE3563 Chapter 7, 8, 10 Reading Assignments  7.1, 7.2, 7.3  8.1, ,   8.5.1, 8.5.2,
1 CSE370, Lecture 18 Lecture 20 u Logistics n HW6 due Wednesday n Lab 7 this week (Tuesday exception) n Midterm 2 Friday (covers material up to simple.
DLD Lecture 26 Finite State Machine Design Procedure.
Analysis and Synthesis of Synchronous Sequential Circuits A “synchronizing” pulse/edge signal (clock) controls the operation of the memory portion of the.
1 State Reduction Goal: reduce the number of states while keeping the external input-output requirements unchanged. State reduction example: a: input 0.
1Sequential circuit design Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA by Erol Sahin and Ruken Cakici.
A sequential logic circuit (a.k.a. state machine) consists of both combinational logic circuit(s) and memory devices (flip flops). The combinational circuits.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Synchronous Counter Design
Introduction to Sequential Logic Design Finite State-Machine Analysis.
Finite State Machine. Clock Clock cycle Sequential circuit Digital logic systems can be classified as combinational or sequential. – Combinational circuits.
Sequential Circuit Design 05 Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
Figure 8.1. The general form of a sequential circuit.
Introduction to Sequential Logic Design
Introduction to Advanced Digital Design (14 Marks)
Analysis of Clocked Sequential Circuit
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
ECE 301 – Digital Electronics
CSE 140 MT 2 Review By Daniel Knapp.
FINITE STATE MACHINES (FSMs)
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Sequential circuit design
Instructor: Alexander Stoytchev
Sequential circuit design
ECE 3130 – Digital Electronics and Design
Recap D flip-flop based counter Flip-flop transition table
CSE 370 – Winter Sequential Logic-2 - 1
Sequential circuit design
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
DESIGN OF SEQUENTIAL CIRCUITS
Instructor: Alexander Stoytchev
CSE 370 – Winter Sequential Logic-2 - 1
SYEN 3330 Digital Systems Chapter 6 – Part 3 SYEN 3330 Digital Systems.
ECE 352 Digital System Fundamentals
FINITE STATE MACHINES.
Guest Lecture by David Johnston
Lecture 20 Logistics Last lecture Today HW6 due Wednesday
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Lecture 18 Logistics Last lecture Today HW5 due today (with extra 10%)
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
ECE 352 Digital System Fundamentals
EGR 2131 Unit 12 Synchronous Sequential Circuits
Instructor: Alexander Stoytchev
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Presentation transcript:

CSE 140L Discussion Finite State Machines

Finite State Machines Two types: Mealy and Moore Mealy depends on both the current state and the input Moore depends only on the current state. (You can think of it as so: in a moore machine, the output is associated with the state. In a mealy machine, the output is associated with the transitions). Typically, moore has more states, but are easier to implement. Mealy machines have less states, and also are faster in clocked systems (the output happens right away when the inputs are detected). Moore has to wait the clock cycle to transition to the next state before the output is changed. But Mealy is usually more sensitive to race conditions.

What you need to think about: 1. All the possible states you could be in 2. All the outputs 3. All the inputs 4. The transitions between the states based on the inputs Note: All inputs and outputs should be accounted for in all the transitions, even when they are “don’t cares.”

First step: Draw out the state machine. Second step: From the state machine, figure out how many bits are needed to encode all the states. If you have 3 states, you need 2 bits. If you have 5 states, you need 3 bits. Encode each of the states. For example, if you have 5 states, then your first state can be 000, and your other states would be 001, 010, etc. Third step: Based on your transitions, draw out the transition table. This is a large table that will map the outputs based on the inputs. You can and should take advantage of “don’t cares.”

How to do this Take the initial circuit we give you, which has the D flip flops. The DFFs hold the current state. When the output of the three DFFs is 000 for example, that means that our current state is 0. The inputs into the DFFs correspond to the NEXT STATE. That is because whatever you send into the DFF will be output on the next clock cycle.

Once you have figured out your finite state machine, start on your transition table. This should map all your inputs to outputs, your inputs being present state and the actual inputs, and the outputs being the segment display bits and next state. From the table, you can derive the combinational logic for each of the outputs. Once you have finished your transition table, complete the circuit by drawing out all the outputs and connecting them to the “current state” and inputs. For a moore machine, the outputs only depend on the current state. For a mealy, the outputs depend on both the current state and the inputs.

For a mealy machine, the outputs depend on both the current state and

Also create the circuit for all your next state bits Also create the circuit for all your next state bits. In the case for our moore machine, there is n0, n1, and n2.