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

Similar documents
Lecture 8: Sequential Logic

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

LATCHES & FLIP-FLOP. Chapter 7

Asynchronous (Ripple) Counters

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

3 Flip-Flops. The latch is a logic block that has 2 stable states (0) or (1). The RS latch can be forced to hold a 1 when the Set line is asserted.

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

Experiment 8 Introduction to Latches and Flip-Flops and registers

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

6. Sequential Logic Flip-Flops

Other Flip-Flops. Lecture 27 1

EE292: Fundamentals of ECE

ASYNCHRONOUS COUNTER CIRCUITS

Chapter. Synchronous Sequential Circuits

RS flip-flop using NOR gate

ENGR 303 Introduction to Logic Design Lecture 10. Dr. Chuck Brown Engineering and Computer Information Science Folsom Lake College

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

Counter dan Register

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

Unit 11. Latches and Flip-Flops

RS flip-flop using NOR gate

Digital Logic Design ENEE x. Lecture 19

Counters

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

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

CHAPTER 4: Logic Circuits

Sequential Circuits: Latches & Flip-Flops

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.

Sequential Logic and Clocked Circuits

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

Logic Design. Flip Flops, Registers and Counters

DIGITAL CIRCUIT COMBINATORIAL LOGIC

CHAPTER 4: Logic Circuits

The NOR latch is similar to the NAND latch

EKT 121/4 ELEKTRONIK DIGIT 1

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

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Flip-Flops and Sequential Circuit Design

Fundamentals of Computer Systems

Fundamentals of Computer Systems

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

ELCT201: DIGITAL LOGIC DESIGN

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

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

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

UNIT 11 LATCHES AND FLIP-FLOPS

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

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

ECE 341. Lecture # 2

D Latch (Transparent Latch)

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

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

Sequential Circuits. Sequential Logic. Circuits with Feedback. Simplest Circuits with Feedback. Memory with Cross-coupled Gates.

! Two inverters form a static memory cell " Will hold value as long as it has power applied

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

Sequential Logic. Sequential Circuits. ! Timing Methodologies " Cascading flip-flops for proper operation " Clock skew

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

Slide 1. Flip-Flops. Cross-NOR SR flip-flop S R Q Q. hold reset set not used. Cross-NAND SR flip-flop S R Q Q. not used reset set hold 1 Q.

Chapter 6 Digital Circuit 6-5 Department of Mechanical Engineering

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

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

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

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

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

EKT 121/4 ELEKTRONIK DIGIT 1

ALGORITHMS IN HW EECS150 ALGORITHMS IN HW. COMBINATIONAL vs. SEQUENTIAL. Sequential Circuits ALGORITHMS IN HW

Chapter 4. Logic Design

Computer Organization & Architecture Lecture #5

COMP2611: Computer Organization. Introduction to Digital Logic

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

Chapter 8 Sequential Circuits

CHAPTER 6 COUNTERS & REGISTERS

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

Digital Fundamentals: A Systems Approach

Digital Networks and Systems Laboratory 2 Basic Digital Building Blocks Time 4 hours

Switching Circuits & Logic Design

ELCT201: DIGITAL LOGIC DESIGN

CPS311 Lecture: Sequential Circuits

Name: Date: Suggested Reading Chapter 7, Digital Systems, Principals and Applications; Tocci

Synchronous Sequential Logic

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

Introduction to Microprocessor & Digital Logic

Introduction to Sequential Circuits

Digital Fundamentals: A Systems Approach

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

Switching Circuits & Logic Design

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

Logic. Andrew Mark Allen March 4, 2012

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

Sequential Logic Circuits

Sequential Circuit W CLK. CMSC 2833 Lecture 42. Steps:

Introduction. Serial In - Serial Out Shift Registers (SISO)

EET2411 DIGITAL ELECTRONICS

Plog rev 1.0 MANUAL Overview

ELE2120 Digital Circuits and Systems. Tutorial Note 8

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

Fundamentals of Computer Systems

Digital Logic Design I

Transcription:

COC 243 equential Logic COC 243 (Computer Architecture) Lecture 5 - equential Logic 1

Overview Last Lecture This Lecture equential logic circuits ource: Chapter 11 (10 th edition) Next Lecture Computer architecture 1 COC 243 (Computer Architecture) Lecture 5 - equential Logic 2

Introduction Combinatorial logic circuit - the same inputs always produces the same outputs (last lecture) Inputs Combinational circuit Outputs equential logic circuit - outputs depend not only on the present inputs, but also on the past history (this lecture) Inputs Combinational circuit Outputs Memory COC 243 (Computer Architecture) Lecture 5 - equential Logic 3

Introduction (cont) Types of equential Circuits ynchronous tate changes occur in synchronization to a clock signal Input changes occur between clock pulses tate changes occur at the clock pulses Asynchronous tate changes occur as changes in inputs occur Event driven We will not study these COC 243 (Computer Architecture) Lecture 5 - equential Logic 4

Memory Circuits et-reset latch D-type flip-flop T-type flip-flop JK-type flip-flop COC 243 (Computer Architecture) Lecture 5 - equential Logic 5

et-eset Latch If you tie the output of the circuit to one of its inputs then the circuit saves state. In this case output is on tart with a = = = 0 ( = 1), the latch stores a 0 NO A B 0 0 1 0 1 0 1 0 0 1 1 0 COC 243 (Computer Architecture) Lecture 5 - equential Logic 6

= 0 et () the Latch NO A B 0 0 1 0 1 0 Now toggle = 1 (set the latch) 1 0 0 1 1 0 = 1, Now toggle = 1 (set the latch) COC 243 (Computer Architecture) Lecture 5 - equential Logic 7

eset () Latch = 1 Now toggle = 1 (reset the latch) NO A B 0 0 1 0 1 0 1 0 0 1 1 0 = 0, Now toggle = 1 (reset the latch) COC 243 (Computer Architecture) Lecture 5 - equential Logic 8

et-eset Latch egardless of, By setting = 1 the latch is set ( = 1) By setting = 1 the latch is reset ( = 0) Action 0 0 None 0 1 =0 1 0 =1 1 1 Invalid (why?) From: http://en.wikipedia.org/wiki/file:-_mk2.gif COC 243 (Computer Architecture) Lecture 5 - equential Logic 9

Clocked (Enabled) Flip-Flop The latch is a nice trick If we add a control line to the circuit then we can turn the latch on and off when we want to Enable COC 243 (Computer Architecture) Lecture 5 - equential Logic 10

Clocked NAND flip-flop By inverting the signals into the latch, a flip-flop can be built using only NAND gates (De Morgan) And recall that a NAND gate can be built with 2 transistors Enable COC 243 (Computer Architecture) Lecture 5 - equential Logic 11

D-Type Flip-Flop ince =, Combine into one line: D D Enable D >C D-Type flip-flop Triangle indicates edge-triggered COC 243 (Computer Architecture) Lecture 5 - equential Logic 12

7400 uad 2-Input NAND Gate http://en.wikipedia.org/wiki/7400_series COC 243 (Computer Architecture) Lecture 5 - equential Logic 13

D-Type Flip-Flop Data flip-flop (Delay flip-flop) et or reset D Toggle the enable line (from 0 to 1) D is stored Toggle the enable line (from 1 to 0) D can vary (wobble) freely There is a 1 clock-cycle delay between D and Enable (Clock) Data Output Time t 1 t 2 t 3 t 4 t 5 COC 243 (Computer Architecture) Lecture 5 - equential Logic 14

T Flip-Flop Toggle Flip-Flop The output is inverted when Toggle is held high Enable is clocked Toggle Enable COC 243 (Computer Architecture) Lecture 5 - equential Logic 15

JK Flip-Flop One flip-flop to rule them all (the universal flip-flop) >C J K Enable J K JK flip-flop J K t+1 Meaning 0 0 t No Change 0 1 0 eset 1 0 1 et 1 1 t Toggle COC 243 (Computer Architecture) Lecture 5 - equential Logic 16

JK Flip-Flop One flip-flop to rule them all (the universal flip-flop) et J = K to get T flip-flop et J = K to get a D flip-flop >C J >C J >C J K K K JK flip-flop T flip-flop D flip-flop COC 243 (Computer Architecture) Lecture 5 - equential Logic 17

Asynchronous ipple Counter A 1-bit counter switches between 0 and 1 each cycle It s a toggle flip-flop It s also a divide by 2 Clock >C J High K Clock Data Output The output square wave is half the frequency of the input square wave Time t 1 t 2 t 3 t 4 t 5 COC 243 (Computer Architecture) Lecture 5 - equential Logic 18

Asynchronous ipple Counter A 2-bit counter The low bit toggles every full clock cycle The high bit toggles at half the clock cycle rate Tie the output of the low bit to the input of the high bit 0 Clock >C 0 >C 1 1 High J K J K COC 243 (Computer Architecture) Lecture 5 - equential Logic 19

ynchronous Counter The async counter has the problem that the propagation delay is inconsistent; a function of the number of transistors the signal passes through Ideally the flip-flops will clock at the same time This is achieved with a synchronous counter Logic is added to set the next state based on the previous state Clock >C 0 >C 1 >C 2 >C 3 High J K J K J K J K 0 1 2 3 COC 243 (Computer Architecture) Lecture 5 - equential Logic 20

equential Circuits COC 243 (Computer Architecture) Lecture 5 - equential Logic 21

nakes and Ladders From: https://wiki.sfu.ca/personal/aoberman/images/thumb/b/b5/nakesandladders.jpg/609px-nakesandladders.jpg COC 243 (Computer Architecture) Lecture 5 - equential Logic 22

Binary nakes and Ladders 6 7 8 5 4 3 0 1 2 0 = move 1 1 = move 2 In this case a 3*3 board and a binary die (0 or 1) COC 243 (Computer Architecture) Lecture 5 - equential Logic 23

nakes and Ladders 6 7 8 5 4 3 0 1 2 0 0 0 0 0 0 1 2 3 4 5 6 7 8 1 1 1 tate Transition Diagram 1 1 Board 0 = move 1 1 = move 2 COC 243 (Computer Architecture) Lecture 5 - equential Logic 24

Detect a Given Input equence Detect the input sequence 11101 ingle input x ingle output z Consider repeating sequences COC 243 (Computer Architecture) Lecture 5 - equential Logic 25

tate Transition Diagram 1 1 1 0 1 0 1 2 3 4 5 1 0 0 0 0 0 Z = 0 Z = 1 COC 243 (Computer Architecture) Lecture 5 - equential Logic 26

Detect a Given Input equence Initial state table Input Present tate Next tate Output 0 0 0 0 1 0 1 0 0 1 0 0 1 1 2 0 0 2 0 0 1 2 3 0 0 3 4 0 1 3 3 0 0 4 0 0 1 4 5 0 0 5 0 1 1 5 2 1 COC 243 (Computer Architecture) Lecture 5 - equential Logic 27

Detect a Given Input equence 6 states 3 state variables (to count to 6) A, B, C Using A, B, C (in that order), let 0 = 0 0 0 1 = 0 0 1 2 = 0 1 0 3 = 0 1 1 4 = 1 0 0 5 = 1 0 1 tore the current state in 3 flip-flops COC 243 (Computer Architecture) Lecture 5 - equential Logic 28

Detect a Given Input equence Complete state table Present tate Input Next tate Output A B C X A' B' C' Z 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 0 0 1 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 1 0 1 0 0 0 0 1 1 0 1 1 0 1 0 1 COC 243 (Computer Architecture) Lecture 5 - equential Logic 29

Detect a Given Input equence A = ABCX + ABCX B = ABCX + ABCX + ABCX + ABCX C = ABCX + ABCX + ABCX + ABCX Z = ABCX + ABCX COC 243 (Computer Architecture) Lecture 5 - equential Logic 30

Detect a Given Input equence X Z ABC Combinatorial Logic Circuit A B C A B C D D D Clock >C >C >C COC 243 (Computer Architecture) Lecture 5 - equential Logic 31

egisters D7 D6 D5 D4 D3 D2 D1 D0 D D D D D D D D >C >C >C >C >C >C >C >C Clock Load Enable 7 6 5 4 3 2 1 0 COC 243 (Computer Architecture) Lecture 5 - equential Logic 32

Tristate Buffer The clock is used to enable flip-flop load The output can be controlled with a 3-state buffer Or a 3-state inverter D Y Input (D) Output (Y) E Output Enable (E) COC 243 (Computer Architecture) Lecture 5 - equential Logic 33

74L374 3-TATE Octal D- Type Transparent Latches and Edge- Triggered Flip-Flops Output Control read line Clock write line COC 243 (Computer Architecture) Lecture 5 - equential Logic 34