Finite State Machine (FSM) Quando a sequencia das ações no seu projeto dependem do estado de um elemento sequüencial, uma máquina de estados finitos (FSM)

Slides:



Advertisements
Similar presentations
Digital System Design-II (CSEB312)
Advertisements

Giuseppe De Robertis - INFN Sez. di Bari 1 SEU – SET test structures.
VHDL 5 FINITE STATE MACHINES (FSM) Some pictures are obtained from FPGA Express VHDL Reference Manual, it is accessible from the machines in the lab at.
FSM and Efficient Synthesizable FSM Design using Verilog
Introduction to Sequential Circuits
//HDL Example 8-2 // //RTL description of design example (Fig.8-9) module Example_RTL (S,CLK,Clr,E,F,A);
Counters Discussion D8.3.
Traffic light contoller using FSM
Implementation Strategies
Sequential Circuits Storage elements
State-machine structure (Mealy)
CS 140 Lecture 10 Sequential Networks: Implementation Professor CK Cheng CSE Dept. UC San Diego 1.
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.
How to get a Circuit in verilog converted to hspice, connected to the micron package models, and simulating in hspice and hsimplus.
Finite State Machine (FSM)  When the sequence of actions in your design depend on the state of sequential elements, a finite state machine (FSM) can be.
1 Lecture 23 More Sequential Circuits Analysis. 2 Analysis of Combinational Vs. Sequential Circuits °Combinational : Boolean Equations Truth Table Output.
FSM examples.
DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali.
Asynchronous FSMs and Verilog. PLD registered output.
Give qualifications of instructors: DAP
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
IC-UNICAMP MC 603/ Finite State Machines Mixed Style RTL Modeling Extraído da George Mason Univ. ECE 545 Lecture 5.
CS 151 Digital Systems Design Lecture 31 Read Only Memory (ROM)
Lecture 17 General finite state machine (FSM) design
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Sequential Logic in Verilog
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.
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Ders 8: FSM Gerçekleme ve.
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,
Review of Digital Logic Design Concepts OR: What I Need to Know from Digital Logic Design (EEL3705)
Workshop Topics - Outline
FINITE STATE MACHINES (FSMs)
DLD Lecture 26 Finite State Machine Design Procedure.
Digital System Design using VHDL

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.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU 99-1 Under-Graduate Project Design of Datapath Controllers Speaker: Shao-Wei Feng Adviser:
Finite State Machine. Clock Clock cycle Sequential circuit Digital logic systems can be classified as combinational or sequential. – Combinational circuits.
Interrupt, again! Lin Zhong ELEC424, Fall 2010.
Govt. Engineering College- Gandhinagar. It is all about……  STATE MACHINE.
1 Modeling of Finite State Machines Debdeep Mukhopadhyay Associate Professor Dept of Computer Science and Engineering NYU Shanghai and IIT Kharagpur.
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 #
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
Exp#7 Finite State Machine Design in Verilog COE203 Digital Logic Laboratory Dr. Ahmad Almulhem KFUPM Spring 2009.
Finite State Machines Mealy machine inputs Outputs next state function
Figure 8.1. The general form of a sequential circuit.
© Copyright 2004, Gaetano Borriello and Randy H. Katz
CSE 140 MT 2 Review By Daniel Knapp.
Sequential logic circuits
Finite State Machines Experiment 4 Introduction
EEL 3705 / 3705L Digital Logic Design
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)
Sequential logic implementation
The Verilog Hardware Description Language
Lecture 4: Continuation of SystemVerilog
Lecture 20 Logistics Last lecture Today HW6 due Wednesday
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Presentation transcript:

Finite State Machine (FSM) Quando a sequencia das ações no seu projeto dependem do estado de um elemento sequüencial, uma máquina de estados finitos (FSM) pode ser implementada. FSMs são amplamente usadas em aplicações que requerem uma atividade seqüencial Exemplos: Sequence Detector Fancy counters Traffic Light Controller Data-path Controller Device Interface Controller etc.

Finite State Machine (FSM) (cont.) Next-State Logic Memory Inputs Current State Next State All state machines have the general feedback structure consisting of: Combinational logic implements the next state logic Next state (ns) of the machine is formed from the current state (cs) and the current inputs State register holds the value of current state

Types of State Machines Moore State Machine Next state depends on the current state and the inputs but the output depends only on the present state next_state(t) = h(current_state(t), input(t)) output = g(current_state(t)) Inputs Outputs ns cs State Register Next-State Logic Output Logic

Types of State Machines (cont.) Mealy State Machine Next state and the outputs depend on the current state and the inputs next_state(t) = h(current_state(t), input(t)) output(t) = g(current_state(t), input(t)) Inputs Outputs Next-State Logic State Register Output Logic ns cs

Typical Structure of a FSM module mod_name ( input …, output … ); parameter size = … ; enum logic [size-1: 0] {state_0, state_1,... } state; (negedge reset or posedge clk) if (reset == 1'b0) state <= state_0; else case (state) state_0: state <= state_1; state_1: default: state <= state_0; endcase always_comb... en

Sequence Detector FSM Functionality: Detect two successive 0s or 1s in the serial input bit stream read_1_zeroread_1_one read_2_zeroread_2_one reset_state reset out_bit = 0 out_bit = 1 FSM Flow-Chart

module seq_detect ( input clock, reset, in_bit, output logic out_bit); enum logic [2:0] { reset_state, read_1_zero, read_1_one, read_2_zero, read_2_one } state; (posedge clock or posedge reset) if (reset) state <= reset_state; else case (state) reset_state: if (in_bit == 0) state <= read_1_zero; else state <= read_1_one; Sequence Detector FSM (cont.) read_1_zero: if (in_bit == 0) state <= read_2_zero; else state <= read_1_one; read_2_zero: if (in_bit == 0) state <= read_2_zero; else state <= read_1_one; read_1_one: if (in_bit == 0) state <= read_1_zero; else state <= read_2_one;

Sequence Detector FSM (cont.) read_2_one: if (in_bit == 0) state <= read_1_zero; else state <= read_2_one; default: state <= reset_state; endcase always_comb out_bit <= ( (state == read_2_zero) || (state== read_2_one)); endmodule