Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

Similar documents
Sequential Circuits Sequential circuits combinational circuits state gate delay

Topic 8: Sequential Circuits

Introduction to Digital Logic

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Sequential Circuit Analysis

Sequential vs. Combinational

ELCT201: DIGITAL LOGIC DESIGN

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

Lecture 7: Logic design. Combinational logic circuits

Topic 8: Sequential Circuits. Bistable Devices. S-R Latches. Consider the following element. Readings : Patterson & Hennesy, Appendix B.4 - B.

Digital Logic Design - Chapter 4

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Sequential Logic Circuits

CPS 104 Computer Organization and Programming Lecture 11: Gates, Buses, Latches. Robert Wagner

Synchronous Sequential Logic

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

Lecture 13: Sequential Circuits, FSM

Lecture 7: Sequential Networks

Week-5. Sequential Circuit Design. Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Digital Circuits and Systems

Chapter 7. Sequential Circuits Registers, Counters, RAM

Chapter 4. Sequential Logic Circuits

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

CPE100: Digital Logic Design I

Lecture 13: Sequential Circuits, FSM

ELCT201: DIGITAL LOGIC DESIGN

Latches. October 13, 2003 Latches 1

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

Sequential Logic. Handouts: Lecture Slides Spring /27/01. L06 Sequential Logic 1

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Topics. CMOS Design Multi-input delay analysis. John A. Chandy Dept. of Electrical and Computer Engineering University of Connecticut

Adders allow computers to add numbers 2-bit ripple-carry adder

Lecture 17: Designing Sequential Systems Using Flip Flops

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

CSE370: Introduction to Digital Design

Synchronous Sequential Circuit

Boolean circuits. Lecture Definitions

Sequential Logic Worksheet

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

Chapter 7 Sequential Logic

Memory, Latches, & Registers

Konstruktion av Vippor och Latchar

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

Lecture 8: Sequential Networks and Finite State Machines

I. Motivation & Examples

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

CS/COE0447: Computer Organization

CSE370 HW6 Solutions (Winter 2010)

Chapter #6: Sequential Logic Design

Chapter 14 Sequential logic, Latches and Flip-Flops

Logic design? Transistor as a switch. Layered design approach. CS/COE1541: Introduction to Computer Architecture. Logic Design Review.

CPE100: Digital Logic Design I

Integrated Circuits & Systems

ALU A functional unit

CPE100: Digital Logic Design I

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

Lecture 3 Review on Digital Logic (Part 2)

I. Motivation & Examples

ELE2120 Digital Circuits and Systems. Tutorial Note 10

Sequential Logic (3.1 and is a long difficult section you really should read!)

CS/COE0447: Computer Organization

State and Finite State Machines

ALU, Latches and Flip-Flops

5. Sequential Logic x Computation Structures Part 1 Digital Circuits. Copyright 2015 MIT EECS

Chapter 3. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 3 <1>

Logic Design II (17.342) Spring Lecture Outline

Synchronous Sequential Logic Part I. BME208 Logic Circuits Yalçın İŞLER

Lecture 12: Adders, Sequential Circuits

P2 (10 points): Given the circuit below, answer the following questions:

Sample Test Paper - I

Chapter 5 Synchronous Sequential Logic

Programmable Logic Devices II

ECE 341. Lecture # 3

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

Lecture 10: Synchronous Sequential Circuits Design

Philadelphia University Student Name: Student Number:

Hold Time Illustrations

Problem Set 9 Solutions

EE141- Spring 2007 Digital Integrated Circuits

Sequential Logic. Road Traveled So Far

Chapter 3 Digital Logic Structures

Fundamentals of Digital Design

Sequential Circuit Design

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

CS61C : Machine Structures

Lecture (08) Synchronous Sequential Logic

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

Chapter 3. Chapter 3 :: Topics. Introduction. Sequential Circuits

CprE 281: Digital Logic

EET 310 Flip-Flops 11/17/2011 1

Digital Design. Sequential Logic

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

Digital Electronics Sequential Logic

CSCI 2150 Intro to State Machines

CS61C : Machine Structures

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

Transcription:

Memory Elements I CS31 Pascal Van Hentenryck CS031 Lecture 6 Page 1

Memory Elements (I) Combinational devices are good for computing Boolean functions pocket calculator Computers also need to remember things memory elements Today s topic how to make computers remember things Overview latches transparent latches flip-flops CS031 Lecture 6 2

The Big Picture CS031 Lecture 6 3

Abstraction Hierarchy Programming Language Assembly Language Machine Language Sequential Circuit Combinational Circuit Binary Value Voltage CS031 Lecture 6 4

Memory Elements How to remember things with gates and wires? Two stable states X = 1 and X = 0 X = 0 and X = 1 This circuit can store one-bit of information What do we need now? How to assign a state? How to change the state? CS031 Lecture 6 5

R-S Latch A word is Each bit is represented by a latch CS031 Lecture 6 6

R-S Latch Initial State: [ Q = 1 and Q = 0 ] What if Q Q S=0 & R=1 CS031 Lecture 6 7

R-S Latch Initial State: [ Q = 1 and Q = 0 ] What if Q Q S=0 & R=1 0 1 CS031 Lecture 6 8

R-S Latch Initial State: [ Q = 1 and Q = 0] What if Q Q S=1 & R=0 CS031 Lecture 6 9

R-S Latch Initial State: [ Q = 1 and Q = 0] What if Q Q S=1 & R=0 1 0 CS031 Lecture 6 10

R-S Latch Initial State: Q = 0 and Q = 1 What if Q Q S=1 & R=0 CS031 Lecture 6 11

R-S Latch Initial State: Q = 0 and Q = 1 What if Q Q S=1 & R=0 1 0 CS031 Lecture 6 12

R-S Latch Initial State: Q = 0 and Q = 1 What if Q Q S=1 & R=1 CS031 Lecture 6 13

R-S Latch Initial State: Q = 0 and Q = 1 What if Q Q S=1 & R=1 0 0 CS031 Lecture 6 14

R-S Latch Initial State: Q = 0 and Q = 0 What if Q Q S=0 & R=0 CS031 Lecture 6 15

R-S Latch 1 Initial State: Q = 0 and Q = 0 What if Q Q S=0 & R=0 (S 1 st ) 0 1 CS031 Lecture 6 16

R-S Latch 1 Initial State: Q = 0 and Q = 0 What if Q Q S=0 & R=0 (R 1 st ) CS031 Lecture 6 17

R-S Latch 1 Initial State: Q = 0 and Q = 0 What if Q Q S=0 & R=0 (R 1 st ) 1 0 CS031 Lecture 6 18

R-S Latch 1 1 Initial State: Q = 0 and Q = 0 What if Q Q S=0 & R=0 (same time)?? CS031 Lecture 6 19

Problems with Latches Race conditions unpredictability of results Possibilities Q =0 and Q=1 Q =1 and Q=0 Instability CS031 Lecture 6 20

Clocks Circuits with feedback loops are difficult to control Need to worry about timing Main abstraction in circuit design Ignoring propagation time Basic solution Using a clock What is a clock? It is a free running signal Clock CS031 Lecture 6 21

Transparent Latches How to avoid timing problems? state changes only occur when the clock is asserted transparent latch that enforces Q=Data CS031 Lecture 6 22

Transparent D-Latch 1 1 CS031 Lecture 6 23

Transparent JK-Latch 1 1 CS031 Lecture 6 24

Shifting Shift right What does shifting right do to a number? Divides the number by 2. CS031 Lecture 6 25

Look Ma, my latch is leaking The results are still unpredictable The value of the first latch can be assigned to the second, the third, or any of the connected latches depending on propagation times and the clock cycle. Annoying to build shifting registers How to remedy this problem? CS031 Lecture 6 26

Edge-Triggered Methodology State Changes only occur on a clock edge Flip-flops latches which are only updated on a clock edge bits in words are flip-flops Flip-Flops CS031 Lecture 6 27

Shift Register Again CS031 Lecture 6 28

R-S Latch A R-S Latch was easy to implement in hardware. What about a flip-flop? CS031 Lecture 6 29

Edge-Triggered Flip-Flop S can only change when C = 0 Q can only change when C = 1 Q changes on next rising clock edge after Data changes A flip-flop is made of two latches! CS031 Lecture 6 30

Edge-Triggered Flip-Flops Basic constraint (rising edge flip-flop) The input D must be stable for a short period of time before the clock edge The input D must be stable for a short period of time after the clock edge In practice Setup times are enforced by making sure that the clock cycle is long enough Hold times are generally 0 or very very small CS031 Lecture 6 31

(Clocked) Sequential Circuit CS031 Lecture 6 32

D (data) More Flip-Flops JK (refinement of RS) T (toggle) CS031 Lecture 6 33

Excitation Tables If we want a flip-flop to make a certain state transition, what signals should we apply? JK Characteristic Table JK Excitation Table CS031 Lecture 6 34

Dynamic Discipline A (clocked) sequential circuit only clocked sequential devices and combinational devices no combinational cycles: every cycle contains a memory element the input values of every memory element must be stable before the clock edge, i.e. the clock cycle must be long enough for the combinational part to propagate CS031 Lecture 6 35

(Clocked) Sequential Circuit CS031 Lecture 6 36