CS 151 Digital Systems Design 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
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
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
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
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
CS 151 Digital Systems Design Lecture 30 Random Access Memory (RAM)
ENGIN112 L33: Arithmetic Logic Units November 21, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 33 Arithmetic Logic Unit (ALU)
CPEN Digital System Design Chapter 9 – Computer Design
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
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.
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
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.
Lecture 30 Read Only Memory (ROM)
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
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)
Abdullah Said Alkalbani University of Buraimi
DLD Lecture 26 Finite State Machine Design Procedure.
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.
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.
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.
Controller Implementation
Class Exercise 1B.
Computer Science 210 Computer Organization
EKT 221 – Counters.
EKT 221 : Digital 2 COUNTERS.
Basics of digital systems
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Instructor: Alexander Stoytchev
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
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
Instructor: Michael Greenbaum
Presentation transcript:

CS 151 Digital Systems Design Lecture 33 Arithmetic Logic Unit (ALU) Give qualifications of instructors: DAP teaching computer architecture at Berkeley since 1977 Co-athor of textbook used in class Best known for being one of pioneers of RISC currently author of article on future of microprocessors in SciAm Sept 1995 RY took 152 as student, TAed 152,instructor in 152 undergrad and grad work at Berkeley joined NextGen to design fact 80x86 microprocessors one of architects of UltraSPARC fastest SPARC mper shipping this Fall

Main computation unit in most computer systems 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 credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

ROM-based Moore Machine Timing What is the maximum clock frequency of this circuit? Does this circuit satisfy hold time constraints? ROM ROM

… Arithmetic Logic Unit Arithmetic logic unit functions DataA DataB 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). Function ALU Conditions DataOut Think of ALU as a number of other arithmetic and logic blocks in a single box! Function selects the block Adder Subtract … AND

ALU Integrated Circuit Integrated circuit – off-the-shelf components Examine the functionality of this ALU chip Performs 8 functions

Change the select code to 101 and repeat. Example Determine the 74HC382 ALU outputs for the following inputs: S2S1S0=010, A3A2A1A0=0100, B3B2B1B0=0001, and CN=1. Function code indicates subtract 0100 – 0001 = 0011 Change the select code to 101 and repeat. Function code indicates OR 0100 OR 0001 = 0101 Synchronize ALU with a clock DataA DataB Function ALU Conditions DataOut

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 In Out If Enable asserted, Out = In Otherwise Out open-circuit Enable Clk Load 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 credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

Consider the following computation steps Using a Datapath Consider the following computation steps ADD A, B and put result in A Subtract A, B and put result in B OR A, B put result in A Repeat starting from step 1 Determine values for Function, LoadA, LoadB Function A B LoadB LoadA ALU credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

Modeling Control as a State Machine Consider the following computation steps ADD A, B and put result in A Subtract A, B and put result in B OR A, B put result in A Repeat starting from step 1 Determine values for Function, LoadA, LoadB Model control as a state machine. Determine control outputs for each state S0 S1 S2 credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

Modeling Control as a State Machine Consider the following computation steps ADD A, B and put result in A Subtract A, B and put result in B 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 00 01 011 1 0 01 10 010 0 1 10 00 101 1 0 credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs. We know how to implement this using an SOP. Can we use a ROM?

ROM Implementation of State Machine Present State Next State Function LoadA LoadB 00 01 011 1 0 01 10 010 0 1 10 00 101 1 0 States S0 = 00 S1 = 01 S2 = 10 PS NS 0101110 1001001 0010110 00 01 10 ROM Function, LoadA, LoadB Note: No minimization! One line in ROM for each state credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

Putting the Control and Datapath Together ROM 0101110 00 1001001 01 0010110 10 PS NS LoadA A B LoadB credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs. ALU 3 Function

What if we replaced the ROM with RAM? 0101110 00 Looks like software! 1001001 01 0010110 10 PS NS LoadA A B LoadB credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs. ALU 3 Function Possible to implement different functions! Program the RAM to perform different sequences

ALU circuit can perform many functions 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 credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.