Chapter 3 Digital Logic Structures

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

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

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

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

Lecture 13: Sequential Circuits, FSM

ELCT201: DIGITAL LOGIC DESIGN

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Lecture 13: Sequential Circuits, FSM

Latches. October 13, 2003 Latches 1

ECE 341. Lecture # 3

Sequential Circuit Analysis

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

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

UNIVERSITY OF WISCONSIN MADISON

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

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

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

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

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

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

Lecture 7: Logic design. Combinational logic circuits

CS/COE0447: Computer Organization

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

Sequential Logic Circuits

Lecture 22 Chapters 3 Logic Circuits Part 1

Digital Electronics Sequential Logic

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

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

Topic 8: Sequential Circuits

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

CS/COE0447: Computer Organization

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

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

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

Lecture 17: Designing Sequential Systems Using Flip Flops

ALU A functional unit

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

Review for Final Exam

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

CSE370 HW6 Solutions (Winter 2010)

CprE 281: Digital Logic

Chapter 4. Sequential Logic Circuits

State and Finite State Machines

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

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

CprE 281: Digital Logic

EXPERIMENT Traffic Light Controller

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

Unit 7 Sequential Circuits (Flip Flop, Registers)

Chapter 14 Sequential logic, Latches and Flip-Flops

Chapter 5 Synchronous Sequential Logic

Finite State Machine (FSM)

CSCI 2150 Intro to State Machines

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Synchronous Sequential Circuit Design. Digital Computer Design

CSE 140 Midterm 2 Tajana Simunic Rosing. Spring 2008

From Sequential Circuits to Real Computers

Lecture 3 Review on Digital Logic (Part 2)

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

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

Sequential vs. Combinational

Design of Sequential Circuits

Clocked Sequential Circuits UNIT 13 ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS. Analysis of Clocked Sequential Circuits. Signal Tracing and Timing Charts

Review for B33DV2-Digital Design. Digital Design

CS61C : Machine Structures

CPE100: Digital Logic Design I

6 Synchronous State Machine Design

Topics. CMOS Design Multi-input delay analysis. John A. Chandy Dept. of Electrical and Computer Engineering University of Connecticut

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop


CS61C : Machine Structures

SRC Language Conventions. Class 6: Intro to SRC Simulator Register Transfers and Logic Circuits. SRC Simulator Demo. cond_br.asm.

PGT104 Digital Electronics. PGT104 Digital Electronics

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

Philadelphia University Student Name: Student Number:

Lecture 7: Sequential Networks

Sample Test Paper - I

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

SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL INTEGRATED CIRCUITS (DIC) LABORATORY MANUAL III / IV B.E. (ECE) : I - SEMESTER

State Machines ELCTEC-131

Synchronous Sequential Logic

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Lecture 10: Synchronous Sequential Circuits Design

ALU, Latches and Flip-Flops

Decoding A Counter. svbitec.wordpress.com 1

CPS 104 Computer Organization and Programming Lecture 11: Gates, Buses, Latches. Robert Wagner

Design at the Register Transfer Level

Department of Electrical and Computer Engineering University of Wisconsin Madison. Fall Final Examination

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

Overview of Chapter 4

Finite State Machine. By : Ali Mustafa

Lecture 9: Sequential Logic Circuits. Reading: CH 7

Digital Design. Sequential Logic

Lecture Outline. ESE 570: Digital Integrated Circuits and VLSI Fundamentals. Total Power. Energy and Power Optimization. Worksheet Problem 1

Week-5. Sequential Circuit Design. Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.

Lecture 14 Finite state machines

Topic 8: Sequential Circuits. Bistable Devices. S-R Latches. Consider the following element. Readings : Patterson & Hennesy, Appendix B.4 - B.

Transcription:

Chapter 3 Digital Logic Structures Original slides from Gregory Byrd, North Carolina State University Modified by C. Wilcox, M. Strout, Y. Malaiya Colorado State University

Computing Layers Problems Algorithms Language Instruction Set Architecture Microarchitecture Circuits Devices 2

State Machine Another type of sequential circuit Combines combinational logic with storage Remembers state, and changes output (and state) based on inputs and current state State Machine Inputs Combinational Logic Circuit Outputs Storage Elements 3

Combinational vs. Sequential Two types of combination locks 4 1 8 4 25 20 30 15 5 10 Combinational Success depends only on the values, not the order in which they are set. Sequential Success depends on the sequence of values (e.g, R-13, L-22, R-3). 4

State The state of a system is a snapshot of all the relevant elements of the system at the moment the snapshot is taken. Examples: The state of a basketball game can be represented by the scoreboard: number of points, time remaining, possession, etc. The state of a tic-tac-toe game can be represented by the placement of X s and O s on the board. 5

State of Sequential Lock Our lock example has four different states, labelled A-D: A: The lock is not open, and no relevant operations have been performed. B: The lock is not open, and the user has completed the R-13 operation. C: The lock is not open, and the user has completed R-13, followed by L-22. D: The lock is open. 6

State Diagram Shows states and actions that cause a transition between states. 7

Finite State Machine A system with the following components: 1. A finite number of states 2. A finite number of external inputs 3. A finite number of external outputs 4. An explicit specification of all state transitions 5. An explicit specification of what determines each external output value Often described by a state diagram. Inputs trigger state transitions. Outputs are associated with each state (or with each transition). 8

The Clock Frequently, a clock circuit triggers transition from one state to the next. 1 0 At the beginning of each clock cycle, state machine makes a transition, based on the current state and the external inputs. One Cycle time Not always required. In lock example, the input itself triggers a transition. 9

Implementing a Finite State Machine Combinational logic Determine outputs and next state. Storage elements Maintain state representation. State Machine Inputs Combinational Logic Circuit Outputs Clock Storage Elements 10

Storage: Master-Slave Flipflop A pair of gated D-latches, to isolate next state from current state. During 1 st phase (clock=1), previously-computed state becomes current state and is sent to the logic circuit. During 2 nd phase (clock=0), next state, computed by logic circuit, is stored in Latch A. 11

Storage Each master-slave flipflop stores one state bit. The number of storage elements (flipflops) needed is determined by the number of states (and the representation of each state). Examples: Sequential lock Four states two bits Basketball scoreboard 7 bits for each score, 5 bits for minutes, 6 bits for seconds,1 bit for possession arrow, 1 bit for half, 12

Flip-flops D Flip-flop: a storage element, can be edgetriggered (available in logisim) Clock Q D Q D Next Q Rising edge: input sampled Clock 0 0 1 1 Discrete math YKM 13 2/13/2013

Analyze this FSM Input: x State: A,B Output: A, B Combinational block In: x, A, B Out: DA, DB 14 2/13/2013

Analyze this FSM Input Present State Next State X A B A B 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 0 0 0 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 0 15 2/13/2013

State Table Analyze this FSM X=0 State Diagram Input Present State Next State X A B A B 0 1 00 1 0 0 0 0 0 0 0 0 1 0 1 01 11 0 1 0 1 0 0 1 1 1 1 1 0 0 0 1 1 10 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 0 It is an up counter 16 2/13/2013

Complete Example A blinking traffic sign No lights on 1 3 4 5 1 & 2 on 2 1, 2, 3, & 4 on 1, 2, 3, 4, & 5 on (repeat as long as switch is turned on) DANGER MOVE RIGHT 17

Traffic Sign State Diagram Switch off Switch on State bit S 1 State bit S 0 Outputs Transition on each clock cycle. 18

Traffic Sign Truth Tables Outputs (depend only on state: S 1 S 0 ) Lights 1 and 2 Lights 3 and 4 Light 5 Next State: S 1 S 0 (depend on state and input) Switch In S 1 S 0 S 1 S 0 S 1 S 0 Z Y X 0 0 0 0 0 0 1 1 0 0 1 0 1 1 0 1 1 1 1 1 Whenever In=0, next state is 00. 0 X X 0 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 0 19

State Table In Pr State Nx State Outputs In S1 S0 S1 S0 Z Y X 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1 1 Comb Ckt: Input: In Output: S1, S0 Z, Y, X 20

Traffic Sign Logic Master-slave flipflop 21

Traffic Sign Logic: Optimal Design 22

From Logic to Data Path The data path of a computer is all the logic used to process information. See the data path of the LC-3 on next slide. Combinational Logic Decoders -- convert instructions into control signals Multiplexers -- select inputs and outputs ALU (Arithmetic and Logic Unit) -- operations on data Sequential Logic State machine -- coordinate control signals and data movement Registers and latches -- storage elements 23

LC-3 Data Path Combinational Logic Storage State Machine 24