Flip-Flops and Registers

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

Other Flip-Flops. Lecture 27 1

ECE 331 Digital System Design

ECE 301 Digital Electronics

Flip-Flops and Sequential Circuit Design

Logic Design II (17.342) Spring Lecture Outline

Chapter 2. Digital Circuits

ELCT201: DIGITAL LOGIC DESIGN

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

ECE 301 Digital Electronics

Unit 11. Latches and Flip-Flops

CHAPTER 11 LATCHES AND FLIP-FLOPS

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

Experiment 8 Introduction to Latches and Flip-Flops and registers

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

ELCT201: DIGITAL LOGIC DESIGN

Introduction to Sequential Circuits

Chapter. Synchronous Sequential Circuits

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

Sequential Design Basics

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

Course Administration

RS flip-flop using NOR gate

Engr354: Digital Logic Circuits

CH 11 Latches and Flip-Flops

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

CMSC 313 Preview Slides

LAB 7. Latches & Flip Flops

Universal Asynchronous Receiver- Transmitter (UART)

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

Logic Design. Flip Flops, Registers and Counters

CHAPTER 4: Logic Circuits

Digital Fundamentals: A Systems Approach

MC9211 Computer Organization

Flip-flop and Registers

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

CHAPTER 4: Logic Circuits

UNIVERSITI TEKNOLOGI MALAYSIA

ECE 263 Digital Systems, Fall 2015

Digital Logic Design ENEE x. Lecture 19

CHAPTER1: Digital Logic Circuits

ECE 341. Lecture # 2

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

Vignana Bharathi Institute of Technology UNIT 4 DLD

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

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

NAME SYMBOL CHARACTERISTIC TABLE EXCITATION TABLE. S R Q(next) 0 0 Q. (hold) (reset) (set) 1 1? (undefined) J K Q(next) (hold) (reset) (set) 1 1 Q'

D Latch (Transparent Latch)

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Switching Circuits & Logic Design

Registers and Counters

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

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

Unit-5 Sequential Circuits - 1

ELE2120 Digital Circuits and Systems. Tutorial Note 7

Chapter 6 Digital Circuit 6-5 Department of Mechanical Engineering

Counter dan Register

Computer Organization & Architecture Lecture #5

RS flip-flop using NOR gate

Registers & Counters. Logic and Digital System Design - CS 303 Erkay Savaş Sabanci University

CprE 281: Digital Logic

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

Counters

Lecture 8: Sequential Logic

Digital Circuits ECS 371

AIM: To study and verify the truth table of logic gates

Sequential Logic Circuits

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

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

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.

Registers and Counters

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

ELE2120 Digital Circuits and Systems. Tutorial Note 8

Class 19 Sequential Logic: Flip-Flop

Class 06 Sequential Logic: Flip-Flop

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

EECS150 - Digital Design Lecture 3 Synchronous Digital Systems Review. Announcements

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

CHAPTER 6 DESIGN OF HIGH SPEED COUNTER USING PIPELINING

B.Tech CSE Sem. 3 15CS202 DIGITAL SYSTEM DESIGN (Regulations 2015) UNIT -IV

Asynchronous (Ripple) Counters

Digital Logic Design I

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

ESE 570 STATIC SEQUENTIAL CMOS LOGIC CELLS. Kenneth R. Laker, University of Pennsylvania, updated 25Mar15

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

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

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

Introduction to Digital Logic Missouri S&T University CPE 2210 Flip-Flops

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

12/31/2010. Overview. 12-Latches and Flip Flops Text: Unit 11. Sequential Circuits. Sequential Circuits. Feedback. Feedback

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

ECE 3401 Lecture 11. Sequential Circuits

CS 261 Fall Mike Lam, Professor. Sequential Circuits

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

FE REVIEW LOGIC. The AND gate. The OR gate A B AB A B A B 0 1 1

Module -5 Sequential Logic Design

CprE 281: Digital Logic

Feedback Sequential Circuits

Chapter 5 Synchronous Sequential Logic

Rangkaian Sekuensial. Flip-flop

Transcription:

The slides included herein were taken from the materials accompanying Fundamentals of Logic Design, 6 th Edition, by Roth and Kinney, and were used with permission from Cengage Learning. Flip-Flops and Registers (Lecture #19)

Flip-Flops (continued)

SR Flip-Flop The SR Flip-Flop has three inputs Clock (Ck) --- denoted by the small arrowhead Set (S) and Reset (R) Similar to an SR Latch S = 1 sets the flip-flop (Q + = 1) R = 1 resets the flip-flop (Q + = 0) Like the D Flip-Flop, the Q output of an SR Flip-Flop only changes in response to an active clock edge. Positive edge-triggered Negative edge-triggered

SR Flip-Flop S R 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 not 1 1 1 allowed } Q+ } } = Q store Q + = 0 reset Q + = 1 set positive edge-triggered SR Flip-Flop State change occurs after active Clock edge

SR Flip-Flop (master-slave) SR Latches Enabled on opposite levels of the clock

SR Flip-Flop: Timing Diagram

JK Flip-Flop The JK Flip-Flop has three inputs Clock (Ck) --- denoted by the small arrowhead J and K Similar to the SR Flip-Flop J corresponds to S: J = 1 Q + = 1 K corresponds to R: K = 1 Q + = 0 Different from the SR Flip-Flop in that the input combination J = 1, K = 1 is allowed. J = K = 1 causes the Q output to toggle after an active clock edge.

JK Flip-Flop } Q+ } Q+ } Q+ } Q+ = Q store = 0 reset = 1 set = Q' toggle Characteristic Equation: Q + = J.Q' + K'.Q

JK Flip-Flop (master-slave) SR Latches Enabled on opposite levels of the clock

JK Flip-Flop: Timing Diagram

T Flip-Flop The Toggle (T) Flip-Flop has two inputs Clock (Ck) --- denoted by the small arrowhead Toggle (T) The T input controls the state change when T = 0, the state does not change (Q + = Q) when T = 1, the state changes following an active clock edge (Q + = Q') T Flip-Flops are often used in the design of counters.

T Flip-Flop Characteristic Equation: Q + = T.Q' + T'.Q = T xor Q

T Flip-Flop: Timing Diagram

Building a T Flip-Flop

Asynchronous Control Signals

Asynchronous Control Signals: Timing Diagram

D FF with Clock Enable

Flip-Flops in VHDL

JK Flip-Flop architecture JKFF of JKFF_entity is signal Qint: std_logic; begin Q <= Qint; Qnot <= not (Qint); process (Clk) begin if Clk'event and Clk = '0' then FF Clk Qint <= (J and not (Qint)) or (not (K) and Qint); end if; end process; end architecture;

D FF with Asynchronous Inputs Clk process (Clk) begin if ClrN = '0' then Q <= 0; elsif PreN = '0' then Q <= 1; elsif Clk'event and Clk = '1' then Q <= D; end if; end process;

Registers

Registers Several D flip-flops may be grouped together with a common clock to form a register. Because each flip-flop can store one bit of information, a register with n D flip-flops can store n bits of information. A load signal can be ANDed with the clock to enable and disable loading the registers. A better approach is to use registers with clock enables if they are available.

Register: 4 bits

Data Transfer between Registers Data transfer between registers is a common operation in computer (i.e. digital) systems. Multiple registers can be interconnected using tri-state buffers. Data can be transferred between two registers by enabling the proper tri-state buffer.

Data Transfer between Registers

Register with Tri-state Output

Data Transfer using Tri-state Bus

Shift Register shift register is a register in which binary data can be stored nd shifted either left or right. The data is shifted according to he applied shift signal; often there is a left shift signal and a ight shift signal. shift register must be constructed using flip-flops (i.e. edgeriggered devices); it cannot be constructed using latches or ated-latches (i.e. level-sensitive devices).

Shift Register: 4 bits

Shift Register (4 bits): Timing Diagram

8-bit SI SO Shift Register

4-bit PI PO Shift Register

-bit PI PO Shift Register: Operation

Registers in VHDL

4-bit Shift-Right Register process (Clock) begin if (Clk'event and Clk = '1') and Shift = '1' then Q3 <= SI after 8 ns; Q2 <= Q3 after 8 ns; Q1 <= Q2 after 8 ns; Q0 <= Q1 after 8 ns; SO <= Q0 after 8 ns; end if; end process;

Parallel Adder with Accumulator

Parallel Adder with Accumulator In computer circuits, it is frequently desirable to store one number in a register (called an accumulator) and add a second number to it, leaving the result stored in the register.

n-bit Parallel Adder with Accumulator

Loading the Accumulator Before addition in the previous circuit can take place, the accumulator must be loaded with X. This can be accomplished in several ways. The easiest way is to first clear the accumulator using the asynchronous clear inputs on the flip-flops, and then put the X data on the Y inputs to the adder and add the accumulator in the normal way. Alternatively, we could add multiplexers at the accumulator inputs so that we could select either the Y input data or the adder output to load into the accumulator.

Adder Cell with Multiplexer

Questions?