Logic design? Transistor as a switch. Layered design approach. CS/COE1541: Introduction to Computer Architecture. Logic Design Review.

Similar documents
CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization and Assembly Language

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

UNIT 8A Computer Circuitry: Layers of Abstraction. Boolean Logic & Truth Tables

Lecture 7: Logic design. Combinational logic circuits

Chapter 4. Sequential Logic Circuits

Sequential Logic Circuits

Lecture 13: Sequential Circuits, FSM

Fundamentals of Digital Design

Lecture 13: Sequential Circuits, FSM

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

CS61C : Machine Structures

Latches. October 13, 2003 Latches 1

CS61C : Machine Structures

Digital Logic Appendix A

Principles of Computer Architecture. Appendix B: Reduction of Digital Logic. Chapter Contents

A crash course in Digital Logic

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Philadelphia University Student Name: Student Number:

Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions?

Sequential Circuit Analysis

Chapter 5. Digital systems. 5.1 Boolean algebra Negation, conjunction and disjunction

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

ELCT201: DIGITAL LOGIC DESIGN

WORKBOOK. Try Yourself Questions. Electrical Engineering Digital Electronics. Detailed Explanations of

CSC9R6 Computer Design. Practical Digital Logic

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

Logic. Basic Logic Functions. Switches in series (AND) Truth Tables. Switches in Parallel (OR) Alternative view for OR

Review for B33DV2-Digital Design. Digital Design

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Synchronous Sequential Logic

Switches: basic element of physical implementations

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Why digital? Overview. Number Systems. Binary to Decimal conversion

Time Allowed 3:00 hrs. April, pages

Chapter 3 Digital Logic Structures

EEE130 Digital Electronics I Lecture #4

Sample Test Paper - I

Chapter 7 Logic Circuits

Review for Final Exam

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Gates and Logic: From switches to Transistors, Logic Gates and Logic Circuits

DIGITAL LOGIC CIRCUITS

Lecture 3 Review on Digital Logic (Part 2)

UNIVERSITY OF WISCONSIN MADISON

Lecture 22 Chapters 3 Logic Circuits Part 1

Hakim Weatherspoon CS 3410 Computer Science Cornell University

S.Y. Diploma : Sem. III [DE/ED/EI/EJ/EN/ET/EV/EX/IC/IE/IS/IU/MU] Principles of Digital Techniques

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

Boolean Algebra. Digital Logic Appendix A. Boolean Algebra Other operations. Boolean Algebra. Postulates, Identities in Boolean Algebra

ENGG 1203 Tutorial_9 - Review. Boolean Algebra. Simplifying Logic Circuits. Combinational Logic. 1. Combinational & Sequential Logic

Systems I: Computer Organization and Architecture

ECE/CS 250 Computer Architecture

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

ECE/CS 250: Computer Architecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Benjamin Lee

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

CS61c: Representations of Combinational Logic Circuits

( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Chapter 7. Sequential Circuits Registers, Counters, RAM

DIGITAL LOGIC CIRCUITS

Introduction to Digital Logic

Boolean Algebra, Gates and Circuits

Chapter 5 Synchronous Sequential Logic

CMPE12 - Notes chapter 1. Digital Logic. (Textbook Chapter 3)

CSC 322: Computer Organization Lab


Digital Logic Design. Midterm #2

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Logic Gates and Boolean Algebra

UNIVERSITI TENAGA NASIONAL. College of Information Technology

CMPE12 - Notes chapter 2. Digital Logic. (Textbook Chapters and 2.1)"

Electronics. Overview. Introducction to Synthetic Biology

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

Chapter 14 Sequential logic, Latches and Flip-Flops

Design of Sequential Circuits

Gates and Logic: From Transistors to Logic Gates and Logic Circuits

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

ECE 2300 Digital Logic & Computer Organization

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

Digital Logic (2) Boolean Algebra

CPE100: Digital Logic Design I

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

Sequential vs. Combinational

CSCI 2150 Intro to State Machines

CS470: Computer Architecture. AMD Quad Core

CSE370 HW6 Solutions (Winter 2010)

Lecture A: Logic Design and Gates

Unit 7 Sequential Circuits (Flip Flop, Registers)

University of Guelph School of Engineering ENG 2410 Digital Design Fall There are 7 questions, answer all questions.

Transcription:

Logic design? CS/COE54: Introduction to Computer rchitecture Digital hardware is implemented by way of logic design Digital circuits process and produce two discrete values: and Example: -bit full adder (F) Logic Design Review Sangyeun Cho Computer Science Department Layered design approach Transistor as a switch Logic design is done using logic gates Often we design desired function using high-level languages and somewhat higher level than logic gates Two approaches in design Top down Bottom up G N -type TR X G= X G= X X X X Microarchitecture Function blocks Logic gates G G= G= Transistors P -type TR

n inverter When = P -type TR P -type TR OFF = = N -type TR N -type TR ON When = bstraction P -type TR ON P -type TR = = N -type TR OFF N -type TR

Logic gates Describing a function 2-input ND B = & B Output = F(Input, Input,, Input N ) Output B = F (Input, Input,, Input N ) Output C = F (Input, Input,, Input N ) 2-input OR B = B Methods 2-input NND B =~( & B) Truth table Sum of products Product of sums 2-input NOR B =~( B) Truth table Sum of products Input Output B C in S C out Input Output B C in S C out S = B C in + BC in + B C in + BC in C out = BC in + B C in + BC in + BC in

Combinational vs. sequential logic Combinational logic Combinational logic = function function whose outputs are dependent only on the current inputs s soon as inputs are known, outputs can be determined Sequential logic = combinational logic + memory Some memory elements (i.e., state ) Outputs are dependent on the current state and the current inputs Next state is dependent on the current state and the current inputs inputs outputs Sequential logic Combinational logic ny combinational logic can be implemented using sum of products or product of sums inputs outputs Input-output relationship can be defined in the truth table format From the truth table, each output function can be derived current state next state Boolean expressions can be further manipulated (e.g., to reduce cost) using various Boolean algebraic rules clock

Boolean algebra Boolean algebra Boole, George (85~864): mathematician and philosopher; inventor of Boolean lgebra, the basis of all computer arithmetic Binary values: {,} Two binary operations: ND ( / ), OR (+) One unary operation: NOT (~) Binary operations: ND ( / ), OR (+) Idempotent a a = a+a= a Commutative a b = b a a+b = b+a ssociative a (b c) = (a b) c a+(b+c) = (a+b)+c Distributive a (b+c) = a b + a c a+(b c) = (a+b) (a+c) Boolean algebra Expressive power De Morgan s laws ~(a+b) = ~a ~b ~(a b) = ~a+~b With ND/OR/NOT, we can express any function in Boolean algebra Sum (+) of products ( ) More a+(a b) = a a (a+b) = a ~~a = a a+~a = a (~a) = What if we have NND/NOR/NOT? What if we have NND only? What if we have NOR only?

Multiplexor (aka MUX) 32-bit MUX B S = (S)? B:; Simplifying expressions Karnaugh map Input Output B C in S C out BC in C in BC in C out = BC in + B C in + BC in + BC in C out = BC in + C in + B B C out = BC in +B+C in

Building a -bit LU Building a 32-bit LU LU = arithmetic logic unit = arithmetic unit + logic unit Implementing sub Implementing NND and NOR

Implementing SLT (set-less-than) Implementing SLT (set-less-than) -bit LU for bits ~3 -bit LU for bit 3 Supporting BEQ and BNE bstracting LU zero detector Note that LU is a combinational logic

RS latch RS latch Beware of the feedback! When R=, S= RS latch RS latch When R=, S= When R=, S=, and Q was

RS latch RS latch When R=, S=, and Q was What happens if R=S= D latch D latch R S Note that we have an RS latch in the back-end of this design Note that R, S inputs always get opposite values when C= When C=, S=R= RS latch remembers the previous value

D latch D latch D Q latched mode D Latch R C D Q(t) C Q Q(t-) Q(t-) S transparent mode D flip-flop (D-FF) D flip-flop D Q D-FF C Q Two cascaded D latches; C input of the second is inverted This is a negative edge triggered D-FF

Finite state machine (FSM) Traffic light control example Two states NSlite: green light on North-South road EWlite: green light on East-West road Current state goes for 3 seconds, then Switch to the other state if there is a car waiting Current state goes for another 3 seconds if not We use /3 Hz clock Traffic light control example Traffic light control example

Traffic light control example To wrap up Let s assign to NSlite and to EWlite initially NextState = CurrentState EWcar + CurrentState NScar NSlite = CurrentState EWlite = CurrentState In digital logic, transistors are used as simple switches Logic gates are an abstraction of a transistor network combinational logic block has inputs and outputs whose values are immediately determined as inputs become known sequential logic block is composed of a combinational logic block and memory elements To wrap up To wrap up Boolean algebra provides a theoretical foundation for digital logic Starting from two transistors (N-type and P-type), we ve built logic gates and more complex structures (bottom up) Flip-flops (FFs) were used as a memory element finite state machine (FSM) can be implemented using FFs and some combinational logic n LU for the MIPS architecture has been built!