Sequential Circuits. inputs Comb FFs. Outputs. Comb CLK. Sequential logic examples. ! Another way to understand setup/hold/propagation time

Similar documents
General FSM design procedure

General FSM design procedure

Chapter 10. case studies in sequential logic design

General FSM design procedure

Data paths and control logic

EECS Components and Design Techniques for Digital Systems. Lec 07 PLAs and FSMs 9/ Big Idea: boolean functions <> gates.

I 3 I 2. ! Language of logic design " Logic optimization, state, timing, CAD tools

Outline. EECS Components and Design Techniques for Digital Systems. Lec 11 Putting it all together Where are we now?

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

ECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines

ECE 2300 Digital Logic & Computer Organization. More Finite State Machines

Mealy and Moore examples

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010

Control in Digital Systems

Quick Introduction to SystemVerilog: Sequental Logic

CS 151 Final. Q1 Q2 Q3 Q4 Q5 Total Credit Score. Instructions: Student ID. (Last Name) (First Name) Signature

10/21/2016. ECE 120: Introduction to Computing. Let s Extend Our Keyless Entry FSM. FSM Designs Also Allow Use of Abstraction

ECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines

Overview. Ram vs Register. Register File. Introduction to Structured VLSI Design. Recap Operator Sharing FSMD Counters.

Sequential Logic Design

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

Computer Organization

Abstraction of State Elements. Sequential Logic Implementation. Forms of Sequential Logic. Finite State Machine Representations

Finite State Machines

23. Digital Baseband Design

Homework deadline extended to next friday

Finite State Machines

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

RTL Design (Using ASM/SM Chart)

R07

ECE 4514 Digital Design II. Spring Lecture 15: FSM-based Control

Sequential Logic Implementation. Mealy vs. Moore Machines. Specifying Outputs for a Mealy Machine. Specifying Outputs for a Moore Machine

Verilog Sequential Logic. Verilog for Synthesis Rev C (module 3 and 4)

Lecture 12 VHDL Synthesis

Finite State Machines

Sequential Logic Synthesis

Exp#8: Designing a Programmable Sequence Detector

EECS150, Fall 2004, Midterm 1, Prof. Culler. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function.

VHDL: RTL Synthesis Basics. 1 of 59

CS 151 Final. (Last Name) (First Name)

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

Laboratory Exercise 3 Davide Rossi DEI University of Bologna AA

PART B. 3. Minimize the following function using K-map and also verify through tabulation method. F (A, B, C, D) = +d (0, 3, 6, 10).

Lecture 24: Sequential Logic Design. Let s refresh our memory.

Finite State Machines (FSM) Description in VHDL. Review and Synthesis

Injntu.com Injntu.com Injntu.com R16

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

ECE 545 Lecture 12. Datapath vs. Controller. Structure of a Typical Digital System Data Inputs. Required reading. Design of Controllers

Introduction to Electronic Design Automation. Model of Computation. Model of Computation. Model of Computation

ECE 449 OOP and Computer Simulation Lecture 09 Logic Simulation

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK NAME OF THE SUBJECT: EE 2255 DIGITAL LOGIC CIRCUITS

In this lecture, we will focus on two very important digital building blocks: counters which can either count events or keep time information, and

Graduate Institute of Electronics Engineering, NTU. Lecturer: Chihhao Chao Date:

Topics. Verilog. Verilog vs. VHDL (2) Verilog vs. VHDL (1)

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

Lecture 3. Behavioral Modeling Sequential Circuits. Registers Counters Finite State Machines

Digital Design Using Digilent FPGA Boards -- Verilog / Active-HDL Edition

Computer Organization. Structure of a Computer. Registers. Register Transfer. Register Files. Memories

Recitation Session 6

Finite State Machines

EE 109L Review. Name: Solutions

TDT4255 Computer Design. Lecture 4. Magnus Jahre. TDT4255 Computer Design

CprE 583 Reconfigurable Computing

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

EECS 150 Homework 7 Solutions Fall (a) 4.3 The functions for the 7 segment display decoder given in Section 4.3 are:

Register Transfer Level in Verilog: Part I

EE178 Lecture Verilog FSM Examples. Eric Crabill SJSU / Xilinx Fall 2007

Verilog for High Performance

ECE 551 Digital System Design and Synthesis. Instructor: Kewal K. Saluja. Midterm Exam

Building Bigger Systems: Hardware Threads

Finite State Machines (FSMs) and RAMs and CPUs. COS 116, Spring 2011 Sanjeev Arora

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

Inf2C - Computer Systems Lecture Processor Design Single Cycle

ECE 551: Digital System *

Control & Execution. Finite State Machines for Control. MIPS Execution. Comp 411. L14 Control & Execution 1

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

State Machine Descriptions

10/21/2016. A Finite State Machine (FSM) Models a System. ECE 120: Introduction to Computing. An FSM Consists of Five Parts

Verilog Tutorial. Introduction. T. A.: Hsueh-Yi Lin. 2008/3/12 VLSI Digital Signal Processing 2

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008

Introduction to Verilog and ModelSim. (Part 6 State Machines)

Unit 2: High-Level Synthesis

Register Transfer Level

Block diagram view. Datapath = functional units + registers

EE 109L Final Review

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Instructor: Mohsen Imani. Slides from Tajana Simunic Rosing

ECE 465, Spring 2010, Instructor: Prof. Shantanu Dutt. Project 2 : Due Fri, April 23, midnight.

CMPT 250 : Week 3 (Sept 19 to Sept 26)

EECS150 - Digital Design Lecture 7 - Computer Aided Design (CAD) - Part II (Logic Simulation) Finite State Machine Review

Controller Implementation--Part I. Cascading Edge-triggered Flip-Flops. Clock Skew. Cascading Edge-triggered Flip-Flops. Why Gating of Clocks is Bad!

Storage Elements & Sequential Circuits

Used to perform operations many times. See previous Parallel to Serial Example

Finite-State Machine (FSM) Design

CMPE 415 Verilog Case-Statement Based State Machines II

Lec-6-HW-2-digitalDesign

EE 3170 Microcontroller Applications

Transcription:

Sequential Circuits! Another way to understand setup/hold/propagation time inputs Comb FFs Comb Outputs CLK CSE 37 Spring 2 - Sequential Logic - Sequential logic examples! Finite state machine concept " FSMs are the decision making logic of digital designs " partitioning designs into datapath and elements " when inputs are sampled and outputs asserted! Basic design approach: a -step design process! Implementation examples and case studies " finite-string pattern recognizer " complex counter " traffic light ler " door combination lock CSE 37 Spring 2 - Sequential Logic - 2

General FSM design procedure! () Determine inputs and outputs! (2) Determine possible states of machine " state minimization! (3) Encode states and outputs into a binary code " state assignment or state encoding " output encoding " possibly input encoding (if under our )! () Realize logic to implement functions for states and outputs " combinational logic implementation and optimization " choices made in steps 2 and 3 can have large effect on resulting logic CSE 37 Spring 2 - Sequential Logic - 3 Finite string pattern recognizer (step )! Finite string pattern recognizer " one input (X) and one output (Z) " output is asserted whenever the input sequence has been observed, as long as the sequence has never been seen! Step : understanding the problem statement " sample input/output behavior: X: Z: X: Z: CSE 37 Spring 2 - Sequential Logic -

Finite string pattern recognizer (step 2)! Step 2: draw state diagram " for the strings that must be recognized, i.e., and " a Moore implementation S [] S2 [] S [] S [] S5 [] S3 [] S6 [] or CSE 37 Spring 2 - Sequential Logic - 5 Finite string pattern recognizer (step 2, cont d)! Exit conditions from state S3: have recognized " if next input is then have =... (state S6) " if next input is then have = (state S2)! Exit conditions from S: recognizes strings of form (no seen) " loop back to S if input is S []! Exit conditions from S: recognizes strings of form (no seen) " loop back to S if input is S []...... S []... S2 [] S5 [] S3 S6... []... [] or CSE 37 Spring 2 - Sequential Logic - 6

Finite string pattern recognizer (step 2, cont d)! S2 and S5 still have incomplete transitions " S2 = ; If next input is, then string could be prefix of ()() S handles just this case " S5 = ; If next input is, then string could be prefix of ()() S2 handles just this case! Reuse states as much as possible " look for same meaning " state minimization leads to smaller number of bits to represent states! Once all states have a complete set of transitions we have a final state diagram... S [] S2 []... S []... S [] S5 []... S3 S6... []... [] or CSE 37 Spring 2 - Sequential Logic - 7 Finite string pattern recognizer! Review of process " understanding problem write down sample inputs and outputs to understand specification " derive a state diagram write down sequences of states and transitions for sequences to be recognized " minimize number of states add missing transitions; reuse states as much as possible " state assignment or encoding encode states with unique patterns " simulate realization verify I/O behavior of your state diagram to ensure it matches specification CSE 37 Spring 2 - Sequential Logic - 8

Complex counter! A synchronous 3-bit counter has a mode M " when M =, the counter counts up in the binary sequence " when M =, the counter advances through the Gray code sequence binary:,,,,,,, Gray:,,,,,,,! Valid I/O behavior (partial) Mode Input M Current State Next State CSE 37 Spring 2 - Sequential Logic - 9 Complex counter (state diagram)! Deriving state diagram " one state for each output combination " add appropriate arcs for the mode S [] S [] S2 [] S3 [] S S5 S6 [] [] [] S7 [] CSE 37 Spring 2 - Sequential Logic -

Digital combinational lock! Door combination lock: " punch in 3 values in sequence and the door opens; if there is an error the lock must be ; once the door opens the lock must be " inputs: sequence of input values, " outputs: door open/close " memory: must remember combination or always have it available " open questions: how do you set the internal combination? stored in registers (how loaded?) hardwired via switches set by user CSE 37 Spring 2 - Sequential Logic - Determining details of the specification! How many bits per input value?! How many values in sequence?! How do we know a new input value is entered?! What are the states and state transitions of the system? new value clock open/closed CSE 37 Spring 2 - Sequential Logic - 2

Digital combination lock state diagram! States: 5 states " represent point in execution of machine " each state has outputs! Transitions: 6 from state to state, 5 self transitions, global " changes of state occur when clock says its ok " based on value of inputs! Inputs:, new, results of comparisons! Output: open/closed closed C!=value C2!=value C3!=value & new & new & new S S2 S3 OPEN C==value & new closed C2==value & new closed C3==value & new ERR closed open not new not new not new CSE 37 Spring 2 - Sequential Logic - 3 Data-path and structure! Data-path " storage registers for combination values " multiplexer " comparator! Control " finite-state machine ler " for data-path (which value to compare) value C C2 C3 multiplexer comparator new ler clock CSE 37 Spring 2 - Sequential Logic - open/closed

State table for combination lock! Finite-state machine " refine state diagram to take internal structure into account " state table ready for encoding next new state state open/closed S C closed S S C closed S ERR closed S S2 C2 closed... S3 OPEN open... CSE 37 Spring 2 - Sequential Logic - 5 Encodings for combination lock! Encode state table " state can be: S, S2, S3, OPEN, or ERR needs at least 3 bits to encode:,,,, and as many as 5:,,,, choose bits:,,,, " output can be: C, C2, or C3 needs 2 to 3 bits to encode choose 3 bits:,, " output open/closed can be: open or closed needs or 2 bits to encode choose bit:, next new state state open/closed...... CSE 37 Spring 2 - Sequential Logic - 6 new ler open/closed clock is identical to last 3 bits of state open/closed is identical to first bit of state therefore, we do not even need to implement FFs to hold state, just use outputs

Data-path implementation for combination lock! Multiplexer " easy to implement as combinational logic when few inputs " logic can easily get too big for most PLDs value Ci C2i C3i value C C2 C3 multiplexer comparator CSE 37 Spring 2 - Sequential Logic - 7 Data-path implementation (cont d)! Tri-state logic " utilize a third output state: no connection or float " connect outputs together as long as only one is enabled " open-collector gates can only output, not value Ci C2i C3i can be used to implement logical AND with only wires + oc C C2 C3 value multiplexer comparator tri-state driver (can disconnect from output) open-collector connection (zero whenever one connection is zero, one otherwise wired AND) CSE 37 Spring 2 - Sequential Logic - 8

Section summary! FSM design " understanding the problem " generating state diagram " implementation using synthesis tools " iteration on design/specification to improve qualities of mapping " communicating state machines! Three case studies " understand I/O behavior " draw diagrams " enumerate states for the "goal" " expand with error conditions " reuse states whenever possible CSE 37 Spring 2 - Sequential Logic - 9