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

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

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

10/1/2016. Everything So Far Has Been Combinational Logic. ECE 120: Introduction to Computing. Now Let s Look at Sequential Logic

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

Chapter 10. Counters (a short discussion)

Mark Redekopp, All rights reserved. EE 352 Unit 8. HW Constructs

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4]

Department of Electrical and Computer Engineering Introduction to Computer Engineering I (ECSE-221) Assignment 3: Sequential Logic

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

EECS150 Homework 2 Solutions Fall ) CLD2 problem 2.2. Page 1 of 15

Lec-6-HW-2-digitalDesign

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

Quick Introduction to SystemVerilog: Sequental Logic

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

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

problem maximum score 1 8pts 2 6pts 3 10pts 4 15pts 5 12pts 6 10pts 7 24pts 8 16pts 9 19pts Total 120pts

VHDL: RTL Synthesis Basics. 1 of 59

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

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Chapter 10. case studies in sequential logic design

Using Programmable Logic and the PALCE22V10

General FSM design procedure

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

General FSM design procedure

Written exam for IE1204/5 Digital Design Thursday 29/

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

Spiral 1 / Unit 6. Flip-flops and Registers

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

Lecture 22: Implementing Combinational Logic

ECE 274 Digital Logic Verilog

The University of Alabama in Huntsville ECE Department CPE Midterm Exam February 26, 2003

Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm. Lecture 3

Sequential Logic Design

Recitation Session 6

Storage Elements & Sequential Circuits

ECE 4514 Digital Design II. Spring Lecture 13: Logic Synthesis

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

Lecture 32: SystemVerilog

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

University of Technology

Control in Digital Systems

Topics. Midterm Finish Chapter 7

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

Topics. Midterm Finish Chapter 7

Memory, Latches, & Registers

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).

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

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

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

Building Bigger Systems: Hardware Threads

Modeling Synchronous Logic Circuits. Debdeep Mukhopadhyay IIT Madras

CE1911 LECTURE FSM DESIGN PRACTICE DAY 2

EE 109L Review. Name: Solutions

Homework deadline extended to next friday

ARM 64-bit Register File

Announcements. Midterm 2 next Thursday, 6-7:30pm, 277 Cory Review session on Tuesday, 6-7:30pm, 277 Cory Homework 8 due next Tuesday Labs: project

Memory, Latches, & Registers

Lecture 7: Structural RTL Design. Housekeeping

Redundant States in Sequential Circuits

ESE534: Computer Organization. Previously. Today. Preclass. Preclass. Latches, Registers. Boolean Logic Gates Arithmetic Complexity of computations

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.

CSE A215 Assembly Language Programming for Engineers

EE 109L Final Review

ECE 551: Digital System *

ENCM 369 Winter 2019 Lab 6 for the Week of February 25

CS Computer Architecture Spring Week 10: Chapter

Synthesizable Verilog

Lecture 20: AVR Programming, Continued. AVR Program Visible State (ones we care about for now)

CAD4 The ALU Fall 2009 Assignment. Description

Mealy and Moore examples

Outcomes. Spiral 1 / Unit 6. Flip Flops FLIP FLOPS AND REGISTERS. Flip flops and Registers. Outputs only change once per clock period

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

CENG 3420 Computer Organization and Design. Lecture 06: MIPS Processor - I. Bei Yu

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

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity

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

Music. Numbers correspond to course weeks EULA ESE150 Spring click OK Based on slides DeHon 1. !

Luleå University of Technology Kurskod SMD098 Datum Skrivtid

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

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

problem maximum score 1 10pts 2 8pts 3 10pts 4 12pts 5 7pts 6 7pts 7 7pts 8 17pts 9 22pts total 100pts

Last Lecture. Talked about combinational logic always statements. e.g., module ex2(input logic a, b, c, output logic f); logic t; // internal signal

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

10/5/2016. Review of General Bit-Slice Model. ECE 120: Introduction to Computing. Initialization of a Serial Comparator

CS 2630 Computer Organization. Meeting 13: Faster arithmetic and more operations Brandon Myers University of Iowa

L11: Major/Minor FSMs

10EC33: DIGITAL ELECTRONICS QUESTION BANK

Lecture 12 VHDL Synthesis

COMPUTER ORGANIZATION AND DESIGN

ECE20B, Spring Final Exam lab questions.

ELCT 501: Digital System Design

RealDigital. Problem Set #7 S1 S2 S3 Y Z X Y + Y Z X Z

Computer Architecture: Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Single Cycle Datapath

Digital Systems Design with PLDs and FPGAs Kuruvilla Varghese Department of Electronic Systems Engineering Indian Institute of Science Bangalore

The Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science

Lecture 4: More Lab 1

Transcription:

18 100 Lecture 24: equential Logic esign 15 L24 1 James C. Hoe ept of ECE, CMU April 21, 2015 Today s Goal: tart thinking about stateful stuff Announcements: Read Rizzoni 12.6 HW 9 due Exam 3 on April 30 Final Exam, Fri., May 8, 8:30~11:30, GHC 4401 Handouts: HW 10 (on Blackboard) HW 9 solutions (on Blackboard later on) Lab 12 (on Blackboard later on) Conflicts? Let s refresh our memory. All sequential digital systems comprise Input Next Next tate Logic tate Output Logic 15 L24 2 Output input and output state stuff that remembers combinational stuff that computes a function (has no memory) In an execution, state is updated to a next state based on a function of the current state

Memory 101 15 L24 3 Pure combinational logic always go from a current input to a current output without any looping back There is no notion of time, past or future To remember, must somehow incorporate previous values You mean like this? oes it remember? What does it remember? (It is easier to see if you associate a small propagation delay with wires and gates) A Better Try: the R Latch 15 L24 4 Keep in mind that? X+0=X (X+0) =X X+1=1 1 (X+1) =0 Hint: stands for set ; R for reset R Consider =0 and R=0: the NORs simply act like inverters in the feedback loop; is remembered =1 and R=0: the top NOR s output is forced to 0; the bottom NOR inverts the feedback; is set to 1 =0 and R=1: the bottom NOR s output is forced to 0; the top NOR inverts the feedback; is reset to 0 =1 and R=1: Just don t do it After asserting or R, the resulting is remembered when and R are both deasserted again If you feel brave try finding the dual

Level ensitive Latch 15 L24 5 E is latch enable when E is asserted follows combinationally when E is de asserted the last value is remembered Timing iagram E R E Edge Triggered Flip Flop 15 L24 6 follows only at the instant of rising edge of clock independent of at all other time Timing iagram clk E E (master slave) clk only make synchronous transitions

15 L24 7 ynchronous Finite tate Machines Input Next tate Logic Next FF FF FF tate FF Output Logic Output Clock special clock input symbol ynchronous Timing (implified) clock period chosen to be greater than worst case T pd 15 L24 8 Global Clock sync comb comb sync sync comb comb sync FFs latch new state sync comb comb T pd : combinational propagation delay sync No more changes to NEXT ; NEXT settles to a fxn of

15 L24 9 Let s play with this a bit first 1 bit FM Example 15 L24 10 Implied input: Reset, Clk Input 1 bit signal Tick you can vary its value over time, anytime you like, but only the values at the rising clock edges matter Output 1 bit signal Tock Tock should be 0 after reset Tock should become 1 and stay 1 after Tick has been 1 (as sampled on a rising clock edge) What are the two states? Tick has never been 1 since reset not the above

Rst Tick Clk 1 bit FM Example N logic rst clk 0 1 0 15 L24 11 FF with reset Tock Clk Rst Tick Tock whatever 15 L24 12 FM as an Abstraction

tate Transition iagram A convenient FM abstraction tates (bubbles) best to give each state a init meaningful name output value associated with no 1 s each state (Moore machines) one state is designated as the initialization state Transitions (edges) edges are predicated by input conditions (i.e., follow this edge if condition is met) each state must have transitions for all possible input values seen 1 s Tock=1 or 15 L24 13 Let s play a bit more 15 L24 14 New design: Tock should become 1 and stay 1 after Tick has been 1 three consecutive times! or no info saw1 saw11 saw111 Tock=1 Init What if I want Tock=1 only right after each time Tick has been 1 three consecutive times; at all other times

Realizing an FM tate assignment require at least n= lg 2 N bits n 1,, 0 to encode an FM with N states (each bit is a flip flop) flop) assign each state to an unique encoding choice of encoding can affect the size of combinational next state logic (don t worry about it in 18 100) Next state logic computes the next state value n 1,, 0 as a function of the FM input and current state n 1 1,,,, 0 Moore style Output logic computes the FM output as a function of current state n 1,, 0 I N tate logic 15 L24 15 O Tick Tock Example 2 states, hence a 1 bit FM no 1 s when 0 =0 seen 1 s 1s when =1 init 0 15 L24 16 Next state logic truth table 0 Tick 0 0 0 0 0 1 1 1 0 1 1 1 1 Output logic truth table 0 Tock 0 0 1 1 no 1 s seen 1 s Tock=1 or

state assignment tate 1 0 no info 0 0 saw 1 0 1 saw11 1 0 saw111 1 1 Three 1 s Example next state logic 1 0 Tick 1 0 0 0 0 output logic 0 0 1 0 1 1 0 Tock 0 1 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 15 L24 17 or no info saw1 saw11 saw111 Tock=1 Init Three 1 s Example 15 L24 18 0 Tick 1 Tick 0 1 0 0 0 0 1 0 1 0 1 1 1 1 0 1 1 1 0 0 Rst 1 0 + 0 Tick rst 0 1 0 + 1 Tick+ 0 Tick rst 1 Tock Clk

Why FMs? 15 L24 19 Looking for 0s and 1s..... (this is actually serious computer science; look up regular expressions on Wikipedia) imple computation/calculations..a i..b i ci co Full Adder s sum The first and foremost practical use is to sequence the control of a datapath or a system Atmel ATmega8 atapath 15 L24 20 Page 9 Atmel 8 bit AVR ATmega8 atabook

FM 15 L24 21 datapath = combinational logic and registers to carry out computation (puppet) FM = combinational logic and registers for control and sequencing (puppeteer) inputs outputs FM datapath clock R Latch ual 15 L24 22 R R R