ECE 250 / CPS 250 Computer Architecture. Processor Design Datapath and Control

Size: px
Start display at page:

Download "ECE 250 / CPS 250 Computer Architecture. Processor Design Datapath and Control"

Transcription

1 ECE 250 / CPS 250 Computer Architecture Processor Design Datapath and Control Benjamin Lee Slides based on those from Andrew Hilton (Duke), Alvy Lebeck (Duke) Benjamin Lee (Duke), and Amir Roth (Penn)

2 Where We Are in This Course Right Now So far: We know what a computer architecture is We know what kinds of instructions it might execute We know how to perform arithmetic and logic in an ALU Now: We learn how to design a processor in which the ALU is just one component Processor must be able to fetch instructions, decode them, and execute them There are many ways to do this, even for a given ISA Next: We learn how to design memory systems from Roth ECE250 2

3 This Unit: Processor Design Application OS Compiler Firmware CPU I/O Memory Digital Circuits Datapath components and timing Registers and register files Memories (RAMs) Mapping an ISA to a datapath Control Exceptions Gates & Transistors from Roth ECE250 3

4 Readings Patterson and Hennessy Chapter 4: Sections Read this chapter carefully It has many more examples than I can cover in class from Roth ECE250 4

5 So You Have an ALU Important reminder: a processor is just a big finite state machine (FSM) that interprets some ISA Start with one instruction add $3,$2,$4 ALU performs just a small part of execution of instruction You have to read and write registers You have have to fetch the instruction to begin with What about loads and stores? Need some sort of memory interface What about branches? Need some hardware for that, too from Roth ECE250 5

6 Datapath and Control datapath fetch PC Insn memory Register File Data Memory control Fetch: get instruction, translate into control Control: which registers read/write, which ALU operation Datapath: registers, memories, ALUs (computation) Processor Cycle: Fetch Decode Execute from Roth ECE250 6

7 Building a Processor for an ISA Fetch is pretty straightforward Just need a register (called the Program Counter or PC) to hold the next address to fetch from instruction memory Provide address to instruction memory! instruction memory provides instruction at that address Let s start with the datapath 1. Look at ISA 2. Make sure datapath can implement every instruction from Roth ECE250 7

8 Datapath for MIPS ISA Consider only the following instructions add $1,$2,$3 addi $1,2,$3 lw $1,4($3) sw $1,4($3) beq $1,$2,PC_relative_target j Absolute_target Why only these? Most other instructions are similar from datapath viewpoint I leave the ones that aren t for you to figure out from Roth ECE250 8

9 Review: A Register D 0 DFF Q 0 D 1 DFF Q 1 D N N Q D N-1 WE CLK DFF Q N-1 WE Register: DFF array with shared clock, write-enable (WE) Notice: both a clock and a WE (DFF WE = clock & register WE ) Convention I: clock represented by wedge Convention II: if no WE, DFF is written on every clock from Roth ECE250 9

10 Uses of Registers: Program Counter datapath fetch PC Insn memory Register File Data Memory A single register is good for some things PC: program counter control Other things which aren t the ISA registers (more later in semester) from Roth ECE250 10

11 Uses of Registers: Architected Registers RDVAL RS1VAL Register File RS2VAL RD = dest reg WE RD RS1 RS2 RS = source reg Register file: the ISA ( architectural, visible ) registers Two read ports + one write port Maximum number of reads/writes in single instruction (R-type) Port: wires for accessing an array of data Data bus: width of data element (MIPS: 32 bits) Address bus: width of log 2 number of elements (MIPS: 5 bits) Write enable: if it s a write port M ports = M parallel and independent accesses from Roth ECE250 11

12 A Register File With Four Registers from Roth ECE250 12

13 Add a Read Port for RS1 RS1VAL Output of each register into 4to1 mux (RS1VAL) RS1 is select input of RS1VAL mux RS1 from Roth ECE250 13

14 Add Another Read Port for RS2 RS2VAL RS1VAL RS2 RS1 Output of each register into another 4to1 mux (RS2VAL) RS2 is select input of RS2VAL mux from Roth ECE250 14

15 Add a Write Port for RD 2-to-1 decoder RDVAL RS2VAL RS1VAL WE RD Input RDVAL into each register Enable only one register s WE: (Decoded RD) & (WE) What if we needed two write ports? RS2 RS1 from Roth ECE250 15

16 Another Read Port Implementation A read port that uses muxes is fine for 4 registers Not so good for 32 registers (32-to-1 mux is very slow) Alternative implementation uses tri-state buffers Truth table (E = enable, D = input, Q = output) D Q E D Q 1 D D E 0 D Z Z: high impedance state, no current flowing Mux: connect multiple tri-stated buses to one output bus Key: only one input driving at any time, all others must be in Z Else, all hell breaks loose (electrically) from Roth ECE250 16

17 Register File With Tri-State Read Ports RDVAL RS1VAL RS2VAL WE RD RS1 RS2 from Roth ECE250 17

18 Another Useful Component: Memory DATAIN DATAOUT ADDRESS Memory WE Memory: where instructions and data reside One address bus One input data bus for writes One output data bus for reads Actually, a more traditional definition of memory is One input/output data bus No clock! asynchronous strobe instead from Roth ECE250 18

19 Let s Build A MIPS-like Datapath from Roth ECE250 19

20 Start With Fetch + 4 P C Insn Mem PC and instruction memory A +4 incrementer computes default next instruction PC Why +4 (and not +1)? from Roth ECE250 20

21 First Instruction: add $rd, $rs, $rt + 4 P C Insn Mem Register File rs rt rs + rt s1 s2 d WE R-type Op(6) rs(5) rt(5) rd(5) Sh(5) Func(6) Add register file and ALU from Roth ECE250 21

22 Second Instruction: addi $rt, $rs, imm + 4 sign extension (sx) unit P C Insn Mem Register File rs s1 s2 d S X Extended(imm) I-type Op(6) rs(5) rt(5) Immed(16) Destination register can now be either rd or rt Add sign extension unit and mux into second ALU input from Roth ECE250 22

23 Third Instruction: lw $rt, imm($rs) + 4 P C Insn Mem Register File s1 s2 d??? a Data d Mem?? S X? I-type Op(6) rs(5) rt(5) Immed(16) Add data memory, address is ALU output (rs+imm) Add register write data mux to select memory output or ALU output from Roth ECE250 23

24 Fourth Instruction: sw $rt, imm($rs) + 4 P C Insn Mem Register File s1 s2 d? a Data d Mem S X I-type Op(6) rs(5) rt(5) Immed(16) Add path from second input register to data memory data input Disable RegFile s WE signal from Roth ECE250 24

25 Fifth Instruction: beq $1,$2,target + 4 << 2 P C Insn Mem Register File s1 s2 d z a Data d Mem S X I-type Op(6) rs(5) rt(5) Immed(16) Add left shift unit (why?) and adder to compute PC-relative branch target Add mux to do what? from Roth ECE250 25

26 Sixth Instruction: j + 4 << 2 << 2 P C Insn Mem Register File s1 s2 d a Data d Mem S X J-type Op(6) Immed(26) Add shifter to compute left shift of 26-bit immediate Add additional PC input mux for jump target from Roth ECE250 26

27 Seventh, Eight, Ninth Instructions Are these the paths we would need for all instructions? sll $1,$2,4 // shift left logical Like an arithmetic operation, but need a shifter too slt $1,$2,$3 // set less than (slt) Like subtract, but need to write the condition bits, not the result Need zero extension unit for condition bits Need additional input to register write data mux jal absolute_target // jump and link Like a jump, but also need to write PC+4 into $ra ($31) Need path from PC+4 adder to register write data mux Need to be able to specify $31 as an implicit destination jr $31 // jump register Like a jump, but need path from register read to PC write mux from Roth ECE250 27

28 Clock Timing Must deliver clock(s) to avoid races Can t write and read same value at same clock edge Particularly a problem for RegFile and Memory May create multiple clock edges (from single input clock) by using buffers (to delay clock) and inverters from Roth ECE250 28

29 This Unit: Processor Design Application OS Compiler Firmware CPU I/O Memory Digital Circuits Gates & Transistors Datapath components and timing Registers and register files Memories (RAMs) Clocking strategies Mapping an ISA to a datapath Control Exceptions from Roth ECE250 29

30 What Is Control? + 4 << 2 << 2 BR JP P C Insn Mem Register File s1 s2 d a Data d Mem Rwd Rwe S X ALUop DMwe Rdst ALUinB 9 signals control flow of data through this datapath MUX selectors, or register/memory write enable signals Datapath of current microprocessor has 100s of control signals from Roth ECE250 30

31 Example: Control for add + 4 << 2 << 2 BR=0 JP=0 P C Insn Mem Register File s1 s2 d a Data d Mem Rwd=0 Rwe=1 S X ALUop=0 DMwe=0 Rdst=1 ALUinB=0 from Roth ECE250 31

32 Example: Control for sw + 4 << 2 << 2 BR=0 JP=0 P C Insn Mem Register File s1 s2 d a Data d Mem Rwd=X Rwe=0 S X ALUop=0 DMwe=1 Rdst=X ALUinB=1 Difference between a sw and an add is 5 signals 3 if you don t count the X ( don t care ) signals from Roth ECE250 32

33 Example: Control for beq $1,$2,target + 4 << 2 << 2 BR=1 JP=0 P C Insn Mem Register File s1 s2 d a Data d Mem Rwd=X Rwe=0 S X ALUop=1 DMwe=0 Rdst=X ALUinB=0 Difference between a store and a branch is only 4 signals from Roth ECE250 33

34 How Is Control Implemented? + 4 << 2 << 2 BR JP P C Insn Mem Register File s1 s2 d a Data d Mem Rwd Rwe S X ALUop DMwe Rdst ALUinB Control? from Roth ECE250 34

35 Implementing Control Each instruction has a unique set of control signals Most signals are function of opcode Some may be encoded in the instruction itself E.g., the ALUop signal is some portion of the MIPS Func field + Simplifies controller implementation Requires careful ISA design Options for implementing control 1. Use instruction type to look up control signals in a table 2. Design FSM whose outputs are control signals Either way, goal is same: turn instruction into control signals from Roth ECE250 35

36 Control Implementation: ROM ROM (read only memory): like a RAM but unwritable Bits in data words are control signals Lines indexed by opcode Example: ROM control for our simple datapath BR JP ALUinB ALUop DMwe Rwe Rdst Rwd add opcode addi lw sw beq j from Roth ECE250 36

37 ROM vs. Combinational Logic A control ROM is fine for 6 insns and 9 control signals A real machine has 100+ insns and 300+ control signals Even RISC s have lots of instructions 30,000+ control bits (~4KB) Not huge, but hard to make fast Control must be faster than datapath Alternative: combinational logic Exploits observation: many signals have few 1s or few 0s from Roth ECE250 37

38 Control Implementation: Combinational Logic Example: combinational logic control for our simple datapath opcode add addi lw sw beq j BR JP DMwe Rwe Rwd Rdst ALUop ALUinB from Roth ECE250 38

39 Datapath and Control Timing + 4 P C Insn Mem Register File s1 s2 d a Data d Mem S X Control (ROM or combinational logic) Read IMem Read Registers (Read Control ROM) Read DMEM Write DMEM Write Registers Write PC from Roth ECE250 39

40 Single-Cycle Performance Useful metric: cycles per instruction (CPI) + Easy to calculate for single-cycle processor: CPI = 1 Seconds/program = (insns/program) * 1 CPI * (N seconds/cycle) ICQ: How many cycles/second in 3.8 GHz processor? Slow! Clock period must be elongated to accommodate longest operation In our datapath: lw Goes through five structures in series: insn mem, register file (read), ALU, data mem, register file again (write) No one will buy a machine with a slow clock Later: faster processor cores from Roth ECE250 40

41 This Unit: Processor Design Application OS Compiler Firmware CPU I/O Memory Digital Circuits Gates & Transistors Datapath components and timing Registers and register files Memories (RAMs) Clocking strategies Mapping an ISA to a datapath Control Exceptions from Roth ECE250 41

42 Program Execution Threads of Control Multiple threads, programs run within a system Each thread, program has its own program counter Program Execution Fetch instruction from memory with address in PC Execute instruction Increment PC Begin PC at known location after system start-up Load the operating system kernel from Roth ECE250 42

43 Execution Context Program context defined by processor state General purpose registers (integer, floating-point) Status registers (e.g., condition codes) Program counter, stack pointer Memory hierarchy from Roth ECE250 43

44 Context Switches Context switches (Motivation) Allows programs to share machine, increases machine utilization OS schedules, switches between multiple programs Permits different execution modes (e.g., user versus OS kernel) Context switches (Mechanism) Save current context, restore next context Context switches (Triggers) User <-> User: Timeslice for multiple programs (e.g., ms) User <-> OS: Invoke OS to handle external events (e.g., I/O) from Roth ECE250 44

45 Interrupts and Exceptions Exception is external event requiring response Clock interrupts for time-slicing, context switches I/O operations for network, disk, keyboard, etc. Exception, interrupt, trap are used interchangeably Exceptions are infrequent Input/Output, illegal instruction, divide-by-zero, page fault, protection fault, ctrl-c, ctrl-z, timer Exception handling requires OS OS kernel includes instructions for exception handling Exception handling is transparent to application code Handlers fix & restart (e.g., I/O), or terminate (e.g., illegal insn) from Roth ECE250 45

46 Detecting Exceptions Undefined Instruction Detect unknown opcodes Arithmetic Exceptions Add logic in ALU to detect overflow Add logic in divider to detect divide-by-zero Unaligned Access Add circuit to check addresses Word-aligned addresses have {00} in the least significant bits from Roth ECE250 46

47 Handling Exceptions Identify interrupt s cause Invoke OS routine i = ID for interrupt s cause PC = interrupt_table[i] Kernel initializes boot Clear interrupt signal Return from interrupt handler Return to user context from Roth ECE250 47

48 Handling System Calls Special instruction invokes OS Read or write I/O devices Create new process Invoke OS routine i = ID for syscall PC = interrupt_table[i] Kernel initializes boot Clear interrupt signal Return from interrupt handler Return to user context from Roth ECE250 48

49 Exceptions as Procedure Calls 1. Processor saves address of user instruction Address of instruction stored in Exception Program Counter (EPC) 2. Processor transfers control to OS Set PC to address of exception handler within OS code 3. OS executes handler, which resolves exception 4. OS returns to user program (EPC), or terminates program from Roth ECE250 49

50 Exceptions and Register Support 1. Exception Program Counter (EPC) 32-bit register holds address of affected instruction 2. Cause Register 32-bit register encodes exception cause 3. BadVAddr 32-bit register holds address that triggers memory access exception See memory hierarchy, virtual memory for detail 4. Status 32-bit register tracks interrupt handling, multiple interrupts, etc. from Roth ECE250 50

51 Exception Handling What does exception handling look like to software? When exception happens Control transfers to OS at pre-specified exception handler address OS has privileged access to registers user processes do not see These registers hold information about exception Cause of exception (e.g., page fault, arithmetic overflow) Other exception info (e.g., address that caused page fault) PC of application insn to return to after exception is fixed OS uses privileged (and non-privileged) registers to do its thing OS returns control to user application Same mechanism available programmatically via SYSCALL from Roth ECE250 51

52 MIPS Exception Handling MIPS uses registers for state during exception handling These registers live on coprocessor 0 $14: EPC (holds PC of user program during exception handling) $13: exception type (SYSCALL, overflow, etc.) $8: virtual address (produced page/protection fault) $12: exception mask (which exceptions trigger OS) Access registers with privileged instructions mfc0, mtc0 Privileged = user program cannot execute them mfc0: move (register) from coprocessor 0 (to user reg) mtc0: move (register) to coprocessor 0 (from user reg) Restore user mode with privileged instruction rfe Kernel executes this instruction to restore user program from Roth ECE250 52

53 Implementing Exceptions Why do architects care about exceptions? Because we use datapath and control to implement them More precisely to implement aspects of exception handling Recognition of exceptions Transfer of control to OS Privileged OS mode Later in semester, we ll talk more about exceptions (b/c we need them for I/O) from Roth ECE250 53

54 Datapath with Support for Exceptions PSRs P S R PSRr + 4 CRwd CRwe Co-procesor Register File << 2 << 2 PCwC P C Insn Mem I R Register File s1 s2 d B A ALUinAC O a Data d Mem D S X Co-processor register (CR) file needn t be implemented as RF Independent registers connected directly to pertinent muxes PSR (processor status register): in privileged mode? from Roth ECE250 54

55 This Unit: Processor Design Application OS Compiler Firmware CPU I/O Memory Digital Circuits Datapath components and timing Registers and register files Memories (RAMs) Clocking strategies Mapping an ISA to a datapath Control Gates & Transistors Next up: Memory Systems from Roth ECE250 55

56 Summary We now know how to build a fully functional processor But We re still treating memory as a black box Our fully functional processor is slow. Really, really slow. from Roth ECE250 56

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware 4.1 Introduction We will examine two MIPS implementations

More information

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle

More information

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017 ECE 550D Funamentals of Computer Systems an Engineering Fall 017 Datapaths Prof. John Boar Duke University Slies are erive from work by Profs. Tyler Bletch an Anrew Hilton (Duke) an Amir Roth (Penn) What

More information

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition The Processor - Introduction

More information

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor. COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor The Processor - Introduction

More information

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University The Processor: Datapath and Control Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Introduction CPU performance factors Instruction count Determined

More information

ECE260: Fundamentals of Computer Engineering

ECE260: Fundamentals of Computer Engineering Datapath for a Simplified Processor James Moscola Dept. of Engineering & Computer Science York College of Pennsylvania Based on Computer Organization and Design, 5th Edition by Patterson & Hennessy Introduction

More information

COMPUTER ORGANIZATION AND DESIGN

COMPUTER ORGANIZATION AND DESIGN COMPUTER ORGANIZATION AND DESIGN 5 Edition th The Hardware/Software Interface Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count CPI and Cycle time Determined

More information

Processor (I) - datapath & control. Hwansoo Han

Processor (I) - datapath & control. Hwansoo Han Processor (I) - datapath & control Hwansoo Han Introduction CPU performance factors Instruction count - Determined by ISA and compiler CPI and Cycle time - Determined by CPU hardware We will examine two

More information

Chapter 4. The Processor. Computer Architecture and IC Design Lab

Chapter 4. The Processor. Computer Architecture and IC Design Lab Chapter 4 The Processor Introduction CPU performance factors CPI Clock Cycle Time Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS

More information

The MIPS Processor Datapath

The MIPS Processor Datapath The MIPS Processor Datapath Module Outline MIPS datapath implementation Register File, Instruction memory, Data memory Instruction interpretation and execution. Combinational control Assignment: Datapath

More information

Implementing the Control. Simple Questions

Implementing the Control. Simple Questions Simple Questions How many cycles will it take to execute this code? lw $t2, 0($t3) lw $t3, 4($t3) beq $t2, $t3, Label add $t5, $t2, $t3 sw $t5, 8($t3) Label:... #assume not What is going on during the

More information

Chapter 4. The Processor Designing the datapath

Chapter 4. The Processor Designing the datapath Chapter 4 The Processor Designing the datapath Introduction CPU performance determined by Instruction Count Clock Cycles per Instruction (CPI) and Cycle time Determined by Instruction Set Architecure (ISA)

More information

Review: Abstract Implementation View

Review: Abstract Implementation View Review: Abstract Implementation View Split memory (Harvard) model - single cycle operation Simplified to contain only the instructions: memory-reference instructions: lw, sw arithmetic-logical instructions:

More information

Systems Architecture

Systems Architecture Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some or all figures from Computer Organization and Design: The Hardware/Software

More information

Initial Representation Finite State Diagram. Logic Representation Logic Equations

Initial Representation Finite State Diagram. Logic Representation Logic Equations Control Implementation Alternatives Control may be designed using one of several initial representations. The choice of sequence control, and how logic is represented, can then be determined independently;

More information

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations Chapter 4 The Processor Part I Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations

More information

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control EE 37 Unit Single-Cycle CPU path and Control CPU Organization Scope We will build a CPU to implement our subset of the MIPS ISA Memory Reference Instructions: Load Word (LW) Store Word (SW) Arithmetic

More information

CS3350B Computer Architecture Winter 2015

CS3350B Computer Architecture Winter 2015 CS3350B Computer Architecture Winter 2015 Lecture 5.5: Single-Cycle CPU Datapath Design Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted from lectures on Computer Organization and Design, Patterson

More information

CPS104 Computer Organization and Programming Lecture 17: Interrupts and Exceptions. Interrupts Exceptions and Traps. Visualizing an Interrupt

CPS104 Computer Organization and Programming Lecture 17: Interrupts and Exceptions. Interrupts Exceptions and Traps. Visualizing an Interrupt CPS104 Computer Organization and Programming Lecture 17: Interrupts and Exceptions Robert Wagner cps 104 Int.1 RW Fall 2000 Interrupts Exceptions and Traps Interrupts, Exceptions and Traps are asynchronous

More information

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University The Processor (1) Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3050: Theory on Computer Architectures, Spring 2017, Jinkyu Jeong (jinkyu@skku.edu)

More information

Instruction Set Architecture of MIPS Processor

Instruction Set Architecture of MIPS Processor CSE 3421/5421: Introduction to Computer Architecture Instruction Set Architecture of MIPS Processor Presentation B Study: 2.1 2.3, 2.4 2.7, 2.10 and Handout MIPS Instructions: 32-bit Core Subset Read:

More information

LECTURE 3: THE PROCESSOR

LECTURE 3: THE PROCESSOR LECTURE 3: THE PROCESSOR Abridged version of Patterson & Hennessy (2013):Ch.4 Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU

More information

LECTURE 5. Single-Cycle Datapath and Control

LECTURE 5. Single-Cycle Datapath and Control LECTURE 5 Single-Cycle Datapath and Control PROCESSORS In lecture 1, we reminded ourselves that the datapath and control are the two components that come together to be collectively known as the processor.

More information

Microprogramming. Microprogramming

Microprogramming. Microprogramming Microprogramming Alternative way of specifying control FSM State -- bubble control signals in bubble next state given by signals on arc not a great language to specify when things are complex Treat as

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

More information

Lecture Topics. Announcements. Today: Single-Cycle Processors (P&H ) Next: continued. Milestone #3 (due 2/9) Milestone #4 (due 2/23)

Lecture Topics. Announcements. Today: Single-Cycle Processors (P&H ) Next: continued. Milestone #3 (due 2/9) Milestone #4 (due 2/23) Lecture Topics Today: Single-Cycle Processors (P&H 4.1-4.4) Next: continued 1 Announcements Milestone #3 (due 2/9) Milestone #4 (due 2/23) Exam #1 (Wednesday, 2/15) 2 1 Exam #1 Wednesday, 2/15 (3:00-4:20

More information

RISC Processor Design

RISC Processor Design RISC Processor Design Single Cycle Implementation - MIPS Virendra Singh Indian Institute of Science Bangalore virendra@computer.org Lecture 13 SE-273: Processor Design Feb 07, 2011 SE-273@SERC 1 Courtesy:

More information

EECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 13 EE141

EECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 13 EE141 EECS 151/251A Fall 2017 Digital Design and Integrated Circuits Instructor: John Wawrzynek and Nicholas Weaver Lecture 13 Project Introduction You will design and optimize a RISC-V processor Phase 1: Design

More information

ENE 334 Microprocessors

ENE 334 Microprocessors ENE 334 Microprocessors Lecture 6: Datapath and Control : Dejwoot KHAWPARISUTH Adapted from Computer Organization and Design, 3 th & 4 th Edition, Patterson & Hennessy, 2005/2008, Elsevier (MK) http://webstaff.kmutt.ac.th/~dejwoot.kha/

More information

TDT4255 Computer Design. Lecture 4. Magnus Jahre. TDT4255 Computer Design

TDT4255 Computer Design. Lecture 4. Magnus Jahre. TDT4255 Computer Design 1 TDT4255 Computer Design Lecture 4 Magnus Jahre 2 Outline Chapter 4.1 to 4.4 A Multi-cycle Processor Appendix D 3 Chapter 4 The Processor Acknowledgement: Slides are adapted from Morgan Kaufmann companion

More information

Outline. A pipelined datapath Pipelined control Data hazards and forwarding Data hazards and stalls Branch (control) hazards Exception

Outline. A pipelined datapath Pipelined control Data hazards and forwarding Data hazards and stalls Branch (control) hazards Exception Outline A pipelined datapath Pipelined control Data hazards and forwarding Data hazards and stalls Branch (control) hazards Exception 1 4 Which stage is the branch decision made? Case 1: 0 M u x 1 Add

More information

Where We Are in This Course Right Now. ECE 152 Introduction to Computer Architecture. This Unit: Caches and Memory Hierarchies.

Where We Are in This Course Right Now. ECE 152 Introduction to Computer Architecture. This Unit: Caches and Memory Hierarchies. Introduction to Computer Architecture Caches and emory Hierarchies Copyright 2012 Daniel J. Sorin Duke University Slides are derived from work by Amir Roth (Penn) and Alvin Lebeck (Duke) Spring 2012 Where

More information

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Hardware Organization and Design Lecture 14: One Cycle MIPs Datapath Adapted from Computer Organization and Design, Patterson & Hennessy, UCB R-Format Instructions Read two register operands Perform

More information

What are Exceptions? EE 457 Unit 8. Exception Processing. Exception Examples 1. Exceptions What Happens When Things Go Wrong

What are Exceptions? EE 457 Unit 8. Exception Processing. Exception Examples 1. Exceptions What Happens When Things Go Wrong 8. 8.2 What are Exceptions? EE 457 Unit 8 Exceptions What Happens When Things Go Wrong Exceptions are rare events triggered by the hardware and forcing the processor to execute a software handler Similar

More information

EE 457 Unit 8. Exceptions What Happens When Things Go Wrong

EE 457 Unit 8. Exceptions What Happens When Things Go Wrong 1 EE 457 Unit 8 Exceptions What Happens When Things Go Wrong 2 What are Exceptions? Exceptions are rare events triggered by the hardware and forcing the processor to execute a software handler HW Interrupts

More information

Initial Representation Finite State Diagram Microprogram. Sequencing Control Explicit Next State Microprogram counter

Initial Representation Finite State Diagram Microprogram. Sequencing Control Explicit Next State Microprogram counter Control Implementation Alternatives Control may be designed using one of several initial representations. The choice of sequence control, and how logic is represented, can then be determined independently;

More information

The Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture

The Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture The Processor Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut CSE3666: Introduction to Computer Architecture Introduction CPU performance factors Instruction count

More information

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture Computer Science 324 Computer Architecture Mount Holyoke College Fall 2009 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture. Idea:

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

More information

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control ELEC 52/62 Computer Architecture and Design Spring 217 Lecture 4: Datapath and Control Ujjwal Guin, Assistant Professor Department of Electrical and Computer Engineering Auburn University, Auburn, AL 36849

More information

EECS150 - Digital Design Lecture 9- CPU Microarchitecture. Watson: Jeopardy-playing Computer

EECS150 - Digital Design Lecture 9- CPU Microarchitecture. Watson: Jeopardy-playing Computer EECS150 - Digital Design Lecture 9- CPU Microarchitecture Feb 15, 2011 John Wawrzynek Spring 2011 EECS150 - Lec09-cpu Page 1 Watson: Jeopardy-playing Computer Watson is made up of a cluster of ninety IBM

More information

MIPS PROJECT INSTRUCTION SET and FORMAT

MIPS PROJECT INSTRUCTION SET and FORMAT ECE 312: Semester Project MIPS PROJECT INSTRUCTION SET FORMAT This is a description of the required MIPS instruction set, their meanings, syntax, semantics, bit encodings. The syntax given for each instruction

More information

CS 61C: Great Ideas in Computer Architecture. MIPS CPU Datapath, Control Introduction

CS 61C: Great Ideas in Computer Architecture. MIPS CPU Datapath, Control Introduction CS 61C: Great Ideas in Computer Architecture MIPS CPU Datapath, Control Introduction Instructor: Alan Christopher 7/28/214 Summer 214 -- Lecture #2 1 Review of Last Lecture Critical path constrains clock

More information

CENG 3420 Computer Organization and Design. Lecture 06: MIPS Processor - I. Bei Yu

CENG 3420 Computer Organization and Design. Lecture 06: MIPS Processor - I. Bei Yu CENG 342 Computer Organization and Design Lecture 6: MIPS Processor - I Bei Yu CEG342 L6. Spring 26 The Processor: Datapath & Control q We're ready to look at an implementation of the MIPS q Simplified

More information

CPU Organization (Design)

CPU Organization (Design) ISA Requirements CPU Organization (Design) Datapath Design: Capabilities & performance characteristics of principal Functional Units (FUs) needed by ISA instructions (e.g., Registers, ALU, Shifters, Logic

More information

Computer Architecture

Computer Architecture CS3350B Computer Architecture Winter 2015 Lecture 4.2: MIPS ISA -- Instruction Representation Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted from lectures on Computer Organization and Design,

More information

CS 61C: Great Ideas in Computer Architecture Datapath. Instructors: John Wawrzynek & Vladimir Stojanovic

CS 61C: Great Ideas in Computer Architecture Datapath. Instructors: John Wawrzynek & Vladimir Stojanovic CS 61C: Great Ideas in Computer Architecture Datapath Instructors: John Wawrzynek & Vladimir Stojanovic http://inst.eecs.berkeley.edu/~cs61c/fa15 1 Components of a Computer Processor Control Enable? Read/Write

More information

CENG 3420 Lecture 06: Datapath

CENG 3420 Lecture 06: Datapath CENG 342 Lecture 6: Datapath Bei Yu byu@cse.cuhk.edu.hk CENG342 L6. Spring 27 The Processor: Datapath & Control q We're ready to look at an implementation of the MIPS q Simplified to contain only: memory-reference

More information

CS Computer Architecture Spring Week 10: Chapter

CS Computer Architecture Spring Week 10: Chapter CS 35101 Computer Architecture Spring 2008 Week 10: Chapter 5.1-5.3 Materials adapated from Mary Jane Irwin (www.cse.psu.edu/~mji) and Kevin Schaffer [adapted from D. Patterson slides] CS 35101 Ch 5.1

More information

EECS150 - Digital Design Lecture 10- CPU Microarchitecture. Processor Microarchitecture Introduction

EECS150 - Digital Design Lecture 10- CPU Microarchitecture. Processor Microarchitecture Introduction EECS150 - Digital Design Lecture 10- CPU Microarchitecture Feb 18, 2010 John Wawrzynek Spring 2010 EECS150 - Lec10-cpu Page 1 Processor Microarchitecture Introduction Microarchitecture: how to implement

More information

COMPUTER ORGANIZATION AND DESI

COMPUTER ORGANIZATION AND DESI COMPUTER ORGANIZATION AND DESIGN 5 Edition th The Hardware/Software Interface Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count Determined by ISA and compiler

More information

Introduction. Datapath Basics

Introduction. Datapath Basics Introduction CPU performance factors - Instruction count; determined by ISA and compiler - CPI and Cycle time; determined by CPU hardware 1 We will examine a simplified MIPS implementation in this course

More information

Determined by ISA and compiler. We will examine two MIPS implementations. A simplified version A more realistic pipelined version

Determined by ISA and compiler. We will examine two MIPS implementations. A simplified version A more realistic pipelined version MIPS Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

More information

Single Cycle Datapath

Single Cycle Datapath Single Cycle atapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili Section 4.-4.4 Appendices B.7, B.8, B.,.2 Practice Problems:, 4, 6, 9 ing (2) Introduction We will examine two MIPS implementations

More information

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization CISC 662 Graduate Computer Architecture Lecture 4 - ISA MIPS ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,

More information

Homework #4 Processor Core Design

Homework #4 Processor Core Design Homework #4 Processor Core Design Last updated 2016-10-21, changes highlighted in yellow. For this homework, you will be building a single-cycle processor in Quartus II using Structural VHDL, downloading

More information

ﻪﺘﻓﺮﺸﻴﭘ ﺮﺗﻮﻴﭙﻣﺎﻛ يرﺎﻤﻌﻣ MIPS يرﺎﻤﻌﻣ data path and ontrol control

ﻪﺘﻓﺮﺸﻴﭘ ﺮﺗﻮﻴﭙﻣﺎﻛ يرﺎﻤﻌﻣ MIPS يرﺎﻤﻌﻣ data path and ontrol control معماري كامپيوتر پيشرفته معماري MIPS data path and control abbasi@basu.ac.ir Topics Building a datapath support a subset of the MIPS-I instruction-set A single cycle processor datapath all instruction actions

More information

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands Stored Program Concept Instructions: Instructions are bits Programs are stored in memory to be read or written just like data Processor Memory memory for data, programs, compilers, editors, etc. Fetch

More information

ECE369. Chapter 5 ECE369

ECE369. Chapter 5 ECE369 Chapter 5 1 State Elements Unclocked vs. Clocked Clocks used in synchronous logic Clocks are needed in sequential logic to decide when an element that contains state should be updated. State element 1

More information

Instruction Set Architecture part 1 (Introduction) Mehran Rezaei

Instruction Set Architecture part 1 (Introduction) Mehran Rezaei Instruction Set Architecture part 1 (Introduction) Mehran Rezaei Overview Last Lecture s Review Execution Cycle Levels of Computer Languages Stored Program Computer/Instruction Execution Cycle SPIM, a

More information

ICS 233 COMPUTER ARCHITECTURE. MIPS Processor Design Multicycle Implementation

ICS 233 COMPUTER ARCHITECTURE. MIPS Processor Design Multicycle Implementation ICS 233 COMPUTER ARCHITECTURE MIPS Processor Design Multicycle Implementation Lecture 23 1 Add immediate unsigned Subtract unsigned And And immediate Or Or immediate Nor Shift left logical Shift right

More information

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization CS/COE0447: Computer Organization and Assembly Language Datapath and Control Sangyeun Cho Dept. of Computer Science A simple MIPS We will design a simple MIPS processor that supports a small instruction

More information

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization A simple MIPS CS/COE447: Computer Organization and Assembly Language Datapath and Control Sangyeun Cho Dept. of Computer Science We will design a simple MIPS processor that supports a small instruction

More information

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA CISC 662 Graduate Computer Architecture Lecture 4 - ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,

More information

Chapter 5: The Processor: Datapath and Control

Chapter 5: The Processor: Datapath and Control Chapter 5: The Processor: Datapath and Control Overview Logic Design Conventions Building a Datapath and Control Unit Different Implementations of MIPS instruction set A simple implementation of a processor

More information

This Unit: Processor Design. What Is Control? Example: Control for sw. Example: Control for add

This Unit: Processor Design. What Is Control? Example: Control for sw. Example: Control for add This Unit: rocessor Design Appliction O ompiler U ory Firmwre I/O Digitl ircuits Gtes & Trnsistors pth components n timing s n register files ories (RAMs) locking strtegies Mpping n IA to tpth ontrol Exceptions

More information

CPE 335. Basic MIPS Architecture Part II

CPE 335. Basic MIPS Architecture Part II CPE 335 Computer Organization Basic MIPS Architecture Part II Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides http://www.abandah.com/gheith/courses/cpe335_s08/index.html CPE232 Basic MIPS Architecture

More information

Digital System Design Using Verilog. - Processing Unit Design

Digital System Design Using Verilog. - Processing Unit Design Digital System Design Using Verilog - Processing Unit Design 1.1 CPU BASICS A typical CPU has three major components: (1) Register set, (2) Arithmetic logic unit (ALU), and (3) Control unit (CU) The register

More information

Format. 10 multiple choice 8 points each. 1 short answer 20 points. Same basic principals as the midterm

Format. 10 multiple choice 8 points each. 1 short answer 20 points. Same basic principals as the midterm Final Review Format 10 multiple choice 8 points each Make sure to show your work Can write a description to the side as to why you think your answer is correct for possible partial credit 1 short answer

More information

EECE 417 Computer Systems Architecture

EECE 417 Computer Systems Architecture EECE 417 Computer Systems Architecture Department of Electrical and Computer Engineering Howard University Charles Kim Spring 2007 1 Computer Organization and Design (3 rd Ed) -The Hardware/Software Interface

More information

Single Cycle Datapath

Single Cycle Datapath Single Cycle atapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili Section 4.1-4.4 Appendices B.3, B.7, B.8, B.11,.2 ing Note: Appendices A-E in the hardcopy text correspond to chapters 7-11 in

More information

Part II Instruction-Set Architecture. Jan Computer Architecture, Instruction-Set Architecture Slide 1

Part II Instruction-Set Architecture. Jan Computer Architecture, Instruction-Set Architecture Slide 1 Part II Instruction-Set Architecture Jan. 211 Computer Architecture, Instruction-Set Architecture Slide 1 Short review of the previous lecture Performance = 1/(Execution time) = Clock rate / (Average CPI

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor 1 Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A

More information

ECE 486/586. Computer Architecture. Lecture # 7

ECE 486/586. Computer Architecture. Lecture # 7 ECE 486/586 Computer Architecture Lecture # 7 Spring 2015 Portland State University Lecture Topics Instruction Set Principles Instruction Encoding Role of Compilers The MIPS Architecture Reference: Appendix

More information

Chapter 5 Solutions: For More Practice

Chapter 5 Solutions: For More Practice Chapter 5 Solutions: For More Practice 1 Chapter 5 Solutions: For More Practice 5.4 Fetching, reading registers, and writing the destination register takes a total of 300ps for both floating point add/subtract

More information

CPE 335 Computer Organization. Basic MIPS Architecture Part I

CPE 335 Computer Organization. Basic MIPS Architecture Part I CPE 335 Computer Organization Basic MIPS Architecture Part I Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides http://www.abandah.com/gheith/courses/cpe335_s8/index.html CPE232 Basic MIPS Architecture

More information

Computer Organization

Computer Organization Computer Organization! Computer design as an application of digital logic design procedures! Computer = processing unit + memory system! Processing unit = control + datapath! Control = finite state machine

More information

Inf2C - Computer Systems Lecture Processor Design Single Cycle

Inf2C - Computer Systems Lecture Processor Design Single Cycle Inf2C - Computer Systems Lecture 10-11 Processor Design Single Cycle Boris Grot School of Informatics University of Edinburgh Previous lectures Combinational circuits Combinations of gates (INV, AND, OR,

More information

Topic Notes: MIPS Instruction Set Architecture

Topic Notes: MIPS Instruction Set Architecture Computer Science 220 Assembly Language & Comp. Architecture Siena College Fall 2011 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture.

More information

Math 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro

Math 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro Math 230 Assembly Programming (AKA Computer Organization) Spring 2008 MIPS Intro Adapted from slides developed for: Mary J. Irwin PSU CSE331 Dave Patterson s UCB CS152 M230 L09.1 Smith Spring 2008 MIPS

More information

COMP303 - Computer Architecture Lecture 8. Designing a Single Cycle Datapath

COMP303 - Computer Architecture Lecture 8. Designing a Single Cycle Datapath COMP33 - Computer Architecture Lecture 8 Designing a Single Cycle Datapath The Big Picture The Five Classic Components of a Computer Processor Input Control Memory Datapath Output The Big Picture: The

More information

Block diagram view. Datapath = functional units + registers

Block diagram view. Datapath = functional units + registers Computer design an application of digital logic design procedures Computer = processing unit + memory system Processing unit = control + datapath Control = finite state machine inputs = machine instruction,

More information

CS222: Processor Design

CS222: Processor Design CS222: Processor Design Dr. A. Sahu Dept of Comp. Sc. & Engg. Indian Institute of Technology Guwahati Processor Design building blocks Outline A simple implementation: Single Cycle Data pathandcontrol

More information

Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1

Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1 Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1 Introduction Chapter 4.1 Chapter 4.2 Review: MIPS (RISC) Design Principles Simplicity favors regularity fixed size instructions small number

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

More information

Computer Science 61C Spring Friedland and Weaver. The MIPS Datapath

Computer Science 61C Spring Friedland and Weaver. The MIPS Datapath The MIPS Datapath 1 The Critical Path and Circuit Timing The critical path is the slowest path through the circuit For a synchronous circuit, the clock cycle must be longer than the critical path otherwise

More information

ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design

ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2014 Sources: Computer

More information

Computer Architecture Computer Science & Engineering. Chapter 4. The Processor BK TP.HCM

Computer Architecture Computer Science & Engineering. Chapter 4. The Processor BK TP.HCM Computer Architecture Computer Science & Engineering Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware

More information

CS3350B Computer Architecture Quiz 3 March 15, 2018

CS3350B Computer Architecture Quiz 3 March 15, 2018 CS3350B Computer Architecture Quiz 3 March 15, 2018 Student ID number: Student Last Name: Question 1.1 1.2 1.3 2.1 2.2 2.3 Total Marks The quiz consists of two exercises. The expected duration is 30 minutes.

More information

Chapter 4 The Processor 1. Chapter 4A. The Processor

Chapter 4 The Processor 1. Chapter 4A. The Processor Chapter 4 The Processor 1 Chapter 4A The Processor Chapter 4 The Processor 2 Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations Determined by ISA

More information

Clever Signed Adder/Subtractor. Five Components of a Computer. The CPU. Stages of the Datapath (1/5) Stages of the Datapath : Overview

Clever Signed Adder/Subtractor. Five Components of a Computer. The CPU. Stages of the Datapath (1/5) Stages of the Datapath : Overview Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 24 Introduction to CPU design Hi to Vitaly Babiy from Albany, NY! 2008-03-21 Stanford researchers developing

More information

Processor. Han Wang CS3410, Spring 2012 Computer Science Cornell University. See P&H Chapter , 4.1 4

Processor. Han Wang CS3410, Spring 2012 Computer Science Cornell University. See P&H Chapter , 4.1 4 Processor Han Wang CS3410, Spring 2012 Computer Science Cornell University See P&H Chapter 2.16 20, 4.1 4 Announcements Project 1 Available Design Document due in one week. Final Design due in three weeks.

More information

EIE/ENE 334 Microprocessors

EIE/ENE 334 Microprocessors EIE/ENE 334 Microprocessors Lecture 6: The Processor Week #06/07 : Dejwoot KHAWPARISUTH Adapted from Computer Organization and Design, 4 th Edition, Patterson & Hennessy, 2009, Elsevier (MK) http://webstaff.kmutt.ac.th/~dejwoot.kha/

More information

Instructions: Language of the Computer

Instructions: Language of the Computer Instructions: Language of the Computer Tuesday 22 September 15 Many slides adapted from: and Design, Patterson & Hennessy 5th Edition, 2014, MK and from Prof. Mary Jane Irwin, PSU Summary Previous Class

More information

CC 311- Computer Architecture. The Processor - Control

CC 311- Computer Architecture. The Processor - Control CC 311- Computer Architecture The Processor - Control Control Unit Functions: Instruction code Control Unit Control Signals Select operations to be performed (ALU, read/write, etc.) Control data flow (multiplexor

More information

Full Datapath. Chapter 4 The Processor 2

Full Datapath. Chapter 4 The Processor 2 Pipelining Full Datapath Chapter 4 The Processor 2 Datapath With Control Chapter 4 The Processor 3 Performance Issues Longest delay determines clock period Critical path: load instruction Instruction memory

More information

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle

More information