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

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

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization and Assembly Language

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Lecture 7: Logic design. Combinational logic circuits

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

Latches. October 13, 2003 Latches 1

Lecture 13: Sequential Circuits, FSM

Fundamentals of Digital Design

Lecture 13: Sequential Circuits, FSM

Chapter 4. Sequential Logic Circuits

Sequential Logic Circuits

CS61C : Machine Structures

Digital Logic Appendix A

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

CS61C : Machine Structures

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

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

CSC9R6 Computer Design. Practical Digital Logic

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

Philadelphia University Student Name: Student Number:

ELCT201: DIGITAL LOGIC DESIGN

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

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

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

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

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

Switches: basic element of physical implementations

Review for Final Exam

EEE130 Digital Electronics I Lecture #4

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Systems I: Computer Organization and Architecture

Synchronous Sequential Logic

Lecture 3 Review on Digital Logic (Part 2)

Sample Test Paper - I

Chapter 3 Digital Logic Structures

Chapter 7 Logic Circuits

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

Review for B33DV2-Digital Design. Digital Design

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

UNIVERSITY OF WISCONSIN MADISON

ECE/CS 250 Computer Architecture

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

Sequential Circuit Analysis

DIGITAL LOGIC CIRCUITS

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

Lecture 22 Chapters 3 Logic Circuits Part 1

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

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.

Chapter 14 Sequential logic, Latches and Flip-Flops

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

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

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

CS61c: Representations of Combinational Logic Circuits

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

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

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

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

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

Boolean Algebra & Logic Gates. By : Ali Mustafa

Time Allowed 3:00 hrs. April, pages

Combinational Logic. Review of Combinational Logic 1

Boolean Algebra, Gates and Circuits

CSC 322: Computer Organization Lab

CS470: Computer Architecture. AMD Quad Core

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Chapter 7. Sequential Circuits Registers, Counters, RAM

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

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

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

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

DIGITAL LOGIC CIRCUITS

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

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

on candidate s understanding. 7) For programming language papers, credit may be given to any other program based on equivalent concept.

Digital Logic (2) Boolean Algebra

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

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

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


Lecture A: Logic Design and Gates

Sequential vs. Combinational

Design of Sequential Circuits

Adders, subtractors comparators, multipliers and other ALU elements

CS 226: Digital Logic Design

Chapter 2 Combinational Logic Circuits

CHAPTER1: Digital Logic Circuits Combination Circuits

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

Fundamentals of Computer Systems

Menu. 7-Segment LED. Misc. 7-Segment LED MSI Components >MUX >Adders Memory Devices >D-FF, RAM, ROM Computer/Microprocessor >GCPU

Combinational Logic. By : Ali Mustafa

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

Synchronous Sequential Circuit

COMBINATIONAL LOGIC FUNCTIONS

Contents. Chapter 3 Combinational Circuits Page 1 of 36

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

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

Transcription:

CS/COE54: Introduction to Computer Architecture Logic Design Review Sangyeun Cho Computer Science Department Logic design? Digital hardware is implemented by way of logic design Digital circuits process and produce two discrete values: 0 and Example: -bit full adder (FA)

Layered design approach 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 Microarchitecture Function blocks Logic gates Transistors Transistor as a switch X X X G G= G=0 N -type TR X X X G G=0 G= P -type TR

An inverter P -type TR A N -type TR 0 When A = P -type TR OFF A= =0 N -type TR ON 0

When A = 0 P -type TR ON A=0 = N -type TR OFF 0 Abstraction P -type TR A A N -type TR 0

Logic gates 2-input AND A B =A & B 2-input OR A B =A B 2-input NAND A B =~(A & B) 2-input NOR A B =~(A B) Describing a function Output A = F(Input 0, Input,, Input N ) Output B = F (Input 0, Input,, Input N ) Output C = F (Input 0, Input,, Input N ) Methods Truth table Sum of products Product of sums

Truth table Input Output A B C in S C out 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Sum of products Input Output A B C in S C out 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 S = A B C in + A BC in + AB C in + ABC in C out = A BC in + AB C in + ABC in + ABC in

Combinational vs. sequential logic Combinational logic = function A function whose outputs are dependent only on the current inputs As 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 Combinational logic inputs outputs

Sequential logic inputs outputs current state next state clock Combinational logic Any combinational logic can be implemented using sum of products or product of sums Input-output relationship can be defined in the truth table format From the truth table, each output function can be derived Boolean expressions can be further manipulated (e.g., to reduce cost) using various Boolean algebraic rules

Boolean algebra Boole, George (85~864): mathematician and philosopher; inventor of Boolean Algebra, the basis of all computer arithmetic Binary values: {0,} Two binary operations: AND ( / ), OR (+) One unary operation: NOT (~) Boolean algebra Binary operations: AND ( / ), OR (+) Idempotent a a = a+a= a Commutative a b = b a a+b = b+a Associative 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 De Morgan s laws ~(a+b) = ~a ~b ~(a b) = ~a+~b More a+(a b) = a a (a+b) = a ~~a = a a+~a = a (~a) = 0 Expressive power With AND/OR/NOT, we can express any function in Boolean algebra Sum (+) of products ( ) What if we have NAND/NOR/NOT? What if we have NAND only? What if we have NOR only?

Multiplexor (aka MUX) A 0 B S = (S)? B:A; A 32-bit MUX

Simplifying expressions Input Output A B C in S C out 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C out = A BC in + AB C in + ABC in + ABC in C out = BC in + AC in + AB Karnaugh map BC in A 0 00 0 0 0 0 AC in BC in 0 0 AB C out = BC in +AB+AC in

Building a -bit ALU ALU = arithmetic logic unit = arithmetic unit + logic unit Building a 32-bit ALU

Implementing sub Implementing NAND and NOR

Implementing SLT (set-less-than) -bit ALU for bits 0~30 -bit ALU for bit 3 Implementing SLT (set-less-than)

Supporting BEQ and BNE zero detector Abstracting ALU Note that ALU is a combinational logic

RS latch Beware of the feedback! RS latch 0 0 0 When R=0, S=

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

RS latch 0 0 0 0 When R=0, S=0, and Q was RS latch What happens if R=S=

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

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

D flip-flop (D-FF) Two cascaded D latches; C input of the second is inverted This is a negative edge triggered D-FF D flip-flop D Q D-FF C Q

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 30 seconds, then Switch to the other state if there is a car waiting Current state goes for another 30 seconds if not We use /30 Hz clock

Traffic light control example Traffic light control example

Traffic light control example Let s assign 0 to NSlite and to EWlite initially NextState = CurrentState EWcar + CurrentState NScar NSlite = CurrentState EWlite = CurrentState To wrap up In digital logic, transistors are used as simple switches Logic gates are an abstraction of a transistor network A combinational logic block has inputs and outputs whose values are immediately determined as inputs become known A sequential logic block is composed of a combinational logic block and memory elements

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) An ALU for the MIPS architecture has been built! To wrap up Flip-flops (FFs) were used as a memory element A finite state machine (FSM) can be implemented using FFs and some combinational logic