Lecture 8: Sequential Logic

Similar documents
RS flip-flop using NOR gate

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

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

Asynchronous (Ripple) Counters

D Latch (Transparent Latch)

RS flip-flop using NOR gate

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

Other Flip-Flops. Lecture 27 1

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

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

Experiment 8 Introduction to Latches and Flip-Flops and registers

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.

Rangkaian Sekuensial. Flip-flop

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

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Unit 11. Latches and Flip-Flops

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

COSC 243. Sequential Logic. COSC 243 (Computer Architecture) Lecture 5 - Sequential Logic 1

LATCHES & FLIP-FLOP. Chapter 7

Digital Logic Design ENEE x. Lecture 19

Counter dan Register

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

ASYNCHRONOUS COUNTER CIRCUITS

Logic Design. Flip Flops, Registers and Counters

CPS311 Lecture: Sequential Circuits

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

EE292: Fundamentals of ECE

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.

Last time, we saw how latches can be used as memory in a circuit

Chapter. Synchronous Sequential Circuits

EKT 121/4 ELEKTRONIK DIGIT 1

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

6. Sequential Logic Flip-Flops

COMP sequential logic 1 Jan. 25, 2016

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

ECE 341. Lecture # 2

EET2411 DIGITAL ELECTRONICS

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

Flip-Flops and Sequential Circuit Design

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

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

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

Registers and Counters

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

Logic Gates, Timers, Flip-Flops & Counters. Subhasish Chandra Assistant Professor Department of Physics Institute of Forensic Science, Nagpur

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

ASYNCHRONOUS SEQUENTIAL CIRCUIT CONCEPTS

Chapter 4. Logic Design

ELCT201: DIGITAL LOGIC DESIGN

1. Convert the decimal number to binary, octal, and hexadecimal.

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Digital Circuits ECS 371

ELCT201: DIGITAL LOGIC DESIGN

Sequential Logic and Clocked Circuits

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

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

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

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

2 Sequential Circuits

(Refer Slide Time: 2:05)

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Counters

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

Chapter 8 Sequential Circuits

CHAPTER 4: Logic Circuits

CHAPTER 6 COUNTERS & REGISTERS

Digital Fundamentals: A Systems Approach

MC9211 Computer Organization

Introduction to Microprocessor & Digital Logic

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Review of Flip-Flop. Divya Aggarwal. Student, Department of Physics and Astro-Physics, University of Delhi, New Delhi. their state.

CHAPTER 1 LATCHES & FLIP-FLOPS

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

Introduction to Sequential Circuits

Switching Circuits & Logic Design

Chapter 5 Sequential Circuits

Digital Circuit And Logic Design I. Lecture 8

CMSC 313 Preview Slides

Digital Circuit And Logic Design I

Sequential Design Basics

Chapter 5: Synchronous Sequential Logic

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops

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

Lecture 7: Sequential Networks

Digital Fundamentals

IT T35 Digital system desigm y - ii /s - iii

Chapter 11 Latches and Flip-Flops

DIGITAL CIRCUIT COMBINATORIAL LOGIC

CHAPTER 4: Logic Circuits

LAB #4 SEQUENTIAL LOGIC CIRCUIT

Vignana Bharathi Institute of Technology UNIT 4 DLD

(Refer Slide Time: 2:00)

The NOR latch is similar to the NAND latch

Topics of Discussion

Module -5 Sequential Logic Design

Transcription:

Lecture 8: Sequential Logic Last lecture discussed how we can use digital electronics to do combinatorial logic we designed circuits that gave an immediate output when presented with a given set of inputs In many cases, however, we want to do sequential logic that means that the output of the circuit should change only when certain other conditions are met An example: memory in a computer we want our circuit to store the value of a variable in binary form, and keep that value until we decide to change it

To achieve this sequential logic, we combine two of the concepts we ve already talked about: logic gates and feedback A simple example is the Set-Reset (S-R) Latch : Has two outputs, but really only one bit of information Let s set the inputs to S =, R = then = and =

Now we set S = (and keep R = ) we then have: = S + = + = = R + = + = In other words, the output doesn t change Now set R = (and keep S = ): = R + = + = = S + = + = Finally, set R = (and keep S = ): = S + = + = = R + = + = once again, output doesn t change

Note that for two of the four possible input states, the output is uniquely defined: S =, R = =, = S =, R = =, = But the output for S = R = depends on what happened earlier that s what we mean by sequential logic the circuit remembers whether S or R was set to most recently I didn t mention the last possible input state, S =, R = that turns out not to be useful

Gated S-R Latch The S-R latch is able to store information, but is still an asynchronous device that is, its outputs respond immediately when either S or R is set to For better control, we want to be able to set S and R, and then at some later time tell the latch to set its final state So, we do a simple modification to come up with the gated S-R latch :

With this circuit, nothing happens until the enable line is set to In other words, the truth table for this device is: R S E Means output values don t change Not used

Edge-triggered flip flops With the gated latch, we have the first example of a flipflop that s a circuit whose output changes how we want and when we want, and remains constant otherwise In many applications, a clock signal is used on the enable line these clock signals can be fanned out to a large number of flip-flops, all of which then change synchronously Rather than enabling on a value of the clock signal, we d often prefer to enable on a transistion either or Devices that do so are called edge-triggered flip-flops

One way to achieve the edge triggering is with the following gates on the enable line: At first glance, looks like output will always be But the inverter takes some time to do the inversion hence the output looks like Flip-flop can only change value during this small interval

The previous circuit would only allow the enable line to go to when the clock makes a ( rising edge ) transition Simple modification allows enable on either transition: Symbol for this type of flip-flop: S Clock R S Clock R Rising-edge trigger Falling-edge trigger

J-K flip-flops The S-R flip-flop still has the problem that one of the possible input states is useless in fact, the circuit would behave unpredictably for S = R = We can avoid this problem by adding a couple of AND gates at the input: With J=K=, the AND outputs are always so R and S are, and the flip-flop is in the memory state (outputs don t change)

If we re in the state with =, and we input J =, K=, then R =, S =, is passed to the S-R latch so it resets to, just as before If we re in the state with =, and we input J =, K=, then R =, S =, is passed to the S-R latch so it sets to, just as before In fact, the J-K flop behaves differently only when J and K are both If is, then R =, S =, is passed to the S-R latch so is reset to If is, then R =, S =, is passed to the S-R latch so is set to Thus the input J = K = is now useful it toggles the flip-flop to the opposite output

Variants on the J-K flip flop We can make useful flip-flops with a single input, starting from an edge-triggered J-K flip-flop: D-type: shifts D to at each active clock edge T-type: toggles at active clock edge if T =, does nothing otherwise

Designing circuits with flip-flops Some parameters and effects to consider: Must make sure the input data arrives before the active clock edge (the time difference between the two is known as the setup time). Otherwise these signals may race against each other, giving unpredictable output Must make sure data maintains its value long enough for result to be propagated to output. This is called the hold time Signal timing should look something like this: Setup time is typically ~ns Propagation delay typically ~3ns

Some flip-flop applications Consider the following circuit, based on T type flip-flops: Output changes at every falling clock edge Output changes whenever first flipflop goes from to Output changes whenever second flipflop goes from to

So if we look at all three outputs as a function of time, we find: This circuit counts the number of clock cycles (in binary) We could keep adding flip-flops to count to higher numbers (more bits)

Counters like this are called ripple counters since input has to ripple through a series of flip-flops to get the correct result Problem: what if we add more flip-flops so that the sum of the propagation delays is greater than the clock period? The circuit will give incorrect results (i.e., by the time the MSB changes, more clock cycles will have arrived at the input, and some of the lower-bit flip-flops will have already toggled)

Synchronous Counter We can avoid those problems by sending the same clock signal to all the flip-flops Second flip-flop toggles only when output of first one is high Third only toggles when both st and 2 nd are high note that we d need a three-input AND gate to add another bit to the counter