Multiplexor (aka MUX) An example, yet VERY useful circuit!

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

CHAPTER 4: Logic Circuits

CHAPTER 4: Logic Circuits

Asynchronous (Ripple) Counters

Experiment 8 Introduction to Latches and Flip-Flops and registers

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

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

Logic Design. Flip Flops, Registers and Counters

COMP sequential logic 1 Jan. 25, 2016

CS 261 Fall Mike Lam, Professor. Sequential Circuits

D Latch (Transparent Latch)

Chapter. Synchronous Sequential Circuits

WINTER 15 EXAMINATION Model Answer

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

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

Sequential Circuits: Latches & Flip-Flops

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus

Chapter 5 Synchronous Sequential Logic

LATCHES & FLIP-FLOP. Chapter 7

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

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

Digital Design, Kyung Hee Univ. Chapter 5. 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.

MODULE 3. Combinational & Sequential logic

Module 4:FLIP-FLOP. Quote of the day. Never think you are nothing, never think you are everything, but think you are something and achieve anything.

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

ELE2120 Digital Circuits and Systems. Tutorial Note 8

Synchronous Sequential Logic. Chapter 5

ELCT201: DIGITAL LOGIC DESIGN

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

BCN1043. By Dr. Mritha Ramalingam. Faculty of Computer Systems & Software Engineering

Lecture 8: Sequential Logic

CHAPTER 1 LATCHES & FLIP-FLOPS

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

Chapter 5: Synchronous Sequential Logic

MC9211 Computer Organization

Synchronous Sequential Logic

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

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

ECE 263 Digital Systems, Fall 2015

Course Administration

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

CHAPTER1: Digital Logic Circuits

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

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

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.

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

Unit 11. Latches and Flip-Flops

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

Chapter 4. Logic Design

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

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

Introduction to Sequential Circuits

Rangkaian Sekuensial. Flip-flop

ECE 341. Lecture # 2

Counter dan Register

Registers and Counters

ELE2120 Digital Circuits and Systems. Tutorial Note 7

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

CS/ECE 250: Computer Architecture. Basics of Logic Design: ALU, Storage, Tristate. Benjamin Lee

Introduction to Microprocessor & Digital Logic

CHAPTER 11 LATCHES AND FLIP-FLOPS

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

ELCT201: DIGITAL LOGIC DESIGN

Registers and Counters

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

Digital Fundamentals: A Systems Approach

Chapter 11 Latches and Flip-Flops

Sequential Logic Circuits

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

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

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

Logic Design Viva Question Bank Compiled By Channveer Patil

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

DIGITAL ELECTRONICS MCQs

Sequential Logic and Clocked Circuits

Synchronous Sequential Logic

SEMESTER ONE EXAMINATIONS 2002

EEC 118 Lecture #9: Sequential Logic. Rajeevan Amirtharajah University of California, Davis Jeff Parkhurst Intel Corporation

MODU LE DAY. Class-A, B, AB and C amplifiers - basic concepts, power, efficiency Basic concepts of Feedback and Oscillation. Day 1

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

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

LAB #4 SEQUENTIAL LOGIC CIRCUIT

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

Dev Bhoomi Institute Of Technology Department of Electronics and Communication Engineering PRACTICAL INSTRUCTION SHEET

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

6.3 Sequential Circuits (plus a few Combinational)

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

R13. II B. Tech I Semester Regular Examinations, Jan DIGITAL LOGIC DESIGN (Com. to CSE, IT) PART-A

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

RS flip-flop using NOR gate

REPEAT EXAMINATIONS 2002

Chapter 5. Introduction

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Chapter 5 Sequential Circuits

Chapter 3 Unit Combinational

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

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

Transcription:

Multiplexor (aka MUX) An example, yet VERY useful circuit! A B 0 1 Y S A B Y 0 0 x 0 0 1 x 1 1 x 0 0 1 x 1 1 S=1 S=0 Y = (S)? B:A; Y=S A+SB when S = 0: output A 1: output B 56

A 32-bit MUX Use 32 1-bit muxes Each mux selects 1 bit S is connected to each mux 57

Building a 1-bit ALU ALU = arithmetic logic unit = arithmetic unit + logic unit 58

Building a 32-bit ALU 59

Implementing sub Binvert=1 CarryIn=1 for 1 st 1-bit ALU Operation=2 60

Implementing NAND and NOR NOR: NOT (A OR B) by DeMorgan s Law: (NOT A) AND (NOT B) Thus, Operation=0, Ainvert=1, Binvert=1 And, NAND??? 61

Implementing SLT (set-less-than) 1-bit ALU for bits 0~30 1-bit ALU for bit 31 62

Implementing SLT (set-less-than) SLT uses subtraction slt $t0,$t1,$t2 $t1<$t2: $t1-$t2 gives negative result set is 1 when negative 1 0 Setting the control perform subtraction (Cin=1,Binvert=1) select Less as output (Operation=3) ALU31 s Set connected to ALU0 Less 0 Consider Suppose $t1=10 and $t2=11 $t1 - $t2 = -1 = 1111 1 binary $t0 = 0000...1 1 0 63

Implementing SLT (set-less-than) SLT uses subtraction slt $t0,$t1,$t2 $t1<$t2: $t1-$t2 gives negative result set is 1 when negative Setting the control perform subtraction (Cin=1,Binvert=1) select Less as output (Operation=3) ALU31 s Set connected to ALU0 Less Why do we need Set? Could we use just the Result31? 64

Supporting BEQ and BNE BEQ uses subtraction beq $t0,$t1,label perform $t0-$t1 result=0 è equality zero detector Setting the control subtract (Cin=1,Binvert=1) select result (operation=2) detect zero result 65

Abstracting ALU Note that ALU is a combinational logic 66

Sequential Logic Output depends on sequence of previous inputs Sequence of previous inputs this is history History is a state that captures how you get here E.g., 25 cents vending = 10 cents + 10 cents + 5 cents Or, 25 cents + 10 cents = 35 cents. Multiple ways are possible. State requires memory remembering the past Memory in logic Smallest element is 1 bit of memory Use logic gates to create a 1-bit memory Yet, combinational logic (using gates) depends on present inputs! Fundamental building block: RS latch 1 bit of history through feedback of gates 68

RS latch Two NOR gates With feedback Output Inputs Current RS control state writing (0 or 1) a 0 or 1 in state Output Current state (0 or 1) Complement of current state Beware of the feedback! 70

RS latch 0 0 1 1 1 0 When R=0, S=1 71

RS latch 1 1 0 0 0 1 When R=1, S=0 72

RS latch 0 1 0 0 0 1 When R=0, S=0, and Q was 0 73

RS latch 0 0 1 1 0 0 When R=0, S=0, and Q was 1 74

RS latch 1 1 What happens if R=S=1 75

RS latch truth table R S Q(t) Q(t+1) 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 Invalid 1 1 1 Invalid Storage (R=0, S=0) Set to 1 (S=1) Reset to 0 (R=0) Outputs will track any changes in the inputs! R=1, S=1 must be avoid. Desirable to control when to capture input state. 76

D latch Note that we have an RS latch in the back-end of this design 77

D latch R S Note that R, S inputs always get opposite values when C=1 When C=0, S=R=0 Þ RS latch remembers the previous value 78

D latch latched mode R C D Q(t) 0 0 Q(t-1) 0 1 Q(t-1) S 1 0 0 1 1 1 transparent mode 79

D latch D C D Latch Q Q 80

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 81

D flip-flop D C D-FF Q Q 82

State Elements RS latch R,S control mode (reset, set, storage) Q,Q track R and S R=1, S=1 invalid D latch C controls mode (0=latched, 1=transparent) D is data input ( copied during transparent) Signal value triggered: Q,Q track D when C=1 Guarantees R=1,S=1 can not be done D flip-flop (falling or negative edge triggered) Two cascaded D latches C=1 means 1 st latch transparent, 2 nd latched C=0 means 1 st latch latched, 2 nd transparent Output changes on falling edge (C: 1=>0) D flip-flop (rising or positive edge triggered) Same as falling edge triggered Output changes on rising edge (C: 0=>1)

Signaling Behavior Q goes high R=0,S=1 Storage mode RS latch behavior Q goes low R=1,S=0

Signaling Behavior Q stays low b/c C=0 D latch behavior Q went low C=1,D=0 Q tracked D when C=1 Q goes C=1, D=1

Signaling Behavior D flip-flop (falling edge triggered) no change b/c not a falling edge tracks D at time of falling edge no change b/c not falling edge

Signaling Behavior RS latch behavior D latch behavior D flip-flop (falling edge triggered)

Example circuits and clocking Suppose we want to: 1-bit value A stored in a D flip-flop 1-bit value B stored in a D flip-flop 1-bit value C stored in a D flip-flip Do 1-bit addition of A and B, producing C C = A + B What is the circuit? Need three D flip-flops Need one 1 bit adder 88

Example circuits and clocking

Example circuits and clocking Is there any difference in the delay with this one? In fact, sequential logic often looks like this. 90

Example circuits and clocking Now, suppose we want to build a 4-bit counter? Counter increments by 1 for a clock pulse (falling edge event) 4 1-bit adders 4 1-bit D flip-flops What s the circuit? How often to pulse the clock (increment counter)? 91

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

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 = 16ns for the adder Flip-flops Must wait for 1 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 = 16ns + 4ns = 20ns. Clock pulse is 20ns. 93

Example circuits and clocking Can we build a counter with just flip-flops? What s the propagation delay? 94