Princess Sumaya Univ. Computer Engineering Dept. 4241 Digital Logic Design Lecture 26 Arithmetic Logic Unit Princess Sumaya Univ. Computer Engineering.

Slides:



Advertisements
Similar presentations
The CPU The Central Presentation Unit What is the CPU?
Advertisements

ENGIN112 L23: Finite State Machine Design Procedure October 27, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 23 Finite State Machine.
Part 4: combinational devices
Princess Sumaya University
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Princess Sumaya University
Give qualifications of instructors: DAP
Circuits require memory to store intermediate data
Princess Sumaya Univ. Computer Engineering Dept. Review:
CENTRAL PROCESSING UNIT
CS 151 DIGITAL Systems Design Lecture 34 Datapath Analysis.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
ENGIN112 L34: Datapath Analysis November 24, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 34 Datapath Analysis.
ENGIN112 L31: Read Only Memory November 17, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 31 Read Only Memory (ROM)
Give qualifications of instructors: DAP
CS 151 Digital Systems Design Lecture 30 Random Access Memory (RAM)
ENGIN112 L27: Counters November 5, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 27 Counters.
ENGIN112 L33: Arithmetic Logic Units November 21, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 33 Arithmetic Logic Unit (ALU)
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 20 Datapath and Control Datapath - performs data transfer and processing operations.
CS 151 Digital Systems Design Lecture 33 Arithmetic Logic Unit (ALU)
CS 151 Digital Systems Design Lecture 31 Read Only Memory (ROM)
Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops.
9/15/09 - L25 Registers & Load Enable Copyright Joanne DeGroat, ECE, OSU1 Registers & Load Enable.
Princess Sumaya Univ. Computer Engineering Dept. Review:
The Computer Processor
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Control pins and Writing Microcode. Simple architecture Recall our architecture from the previous week It was a simple bus architecture “Control” was.
Lecture 31 PLAs and Arithmetic Logic Unit (ALU)
1 Lecture 32 Datapath Analysis. 2 Overview °Datapaths must deal with input and output data values Implement with tri-state buffers °Necessary to control.
The CPU (or Central Processing Unit. Statistics Clock speed – number of instructions that can be executed per second Data width – The number of bits held.
Stack Stack Pointer A stack is a means of storing data that works on a ‘Last in first out’ (LIFO) basis. It reverses the order that data arrives and is.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
1 Arithmetic Logic Unit ALU. 2 The Bus Concept 3 CPU Building Blocks  Registers (IR, PC, ACC)  Control Unit (CU)  Arithmetic Logic Unit (ALU)
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
General Concepts of Computer Organization Overview of Microcomputer.
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
1 Computer Organization Notes: Test 2 on Thursday TA office hours moved from Fri to Wed this week: Wed 9-11 (Mehul); Wed 12-3 (Vivek) in JEC 6119 Today:
DLD Lecture 26 Finite State Machine Design Procedure.
1/8/ Data Path Design & Control Copyright Joanne DeGroat, ECE, OSU1 Processor Data Paths - ALU and Registers Incorporating the ALU into a.
CPU The Central Processing Unit (CPU), has 3 main parts: Control Unit Arithmetic and Logic Unit Registers. These components are connected to the rest.
Programmable Logic Controllers LO1: Understand the design and operational characteristics of a PLC system.
Microarchitecture. Outline Architecture vs. Microarchitecture Components MIPS Datapath 1.
Logic Design / Processor and Control Units Tony Diep.
Computer Architecture Lecture 9 MIPS ALU and Data Paths Ralph Grishman Oct NYU.
Register Transfer Languages (RTL)
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Arithmetic Logic Unit (ALU)
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
Controller Implementation
Class Exercise 1B.
Computer Science 210 Computer Organization
EKT 221 – Counters.
Basics of digital systems
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Computer Science 210 Computer Organization
Instructors: Randy H. Katz David A. Patterson
5. Combinational circuits
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Recall: ROM example Here are three functions, V2V1V0, implemented with an 8 x 3 ROM. Blue crosses (X) indicate connections between decoder outputs and.
Levels in Processor Design
Overview Last lecture Digital hardware systems Today
KU College of Engineering Elec 204: Digital Systems Design
Levels in Processor Design
Levels in Processor Design
The Processor: Datapath & Control.
Instructor: Michael Greenbaum
Presentation transcript:

Princess Sumaya Univ. Computer Engineering Dept Digital Logic Design Lecture 26 Arithmetic Logic Unit Princess Sumaya Univ. Computer Engineering Dept.

Princess Sumaya University Digital Logic Design 2 / 15 ROM-based Moore Machine Timing °What is the maximum clock frequency of this circuit? °Does this circuit satisfy hold time constraints? ROM

Princess Sumaya University Digital Logic Design 3 / 15 Arithmetic Logic Unit °Arithmetic logic unit functions Two multi-bit data inputs Function indicates action (e.g. add, subtract, OR…) °DataOut is same bit width as multi-bit inputs (DataA and DataB) °ALU is combinational °Conditions indicate special conditions of arithmetic activity (e.g. overflow). ALU Function Conditions DataADataB DataOut Think of ALU as a number of other arithmetic and logic blocks in a single box! Function selects the block AdderSubtract AND …

Princess Sumaya University Digital Logic Design 4 / 15 ALU Integrated Circuit °Integrated circuit – off-the-shelf components °Examine the functionality of this ALU chip Performs 8 functions

Princess Sumaya University Digital Logic Design 5 / 15 °Determine the 74HC382 ALU outputs for the following inputs: S 2 S 1 S 0 =010 A 3 A 2 A 1 A 0 =0100, B 3 B 2 B 1 B 0 =0001, and C N =1. Function code indicates subtract 0100 – 0001 = 0011 °Change the select code to 101 and repeat. Function code indicates OR 0100 OR 0001 = 0101 Example ALU Function Conditions DataADataB DataOut Synchronize ALU with a clock

Princess Sumaya University Digital Logic Design 6 / 15 Expanding the ALU ° °Multi-bit ALU created by connecting carry output of low-order chip to carry in of high order Eight-bit ALU formed from 2 four-bit ALUs

Princess Sumaya University Digital Logic Design 7 / 15 Datapath components °Tri-state buffer °Loadable register InOut Enable If Enable asserted, Out = In Otherwise Out open-circuit LoadClk Data stored on rising edge if Load is asserted (e.g. Load = 1)

Princess Sumaya University Digital Logic Design 8 / 15 Computation in a Typical Computer °Control logic often implemented as a finite state machine (including ROMs) °Datapath contains blocks such as ALUs, registers, tri-state buffers, and RAMs °In a processor chip often a 5 to 1 ratio of datapath to control logic

Princess Sumaya University Digital Logic Design 9 / 15 Using a Datapath °Consider the following computation steps 1.ADD A, B and put result in A 2.Subtract A, B and put result in B 3.OR A, B put result in A Repeat starting from step 1 Determine values for Function, LoadA, LoadB Function ABLoadBLoadA ALU

Princess Sumaya University Digital Logic Design 10 / 15 Modeling Control as a State Machine °Consider the following computation steps 1.ADD A, B and put result in A 2.Subtract A, B and put result in B 3.OR A, B put result in A Repeat starting from step 1 Determine values for Function, LoadA, LoadB S0 S1 S2 Model control as a state machine. Determine control outputs for each state

Princess Sumaya University Digital Logic Design 11 / 15 Modeling Control as a State Machine °Consider the following computation steps 1.ADD A, B and put result in A 2.Subtract A, B and put result in B 3.OR A, B put result in A Repeat starting from step 1 States S0 = 00 S1 = 01 S2 = 10 Present State Next State Function LoadA LoadB We know how to implement this using an SOP. Can we use a ROM?

Princess Sumaya University Digital Logic Design 12 / 15 Present State Next State Function LoadA LoadB ROM Implementation of State Machine States S0 = 00 S1 = 01 S2 = 10 PS NS ROM Function, LoadA, LoadB Note: No minimization! One line in ROM for each state

Princess Sumaya University Digital Logic Design 13 / 15 Putting the Control and Datapath Together PS NS ROM Function LoadA ABLoadB ALU 3

Princess Sumaya University Digital Logic Design 14 / 15 What if we replaced the ROM with RAM? PS NS RAM Function LoadA ABLoadB ALU 3 Possible to implement different functions! Program the RAM to perform different sequences Looks like software!

Princess Sumaya University Digital Logic Design 15 / 15 Summary °ALU circuit can perform many functions Combinational circuit °ALU chips can be combined together to form larger ALU chips Remember to connect carry out to carry in °ALUs form the basis of datapaths °ROMs can form the basis of control paths °Combine the two together to build a computing circuit °Next time: more data and control paths