CSE370: Introduction to Digital Design

Similar documents
Welcome to EECS 150: Components and Design Techniques for Digital Systems

Welcome to EECS 150: Components and Design Techniques for Digital Systems

! Inherent parallelism in hardware " Parallel computation beyond 61C. ! Counterpoint to software design " Furthering our understanding of computation

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

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

Adders allow computers to add numbers 2-bit ripple-carry adder

Combinational Logic Design Combinational Functions and Circuits

CSC9R6 Computer Design. Practical Digital Logic

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

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

ECE 407 Computer Aided Design for Electronic Systems. Simulation. Instructor: Maria K. Michael. Overview

Fundamentals of Digital Design

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

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

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

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

Design at the Register Transfer Level

ECE/CS 250 Computer Architecture

Binary addition example worked out

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

From Sequential Circuits to Real Computers

Lecture 13: Sequential Circuits, FSM

CS/COE0447: Computer Organization

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

INF2270 Spring Philipp Häfliger. Lecture 8: Superscalar CPUs, Course Summary/Repetition (1/2)

Latches. October 13, 2003 Latches 1

Lecture A: Logic Design and Gates

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

CS 226: Digital Logic Design

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

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

Lecture 22 Chapters 3 Logic Circuits Part 1

Testability. Shaahin Hessabi. Sharif University of Technology. Adapted from the presentation prepared by book authors.

CS/COE0447: Computer Organization

Introduction to Computer Engineering. CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison

Example: A vending machine

CprE 281: Digital Logic

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

Mark Redekopp, All rights reserved. Lecture 1 Slides. Intro Number Systems Logic Functions

Sample Test Paper - I

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

UNIVERSITY OF WISCONSIN MADISON

Chapter 7. Sequential Circuits Registers, Counters, RAM

Digital Logic Appendix A

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

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.

Lecture 10: Synchronous Sequential Circuits Design

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

Intro To Digital Logic

SAU1A FUNDAMENTALS OF DIGITAL COMPUTERS

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

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

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

CMP 338: Third Class

ELCT201: DIGITAL LOGIC DESIGN

! Chris Diorio. ! Gaetano Borrielo. ! Carl Ebeling. ! Computing is in its infancy

Table of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25

Computer organization

1.10 (a) Function of AND, OR, NOT, NAND & NOR Logic gates and their input/output.

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

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

ALU A functional unit

cse 311: foundations of computing Spring 2015 Lecture 3: Logic and Boolean algebra

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Chapter 3 Digital Logic Structures

Boolean Logic Continued Prof. James L. Frankel Harvard University

Lecture 7: Logic design. Combinational logic circuits

Lecture 13: Sequential Circuits, FSM

From Sequential Circuits to Real Computers

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014

Chapter 2 Combinational Logic Circuits

Chapter 7 Logic Circuits

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

of Digital Electronics

Combinational Logic Trainer Lab Manual

CS470: Computer Architecture. AMD Quad Core

Computer Science. 19. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section 6.1.

Introduction to Computer Engineering. CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison

Lecture 8: Sequential Networks and Finite State Machines

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

A crash course in Digital Logic

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

DIGITAL LOGIC CIRCUITS

ELEN Electronique numérique

COSC3330 Computer Architecture Lecture 2. Combinational Logic

Combinatorial Logic Design Principles

Enrico Nardelli Logic Circuits and Computer Architecture

ECE 341. Lecture # 3

CSE 140 Lecture 11 Standard Combinational Modules. CK Cheng and Diba Mirza CSE Dept. UC San Diego

Logic Theory in Designing of Digital Circuit & Microprocessor

CpE358/CS381. Switching Theory and Logical Design. Summer

Synchronous Sequential Logic

Digital Systems Roberto Muscedere Images 2013 Pearson Education Inc. 1

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus.

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

211: Computer Architecture Summer 2016

ELCT201: DIGITAL LOGIC DESIGN

Combinational vs. Sequential. Summary of Combinational Logic. Combinational device/circuit: any circuit built using the basic gates Expressed as

Transcription:

CSE370: Introduction to Digital Design Course staff Gaetano Borriello, Brian DeRenzi, Firat Kiyak Course web www.cs.washington.edu/370/ Make sure to subscribe to class mailing list (cse370@cs) Course text Contemporary Logic Design, 2e, Katz/Borriello, Prentice-Hall Today s agenda Class administration and overview of course web Course objectives and approach Classroom Presenter Autumn 2006 CSE370 - I - Introduction 1 Why are you here? Obvious reasons this course is part of the CS/CompE requirements it is the implementation basis for all modern computing devices building large things from small components computers = transistors + wires - it s all in how they are interconnected provide a model of how a computer works More important reasons the inherent parallelism in hardware is your first exposure to parallel computation it offers an interesting counterpoint to programming and is therefore useful in furthering our understanding of computation Autumn 2006 CSE370 - I - Introduction 2

What will we learn in CSE370? The language of logic design Boolean algebra, logic minimization, state, timing, CAD tools The concept of state in digital systems analogous to variables and program counters in software systems How to specify/simulate/compile/realize our designs hardware description languages tools to simulate the workings of our designs logic compilers to synthesize the hardware blocks of our designs mapping onto programmable hardware Contrast with programming sequential and parallel implementations specify algorithm as well as computing/storage resources it will use Autumn 2006 CSE370 - I - Introduction 3 Applications of logic design Conventional computer design CPUs, busses, peripherals Networking and communications phones, modems, routers Embedded products in cars, toys, appliances, entertainment devices Scientific equipment testing, sensing, reporting The world of computing is much much bigger than just PCs! Autumn 2006 CSE370 - I - Introduction 4

What is logic design? What is design? given a specification of a problem, come up with a way of solving it choosing appropriately from a collection of available components while meeting some criteria for size, cost, power, beauty, elegance, etc. What is logic design? determining the collection of digital logic components to perform a specified control and/or data manipulation and/or communication function and the interconnections between them which logic components to choose? there are many implementation technologies (e.g., off-the-shelf fixed-function components, programmable devices, transistors on a chip, etc.) the design may need to be optimized and/or transformed to meet design constraints Autumn 2006 CSE370 - I - Introduction 5 What is digital hardware? Collection of devices that sense and/or control wires that carry a digital value (i.e., a physical quantity that can be interpreted as a logical 0 or 1 ) example: digital logic where voltage < 0.8v is a 0 and > 2.0v is a 1 example: pair of transmission wires where a 0 or 1 is distinguished by which wire has a higher voltage (differential) example: orientation of magnetization signifies a 0 or a 1 Primitive digital hardware devices logic computation devices (sense and drive) are two wires both 1 - make another be 1 (AND) is at least one of two wires 1 - make another be 1 (OR) is a wire 1 - then make another be 0 (NOT) memory devices (store) store a value recall a previously stored value Autumn 2006 CSE370 - I - Introduction 6

What is happening now in digital design? Important trends in how industry does hardware design larger and larger designs shorter and shorter time to market cheaper and cheaper products design time often dominates cost Scale pervasive use of computer-aided design tools over hand methods multiple levels of design representation Time emphasis on abstract design representations programmable rather than fixed function components automatic synthesis techniques importance of sound design methodologies Cost higher levels of integration use of simulation to debug designs simulate and verify before you build Autumn 2006 CSE370 - I - Introduction 7 CSE 370: concepts/skills/abilities Understanding the basics of logic design (concepts) Understanding sound design methodologies (concepts) Modern specification methods (concepts) Familiarity with a full set of CAD tools (skills) Realize digital designs in an implementation technology (skills) Appreciation for the differences and similarities (abilities) in hardware and software design New ability: to accomplish the logic design task with the aid of computer-aided design tools and map a problem description into an implementation with programmable logic devices after validation via simulation and understanding of the advantages/disadvantages as compared to a software implementation Autumn 2006 CSE370 - I - Introduction 8

Representation of digital designs Physical devices (transistors) Switches Truth tables Boolean algebra Gates Waveforms Finite-state behavior Register-transfer behavior Processor architecture Concurrent abstract specifications scope of CSE 370 Autumn 2006 CSE370 - I - Introduction 9 Computation: abstract vs. implementation Up to now, computation has been a mental exercise (paper, programs) This class is about physically implementing computation using physical devices that use voltages to represent logical values Basic units of computation are: representation: "0", 1" on a wire set of wires (e.g., for binary ints) assignment: x = y data operations: x + y 5 control: sequential statements: A; B; C conditionals: if x == 1 then y loops: for ( i = 1 ; i == 10, i++) procedures: A; proc(...); B; We will study how each of these are implemented in hardware and composed into computational structures Autumn 2006 CSE370 - I - Introduction 10

Class components Combinational logic output t = F(input t ) Sequential logic output t = F(output t-1, input t ) output dependent on history concept of a time step (clock) Basic computer architecture how a CPU executes instructions Autumn 2006 CSE370 - I - Introduction 11 Combinational logic Common combinational logic elements are called logic gates Buffer, NOT AND, NAND OR, NOR easy to implement with CMOS transistors Autumn 2006 CSE370 - I - Introduction 12

Sequential logic Common sequential logic elements are called flip-flops Flip-flops only change their output after a clocking event Autumn 2006 CSE370 - I - Introduction 13 Mixing combinational and sequential logic What does this very simple circuit do? Autumn 2006 CSE370 - I - Introduction 14

Combinational or sequential? Circle combinational in red, sequential in blue assignment: x = y; data operations: x + y 5 sequential statements: A; B; C; conditionals: if x == 1 then y; loops: for ( i = 1 ; i == 10, i++) { } procedures/methods: A; proc(...); B; Autumn 2006 CSE370 - I - Introduction 15 A combinational logic example Calendar subsystem: number of days in a month (to control watch display) used in controlling the display of a wrist-watch LCD screen inputs: month, leap year flag outputs: number of days Autumn 2006 CSE370 - I - Introduction 16

Implementation as a combinational digital system Encoding: how many bits for each input/output? binary number for month four wires for 28, 29, 30, and 31 Behavior: combinational truth table specification month leap d28 d29 d30 d31 month leap d28 d29 d30 d31 0000 0001 0 0 0 1 0010 0 1 0 0 0 0010 1 0 1 0 0 0011 0 0 0 1 0100 0 0 1 0 0101 0 0 0 1 0110 0 0 1 0 0111 0 0 0 1 1000 0 0 0 1 1001 0 0 1 0 1010 0 0 0 1 1011 0 0 1 0 1100 0 0 0 1 1101 111 Autumn 2006 CSE370 - I - Introduction 17 Combinational example (cont d) Truth-table to logic to switches to gates d28 = 1 when month=0010 and leap=0 d28 = m8' m4' m2 m1' leap' symbol for not d31 = 1 when month=0001 or month=0011 or... month=1100 d31 = (m8' m4' m2' m1) + (m8' m4' m2 m1) +... (m8 m4 m2' m1') d31 = can we simplify more? symbol for and symbol for or month leap d28 d29 d30 d31 0001 0 0 0 1 0010 0 1 0 0 0 0010 1 0 1 0 0 0011 0 0 0 1 0100 0 0 1 0... 1100 0 0 0 1 1101 111 0000 Autumn 2006 CSE370 - I - Introduction 18

Combinational example (cont d) d28 = m8' m4' m2 m1' leap d29 = m8' m4' m2 m1' leap d30 = (m8' m4 m2' m1') + (m8' m4 m2 m1') + (m8 m4' m2' m1) + (m8 m4' m2 m1) = (m8' m4 m1') + (m8 m4' m1) d31 = (m8' m4' m2' m1) + (m8' m4' m2 m1) + (m8' m4 m2' m1) + (m8' m4 m2 m1) + (m8 m4' m2' m1') + (m8 m4' m2 m1') + (m8 m4 m2' m1') Autumn 2006 CSE370 - I - Introduction 19 Activity How much can we simplify d31? month d31 0000 0001 1 0010 0 0011 1 0100 0 0101 1 0110 0 0111 1 1000 1 1001 0 1010 1 1011 0 1100 1 1101 1110 1111 Autumn 2006 CSE370 - I - Introduction 20

Realization of combinational logic d28 = m8' m4' m2 m1' leap d31 = (m8' m4' m2' m1) + (m8' m4' m2 m1) + (m8' m4 m2' m1) + (m8' m4 m2 m1) + (m8 m4' m2' m4') + (m8 m4' m2 m1') + (m8 m4 m2' m1') Autumn 2006 CSE370 - I - Introduction 21 Another example Door combination lock: punch in 3 values in sequence and the door opens; if there is an error the lock must be ; once the door opens the lock must be inputs: sequence of input values, outputs: door open/close memory: must remember combination or always have it available as an input Autumn 2006 CSE370 - I - Introduction 22

Implementation in software integer combination_lock ( ) { integer v1, v2, v3; integer error = 0; static integer c[3] = 3, 4, 2; while (!new_value( )); v1 = read_value( ); if (v1!= c[1]) error = 1; while (!new_value( )); v2 = read_value( ); if (v2!= c[2]) error = 1; while (!new_value( )); v3 = read_value( ); if (v2!= c[3]) error = 1; } if (error == 1) return(0); else return (1); Autumn 2006 CSE370 - I - Introduction 23 Implementation as a sequential digital system Encoding: how many bits per input value? how many values in sequence? how do we know a new input value is entered? how do we represent the states of the system? Behavior: clock wire tells us when it s ok to look at inputs (i.e., they have settled after change) sequential: sequence of values must be entered clock sequential: remember if an error occurred finite-state specification new value state open/ Autumn 2006 CSE370 - I - Introduction 24

Sequential example: abstract control Finite-state diagram states (with outputs: open/ flag) represent point in execution of machine transitions (based on inputs:, new, comparison results ) changes of state occur when clock says it s ok S1 Autumn 2006 CSE370 - I - Introduction 25 Sequential example: abstract control Finite-state diagram states (with outputs: open/ flag) represent point in execution of machine transitions (based on inputs:, new, comparison results ) changes of state occur when clock says it s ok S1 C1=value S2 Autumn 2006 CSE370 - I - Introduction 26

Sequential example: abstract control Finite-state diagram states (with outputs: open/ flag) represent point in execution of machine transitions (based on inputs:, new, comparison results ) changes of state occur when clock says it s ok ERR S1 C1=value C1!=value S2 Autumn 2006 CSE370 - I - Introduction 27 Sequential example: abstract control Finite-state diagram states (with outputs: open/ flag) represent point in execution of machine transitions (based on inputs:, new, comparison results ) changes of state occur when clock says it s ok ERR C1!=value S1 S2 S3 C1=value C2=value Autumn 2006 CSE370 - I - Introduction 28

Sequential example: abstract control Finite-state diagram states: 5 states transitions: 6 from state to state, 5 self transitions, 1 global inputs:, new, results of comparisons output: open/ ERR S1 C1=value C1!=value S2 C2=value C2!=value S3 C3=value C3!=value open OPEN Autumn 2006 CSE370 - I - Introduction 29 Sequential example: data-path vs. control Internal structure data-path storage for combination comparators control finite-state machine controller control for data-path state changes controlled by clock value C1 C2 C3 multiplexer comparator mux control new equal controller clock equal open/ Autumn 2006 CSE370 - I - Introduction 30

Sequential example: finite-state machine Finite-state machine refine state diagram to include internal structure ERR mux=c1 not equal not equal not equal S1 S2 S3 OPEN open mux=c2 mux=c3 equal equal equal Autumn 2006 CSE370 - I - Introduction 31 Sequential example: state table Finite-state machine generate state table (much like a truth-table) mux=c1 not equal not equal not equal S1 S2 S3 OPEN equal mux=c2 equal mux=c3 equal open ERR next new equal state state mux open/ 1 S1 C1 0 0 S1 S1 C1 0 1 0 S1 ERR 0 1 1 S1 S2 C2 0 0 S2 S2 C2 0 1 0 S2 ERR 0 1 1 S2 S3 C3 0 0 S3 S3 C3 0 1 0 S3 ERR 0 1 1 S3 OPEN open 0 OPEN OPEN open 0 ERR ERR Autumn 2006 CSE370 - I - Introduction 32

Sequential example: encoding Encode state table state can be: S1, S2, S3, OPEN, or ERR needs at least 3 bits to encode: 000, 001, 010, 011, 100 and as many as 5: 00001, 00010, 00100, 01000, 10000 choose 4 bits: 0001, 0010, 0100, 1000, 0000 output mux can be: C1, C2, or C3 needs 2 to 3 bits to encode choose 3 bits: 001, 010, 100 output open/ can be: open or needs 1 or 2 bits to encode choose 1 bits: 1, 0 Autumn 2006 CSE370 - I - Introduction 33 Sequential example: encoding Encode state table state can be: S1, S2, S3, OPEN, or ERR choose 4 bits: 0001, 0010, 0100, 1000, 0000 output mux can be: C1, C2, or C3 choose 3 bits: 001, 010, 100 output open/ can be: open or choose 1 bits: 1, 0 next new equal state state mux open/ 1 0001 001 0 0 0 0001 0001 001 0 0 1 0 0001 0000 0 0 1 1 0001 0010 010 0 0 0 0010 0010 010 0 0 1 0 0010 0000 0 0 1 1 0010 0100 100 0 0 0 0100 0100 100 0 0 1 0 0100 0000 0 0 1 1 0100 1000 1 0 1000 1000 1 0 0000 0000 0 Autumn 2006 CSE370 - I - Introduction 34

Sequential example (cont d): encoding Encode state table state can be: S1, S2, S3, OPEN, or ERR choose 4 bits: 0001, 0010, 0100, 1000, 0000 output mux can be: C1, C2, or C3 choose 3 bits: 001, 010, 100 output open/ can be: open or choose 1 bits: 1, 0 next new equal state state mux open/ 1 0001 001 0 0 0 0001 0001 001 0 0 1 0 0001 0000 0 0 1 1 0001 0010 010 0 0 0 0010 0010 010 0 0 1 0 0010 0000 0 0 1 1 0010 0100 100 0 0 0 0100 0100 100 0 0 1 0 0100 0000 0 0 1 1 0100 1000 1 0 1000 1000 1 0 0000 0000 0 good choice of encoding! mux is identical to last 3 bits of state open/ is identical to first bit of state Autumn 2006 CSE370 - I - Introduction 35 Sequential example (cont d): controller implementation Implementation of the controller mux control new equal controller clock sequential element, called a register, for remembering inputs when told to by clock open/ new equal mux control comb. logic state clock open/ Autumn 2006 CSE370 - I - Introduction 36

Design hierarchy system data-path control code registers multiplexer comparator state registers combinational logic register logic transistors Autumn 2006 CSE370 - I - Introduction 37 Summary That was what the entire course is about converting solutions to problems into combinational and sequential networks effectively organizing the design hierarchically doing so with a modern set of design tools that lets us handle large designs effectively taking advantage of optimization opportunities Now lets do it again this time we'll take nine weeks instead of one Autumn 2006 CSE370 - I - Introduction 38