ENGIN112 L33: Arithmetic Logic Units November 21, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 33 Arithmetic Logic Unit (ALU)

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
Give qualifications of instructors: DAP
Give qualifications of instructors: DAP
Circuits require memory to store intermediate data
CENTRAL PROCESSING UNIT
CS 151 DIGITAL Systems Design Lecture 34 Datapath Analysis.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
1 ALUs. 2 Topics: ALU Overview - core of the integer datapath - 2 operands, 32-bits wide, plus control signals Exercise: A simple multiplier.
DATAPATHS 3) Shifters. 4) Comparators 5) Counters.
ENGIN112 L30: Random Access Memory November 14, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 30 Random Access Memory (RAM)
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
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
ENGIN112 L27: Counters November 5, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 27 Counters.
CS 151 Digital Systems Design Lecture 33 Arithmetic Logic Unit (ALU)
ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
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.
The Computer Processor
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
The Microcomputer System In this presentation you will: Investigate the microprocessor Title Page.
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.
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)
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.
Confidentiality/date line: 13pt Arial Regular, white Maximum length: 1 line Information separated by vertical strokes, with two spaces on either side Disclaimer.
CPU The Central Processing Unit (CPU), has 3 main parts: Control Unit Arithmetic and Logic Unit Registers. These components are connected to the rest.
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)
Princess Sumaya Univ. Computer Engineering Dept Digital Logic Design Lecture 26 Arithmetic Logic Unit Princess Sumaya Univ. Computer Engineering.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
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.
Logic Design (CE1111 ) Lecture 6 (Chapter 6) Registers &Counters Prepared by Dr. Lamiaa Elshenawy 1.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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.
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
Levels in Processor Design
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Systems Architecture I
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
Levels in Processor Design
Levels in Processor Design
The Processor: Datapath & Control.
Instructor: Michael Greenbaum
Presentation transcript:

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 33 Arithmetic Logic Unit (ALU)

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 Overview °Main computation unit in most computer systems °ALUs perform a vaiety of different functions Add, subtract, OR, AND… °Example: ALU chip (74LS382) Has data and control inputs °Individual chips can be chained together to make larger ALUs °ALUs are important parts of datapaths ROMs often are usd in the control path °Build a data and control path

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 ROM-based Moore Machine Timing °What is the maximum clock frequency of this circuit? °Does this circuit satisfy hold time constraints? ROM

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 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 …

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 ALU Integrated Circuit °Integrated circuit – off-the-shelf components °Examine the functionality of this ALU chip Performs 8 functions

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 Example °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 ALU Function Conditions DataADataB DataOut Synchronize ALU with a clock

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 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

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 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)

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 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

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 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

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 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

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 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?

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 ROM Implementation of State Machine States S0 = 00 S1 = 01 S2 = 10 Present State Next State Function LoadA LoadB PS NS ROM Function, LoadA, LoadB Note: No minimization! One line in ROM for each state

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 Putting the Control and Datapath Together PS NS ROM Function LoadA ABLoadB ALU 3

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 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!

ENGIN112 L33: Arithmetic Logic Units November 21, 2003 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