FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Topics n Basics of sequential machines. n Sequential machine specification. n Sequential.

Slides:



Advertisements
Similar presentations
Introduction to Sequential Circuits
Advertisements

Finite State Machines (FSMs)
State-machine structure (Mealy)
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Give qualifications of instructors: DAP
Modern VLSI Design 4e: Chapter 5 Copyright  2008 Wayne Wolf Topics n State assignment. n Power optimization of sequential machines. n Design validation.
Modern VLSI Design 4e: Chapter 5 Copyright  2008 Wayne Wolf Topics n Memory elements. n Basics of sequential machines.
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
Modern VLSI Design 2e: Chapter 8 Copyright  1998 Prentice Hall PTR Topics n High-level synthesis. n Architectures for low power. n Testability and architecture.
FPGA-Based System Design: Chapter 6 Copyright  2004 Prentice Hall PTR Register-transfer Design n Basics of register-transfer design: –data paths and controllers.
Finite State Machine Chapter 10 RTL Hardware Design by P. Chu.
1 Lecture 23 More Sequential Circuits Analysis. 2 Analysis of Combinational Vs. Sequential Circuits °Combinational : Boolean Equations Truth Table Output.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
1 Sequential logic networks I. Motivation & Examples  Output depends on current input and past history of inputs.  “State” embodies all the information.
Modern VLSI Design 2e: Chapter 5 Copyright  1998 Prentice Hall PTR Topics n Sequential machine implementation: –clocking. n Sequential machine design.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 3 Microcomputer Systems Design (Embedded Systems)
Modern VLSI Design 2e: Chapter 5 Copyright  1998 Prentice Hall PTR Topics n Memory elements. n Basics of sequential machines.
1 COMP541 State Machines Montek Singh Feb 6, 2007.
Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
Modern VLSI Design 2e: Chapter 5 Copyright  1998 Prentice Hall PTR Topics n State assignment. n Power optimization of sequential machines. n Design validation.
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
Digital Logic Design Lecture 26. Announcements Exams will be returned on Thursday Final small quiz on Monday, 12/8. Final homework will be assigned Thursday,
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.
Lecture 17 General finite state machine (FSM) design
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
1 COMP541 State Machines Montek Singh Feb 8, 2012.
EE434 ASIC & Digital Systems
Modern VLSI Design 3e: Chapter 5,6 Copyright  2002 Prentice Hall PTR Adapted by Yunsi Fei Topics n Sequential machine (§5.2, §5.3) n FSM construction.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Ders 8: FSM Gerçekleme ve.
George Mason University ECE 545 – Introduction to VHDL ECE 545 Lecture 5 Finite State Machines.
Lecture 18 More Moore/Mealy machines.
1 CSE370, Lecture 19 Lecture 19 u Logistics n Lab 8 this week to be done in pairs íFind a partner before your lab period íOtherwise you will have to wait.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics Basics of register-transfer design: –data paths and controllers; –ASM charts. Pipelining.
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,
Computer Organization & Programming Chapter 5 Synchronous Components.
Digital Logic Design.
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
Modern VLSI Design 4e: Chapter 5 Copyright  2008 Wayne Wolf Topics n Sequential machine implementation: –clocking. n Sequential machine design.
ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay 2 The D FlipFlop The RS flipflop stores one bit of information.
Lecture 11: FPGA-Based System Design October 18, 2004 ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design.
Registers; State Machines Analysis Section 7-1 Section 5-4.
1 COMP541 State Machines – 2 Registers and Counters Montek Singh Feb 11, 2010.
Digital System Design using VHDL
Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Topics n Basics of register-transfer design: –data paths and controllers; –ASM.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Chapter 11: System Design.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU 99-1 Under-Graduate Project Design of Datapath Controllers Speaker: Shao-Wei Feng Adviser:
Common Elements in Sequential Design. Lecture 3 topics  Registers and Register Transfer  Shift Registers  Counters Basic Counter Partial sequence counters.
Logic Design (CE1111 ) Lecture 6 (Chapter 6) Registers &Counters Prepared by Dr. Lamiaa Elshenawy 1.
Govt. Engineering College- Gandhinagar. It is all about……  STATE MACHINE.
EMT 351/4 DIGITAL IC DESIGN Verilog Behavioral Modeling  Finite State Machine -Moore & Mealy Machine -State Encoding Techniques.
Pusat Pengajian Kejuruteraan Mikroelektronik EMT 351/4 DIGITAL IC DESIGN Verilog Behavioural Modeling (Part 4) Week #
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
Week #7 Sequential Circuits (Part B)
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
COMP541 Sequential Logic – 2: Finite State Machines
FIGURE 5.1 Block diagram of sequential circuit
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
CSE 370 – Winter Sequential Logic-2 - 1
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Topics n Basics of sequential machines. n Sequential machine specification. n Sequential machine design processes.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Sequential machines n Use registers to make primary output values depend on state + primary inputs. n Varieties: –Mealy—outputs function of present state, inputs; –Moore—outputs depend only on state.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR FSM structure

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Constraints on structure n No combinational cycles. n All components must have bounded delay.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Synchronous design n Controlled by clock(s). –State changes at time determined by the clock. –Inputs to registers settle in time for state change. –Primary inputs settle in time for combinational delay through logic. n Machine state is determined solely by registers. –Don’t have to worry about timing constraints, events outside the registers.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Non-functional requirements and optimization n Performance: –Clock period is determined by combinational logic delay. n Area: –Combinational logic size usually dominates area. n Energy/power: –Often dominated by combinational logic. –May be improved by latching values.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Models of state machines n Register-transfer: –Combinational equations for inputs to registers. n State transition graph/table: –Next-state, output functions described piecewise.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR State transition graph n Each transition describes part of the next- state, output functions: S1 S2 S3 0/010 1/1-0

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Register-transfer structure n Registers fed by combinational logic: Combinational logic DQDQDQDQDQDQ

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Block diagram n Purely structural description: B1 A B2

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Symbolic values n A sequential machine description may use symbolic, not binary values. –Symbolic values must be encoded during implementation. n Encoding may optimize implementation characteristics: –Area. –Performance. –Energy.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR STG vs. register-transfer n Each representation is easier for some types of machines. n Example: counter.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Counter state transition graph n Cyclic structure: 0 1/1 1 1/2 6 1/7 7 1/0 …

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Counter register-transfer function n Specify using addition: –Next_count = count + 1. n Regular structure of logic.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Example: 01 string recognizer n Recognize 01 sequence in input string: recognizer

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Recognizer state transition graph Bit 1Bit 2 0/0 1/1 1/0 0/0

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Mealy vs. Moore machine n Moore machine: –Output a function of state. n Mealy machine: –Output a function of primary inputs + state.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Sequential machine definition n Machine computes next state N, primary outputs O from current state S, primary inputs I. n Next-state function: –N =  (I,S). n Output function (Mealy): –O = (I,S).

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Reachability n State is reachable if there is a path from given state. n May be created by state encoding: s0s1 s2s3

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Homing sequence n Sequence of inputs that drives the machine to a given state. s0s1 s2

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Equivalent states n States are equivalent if they cannot be distinguished by any input sequence: s1s2 s3s4 0/0 -/0 -/1 -/0 1/0

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Networks of FSMs n Functions can be built up from interconnected FSMs: M1M2 x y I1 O1 I2 O2 External connections Internal connections

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Illegal composition of Mealy machines Combinational logic DQ Combinational logic DQ

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Communicating FSM states s1 s2 M1 0/0 1/0 -/1 s3 s4 M2 0/0 -/0 1/1

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Product machine n Two connected machines: RS i1o1 i2 o2

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Component STGs

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Behavior of connected machines RS i1o1 i2 o2 R1S1001 R2S2010 R3S1000 R3S1000

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Forming product machine n Form Cartestian product of states: –R1S1, R1S2, R2S1, R2S2, R3S1, R3S2. n For each product state, determine the combined behavior of each product transition: –Required inputs. –Produced output. –Next product state.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR State assignment n Find a binary code for symbolic values in machine. –Optimize area, performance. –May be done on inputs, outputs as well.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Optimizing state assignments n Codes affect the next-state, output logic. –Compute conditions based on state. n Best code depends on the input, output logic and its interaction with state computations.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Encoding a shift register n Symbolic state transition table for shift register: 0S S100 0S01S001 1S01S101 0 S010 1S10S110 0 S011 1S11 1

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Bad encoding n Let S00 = 00, S01 = 01, S10 = 10, S11 = 10. n Logic: –Output = S1 S0’ + S1’ S0 –N1 = I –N0 = I S1’ + I S1

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Good encoding n Let S00 = 00, S01 = 01, S10 = 10, S11 = 11. n Logic: –Output = S0 –N1 = I –N0 = S1

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR One-hot code n N-state machine has n-bit encoding. n Ith bit is 1 if machine is in state i. n Comparison: –Easy to tell what state the machine is in. –Easy to get the machine into an illegal state (0000, 1111, etc.). –Uses a lot of registers.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Common factors in state coding n Consider this set of transitions: –0, s1 OR s2 -> s3, 1 n Want to choose a code that easily produces s1 OR s2. –S1 = 00, S2 = 01.

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR State codes in n-space 0 s1 code = 111 s2 code =

FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR State codes and delay