نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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
CENTRAL PROCESSING UNIT
CS 151 DIGITAL Systems Design Lecture 34 Datapath Analysis.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
DATAPATHS 3) Shifters. 4) Comparators 5) Counters.
ENGIN112 L34: Datapath Analysis November 24, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 34 Datapath Analysis.
Levels in Processor Design
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
Give qualifications of instructors: DAP
Spring 2006EE VLSI Design II - © Kia Bazargan 187 EE 5324 – VLSI Design II Kia Bazargan University of Minnesota Part IV: Control Path and Busses.
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
ENGIN112 L33: Arithmetic Logic Units November 21, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 33 Arithmetic Logic Unit (ALU)
CS 151 Digital Systems Design Lecture 33 Arithmetic Logic Unit (ALU)
Arithmetic-Logic Units (ALUs). The four-bit adder The basic four-bit adder always computes S = A + B + CI But by changing what goes into the adder inputs.
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
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.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
1/8/ L3 Data Path DesignCopyright Joanne DeGroat, ECE, OSU1 ALUs and Data Paths Subtitle: How to design the data path of a processor.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
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.
Arithmetic Logic Unit (ALU) Anna Kurek CS 147 Spring 2008.
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.
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)
Princess Sumaya Univ. Computer Engineering Dept Digital Logic Design Lecture 26 Arithmetic Logic Unit Princess Sumaya Univ. Computer Engineering.
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.
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.
Exam-like questions.
Class Exercise 1B.
Computer Science 210 Computer Organization
More Devices: Control (Making Choices)
Chap 7. Register Transfers and Datapaths
Basics of digital systems
Computer Architecture
Computer Science 210 Computer Organization
Instructors: Randy H. Katz David A. Patterson
5. Combinational circuits
Processor Data Paths -ALU and Registers
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
MIPS Processor.
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
Lecture 6 CdM-8 CPU overview
Levels in Processor Design
The Processor: Datapath & Control.
Instructor: Michael Greenbaum
Presentation transcript:

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Arithmetic Logic Unit (ALU)

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Overview Main computation unit in most computer systems ALUs perform a variety 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 data paths ROMs often are used in the control path Build a data and control path

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Arithmetic Logic Unit Arithmetic logic unit functions Two multi-bit data inputs Function indicates action (e.g. add, subtract, OR…) Data Out is same bit width as multi-bit inputs (Data A and Data B) 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 …

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني ALU Integrated Circuit Integrated circuit – off-the-shelf components Examine the functionality of this ALU chip Performs 8 functions

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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)

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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?

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Putting the Control and Datapath Together PS NS ROM Function LoadA ABLoadB ALU 3

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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!

نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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