Output depends on sequence of previous inputs Sequence of previous this is history History is a state that captures how you got here

Similar documents
Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

Counters and Decoders

CHAPTER 11 LATCHES AND FLIP-FLOPS

Lesson 12 Sequential Circuits: Flip-Flops

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

BINARY CODED DECIMAL: B.C.D.

Module 3: Floyd, Digital Fundamental

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Memory Elements. Combinational logic cannot remember

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Digital Logic Design Sequential circuits

CHAPTER 3 Boolean Algebra and Digital Logic

Flip-Flops, Registers, Counters, and a Simple Processor

ECE380 Digital Logic

Theory of Logic Circuits. Laboratory manual. Exercise 3

CSE140: Components and Design Techniques for Digital Systems

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

CHAPTER 11: Flip Flops

Sequential Logic Design Principles.Latches and Flip-Flops

Chapter 8. Sequential Circuits for Registers and Counters

CSE140 Homework #7 - Solution

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Lecture 8: Synchronous Digital Systems

ASYNCHRONOUS COUNTERS

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

Binary Adders: Half Adders and Full Adders

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Modeling Latches and Flip-flops

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Systems I: Computer Organization and Architecture

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Decimal Number (base 10) Binary Number (base 2)

Counters are sequential circuits which "count" through a specific state sequence.

Asynchronous counters, except for the first block, work independently from a system clock.

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

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

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Chapter 5. Sequential Logic

Contents COUNTER. Unit III- Counters

Chapter 9 Latches, Flip-Flops, and Timers

Engr354: Digital Logic Circuits

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

CS311 Lecture: Sequential Circuits

Fig1-1 2-bit asynchronous counter

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Digital Electronics Detailed Outline

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Counters. Present State Next State A B A B

Combinational Logic Design Process

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Sequential Logic: Clocks, Registers, etc.

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Counters & Shift Registers Chapter 8 of R.P Jain

Asynchronous Counters. Asynchronous Counters

DEPARTMENT OF INFORMATION TECHNLOGY

Design: a mod-8 Counter

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

Gates, Circuits, and Boolean Algebra

Lecture-3 MEMORY: Development of Memory:

Digital Fundamentals

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

Upon completion of unit 1.1, students will be able to

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Set-Reset (SR) Latch

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

The components. E3: Digital electronics. Goals:

Binary full adder. 2-bit ripple-carry adder. CSE 370 Spring 2006 Introduction to Digital Design Lecture 12: Adders

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

7. Latches and Flip-Flops

Operating Manual Ver.1.1

[ 4 ] Logic Symbols and Truth Table

Registers & Counters

ANALOG & DIGITAL ELECTRONICS

路 論 Chapter 15 System-Level Physical Design

TIMING DIAGRAM O 8085

DM54161 DM74161 DM74163 Synchronous 4-Bit Counters

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

DATA SHEET. HEF4017B MSI 5-stage Johnson counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

COMBINATIONAL CIRCUITS

Wiki Lab Book. This week is practice for wiki usage during the project.

Digital Logic Elements, Clock, and Memory Elements

Lecture 10 Sequential Circuit Design Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

CMOS Binary Full Adder

Transcription:

Sequential Logic Output depends on sequence of previous inputs Sequence of previous this is history History is a state that captures how you got here " E.g., 35 cents vending = cents + cents + cents + 5 cents " Or, 25 cents + cents = 35 cents. Multiple ways are possible. State requires memory remembering the past... Memory in logic Smallest element is bit of memory Use logic gates to create a -bit memory Yet, combinational logic (using gates) depends only on present inputs! Fundamental building block: RS Latch -bit of history through feedback of gates 43 RS latch Two NOR gates With feedback Input R,S control writing a or in state Output Current state ( or ) Beware of the feedback! Complement of current state 44

RS latch Let s see how it operates! Write a value into the -bit state. 45 RS latch When R=, S=, Q(t)= 46 2

RS latch When R=, S=, Q(t)= 47 RS latch When R=, S=, Q(t)= 48 3

RS latch When R=, S=, Q(t)= 49 RS latch When R=, S=, Q(t)= 5 4

RS latch When R=, S= 5 RS latch When R=, S=, and Q(t)= 52 5

RS latch When R=, S=, and Q(t)= 53 RS latch What happens if R=S= 54 6

RS latch R S Q(t) Q(t+) Q (t+) 55 RS latch R S Q(t) Q(t+) Q (t+) 56 7

RS latch truth table Inputs Outputs R S Q(t) Q(t+) Invalid Invalid Storage (R=, S=) Set to (S=) Reset to (R=) Outputs will track any changes in the inputs! R=, S= must be avoided. Desirable to control when to capture input state. 57 Consider RS latch over time Time (t) R S Q(t) Q(t+) 2 3 4 5 6 7 8 9 58 8

Time (t) R S Q(t) Q(t+) 2 3 4 5 6 7 8 9 59 Time (t) R S Q(t) Q(t+) 2 3 4 5 6 7 8 9 6 9

Time (t) R S Q(t) Q(t+) 2 3 4 5 6 7 8 9 6 Time (t) R S Q(t) Q(t+) 2 3 4 5 6 7 8 9 62

Time (t) R S Q(t) Q(t+) 2 3 4 5 6 7 8 9 63 Time (t) R S Q(t) Q(t+) 2 3 4 5 6 7 8 9 64

Time (t) R S Q(t) Q(t+) 2 3 4 5 6 7 8 9 65 D latch Controls when to capture data input Same data outputs as the RS latch One signal (bit) for data input 66 2

D latch Note that we have an RS latch in the back-end of this design 67 D latch R Inverter for D input with C S Note that R, S inputs always get opposite values when C= When C=, S=R= RS latch remembers the previous value 68 3

D latch C=, D= R S Note that R, S inputs always get opposite values when C= When C=, S=R= RS latch remembers the previous value 69 D latch C=, D= R S Note that R, S inputs always get opposite values when C= When C=, S=R= RS latch remembers the previous value 7 4

D latch C=, D= Q(t)= R S Note that R, S inputs always get opposite values when C= When C=, S=R= RS latch remembers the previous value 7 D latch C=, D= Q(t)= R S Note that R, S inputs always get opposite values when C= When C=, S=R= RS latch remembers the previous value 72 5

D latch R latched mode C D Q(t) Q(t-) Q(t-) S transparent mode 73 D latch D C D Latch Q Q 74 6

D latch D Q D Latch C Q D C Q 75 D flip-flop (D-FF) Two cascaded D latches; C input of the second is inverted This is a negative edge (aka falling edge ) triggered D-FF 76 7

D flip-flop D C D-FF Q Q 77 D flip-flop Q D Q D-FF transparent storage transparent storage C Q D C data value at falling edge Q Q 78 8

State Elements RS latch R,S control mode (reset, set, storage) Q,Q track R and S R=, S= invalid D latch C controls mode (=latched, =transparent) D is data input ( copied during transparent) Signal value triggered: Q,Q track D when C= Guarantees R=,S= can not be done D flip-flop (falling or negative edge triggered) Two cascaded D latches C= means st latch transparent, 2 nd latched C= means st latch latched, 2 nd transparent Output changes on falling edge (C: =>) D flip-flop (rising or positive edge triggered) Same as falling edge triggered Output changes on rising edge (C: =>) Example circuits and clocking Suppose we want to: -bit value A stored in a D flip-flop -bit value B stored in a D flip-flop -bit value C stored in a D flip-flip Do -bit addition of A and B, producing C C = A + B What is the circuit? Need three D flip-flops Need one bit adder 84 9

Example circuits and clocking A C B How quickly can this produce a new sum C=A+B? Suppose D flip-flop: Each latch is 2ns Adder: With ripple carries is 4ns Example circuits and clocking 2

Example circuits and clocking Propagation delay = 2ns + 4ns + 2ns = 8ns Read A,B Compute A+B Write C How often can a new sum be produced? Every 8ns! How do we control when to write C? Clock! Example circuits and clocking falling edge Read A,B Compute A+B Write C 2

Example circuits and clocking falling edge falling edge 8ns between falling edges Read A,B Compute A+B Write C Clock Frequency Clock frequency is how many edges (falling) per second In our example, how many edges per second? clock frequency Convenient unit of measurements Hertz = Hz = Cycles Per Second = second / 8ns between edges = 9 ns per second / 8ns = 25,, edges per second MegaHertz = MHz = Millions of Cycles Per Second GigaHertz = GHz = Billions of Cycles Per Second For our example, it s 25 MHz clock frequency 9 22

Clock Frequency Suppose delay between edges was.5ns What is the clock frequency? Clock frequency = second / time between edges = second /.5ns = 9 ns per second /.5ns = 2,,, edges per second = 2 MHz clock frequency = 2. GHz clock frequency 9 Example circuits and clocking Is there any difference in the delay with this one? In fact, sequential logic often looks like this. 92 23

Example circuits and clocking Now, suppose we want to build a 4-bit counter? Counter increments by for a clock pulse (falling edge event) 4 -bit adders 4 -bit D flip-flops What s the circuit? How often to pulse the clock (increment counter)? 93 Example circuits and clocking Recall: The flip-flops are edge triggered -- assuming falling edge (negative) How often can an edge event happen? No more frequent than the maximum propagation delay Let s compute the delay -- assume 2ns for latch to stabilize and 4ns for adder 24

Example circuits and clocking Values of output bits must all be stable I.e., can t pulse the clock (increment) until all four bits are computed Adder circuit is ripple-carry: Must wait for carries 4ns per adder 4-bit adder thus, 4 * 4ns = 6ns for the adder Flip-flops Must wait for st latch of last bit to stabilize (others done in parallel) Must wait for 2 nd latch of all bits to stabilize (all done in parallel) thus, 2ns + 2ns = 4ns Overall delay = 6ns + 4ns = 2ns. Clock pulse is 2ns. 95 Example circuits and clocking Can we build a counter with just flip-flops? What s the propagation delay? 96 25