Introduction to Computer Engineering EECS dickrp/eecs203/

Similar documents
Advanced Digital Logic Design EECS 303

Chapter 5 Synchronous Sequential Logic

Lecture 11: Synchronous Sequential Logic

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

Digital Integrated Circuits EECS 312

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

ELCT201: DIGITAL LOGIC DESIGN

ELCT201: DIGITAL LOGIC DESIGN

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

WEEK 10. Sequential Circuits: Analysis and Design. Page 1

Sequential Logic Circuits

Synchronous Sequential Logic. Chapter 5

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

Digital Logic Design I

ECE 341. Lecture # 2

ELCT201: DIGITAL LOGIC DESIGN

Chapter. Synchronous Sequential Circuits

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Universidad Carlos III de Madrid Digital Electronics Exercises

Synchronous Sequential Logic

ECE 301 Digital Electronics

Chapter 5. Introduction

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Engr354: Digital Logic Circuits

Sequential Design Basics

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Chapter 5: Synchronous Sequential Logic

L5 Sequential Circuit Design

Introduction to Sequential Circuits

Synchronous Sequential Logic

Part II. Chapter2: Synchronous Sequential Logic

FPGA Implementation of Sequential Logic

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

Analysis of Clocked Sequential Circuits

Chapter 5 Synchronous Sequential Logic

Experiment # 12. Traffic Light Controller

Switching Circuits & Logic Design

INTRODUCTION TO SEQUENTIAL CIRCUITS

Spring 2017 EE 3613: Computer Organization Chapter 5: The Processor: Datapath & Control - 1

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

2 Sequential Circuits

Synchronous Sequential Logic

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Digital Circuits ECS 371

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

RS flip-flop using NOR gate

ENGG 1203 Tutorial. D Flip Flop. D Flip Flop. Q changes when CLK is in Rising edge PGT NGT

Logic Design. Flip Flops, Registers and Counters

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

Unit 11. Latches and Flip-Flops

Combinational / Sequential Logic

CHAPTER1: Digital Logic Circuits

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

MC9211 Computer Organization

CHAPTER 4: Logic Circuits

Course Administration

RS flip-flop using NOR gate

CS8803: Advanced Digital Design for Embedded Hardware

Introduction to Microprocessor & Digital Logic

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

EEC 118 Lecture #9: Sequential Logic. Rajeevan Amirtharajah University of California, Davis Jeff Parkhurst Intel Corporation

Latches, Flip-Flops, and Registers. Dr. Ouiem Bchir

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Chapter 11 Latches and Flip-Flops

Fall 2000 Chapter 5 Part 1

Other Flip-Flops. Lecture 27 1

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Chapter 8 Sequential Circuits

Rangkaian Sekuensial. Flip-flop

EET2411 DIGITAL ELECTRONICS

CHAPTER 4: Logic Circuits

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

The NOR latch is similar to the NAND latch

Flip-Flops and Sequential Circuit Design

Problems with D-Latch

Digital Integrated Circuits EECS 312. Review. Combinational vs. sequential logic. Sequential logic. Introduction to sequential elements

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute


CHAPTER 6 COUNTERS & REGISTERS

6. Sequential Logic Flip-Flops

Topic 8. Sequential Circuits 1

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Chapter 5 Sequential Circuits

ECE 25 Introduction to Digital Design. Chapter 5 Sequential Circuits ( ) Part 1 Storage Elements and Sequential Circuit Analysis

Chapter 5 Synchronous Sequential Logic

P U Q Q*

CS 261 Fall Mike Lam, Professor. Sequential Circuits

CPS311 Lecture: Sequential Circuits

EECS 3201: Digital Logic Design Lecture 9. Ihab Amer, PhD, SMIEEE, P.Eng.

CH 11 Latches and Flip-Flops

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

ECE 331 Digital System Design

Transcription:

Introduction to Computer Engineering EECS 203 http://ziyang.eecs.northwestern.edu/ dickrp/eecs203/ Instructor: Robert Dick Office: L477 Tech Email: dickrp@northwestern.edu Phone: 847 467 2298 TA: Neal Oza Office: Tech. Inst. L375 Phone: 847-467-0033 Email: nealoza@u.northwestern.edu TT: David Bild Office: Tech. Inst. L470 Phone: 847-491-2083 Email: d-bild@northwestern.edu

Outline Finite State Machines 1. Finite State Machines 2. 3. 4. 2 R. Dick Introduction to Computer Engineering EECS 203

Word description to state diagram Design a vending machine controller that will release (output signal r) an apple as soon as 30 have been inserted The machine s sensors will clock your controller when an event occurs. The machine accepts only dimes (input signal d) and quarters (input signal q) and does not give change When an apple is removed from the open machine, it indicates this by clocking the controller with an input of d The sensors use only a single bit to communicate with the controller 3 R. Dick Introduction to Computer Engineering EECS 203

Word description to state diagram We can enumerate the inputs on which an apple should be released For d, i = 0, for q, i = 1 ddd + ddq + dq + qd + qq d(dd + dq + q) + q(d + q) d(d(d + q) + q) + q(d + q) 0(0(0 + 1) + 1) + 1(0 + 1) 4 R. Dick Introduction to Computer Engineering EECS 203

Word description to state diagram 0(0(0 + 1) + 1) + 1(0 + 1) 0 1 A/0 0 B/0 0 C/0 1 1 0 D/1 1 E/0 0 1 5 R. Dick Introduction to Computer Engineering EECS 203

Word description to state diagram 0(0(0 + 1) + 1) + 1(0 + 1) X 0 C/0 X A/0 0 B/0 1 D/1 1 E/0 X 5 R. Dick Introduction to Computer Engineering EECS 203

Word description to state diagram 0(0(0 + 1) + 1) + 1(0 + 1) X 0 C/0 X A/0 0 B/0 1 D/1 1 5 R. Dick Introduction to Computer Engineering EECS 203

State diagram to state table next Current state state i=0 i=1 output (r) A B E 0 B C D 0 C D D 0 D A A 1 E D D 0 6 R. Dick Introduction to Computer Engineering EECS 203

Moore block diagram outputs combinational logic sequential elements feedback combinational logic inputs 7 R. Dick Introduction to Computer Engineering EECS 203

Mealy block diagram sequential elements outputs feedback combinational logic inputs 8 R. Dick Introduction to Computer Engineering EECS 203

Moore FSMs Finite State Machines 0 1 1 A/0 B/0 0 1 0 0 1 D/1 C/0 9 R. Dick Introduction to Computer Engineering EECS 203

Mealy FSMs Finite State Machines 1/0 A 1/X B 0/0 D 0/0 0/1 1/0 0/1 C 1/1 10 R. Dick Introduction to Computer Engineering EECS 203

Mealy tabular form s + /q s 0 1 A D/0 B/X B C/1 B/0 C A/0 B/1 D C/1 C/0 11 R. Dick Introduction to Computer Engineering EECS 203

FSM design summary Specify requirements in natural form Manually derive state diagram Automatic way to go from English to FSM, however more theory required Can minimize state count, however, more theory also required See me if you want more information on this, or take a compilers course and a graduate-level switching theory course, or take my ECE 303 Assign values to states to minimize logic complexity Optimize implementation of state and output functions 12 R. Dick Introduction to Computer Engineering EECS 203

Outline Finite State Machines 1. Finite State Machines 2. 3. 4. 13 R. Dick Introduction to Computer Engineering EECS 203

Back to latches Finite State Machines Latches: Level sensitive Flip-flops: Edge-triggered 14 R. Dick Introduction to Computer Engineering EECS 203

Review: Clocking conventions Active-high transparent D Q CLK Active-low transparent D Q CLK Positive (rising) edge Negative (falling) edge D Q D Q CLK CLK 15 R. Dick Introduction to Computer Engineering EECS 203

Latch and flip-flop equations RS Q + = S + R Q D Q + = D 16 R. Dick Introduction to Computer Engineering EECS 203

Latch and flip-flop equations JK Q + = J Q + K Q T Q + = T Q 17 R. Dick Introduction to Computer Engineering EECS 203

JK latch Finite State Machines K J R S R S latch Q Q Q Q Use output feedback to ensure that RS 11 Q + = Q K + Q J 18 R. Dick Introduction to Computer Engineering EECS 203

JK latch Finite State Machines J K Q Q + 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 hold reset set toggle 19 R. Dick Introduction to Computer Engineering EECS 203

JK race Finite State Machines Set Reset 100 Toggle J K Q Q Race Condition 20 R. Dick Introduction to Computer Engineering EECS 203

Falling edge-triggered D flip-flop Use two stages of latches When clock is high First stage samples input w.o. changing second stage Second stage holds value When clock goes low First stage holds value and sets or resets second stage Second stage transmits first stage Q + = D One of the most commonly used flip-flops 21 R. Dick Introduction to Computer Engineering EECS 203

Falling edge-triggered D flip-flop D D 0 Clk= =1 R Q S Q 0 D D Clock high 22 R. Dick Introduction to Computer Engineering EECS 203

Falling edge-triggered D flip-flop D D 0 Holds D when clock goes low Clk=1= R Q S Q 0 D D Holds D when clock goes low Clock switching Inputs sampled on falling edge, outputs change after falling edge 23 R. Dick Introduction to Computer Engineering EECS 203

Falling edge-triggered D flip-flop D D D Clk= = 0 R Q S Q D? 0 Clock low 24 R. Dick Introduction to Computer Engineering EECS 203

Another view of an edge-triggered DFF R Q clk S Q R Q Q R Q S Q D S Q 25 R. Dick Introduction to Computer Engineering EECS 203

Edge triggered timing 100 D CLK Qpos Qpos Qneg Qneg Positive edge t riggered FF Negative edge t riggered FF 26 R. Dick Introduction to Computer Engineering EECS 203

RS clocked latch Storage element in narrow width clocked systems Dangerous Fundamental building block of many flip-flop types 27 R. Dick Introduction to Computer Engineering EECS 203

JK flip-flop Finite State Machines Versatile building block Building block for D and T flip-flops Has two inputs resulting in increased wiring complexity Edge-triggered varieties exist 28 R. Dick Introduction to Computer Engineering EECS 203

D flip-flop Finite State Machines Minimizes input wiring Simple to use Common choice for basic memory elements in sequential circuits 29 R. Dick Introduction to Computer Engineering EECS 203

Outline Finite State Machines 1. Finite State Machines 2. 3. 4. 30 R. Dick Introduction to Computer Engineering EECS 203

Finite State Machines Mechanical switches bounce! What happens if multiple pulses? Mutliple state transitions Need to clean up signal 31 R. Dick Introduction to Computer Engineering EECS 203

Schmitt triggers Finite State Machines A B High A Low 32 R. Dick Introduction to Computer Engineering EECS 203

Schmitt triggers Finite State Machines A B High V TH A V TL Low 32 R. Dick Introduction to Computer Engineering EECS 203

Schmitt triggers Finite State Machines A B High V TH A V TL Low 32 R. Dick Introduction to Computer Engineering EECS 203

Schmitt triggers Finite State Machines A B High V TH A V TL transition Low 32 R. Dick Introduction to Computer Engineering EECS 203

Schmitt triggers Finite State Machines A B High V TH A V TL transition B Low 32 R. Dick Introduction to Computer Engineering EECS 203

Finite State Machines 5 4 Schmitt trig. RC 0.75 1.65 3 V 2 1 0-1.0e-03-5.0e-04 0.0e+00 5.0e-04 1.0e-03 1.5e-03 T (s) 33 R. Dick Introduction to Computer Engineering EECS 203

Outline Finite State Machines 1. Finite State Machines 2. 3. 4. 34 R. Dick Introduction to Computer Engineering EECS 203

Assigned reading M. Morris Mano and Charles R. Kime. Logic and Computer Design Fundamentals. Prentice-Hall, NJ, fourth edition, 2008 Review Sections 5.1 5.7 If FSMs don t make sense now, please ask questions, or see me FSMs are tricky at first Almost everybody has this moment of epiphany at which they suddenly make sense Section 9.1 9.6 35 R. Dick Introduction to Computer Engineering EECS 203

Computer geek culture references Parsers and lexical analyzers Writing problem-specific languages A. V. Aho, R. Sethi, and J. D. Ullman. Compilers principles, techniques, and tools. Addison-Wesley, MA, 1986 Lex and yacc Flex and bison 36 R. Dick Introduction to Computer Engineering EECS 203