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

Similar documents
COMP2611: Computer Organization. Introduction to Digital Logic

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

CS 261 Fall Mike Lam, Professor. Sequential Circuits

Combinational vs Sequential

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

Microprocessor Design

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

First Name Last Name November 10, 2009 CS-343 Exam 2

Difference with latch: output changes on (not after) falling clock edge

Logic Design. Flip Flops, Registers and Counters

CS8803: Advanced Digital Design for Embedded Hardware

COMP sequential logic 1 Jan. 25, 2016

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

Register Transfer Level (RTL) Design Cont.

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

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

11. Sequential Elements

CS3350B Computer Architecture Winter 2015

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

ECE 263 Digital Systems, Fall 2015

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

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Tajana Simunic Rosing. Source: Vahid, Katz

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Logic Design II (17.342) Spring Lecture Outline

Chapter 5 Sequential Circuits

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

6.3 Sequential Circuits (plus a few Combinational)

CHAPTER 4: Logic Circuits

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

CHAPTER 4: Logic Circuits

L14: Quiz Information and Final Project Kickoff. L14: Spring 2004 Introductory Digital Systems Laboratory

Digital Fundamentals: A Systems Approach

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

Sequential Logic Circuits

CSE140L: Components and Design Techniques for Digital Systems Lab. CPU design and PLDs. Tajana Simunic Rosing. Source: Vahid, Katz

CS6201 UNIT I PART-A. Develop or build the following Boolean function with NAND gate F(x,y,z)=(1,2,3,5,7).

Lecture 8: Sequential Logic

Chapter 5 Synchronous Sequential Logic

Final Exam review: chapter 4 and 5. Supplement 3 and 4

TEST-3 (DIGITAL ELECTRONICS)-(EECTRONIC)

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.

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

Chapter Contents. Appendix A: Digital Logic. Some Definitions

Experiment 8 Introduction to Latches and Flip-Flops and registers

DIGITAL FUNDAMENTALS

Contents Slide Set 6. Introduction to Chapter 7 of the textbook. Outline of Slide Set 6. An outline of the first part of Chapter 7

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

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

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

Principles of Computer Architecture. Appendix A: Digital Logic

CS8803: Advanced Digital Design for Embedded Hardware

Sequential Logic. Introduction to Computer Yung-Yu Chuang

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

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

Slide Set 6. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

Chapter 7 Memory and Programmable Logic

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

WINTER 14 EXAMINATION

D Latch (Transparent Latch)

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

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

Chapter 5 Sequential Circuits

More Digital Circuits

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

BUSES IN COMPUTER ARCHITECTURE

Digital Fundamentals: A Systems Approach

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic


Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

Chapter 3. Boolean Algebra and Digital Logic

ELCT201: DIGITAL LOGIC DESIGN

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

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

Logic Devices for Interfacing, The 8085 MPU Lecture 4

MODULE 3. Combinational & Sequential logic

COE328 Course Outline. Fall 2007

EE 447/547 VLSI Design. Lecture 9: Sequential Circuits. VLSI Design EE 447/547 Sequential circuits 1

WINTER 15 EXAMINATION Model Answer

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

For Teacher's Use Only Q Total No. Marks. Q No Q No Q No

DIGITAL ELECTRONICS MCQs

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

Advanced Digital Logic Design EECS 303

Problems with D-Latch

Logic Design ( Part 3) Sequential Logic (Chapter 3)

Department of Computer Science and Engineering Question Bank- Even Semester:

Chapter 4. Logic Design

Lecture 10: Sequential Circuits

CSE 140 Exam #3 Tajana Simunic Rosing

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

6. Sequential Logic Flip-Flops

Asynchronous (Ripple) Counters

Where Are We Now? e.g., ADD $S0 $S1 $S2?? Computed by digital circuit. CSCI 402: Computer Architectures. Some basics of Logic Design (Appendix B)

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

Flip-Flops and Sequential Circuit Design

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

Lecture 11: Synchronous Sequential Logic

CHAPTER1: Digital Logic Circuits

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

Transcription:

Digital logic: ALUs Sequential logic circuits CS207, Fall 2004 October 11, 13, and 15, 2004 1 Read-only memory (ROM) A form of memory Contents fixed when circuit is created n input lines for 2 n addressable locations Number of output bits = size of each entry Each input in the truth table is represented in the addresses (all inputs represented) Each output in the truth table is represented in the contents (all outputs represented) Programmable ROM: can be changed or programmed if you know the contents 2 Don't cares Sometimes a function does not depend on certain combinations of inputs, or the result only depends on certain variables Don't cares (X) indicates these states in the truth table can be input or output Bus Collection of data lines that are treated as a single data line only works if each input line is independent of the others example: 32-bit multiplexor abstraction Bus means something entirely different for I/O (later) 3 4

Designing an ALU ALU must implement logic functions (AND, OR, etc.) arithmetic functions ALU does not implement shifts can be done faster with special shifting hardware than by adding Derive 1-bit ALU first, then 32-bit ALU 1-bit ALU: addition Three inputs: A, B, CarryIn Two outputs: Sum = A'B'CarryIn + A'BCarryIn' + AB'CarryIn' + ABCarryIn CarryOut = BCarryIn + ACarryIn + AB Multiplexor: Line 2 = addition line 0 = AND, line 1 = OR 5 6 1-bit ALU 32-bit ALU 32 1-bit ALUs CarryOut is propagated from least significant bit to most significant bit ripple carry adder Subtraction: A B = A + B' + 1 1 = CarryIn for least significant adder Source: Patterson and Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd ed. 7 8

32-bit ALU Other MIPS ALU operations slt: subtract the operands, take the sign, compensating for overflow conditional branches: test for zero OR all inputs and then invert (1 = no bits are set = zero) Source: Patterson and Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd ed. 9 10 Clock Signal with a cycle time (frequency) that oscillates between high and low values must be long enough for inputs Used to synchronize sequential logic gates state changes occur on an up or down edge (edgetriggered) samples the digital signal Memory (sequential) devices Flip-flops Latches Registers 11 12

S-R (set-reset) latch Unclocked memory device Basis for more complicated flip-flops and latches Flip-flop Output = value of the stored state inside the device Internal state changes on clock edge R S Q Q' 0 0 previous value previous value 0 1 1 0 1 1 0 1 1 1 unstable unstable Source: Patterson and Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd ed. 13 14 Latch Output = value of the stored state inside the device Internal state changes when one or more inputs change AND the clock signal is high D latch Stores the value of the input signal when the clock signal is high Timing diagram 15 Source: Patterson and Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd ed. 16

D flip-flop Output is stored on the falling clock edge D latches are in a master-slave configuration Application: shift register 32 D flip-flops Output (Q) of {left, right} flip-flop connected to input (D) of {right, left} flip-flop Circular shift: connect output (Q) of last flip-flop to input (D) of first flip-flop Timing diagram Q changes as clock signal moves from high to low Source: Patterson and Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd ed. 17 18 Memory elements SRAM: static random access memory fixed access time fixed number of addressable locations and memroy widths DRAM: dynamic random access memory data storage = charge on a capacitor must be periodically refreshed (capacitors slowly discharge) by reading the contents and writing them back occurs once every several milliseconds Error detection and correction Parity code: count of the number of 1's in a sequence of bits odd parity: number of 1's is odd (parity bit = 1) even parity: number of 1's is even (parity bit = 0) Parity bit can be used for error detection or correction 1 parity bit can detect an odd number of errors more bits required for error correction 19 20

Finite state machine A sequential logic function that contains: Set of states: all possible values that can be stored Next-state function: maps current state and inputs to new state Output function: maps current state and inputs to a set of (asserted) outputs Finite state machines are synchronous State changes on clock cycle New state is computed once per clock cycle Used to control processor, datapath (more in Chapters 5-6) Note: there are asynchronous finite state machines too Source: Patterson and Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd ed. 21 22 Some applications of FSMs Life behaviors (sleep patterns, etc) Networking Pattern matching Large complex systems User interface design Video game logic AI Types of finite state machines Moore machine: output function only depends on current state Mealy machine: output depends on current state and current inputs 23 24

Finite state machine: example 2-bit counter States: 00, 01, 10, 11, 00,... Outputs: 00, 01, 10, 11, 00,... No inputs (changes occur on clock cycle) Implementation: bit0 inverts on every clock cycle, bit1 inverts on every other clock cycle Field programmable devices Non-custom integrated circuit Contains combinational logic gates and memory devices programmable logic devices: combinational gates only field programmable gate arrays: combinational gates and flip-flops Programmable by user 25 26 Field programmable devices (cont.) Static gates and registers Connections permanent: connection between two wires (antifuse) temporary: SRAM FPGAs are actually mini-programmable RAMs! 27