Instructor Paul Pearce

Slides:



Advertisements
Similar presentations
CS1104: Computer Organisation School of Computing National University of Singapore.
Advertisements

CMPT 334 Computer Organization
CS 61C L29 Combinational Logic Blocks (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L23 Combinational Logic Blocks (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS61C L23 Combinational Logic Blocks (1) Garcia, Spring 2007 © UCB Salamander robot!  Swiss scientists have built a robot that can both swim and walk.
CS61C L24 Introduction to CPU Design (1) Garcia, Spring 2007 © UCB Cell pic to web site  A new MS app lets people search the web based on a digital cell.
CS61C L26 CPU Design : Designing a Single-Cycle CPU II (1) Garcia, Spring 2007 © UCB 3.6 TB DVDs? Maybe!  Researchers at Harvard have found a way to use.
CS61C L18 Introduction to CPU Design (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS61C L17 Combinatorial Logic Blocks (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS61C L19 Intro to CPU (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #19 – Intro.
CS61C L18 Combinational Logic Blocks, Latches (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
CS61C L23 Combinational Logic Blocks (1) Garcia, Fall 2006 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c UC.
CS61C L24 Introduction to CPU Design (1) Garcia, Fall 2006 © UCB Fedora Core 6 (FC6) just out  The latest version of the distro has been released; they.
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 24 Introduction to CPU design Stanford researchers developing 3D camera.
CS 61C L23 Combinational Logic Blocks (1) Garcia, Fall 2004 © UCB slashdot.org/article.pl?sid=04/10/21/ &tid=126&tid=216 Lecturer PSOE Dan Garcia.
CS 61C L15 Blocks (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #15: Combinational Logic Blocks.
Copyright 1998 Morgan Kaufmann Publishers, Inc. All rights reserved. Digital Architectures1 Machine instructions execution steps (1) FETCH = Read the instruction.
CS61CL L09 Single Cycle CPU Design (1) Huddleston, Summer 2009 © UCB Jeremy Huddleston inst.eecs.berkeley.edu/~cs61c CS61CL : Machine Structures Lecture.
CS61C L20 Datapath © UC Regents 1 CS61C - Machine Structures Lecture 20 - Datapath November 8, 2000 David Patterson
CS 61C L15 State & Blocks (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #15: State 2 and Blocks.
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 27: Single-Cycle CPU Datapath Design Instructor: Sr Lecturer SOE Dan Garcia
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
CS61C L26 Combinational Logic Blocks (1) Garcia, Spring 2014 © UCB Very fast 3D Micro Printer  A new company called Nanoscribe has developed a fabrication.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Computer Organization and Design Lecture 16 – Combinational Logic Blocks Close call!   Cal squeaked by Washington in Overtime We win, and then.
CS3350B Computer Architecture Winter 2015 Lecture 5.4: Combinational Logic Blocks Marc Moreno Maza [Adapted from lectures.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
CS2100 Computer Organisation The Processor: Datapath (AY2015/6) Semester 1.
CS 61C L4.1.2 State (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture State and FSMs Kurt Meinz inst.eecs.berkeley.edu/~cs61c.
CS61C L20 Datapath © UC Regents 1 Microprocessor James Tan Adapted from D. Patterson’s CS61C Copyright 2000.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
MIPS Processor.
CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units 1 Instructors: Vladimir Stojanovic and Nicholas Weaver
New-School Machine Structures Parallel Requests Assigned to computer e.g., Search “Katz” Parallel Threads Assigned to core e.g., Lookup, Ads Parallel Instructions.
CS 61C: Great Ideas in Computer Architecture MIPS Datapath 1 Instructors: Nicholas Weaver & Vladimir Stojanovic
CPU Design - Datapath. Review Use muxes to select among input S input bits selects 2 S inputs Each input can be n-bits wide, indep of S Can implement.
Revisão de Circuitos Lógicos PARTE III. Review Use this table and techniques we learned to transform from 1 to another.
CS161 – Design and Architecture of Computer Systems
Electrical and Computer Engineering University of Cyprus
CS 230: Computer Organization and Assembly Language
Single-Cycle Datapath and Control
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle DataPath
Instructors: Randy H. Katz David A. Patterson
CSCE 212 Chapter 5 The Processor: Datapath and Control
Yuanqing Cheng Great Ideas in Computer Architecture Lecture 11: RISC-V Processor Datapath Yuanqing Cheng
Single-Cycle CPU DataPath.
minecraft.gamepedia.com/Tutorials/Basic_Logic_Gates
Design of the Control Unit for One-cycle Instruction Execution
CS/COE0447 Computer Organization & Assembly Language
Senior Lecturer SOE Dan Garcia
MIPS Processor.
ECE232: Hardware Organization and Design
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
Lecturer SOE Dan Garcia
The Processor Lecture 3.2: Building a Datapath with Control
Hello to Casey Holgado listening from Oklahoma State!
robosavvy.com/forum/viewtopic.php?p=32542
Guest Lecturer TA: Shreyas Chand
Topic 5: Processor Architecture
Systems Architecture I
COMS 361 Computer Organization
Combinational Circuits
Digital Circuits and Logic
COMS 361 Computer Organization
Instructor: Michael Greenbaum
MIPS Processor.
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Instructor Paul Pearce inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 17 Combinational Logic Blocks and Intro to CPU Design 2010-07-20 Instructor Paul Pearce Passwords that are simple, AND safe Greet class Researchers at Harvard and Microsoft have developed a new scheme for password requirements that simply mandates that no single password may be “too popular.” Their findings will be presented at Hot Topics in Security next month. http://www.technologyreview.com/computing/25826/

Review Use this table and techniques we learned to transform from 1 to another Truth Table Boolean Expression Gate Diagram

Today Data Multiplexors Arithmetic and Logic Unit Adder/Subtractor Datapath design

Data Multiplexor (here 2-to-1, n-bit-wide) “mux”

N instances of 1-bit-wide mux How many rows in TT?

How do we build a 1-bit-wide mux?

4-to-1 Multiplexor? How many rows in TT?

Is there any other way to do it? Hint: NCAA tourney! Ans: Hierarchically!

Arithmetic and Logic Unit Most processors contain a special logic block called “Arithmetic and Logic Unit” (ALU) We’ll show you an easy one that does ADD, SUB, bitwise AND, bitwise OR

Our simple ALU

Adder/Subtracter Design -- how? Truth-table, then determine canonical form, then minimize and implement as we’ve seen before Look at breaking the problem down into smaller pieces that we can cascade or hierarchically layer

Administrivia If you want a regrade for your midterm, staple a paper with your explanation (clearly indicating on what question you want more points) to your exam and turn it in to your TA in section Monday We’ll regrade the exam and your score MIGHT go down… We will regrade with respect to the established rubric, so that all tests are graded equally Project 2 will be done with 1 partner (groups of 2). Start thinking about who you want to work with. Hint: Your best friend may not be the best choice for a partner. Projects ruin friendships. HW6 due tomorrow at midnight.

Adder/Subtracter – One-bit adder LSB…

Adder/Subtracter – One-bit adder (1/2)…

Adder/Subtracter – One-bit adder (2/2)…

N 1-bit adders  1 N-bit adder + What about overflow? Overflow = cn?

Consider a 2-bit signed # & overflow: What about overflow? Consider a 2-bit signed # & overflow: 10 = -2 + -2 or -1 11 = -1 + -2 only 00 = 0 NOTHING! 01 = 1 + 1 only Highest adder C1 = Carry-in = Cin, C2 = Carry-out = Cout No Cout or Cin  NO overflow! Cin, and Cout  NO overflow! Cin, but no Cout  A,B both > 0, overflow! Cout, but no Cin  A,B both < 0, overflow! ± # What op?

Consider a 2-bit signed # & overflow: What about overflow? Consider a 2-bit signed # & overflow: 10 = -2 + -2 or -1 11 = -1 + -2 only 00 = 0 NOTHING! 01 = 1 + 1 only Overflows when… Cin, but no Cout  A,B both > 0, overflow! Cout, but no Cin  A,B both < 0, overflow! ± #

Extremely Clever Subtractor A - B = A + (-B); how do we make “-B”? + + + x y xor 1 An xor is a “Conditional Inverter!”

Five Components of a Computer Keyboard, Mouse Computer Devices Memory (passive) (where programs, data live when running) Processor Disk (where programs, data live when not running) Input Control Output Datapath Display, Printer

The CPU Processor (CPU): the active part of the computer, which does all the work (data manipulation and decision- making) Datapath: portion of the processor which contains hardware necessary to perform operations required by the processor (the brawn) Control: portion of the processor (also in hardware) which tells the datapath what needs to be done (the brain)

Stages of the Datapath : Overview Problem: a single, atomic block which “executes an instruction” (performs all necessary operations beginning with fetching the instruction) would be too bulky and inefficient Solution: break up the process of “executing an instruction” into stages, and then connect the stages to create the whole datapath smaller stages are easier to design easy to optimize (change) one stage without touching the others

Stages of the Datapath (1/5) There is a wide variety of MIPS instructions: so what general steps do they have in common? Stage 1: Instruction Fetch no matter what the instruction, the 32-bit instruction word must first be fetched from memory (the cache-memory hierarchy) also, this is where we Increment PC (that is, PC = PC + 4, to point to the next instruction: byte addressing so + 4)

Stages of the Datapath (2/5) Stage 2: Instruction Decode upon fetching the instruction, we next gather data from the fields (decode all necessary instruction data) first, read the opcode to determine instruction type and field lengths second, read in data from all necessary registers for add, read two registers for addi, read one register for jal, no reads necessary

Stages of the Datapath (3/5) Stage 3: ALU (Arithmetic-Logic Unit) the real work of most instructions is done here: arithmetic (+, -, *, /), shifting, logic (&, |), comparisons (slt) what about loads and stores? lw $t0, 40($t1) the address we are accessing in memory = the value in $t1 PLUS the value 40 so we do this addition in this stage

Stages of the Datapath (4/5) Stage 4: Memory Access actually only the load and store instructions do anything during this stage; the others remain idle during this stage or skip it all together since these instructions have a unique step, we need this extra stage to account for them as a result of the cache system, this stage is expected to be fast

Stages of the Datapath (5/5) Stage 5: Register Write most instructions write the result of some computation into a register examples: arithmetic, logical, shifts, loads, slt what about stores, branches, jumps? don’t write anything into a register at the end these remain idle during this fifth stage or skip it all together

Generic Steps of Datapath rd ALU instruction memory PC registers rs memory Data rt +4 imm 2. Decode/ Register Read 1. Instruction Fetch 3. Execute 4. Memory 5. Reg. Write

Truth table for mux with 4-bits of select is 24 rows long Peer Instruction Truth table for mux with 4-bits of select is 24 rows long We could cascade N 1-bit shifters to make 1 N-bit shifter for sll, srl 12 a) FF b) FT c) TF d) TT False (explained above) True

“And In conclusion…” Use muxes to select among input S input bits selects 2S inputs Each input can be n-bits wide, independent of S Can implement muxes hierarchically ALU can be implemented using a mux Coupled with basic block elements N-bit adder-subtractor done using N 1-bit adders with XOR gates on input XOR serves as conditional inverter CPU design involves Datapath,Control Datapath in MIPS involves 5 CPU stages Instruction Fetch Instruction Decode & Register Read ALU (Execute) Memory Register Write