More FSM Design CT 101 – Computing Systems. String Checker - Specification Inputs a string of bits, one per clock cycle When the previous three bits form.

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

Lab 2: Finite State Machines CS 3410 Spring 2015.
Finite State Machine Continued
FSM Design & Implementation
Lecture 8 Sequential Logic Prof. Sin-Min Lee Department of Computer Science.
Lecture #24 Page 1 EE 367 – Logic Design Lecture #24 Agenda 1.State Machines Review Announcements 1.n/a.
Sequential Circuits Storage elements
Analysis of Clocked Sequential Circuits
CSCE 211: Digital Logic Design. Chapter 6: Analysis of Sequential Systems.
Circuits require memory to store intermediate data
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
Sequential Circuit Design
ECE 331 – Digital System Design
Sequential Logic Design Process A sequential circuit that controls Boolean outputs and a specific time- ordered behavior is called a controller. StepDescription.
ECE C03 Lecture 101 Lecture 10 Finite State Machine Design Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Mealy vs Moore 2 examples of problems where Moore FSM has more than 1 extra state versus Mealy FSM.
Give qualifications of instructors: DAP
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
1 Lecture 14: FSM and Basic CPU Design Today’s topics:  Finite state machines  Single-cycle CPU Reminder: midterm on Tue 10/24  will cover Chapters.
1 Synchronous Sequential Circuit Design. 2 Sequential circuit design In sequential circuit design, we turn some description into a working circuit – We.
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.
ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment.
11/10/ :53:59 AMweek12-3.ppt1 Intelligent Traffic Controller We want to use a finite state machine to control the traffic lights at an intersection.
1 COMP541 State Machines Montek Singh Feb 8, 2012.
Elevator Controller We’re hired to design a digital elevator controller for a four-floor building st try: Design a counter that counts up.
EE434 ASIC & Digital Systems
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.
Finite State Machines CT101 – Computing Systems. FSM Overview Finite State Machine is a tool to model the desired behavior of a sequential system. The.
Introduction to State Machine
1 Chapter 2 Introduction To Finite State Machines Presented By: Cecilia Parng Class: C.S. 147 Prof: Sin-Min Lee.
Lecture 5. Sequential Logic 2 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
FINITE STATE MACHINES (FSMs)
CSIE.NCTU, DL-6-1 Basic Design Approach of FSM Six Step Process 1. Understand the statement of the Specification 2. Obtain an abstract specification of.
DLD Lecture 26 Finite State Machine Design Procedure.
Modern VLSI Design 4e: Chapter 5 Copyright  2008 Wayne Wolf Topics n Sequential machine implementation: –clocking. n Sequential machine design.
State Table Problem #1 An electronic lock is controlled by a keypad, which has three buttons labeled A, B, and R. The keypad is restricted such that, at.
Prepared by: Engr. Qurban Ali Memon 11ES (SEC- 1 & 2)
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell State Machines.

Computing Machinery Chapter 4: Finite State Machines.
University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell State Machines.
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
Finite State Machine. Clock Clock cycle Sequential circuit Digital logic systems can be classified as combinational or sequential. – Combinational circuits.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
Finite State Machines Mealy machine inputs Outputs next state function
FSM Design & Implementation
Lecture 4. Sequential Logic #2
Introduction and Overview
COMP541 Sequential Logic – 2: Finite State Machines
CSCE 211: Digital Logic Design
Synchronous Sequential Circuit Design
CSE 140L Discussion Finite State Machines.
Hakim Weatherspoon CS 3410 Computer Science Cornell University
Electronics II Physics 3620 / 6620
Lecture 24 Logistics Last lecture Today HW7 due today
Introduction to Sequential Circuits
Joseph Ravichandran, Srijan Chakraborty, Kanad Sarkar
CSE 370 – Winter Sequential Logic-2 - 1
ECE 352 Digital System Fundamentals
Lecture 24 Logistics Last lecture Today HW7 due today
Lecture 20 State minimization via row matching.
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Announcements Assignment 7 due now or tommorrow Assignment 8 posted
Finite State Machine Continued
Lecture 4: Finite State Machines
Presentation transcript:

More FSM Design CT 101 – Computing Systems

String Checker - Specification Inputs a string of bits, one per clock cycle When the previous three bits form the pattern 110, it sets the output match M=1; otherwise M=0 The pattern is checked continuously through the entire bit stream; the system DOES NOT check the first three bits and then the next three bits and so on. The system checks bits 123 and then bits 234 and then bits 345 and so on.

String Checker – State table (i) The last there bits received represent the state of the system Bits are received from left to right (i.e. the current state is S0 (000), if a new bit with value 1 is received, then the next value of the state is S1 (001) Each state goes from one state in two possible next states, depending on the value of I Example S2 corresponds to the case where last three bits were 010: –I=0 next state is S4 (100), output is M=0 –I=1 next state is S5 (101), output is M=0 Present State INext State M S0 (000)0S00 S0 (000)1S10 S1 (001)0S20 S1 (001)1S30 S2 (010)0S40 S2 (010)1S50 S3 (011)0S61 S3 (011)1S70 S4 (100)0S00 S4 (100)1S10 S5 (101)0S20 S5 (101)1S30 S6 (110)0S40 S6 (110)1S50 S7 (111)0S61 S7 (111)1S70

String Checker – State diagrams (i)

String Checker – Hardware Implementation Assign values to the states –S0 assign 000 and so on Start to design the hardware for this implementation, starting with generic –Design the next state logic –Design the output logic P2P1P0IN2N1N

String Checker – Next state logic –N2 = P1 –N1 = P0 –N0 = I P0I P2P N2 P0I P2P P0I P2P N1 N0

String Checker – Moore Machine The output logic is straight forward; when the machine is in state S6 the M is 1, otherwise is 0. This can be implemented as: –M = P2P1P0’

String Checker – Mealy Machine M = P1P0I’ P0I P2P M P2P1P0IM

String Checker – State table (ii) Sometimes there are simpler alternative methods: –S0 – no bits matched –S1 – one bit matched –S2 – two bits matched S3 – three bits matched In each state, consider the possible values of the input bit and determine which next state is appropriate Present State INext State M S0 (---)0 0 1S1 (--1)0 0S0 (---)0 S1 (--1)1S2 (-11)0 0S3 (110)1 S2 (-11)1 0 S3 (110)0S0 (---)0 S3 (110)1S1 (--1)0

String Checker – State diagrams (ii)

Toll Booth Controller - Specification Has two input sensors: –Car sensor C (car in toll booth) = 1 if there is a car or 0 if there is no car –Coin sensor (and its value): I1I0 = 00 – no coin has been inserted I1I0 = 01 – a 5 cents coin has been inserted I1I0 = 10 – a 10 cents coin has been inserted I1I0 = 11 – a quarter coin has been inserted Two output lights and one alarm output –When a car pulls into the toll booth, a red light (R) is lit until the driver deposits at least 35 cents, when the red light goes off and the green light (G) is lit; –The green light remains lit until the car leaves the toll booth, when this happen, the red light is lit again –If the car leaves the toll booth without paying the full amount, the red light is lit and the alarm (A) sound –The alarm remains active until another car pulls into the booth

Toll Booth Controller – States definition StateConditionRGA SnocarNo car in toll booth100 S0Car in toll booth, 0 cents paid100 S5Car in toll booth, 5 cents paid100 S10Car in toll booth, 10 cents paid100 S15Car in toll booth, 15 cents paid100 S20Car in toll booth, 20 cents paid100 S25Car in toll booth, 25 cents paid100 S30Car in toll booth, 30 cents paid100 SpaidCar in toll booth, toll paid010 ScheatCar left toll booth without paying full toll 101

Toll Booth Controller – State table Current State CI1I0Next state RGA Snocar0XXSnocar100 1XXS0100 Spaid0XXSnocar100 Spaid1XXSpaid010 Scheat0XXSnocar101 S00XXScheat101 S0100S S5100 S0110S10100 S0111S25100 S50XXScheat101 S5100S S10100 S5110S15100 S5111S30100 S100XXScheat101 S10100S S15100 S10110S20100 S10111Spaid010 Current State CI1I0Next state RGA S150XXScheat101 S15100S S20100 S15110S25100 S15111Spaid010 S200XXScheat101 S20100S0100 S20101S25100 S20110S30100 S20111Spaid010 S250XXScheat101 S25100S S30100 S25110Spaid010 S25111Spaid S300XXScheat101 S30100S Spaid010 S30110Spaid010 S30111Spaid010

Toll Booth Controller – Moore State diagram

References “Computer Systems Organization & Architecture”, John D. Carpinelli, ISBN: