CSE 141 Computer Architecture Summer Session I, Lecture 3 Performance and Single Cycle CPU Part 1. Pramod V. Argade

Size: px
Start display at page:

Download "CSE 141 Computer Architecture Summer Session I, Lecture 3 Performance and Single Cycle CPU Part 1. Pramod V. Argade"

Transcription

1 CSE 141 Computer Architecture Summer Session I, 2005 Lecture 3 Performance and Single Cycle CPU Part 1 Pramod V. Argade

2 CSE141: Introduction to Computer Architecture Instructor: Pramod V. Argade Office Hour: Tue. 7:30-9:00 (Center 105) Wed. 5:00-6:00 PM (HSS 1330) By Appointment TAs: Chengmo Yang: Wenjing Rao: Lecture: Mon/Wed. 6:00-8:50 PM, HSS 1330 Textbook: Web-page: Computer Organization & Design The Hardware Software Interface, 3 nd Edition. Authors: Patterson and Hennessy 2

3 Summer Session I, 2005 CSE141 Course Schedule Lecture # Date Time Room Topic Quiz topic 1 Mon. 6/27 6-8:50 PM HSS 1330 Introduction, Ch. 1 ISA, Ch. 2 2 Wed. 6/29 6-8:50 PM HSS 1330 Arithmetic, Ch. 3 Homework Due - - ISA Ch. 2 - Mon. 7/4 No Class July 4th Holiday Wed. 7/6 6-8:50 PM HSS 1330 Performance, Ch. 4 Arithmetic Single-cycle CPU Ch. 5 Ch. 3 #2 4 Mon. 7/11 6-8:50 PM HSS 1330 Single-cycle CPU Ch. 5 Cont. Performance Multi-cycle CPU Ch. 5 Ch. 4 #3 5 Tue. 7/12 7:30-8:50 PM HSS 1330 Multi-cycle CPU Ch. 5 Cont. (July 4th make up class) Wed. 7/13 6-8:50 PM HSS 1330 Single and Multicycle CPU Examples and Single-cycle CPU Review for Midterm Ch. 5-7 Mon. 7/18 6-8:50 PM HSS 1330 Mid-term Exam Exceptions - #4 8 Tue. 7/19 7:30-8:50 PM HSS 1330 Pipelining Ch. 6 (July 4th make up class) Wed. 7/20 6-8:50 PM HSS 1330 Hazards, Ch Mon. 7/25 6-8:50 PM HSS 1330 Memory Hierarchy & Caches Ch Wed. 7/27 6-8:50 PM HSS 1330 Virtual Memory, Ch. 7 Course Review Hazards Ch. 6 Cache Ch Sat. 7/30 TBD TBD Final Exam - - #1 #5 #6 3

4 Discussions Sections for 141: Thursday, 7:30-8:30 WLH-2205 Office Hour: Tue. 7:30-9:00 (Center 105) Wed. 5:00-6:00 PM (HSS 1330) By Appointment Announcements Reading Assignment Chapter 4. Assessing and Understanding Performance Sections Homework 3: Due Mon., July 11th in class 4.1, 4.2, 4.6, 4.7, 4.8, 4.9, 4.12, 4.19, 4.22, 4.45 Quiz When: Mon., July 11th, First 10 minutes of the class Topic: Performance, Chapter 4 Need: Paper, pen 4

5 Performance Assessment Airplane Passenger Capacity Cruising Range (miles) Cruising Speed (m.p.h.) Passenger Throughput (passenger x m.p.h.) Boeing ,750 Boeing ,700 Douglas DC ,424 Airbus A ,975 Example definitions of performance Passengers * MPH Cruising speed Passenger capacity (Passenger * MPH)/$ need more data! Clearly formulate your definition of performance 5

6 Why worry about performance? Learn to measure, report, and summarize Make intelligent choices See through the marketing hype As a designer or purchaser, assess: which system has best performance? which system has lowest cost? which system has highest performance/cost? Formulate metrics for performance measurement How to report relative performance? Understand impact of architectural choices on performance 6

7 Computer Performance: TIME, TIME, TIME Response Time (latency) How long does it take for my job to run? How long does it take to execute a job? How long must I wait for the database query? Throughput How many jobs can the machine run at once? What is the average execution rate? How much work is getting done? If we upgrade a machine with a new processor what do we decrease? If we add a new machine to the lab what do we increase? 7

8 % time program... program results u 12.9s 2:39 65% % Execution Time Elapsed Time (2:39) Counts everything (disk and memory accesses, I/O, etc.) A useful number, but often not good for comparison purposes Total CPU time (103.6 s) Doesn't count I/O or time spent running other programs Comprised of system time (12.9 s), and user time (90.7 s) Our focus: user CPU time Time spent executing the lines of code that are "in" our program 8

9 A Definition of Performance For some program running on machine X, Performance X = 1 / Execution time X Machine X is n times faster than Y n = Performance X / Performance Y = (Execution time Y ) / (Execution time X ) Problem: Execution time: Machine A: 12 seconds, B: 20 seconds A/B =.6, so A is 40% faster, or 1.4X faster, or B is 40% slower B/A = 1.67, so A is 67% faster, or 1.67X faster, or B is 67% slower Need a precise definition X is n times faster than Y, n > 1 A is 1.67 times faster than B 9

10 Clock Cycles Operation of conventional computer is controlled by Clock ticks Clock rate (frequency) = cycles per second (Hertz) MHz = Million cycles per second GHz = Giga (Billion) cycles per second Cycle time = time between ticks = seconds per cycle A 2 GHz clock => Cycle time = 1/(2x10 9 ) s = 0.5 nanoseconds Instead of reporting execution time in seconds, we often use clock cycles seconds program = cycles program seconds cycle time 10

11 How many cycles are required for a program? Assumption: # of cycles = # of instructions 1st instruction 2nd instruction 3rd instruction 4th 5th 6th... time Assumption is incorrect Typically, different instructions take different number of clock cycles Integer Multiply instructions are multi-cycle Floating point instructions are multi-cycle 1st 2nd 3rd 4th 5th time 11

12 Now that we understand cycles A given program will require some number of instructions (machine instructions) some number of cycles some number of seconds We have a vocabulary that relates these quantities: cycle time (seconds per cycle) clock rate (cycles per second) CPI (cycles per instruction) 12

13 Now that we understand cycles A given program will require some number of instructions (machine instructions) some number of cycles some number of seconds We have a vocabulary that relates these quantities: cycle time (seconds per cycle) clock rate (cycles per second) CPI (cycles per instruction) CPU CPU time time = Seconds = Instructions x Cycles Cycles x Seconds Program Program Instruction Cycle Cycle 13

14 CPI Example 2.1 Suppose we have two implementations of the same instruction set architecture (ISA). For some program, Machine A has a clock cycle time of 10 ns. and a CPI of 2.0 Machine B has a clock cycle time of 20 ns. and a CPI of 1.2 What machine is faster for this program, and by how much? 14

15 Compiler Optimization: Example 2.2 A compiler designer is trying to decide between two code sequences for a particular machine with 3 instruction classes. CPI: Class A = 1, Class B = 2, and Class C = 3 Code sequence X has 5 instructions: 2 of A, 1 of B, and 2 of C Code sequence Y has 6 instructions: 4 of A, 1 of B, and 1 of C. Which sequence will be faster? How much? 15

16 Execution time: Contributing Factors CPU CPU time time = Seconds = Instructions x Cycles Cycles x Seconds Program Program Instruction Cycle Cycle Instruction Count CPI Program X Compiler X (X) ISA X X Clock Rate Organization X X Technology X Improve performance => reduce execution time Reduce instruction count (Programmer, Compiler) Reduce cycles per instruction (ISA, Machine designer) Reduce clock cycle time (Hardware designer, Process engineer) 16

17 Performance Performance is determined by program execution time Do any of the other variables equal performance? # of cycles to execute program? # of instructions in program? # of cycles per second? average # of cycles per instruction? average # of instructions per second? Common pitfall: thinking one of the variables is indicative of performance when it really isn t. 17

18 Performance Variation CPU Execution Time Instruction CPI = Count X X Clock Cycle Time Number of instructions CPI Clock Cycle Time Same machine different programs same programs, different machines, same ISA different similar same same different different Same programs, different machines somewhat different different different 18

19 Amdahl s Law The impact of a performance improvement is limited by the percent of execution time affected by the improvement Execution time after improvement = Execution Time Affected Amount of Improvement + Execution Time Unaffected Make the common case fast! Amdahl s law sets limit on how much improvement can be made 19

20 Amdahl s Law: Example 2.3 Example: A program runs in 100 seconds on a machine, with multiply responsible for 80 seconds of this time. How much do we have to improve the speed of multiplication if we want the program to run 4 times faster? Is it possible to get the program to run 5 times faster? 20

21 Metrics of Performance Application Programming Language Answers per month Useful Operations per second Compiler (millions) of Instructions per second MIPS ISA (millions) of (F.P.) operations per second MFLOP/s Datapath Control Megabytes per second Function Units TransistorsWiresPins Cycles per second (clock rate) Each metric has a place and a purpose, and each can be misused 21

22 Benchmarks Performance best determined by running a real application Use programs typical of expected workload Or, typical of expected class of applications e.g., compilers/editors, scientific applications, graphics, etc. Small benchmarks nice for architects and designers easy to standardize can be abused SPEC (System Performance Evaluation Cooperative) companies have agreed on a set of real program and inputs can still be abused (Intel s other bug) valuable indicator of performance (and compiler technology) 22

23 SPEC 89 Compiler enhancements and performance SPEC performance ratio gcc espresso spice doduc nasa7 li eqntott matrix300 fpppp tomcatv Benchmark Compiler Enhanced compiler 23

24 SPEC 95* Benchmark go m88ksim gcc compress li ijpeg perl vortex tomcatv swim su2cor hydro2d mgrid applu trub3d apsi fpppp wave5 Description Artificial intelligence; plays the game of Go Motorola 88k chip simulator; runs test program The Gnu C compiler generating SPARC code Compresses and decompresses file in memory Lisp interpreter Graphic compression and decompression Manipulates strings and prime numbers in the special-purpose programming language Perl A database program A mesh generation program Shallow water model with 513 x 513 grid quantum physics; Monte Carlo simulation Astrophysics; Hydrodynamic Naiver Stokes equations Multigrid solver in 3-D potential field Parabolic/elliptic partial differential equations Simulates isotropic, homogeneous turbulence in a cube Solves problems regarding temperature, wind velocity, and distribution of pollutant Quantum chemistry Plasma physics; electromagnetic particle simulation SPEC CPU2000 consists of 12 integer and 14 floating point benchmarks 24

25 SPEC 95 Does doubling the clock rate double the performance? Can a machine with a slower clock rate have better performance? SPECint SPECfp Clock rate (MHz) Pentium Clock rate (MHz) Pentium Pentium Pro Pentium Pro 25

26 MIPS, MFLOPS etc. MIPS - million instructions per second number of instructions executed in program Clock rate = = execution time in seconds * 10 6 CPI * 10 6 MFLOPS - million floating point operations per second = number of floating point operations executed in program execution time in seconds * 10 6 Hard to relate MIPS/MFLOPS with execution time CPU Execution Time Instruction CPI = Count X X Clock Cycle Time Highly program-dependent metrics Deceptive (See pages in the text) MIPS would be higher for a program using simple instructions (e.g. a loop of NOPs!) 26

27 RISC Processor: Example 2.4 Base Machine (Reg / Reg) Op Freq Cycles CPI(i) % Time ALU 50% 1 Load 20% 5 Store 10% 3 Branch 20% 2 What is average CPI? What percentage of time is spent in each instruction class? How much faster would the machine be if a better data cache reduced the average load time to 2 cycles? How does this compare with using branch prediction to shave a cycle off the branch time? What if two ALU instructions could be executed at once? 27

28 Performance assessment is tricky Performance is specific to particular program(s) Total execution time is a consistent summary of performance For a given architecture performance increases come from: increases in clock rate (without adverse CPI affects) improvements in processor organization that lower CPI compiler enhancements that lower CPI and/or instruction count Pitfall: expecting improvement in one aspect of a machine s performance to affect the total performance You should not always believe everything you read! Read carefully! 28

29 Discussions Sections for 141: Thursday, 7:30-8:30 WLH-2205 Office Hour: Tue. 7:30-9:00 (Center 105) Wed. 5:00-6:00 PM (HSS 1330) By Appointment Announcements Reading Assignment Chapter 4. Assessing and Understanding Performance Sections Homework 3: Due Mon., July 11th in class 4.1, 4.2, 4.6, 4.7, 4.8, 4.9, 4.12, 4.19, 4.22, 4.45 Quiz When: Mon., July 11th, First 10 minutes of the class Topic: Performance, Chapter 4 Need: Paper, pen 29

30 Datapath and Control Design The Five Classic Components of a Computer Processor Control Memory Input Datapath Output 30

31 Two Types of Logic Components Combinational Elements that operate on data values Produces same output if given same inputs State Elements Contains internal storage May produce different output if given same inputs Clock is used to determine when a state element(s) should be written A B State Element clk A B Combinational Logic C = f(a,b,state) C = f(a,b) 31

32 Clock Clock is a free running signal Fixed cycle time (period) Frequency = 1/(cycle time) Duty Cycle: (% high)/(%low), e.g. 50/50 Duty Cycle below Jitter: Uncertainty/wobble in rising or falling edge Rising Edge Falling Edge Clock Cycle (Period) 32

33 Storage Elements D Latch Two inputs: the data value to be stored (D) the clock signal (C) indicating when to read & store D Two outputs: the value of the internal state (Q) and it's complement C Q D D _ Q C Q Falling edge triggered D flip-flop Output changes only on the clock edge D D D Q latch C D Q D latch _ C Q Q _ Q D C C Q 33

34 Edge-triggered Clocking Values stored in the machine are updated on a clock edge The clock edge can be either rising or falling State element 1 Combinational logic State element 2 State element 1 Combinational logic State element 1 Clock cycle Clock cycle By default a state element is written every clock edge An explicit write control signal is required otherwise. Edge triggered methodology allows, in the same clock cycle to: read the contents of a register send the value through some combinational logic, and write the contents of the same or another register Possible to have the same state element as input and output 34

35 CPU: Clocking Clk Setup Hold Don t Care Setup Hold CLK CLK All storage elements are clocked by the same clock edge 35

36 Register: A Storage Element Similar to the D Flip Flop except N-bit input and output Write Enable input Write Enable: 0: Data Out will not change 1: Data Out will become Data In (on the clock edge) Write Enable Data In N Data Out N Clk 36

37 Register File Register File consists of (32) registers: Two 32-bit output busses: busa and busb One 32-bit input bus: busw Register is selected by: RA selects the register to put on busa RB selects the register to put on busb RW selects the register to be written via busw when Write Enable is 1 Clock input (CLK) Write Enable busw 32 Clk RW RA RB bit Registers busa 32 busb 32 37

38 Memory Write Enable Address Memory One input bus: Data In One output bus: Data Out Memory word is selected by: Address selects the word to put on Data Out Write Enable = 1: address selects the memory word to be written via the Data In bus Clock input (CLK) Data In DataOut Clk The CLK input is a factor ONLY during write operation During read operation, behaves as a combinational logic block: Address valid => Data Out valid after access time. 38

39 Basic 4 x 2 Static RAM Din[1] Din[0] Write enable D D C latch Enable Q D D C latch Enable Q 0 2-to-4 decoder D C D latch Q D C D latch Q Enable Enable 1 Address D C D latch Q D C D latch Q Enable Enable 2 D C D latch Q D C D latch Q Enable Enable 3 Dout[1] Dout[0] 39

40 Register Transfer Language (RTL) Mechanism for describing the movement and manipulation of of data between storage elements. Example: R[rd] R[rs] + R[rt] PC PC + 4 R[rt] Mem[R[rs] + immediate] 40

41 A Simple Implementation of MIPS CPU Simplified to contain only: Memory-reference instructions: lw, sw Arithmetic-logical instructions: add, sub, and, or, slt Control flow instructions: beq, j Execution Time = Instructions * CPI * Cycle Time Processor design (datapath and control) will determine: Clock cycle time Clock cycles per instruction We will design a single cycle processor: Advantage: One clock cycle per instruction Disadvantage: long cycle time 41

42 Arithmetic Instructions (R-Type) ADD, SUB, AND, OR, SLT Example add rd, rs, rt s0 21 s5 16 t op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits 0 e.g. add $t3, $s0, $s5 REG[$t3] = REG[$s0] + REG[$s5] 42

43 Load/Store Instructions (I-Type) LW, SW Examples lw rt, rs, imm16 sw rt, rs, imm s2 21 s op rs rt immediate 6 bits 5 bits 5 bits 16 bits 0 e.g. lw $s3, -4($s2) REG[$s3] = D-MEM[ REG[$s2] - 4 ] 43

44 Branch (I-Type) Beq Example beq rs, rt, imm s1 21 t op rs rt displacement 6 bits 5 bits 5 bits 16 bits e.g. 0x4c beq $s1, $t3, -12 if( REG[$s1] == REG[$t3] ) { new_pc = old_pc # new_pc = 0x44 } else { new_pc = old_pc + 4 # new_pc = 0x50 } 0 44

45 Jump (J-Type) J Example J Label x op target address 6 bits 26 bits 0 e.g. 0x j Label Label: 0x ADD $s3, $s5, $t1 new_pc = 0x

46 Single Cycle Implementation Datapath and Control Instruction Fetch Instruction Decode Operand Fetch Execute Result Store Clock Cycle I. Fetch Decode Op. Fetch Execute Store Next PC Complete Execution of a Single Instruction Next Instruction 46

47 Components Required to implement the ISA Next PC generation Add 4 or extended 16-bit immediate to PC Memory Instruction read Data read/write Registers (32 x 32-bit) Read register rs Read register rt Write register rt or rd Sign extend immediate operand ALU to operate on the operands 47

48 Datapath Abstract / Simplified View: Data Register # PC Address Instruction Instruction Registers Register # ALU memory Register # Address Data memory Data 48

49 CPU: Instruction Fetch RTL version of the instruction fetch step: Fetch the Instruction: mem[pc] Update the program counter: Sequential Code: PC PC + 4 Branch and Jump: PC something else Clk PC 4 Address Instruction Memory Adder 32 Instruction Word 49

50 CPU: Register-Register Operations (Add, Subtract etc.) R[rd] R[rs] op R[rt] Example: addu rd, rs, rt Ra, Rb, and Rw come from instruction s rs, rt, and rd fields ALUctr and RegWr: control logic after decoding the instruction op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits 0 RegWr busw 32 Clk Rd Rs Rt Rw Ra Rb bit Registers busa 32 busb 32 ALUctr ALU 32 Result 50

51 CPU: Load Operations R[rt] Mem[R[rs] + SignExt[imm16]] Example: lw rt, rs, imm op rs rt immediate 6 bits 5 bits 5 bits 16 bits 0 Rd Rt RegDst Mux Rs Rt RegWr busw 32 Clk imm16 Rw Ra Rb bit Registers 16 busb 32 Extender busa Mux ALUSrc ALUctr ALU Data In 32 Clk 32 MemWr WrEn Adr Data Memory 32 W_Src Mux ExtOp 51

52 CPU: Store Operations Mem[ R[rs] + SignExt[imm16] R[rt] ] Example: sw rt, rs, imm op rs rt immediate 6 bits 5 bits 5 bits 16 bits 0 RegDst busw 32 Clk Rd Mux Rt RegWr 5 5 imm16 Rs 5 Rw Ra Rb bit Registers 16 Rt busb 32 Extender busa Mux ALUctr ALU Data In 32 Clk 32 MemWr WrEn Adr Data Memory 32 W_Src Mux ExtOp ALUSrc 52

53 CPU: Datapath for Branching beq rs, rt, imm Datapath generates condition (equal) 16 op rs rt immediate 6 bits 5 bits 5 bits 16 bits Instruction Address 0 Cond 4 imm16 PC Ext npc_sel Mux Adder Adder PC 00 Clk 32 busw Clk Rs RegWr Rw Ra Rb bit Registers Rt busa 32 busb 32 Equal? Sign extend to 32 bits and left shift by 2 53

54 CPU: Binary arithmetic for PC In theory, the PC is a 32-bit byte address into the instruction memory: Sequential operation: PC<31:0> = PC<31:0> + 4 Branch operation: PC<31:0> = PC<31:0> SignExt[Imm16] * 4 The magic number 4 always comes up because: The 32-bit PC is a byte address And all our instructions are 4 bytes (32 bits) long In other words: The 2 LSBs of the 32-bit PC are always zeros There is no reason to have hardware to keep the 2 LSBs In practice, we can simplify the hardware by using a 30-bit PC<31:2>: Sequential operation: PC<31:2> = PC<31:2> + 1 Branch operation: PC<31:2> = PC<31:2> SignExt[Imm16] In either case: Instruction Memory Address = PC<31:2> concat 00 54

55 Single Cycle Implementation Putting it all together Supports Arithmetic, Load/Store and Branch instructions PCSrc 4 Add RegWrite Shift left 2 Add ALU result 1 M u x 0 PC Read address Instruction [31 0] Instruction memory Instruction [25 21] Instruction [20 16] 1 M u Instruction [15 11] x 0 RegDst Instruction [15 0] Read register 1 Read register 2 Write register Write data Read data 1 Read data 2 Registers 16 Sign 32 extend ALUSrc 1 M u x 0 ALU control ALU Zero ALU result MemWrite Address Write data Data memory MemRead Read data MemtoReg 1 M u x 0 Instruction [5 0] ALUOp 55

56 Discussions Sections for 141: Thursday, 7:30-8:30 WLH-2205 Office Hour: Tue. 7:30-9:00 (Center 105) Wed. 5:00-6:00 PM (HSS 1330) By Appointment Announcements Reading Assignment Chapter 4. Assessing and Understanding Performance Sections Homework 3: Due Mon., July 11th in class 4.1, 4.2, 4.6, 4.7, 4.8, 4.9, 4.12, 4.19, 4.22, 4.45 Quiz When: Mon., July 11th, First 10 minutes of the class Topic: Performance, Chapter 4 Need: Paper, pen 56

CSE 141 Computer Architecture Summer Session Lecture 3 ALU Part 2 Single Cycle CPU Part 1. Pramod V. Argade

CSE 141 Computer Architecture Summer Session Lecture 3 ALU Part 2 Single Cycle CPU Part 1. Pramod V. Argade CSE 141 Computer Architecture Summer Session 1 2004 Lecture 3 ALU Part 2 Single Cycle CPU Part 1 Pramod V. Argade Reading Assignment Announcements Chapter 5: The Processor: Datapath and Control, Sec. 5.3-5.4

More information

Measure, Report, and Summarize Make intelligent choices See through the marketing hype Key to understanding effects of underlying architecture

Measure, Report, and Summarize Make intelligent choices See through the marketing hype Key to understanding effects of underlying architecture Chapter 2 Note: The slides being presented represent a mix. Some are created by Mark Franklin, Washington University in St. Louis, Dept. of CSE. Many are taken from the Patterson & Hennessy book, Computer

More information

361 datapath.1. Computer Architecture EECS 361 Lecture 8: Designing a Single Cycle Datapath

361 datapath.1. Computer Architecture EECS 361 Lecture 8: Designing a Single Cycle Datapath 361 datapath.1 Computer Architecture EECS 361 Lecture 8: Designing a Single Cycle Datapath Outline of Today s Lecture Introduction Where are we with respect to the BIG picture? Questions and Administrative

More information

CSE 141 Computer Architecture Summer Session Lecture 2 Performance, ALU. Pramod V. Argade

CSE 141 Computer Architecture Summer Session Lecture 2 Performance, ALU. Pramod V. Argade CSE 141 Computer Architecture Summer Session 1 24 Lecture 2 Performance, ALU Pramod V. Argade CSE141: Introduction to Computer Architecture Instructor: TA: Pramod V. Argade (p2argade@cs.ucsd.edu) Office

More information

CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath

CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath CPE 442 single-cycle datapath.1 Outline of Today s Lecture Recap and Introduction Where are we with respect to the BIG picture?

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

Computer Performance Evaluation: Cycles Per Instruction (CPI)

Computer Performance Evaluation: Cycles Per Instruction (CPI) Computer Performance Evaluation: Cycles Per Instruction (CPI) Most computers run synchronously utilizing a CPU clock running at a constant clock rate: where: Clock rate = 1 / clock cycle A computer machine

More information

The Big Picture: Where are We Now? EEM 486: Computer Architecture. Lecture 3. Designing a Single Cycle Datapath

The Big Picture: Where are We Now? EEM 486: Computer Architecture. Lecture 3. Designing a Single Cycle Datapath The Big Picture: Where are We Now? EEM 486: Computer Architecture Lecture 3 The Five Classic Components of a Computer Processor Input Control Memory Designing a Single Cycle path path Output Today s Topic:

More information

ECE468 Computer Organization and Architecture. Designing a Single Cycle Datapath

ECE468 Computer Organization and Architecture. Designing a Single Cycle Datapath ECE468 Computer Organization and Architecture Designing a Single Cycle Datapath ECE468 datapath1 The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor Control Input Datapath

More information

Outline. EEL-4713 Computer Architecture Designing a Single Cycle Datapath

Outline. EEL-4713 Computer Architecture Designing a Single Cycle Datapath Outline EEL-473 Computer Architecture Designing a Single Cycle path Introduction The steps of designing a processor path and timing for register-register operations path for logical operations with immediates

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

CS3350B Computer Architecture Winter Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2)

CS3350B Computer Architecture Winter Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2) CS335B Computer Architecture Winter 25 Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2) Marc Moreno Maza www.csd.uwo.ca/courses/cs335b [Adapted from lectures on Computer Organization and Design,

More information

CS61C : Machine Structures

CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #19 Designing a Single-Cycle CPU 27-7-26 Scott Beamer Instructor AI Focuses on Poker CS61C L19 CPU Design : Designing a Single-Cycle CPU

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

Ch 5: Designing a Single Cycle Datapath

Ch 5: Designing a Single Cycle Datapath Ch 5: esigning a Single Cycle path Computer Systems Architecture CS 365 The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor Control Memory path Input Output Today s Topic:

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

COMP303 Computer Architecture Lecture 9. Single Cycle Control

COMP303 Computer Architecture Lecture 9. Single Cycle Control COMP33 Computer Architecture Lecture 9 Single Cycle Control A Single Cycle Datapath We have everything except control signals (underlined) RegDst busw Today s lecture will look at how to generate the control

More information

CS 110 Computer Architecture Single-Cycle CPU Datapath & Control

CS 110 Computer Architecture Single-Cycle CPU Datapath & Control CS Computer Architecture Single-Cycle CPU Datapath & Control Instructor: Sören Schwertfeger http://shtech.org/courses/ca/ School of Information Science and Technology SIST ShanghaiTech University Slides

More information

Computer Performance. Reread Chapter Quiz on Friday. Study Session Wed Night FB 009, 5pm-6:30pm

Computer Performance. Reread Chapter Quiz on Friday. Study Session Wed Night FB 009, 5pm-6:30pm Computer Performance He said, to speed things up we need to squeeze the clock Reread Chapter 1.4-1.9 Quiz on Friday. Study Session Wed Night FB 009, 5pm-6:30pm L15 Computer Performance 1 Why Study Performance?

More information

Lecture #17: CPU Design II Control

Lecture #17: CPU Design II Control Lecture #7: CPU Design II Control 25-7-9 Anatomy: 5 components of any Computer Personal Computer Computer Processor Control ( brain ) This week ( ) path ( brawn ) (where programs, data live when running)

More information

361 control.1. EECS 361 Computer Architecture Lecture 9: Designing Single Cycle Control

361 control.1. EECS 361 Computer Architecture Lecture 9: Designing Single Cycle Control 36 control. EECS 36 Computer Architecture Lecture 9: Designing Single Cycle Control Recap: The MIPS Subset ADD and subtract add rd, rs, rt sub rd, rs, rt OR Imm: ori rt, rs, imm6 3 3 26 2 6 op rs rt rd

More information

Major CPU Design Steps

Major CPU Design Steps Datapath Major CPU Design Steps. Analyze instruction set operations using independent RTN ISA => RTN => datapath requirements. This provides the the required datapath components and how they are connected

More information

MIPS-Lite Single-Cycle Control

MIPS-Lite Single-Cycle Control MIPS-Lite Single-Cycle Control COE68: Computer Organization and Architecture Dr. Gul N. Khan http://www.ee.ryerson.ca/~gnkhan Electrical and Computer Engineering Ryerson University Overview Single cycle

More information

CS61C : Machine Structures

CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #17 Single Cycle CPU Datapath CPS today! 2005-10-31 There is one handout today at the front and back of the room! Lecturer PSOE, new dad

More information

CS 61C: Great Ideas in Computer Architecture Control and Pipelining

CS 61C: Great Ideas in Computer Architecture Control and Pipelining CS 6C: Great Ideas in Computer Architecture Control and Pipelining Instructors: Vladimir Stojanovic and Nicholas Weaver http://inst.eecs.berkeley.edu/~cs6c/sp6 Datapath Control Signals ExtOp: zero, sign

More information

University of California College of Engineering Computer Science Division -EECS. CS 152 Midterm I

University of California College of Engineering Computer Science Division -EECS. CS 152 Midterm I Name: University of California College of Engineering Computer Science Division -EECS Fall 996 D.E. Culler CS 52 Midterm I Your Name: ID Number: Discussion Section: You may bring one double-sided pages

More information

CPU Design Steps. EECC550 - Shaaban

CPU Design Steps. EECC550 - Shaaban CPU Design Steps 1. Analyze instruction set operations using independent RTN => datapath requirements. 2. Select set of datapath components & establish clock methodology. 3. Assemble datapath meeting the

More information

CS61C : Machine Structures

CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 34 Single Cycle CPU Control I 24-4-16 Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia 1.5 Quake?! NBC movie on May 3 rd. Truth stranger

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

Designing a Multicycle Processor

Designing a Multicycle Processor Designing a Multicycle Processor Arquitectura de Computadoras Arturo Díaz D PérezP Centro de Investigación n y de Estudios Avanzados del IPN adiaz@cinvestav.mx Arquitectura de Computadoras Multicycle-

More information

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 28: Single- Cycle CPU Datapath Control Part 1

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 28: Single- Cycle CPU Datapath Control Part 1 CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 28: Single- Cycle CPU Datapath Control Part 1 Guest Lecturer: Sagar Karandikar hfp://inst.eecs.berkeley.edu/~cs61c/ http://research.microsoft.com/apps/pubs/default.aspx?id=212001!

More information

4. What is the average CPI of a 1.4 GHz machine that executes 12.5 million instructions in 12 seconds?

4. What is the average CPI of a 1.4 GHz machine that executes 12.5 million instructions in 12 seconds? Chapter 4: Assessing and Understanding Performance 1. Define response (execution) time. 2. Define throughput. 3. Describe why using the clock rate of a processor is a bad way to measure performance. Provide

More information

Working on the Pipeline

Working on the Pipeline Computer Science 6C Spring 27 Working on the Pipeline Datapath Control Signals Computer Science 6C Spring 27 MemWr: write memory MemtoReg: ALU; Mem RegDst: rt ; rd RegWr: write register 4 PC Ext Imm6 Adder

More information

The Von Neumann Computer Model

The Von Neumann Computer Model The Von Neumann Computer Model Partitioning of the computing engine into components: Central Processing Unit (CPU): Control Unit (instruction decode, sequencing of operations), Datapath (registers, arithmetic

More information

Lecture 6 Datapath and Controller

Lecture 6 Datapath and Controller Lecture 6 Datapath and Controller Peng Liu liupeng@zju.edu.cn Windows Editor and Word Processing UltraEdit, EditPlus Gvim Linux or Mac IOS Emacs vi or vim Word Processing(Windows, Linux, and Mac IOS) LaTex

More information

UC Berkeley CS61C : Machine Structures

UC Berkeley CS61C : Machine Structures inst.eecs.berkeley.edu/~cs6c UC Berkeley CS6C : Machine Structures The Internet is broken?! The Clean Slate team at Stanford wants to revamp the Internet, making it safer (from viruses), more reliable

More information

UC Berkeley CS61C : Machine Structures

UC Berkeley CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures Lecture 25 CPU Design: Designing a Single-cycle CPU Lecturer SOE Dan Garcia www.cs.berkeley.edu/~ddgarcia T-Mobile s Wi-Fi / Cell phone

More information

ECE170 Computer Architecture. Single Cycle Control. Review: 3b: Add & Subtract. Review: 3e: Store Operations. Review: 3d: Load Operations

ECE170 Computer Architecture. Single Cycle Control. Review: 3b: Add & Subtract. Review: 3e: Store Operations. Review: 3d: Load Operations ECE7 Computer Architecture Single Cycle Control Review: 3a: Overview of the Fetch Unit The common operations Fetch the : mem[] Update the program counter: Sequential Code: < + Branch and Jump: < something

More information

The Processor: Datapath & Control

The Processor: Datapath & Control Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture The Processor: Datapath & Control Processor Design Step 3 Assemble Datapath Meeting Requirements Build the

More information

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 18 CPU Design: The Single-Cycle I ! Nasty new windows vulnerability!

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 18 CPU Design: The Single-Cycle I ! Nasty new windows vulnerability! inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 18 CPU Design: The Single-Cycle I CS61C L18 CPU Design: The Single-Cycle I (1)! 2010-07-21!!!Instructor Paul Pearce! Nasty new windows vulnerability!

More information

Single Cycle CPU Design. Mehran Rezaei

Single Cycle CPU Design. Mehran Rezaei Single Cycle CPU Design Mehran Rezaei What does it mean? Instruction Fetch Instruction Memory clk pc 32 32 address add $t,$t,$t2 instruction Next Logic to generate the address of next instruction The Branch

More information

Full Datapath. CSCI 402: Computer Architectures. The Processor (2) 3/21/19. Fengguang Song Department of Computer & Information Science IUPUI

Full Datapath. CSCI 402: Computer Architectures. The Processor (2) 3/21/19. Fengguang Song Department of Computer & Information Science IUPUI CSCI 42: Computer Architectures The Processor (2) Fengguang Song Department of Computer & Information Science IUPUI Full Datapath Branch Target Instruction Fetch Immediate 4 Today s Contents We have looked

More information

How to design a controller to produce signals to control the datapath

How to design a controller to produce signals to control the datapath ECE48 Computer Organization and Architecture Designing Single Cycle How to design a controller to produce signals to control the datapath ECE48. 2--7 Recap: The MIPS Formats All MIPS instructions are bits

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

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU Datapath & Control Part 2

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU Datapath & Control Part 2 CS 6C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU Datapath & Control Part 2 Instructors: Krste Asanovic & Vladimir Stojanovic hfp://inst.eecs.berkeley.edu/~cs6c/ Review:

More information

CPSC614: Computer Architecture

CPSC614: Computer Architecture CPSC614: Computer Architecture E.J. Kim Texas A&M University Computer Science & Engineering Department Assignment 1, Due Thursday Feb/9 Spring 2017 1. A certain benchmark contains 195,700 floating-point

More information

UC Berkeley CS61C : Machine Structures

UC Berkeley CS61C : Machine Structures inst.eecs.berkeley.edu/~cs6c UC Berkeley CS6C : Machine Structures Lecture 26 Single-cycle CPU Control 27-3-2 Exhausted TA Ben Sussman www.icanhascheezburger.com Qutrits Bring Quantum Computers Closer:

More information

Review. N-bit adder-subtractor done using N 1- bit adders with XOR gates on input. Lecture #19 Designing a Single-Cycle CPU

Review. N-bit adder-subtractor done using N 1- bit adders with XOR gates on input. Lecture #19 Designing a Single-Cycle CPU CS6C L9 CPU Design : Designing a Single-Cycle CPU () insteecsberkeleyedu/~cs6c CS6C : Machine Structures Lecture #9 Designing a Single-Cycle CPU 27-7-26 Scott Beamer Instructor AI Focuses on Poker Review

More information

CS 152 Computer Architecture and Engineering. Lecture 10: Designing a Multicycle Processor

CS 152 Computer Architecture and Engineering. Lecture 10: Designing a Multicycle Processor CS 152 Computer Architecture and Engineering Lecture 1: Designing a Multicycle Processor October 1, 1997 Dave Patterson (http.cs.berkeley.edu/~patterson) lecture slides: http://www-inst.eecs.berkeley.edu/~cs152/

More information

Midterm I March 3, 1999 CS152 Computer Architecture and Engineering

Midterm I March 3, 1999 CS152 Computer Architecture and Engineering University of California, Berkeley College of Engineering Computer Science Division EECS Spring 1999 John Kubiatowicz Midterm I March 3, 1999 CS152 Computer Architecture and Engineering Your Name: SID

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

CSCI 402: Computer Architectures. Fengguang Song Department of Computer & Information Science IUPUI. Today s Content

CSCI 402: Computer Architectures. Fengguang Song Department of Computer & Information Science IUPUI. Today s Content 3/6/8 CSCI 42: Computer Architectures The Processor (2) Fengguang Song Department of Computer & Information Science IUPUI Today s Content We have looked at how to design a Data Path. 4.4, 4.5 We will design

More information

CS359: Computer Architecture. The Processor (A) Yanyan Shen Department of Computer Science and Engineering

CS359: Computer Architecture. The Processor (A) Yanyan Shen Department of Computer Science and Engineering CS359: Computer Architecture The Processor (A) Yanyan Shen Department of Computer Science and Engineering Eecuting R-type Instructions 7 Instructions ADD and subtract add rd, rs, rt sub rd, rs, rt OR Immediate:

More information

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements CSE141: Introduction to Computer Architecture CSE 141 Computer Architecture Spring 2005 Lecture 3 Instruction Set Architecute Pramod V. Argade April 4, 2005 Instructor: TAs: Pramod V. Argade (p2argade@cs.ucsd.edu)

More information

Defining Performance. Performance. Which airplane has the best performance? Boeing 777. Boeing 777. Boeing 747. Boeing 747

Defining Performance. Performance. Which airplane has the best performance? Boeing 777. Boeing 777. Boeing 747. Boeing 747 Defining Which airplane has the best performance? 1 Boeing 777 Boeing 777 Boeing 747 BAC/Sud Concorde Douglas DC-8-50 Boeing 747 BAC/Sud Concorde Douglas DC- 8-50 0 100 200 300 400 500 Passenger Capacity

More information

Defining Performance. Performance 1. Which airplane has the best performance? Computer Organization II Ribbens & McQuain.

Defining Performance. Performance 1. Which airplane has the best performance? Computer Organization II Ribbens & McQuain. Defining Performance Performance 1 Which airplane has the best performance? Boeing 777 Boeing 777 Boeing 747 BAC/Sud Concorde Douglas DC-8-50 Boeing 747 BAC/Sud Concorde Douglas DC- 8-50 0 100 200 300

More information

IC220 Slide Set #5B: Performance (Chapter 1: 1.6, )

IC220 Slide Set #5B: Performance (Chapter 1: 1.6, ) Performance IC220 Slide Set #5B: Performance (Chapter 1: 1.6, 1.9-1.11) Measure, Report, and Summarize Make intelligent choices See through the marketing hype Key to understanding underlying organizational

More information

CS 61C: Great Ideas in Computer Architecture Lecture 12: Single- Cycle CPU, Datapath & Control Part 2

CS 61C: Great Ideas in Computer Architecture Lecture 12: Single- Cycle CPU, Datapath & Control Part 2 CS 6C: Great Ideas in Computer Architecture Lecture 2: Single- Cycle CPU, Datapath & Control Part 2 Instructor: Sagar Karandikar sagark@eecs.berkeley.edu hbp://inst.eecs.berkeley.edu/~cs6c Midterm Results

More information

CS152 Computer Architecture and Engineering Lecture 10: Designing a Single Cycle Control. Recap: The MIPS Instruction Formats

CS152 Computer Architecture and Engineering Lecture 10: Designing a Single Cycle Control. Recap: The MIPS Instruction Formats CS52 Computer Architecture and Engineering Lecture : Designing a Single Cycle February 7, 995 Dave Patterson (patterson@cs) and Shing Kong (shing.kong@eng.sun.com) Slides available on http://http.cs.berkeley.edu/~patterson

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

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

Introduction to Pipelined Datapath

Introduction to Pipelined Datapath 14:332:331 Computer Architecture and Assembly Language Week 12 Introduction to Pipelined Datapath [Adapted from Dave Patterson s UCB CS152 slides and Mary Jane Irwin s PSU CSE331 slides] 331 W12.1 Review:

More information

CS61C : Machine Structures

CS61C : Machine Structures CS 61C L path (1) insteecsberkeleyedu/~cs61c/su6 CS61C : Machine Structures Lecture # path natomy: 5 components of any Computer Personal Computer -7-25 This week Computer Processor ( brain ) path ( brawn

More information

Midterm I October 6, 1999 CS152 Computer Architecture and Engineering

Midterm I October 6, 1999 CS152 Computer Architecture and Engineering University of California, Berkeley College of Engineering Computer Science Division EECS Fall 1999 John Kubiatowicz Midterm I October 6, 1999 CS152 Computer Architecture and Engineering Your Name: SID

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

EEM 486: Computer Architecture. Lecture 3. Designing Single Cycle Control

EEM 486: Computer Architecture. Lecture 3. Designing Single Cycle Control EEM 48: Computer Architecture Lecture 3 Designing Single Cycle The Big Picture: Where are We Now? Processor Input path Output Lec 3.2 An Abstract View of the Implementation Ideal Address Net Address PC

More information

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU Datapath Control Part 1

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU Datapath Control Part 1 CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU Datapath Control Part 1 Instructors: Krste Asanovic & Vladimir Stojanovic hfp://inst.eecs.berkeley.edu/~cs61c/ Review

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

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

COSC3330 Computer Architecture Lecture 7. Datapath and Performance

COSC3330 Computer Architecture Lecture 7. Datapath and Performance COSC3330 Computer Architecture Lecture 7. Datapath and Performance Instructor: Weidong Shi (Larry), PhD Computer Science Department University of Houston Datapath Performance 2 Datapath Control Signals

More information

Instructor: Randy H. Katz hcp://inst.eecs.berkeley.edu/~cs61c/fa13. Fall Lecture #18. Warehouse Scale Computer

Instructor: Randy H. Katz hcp://inst.eecs.berkeley.edu/~cs61c/fa13. Fall Lecture #18. Warehouse Scale Computer /29/3 CS 6C: Great Ideas in Computer Architecture Building Blocks for Datapaths Instructor: Randy H. Katz hcp://inst.eecs.berkeley.edu/~cs6c/fa3 /27/3 Fall 23 - - Lecture #8 So5ware Parallel Requests Assigned

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

The character of the instruction scheduling problem

The character of the instruction scheduling problem The character of the instruction scheduling problem Darko Stefanović Department of Computer Science University of Massachusetts March 997 Abstract Here I present some measurements that serve to characterize

More information

COMP303 - Computer Architecture Lecture 10. Multi-Cycle Design & Exceptions

COMP303 - Computer Architecture Lecture 10. Multi-Cycle Design & Exceptions COP33 - Computer Architecture Lecture ulti-cycle Design & Exceptions Single Cycle Datapath We designed a processor that requires one cycle per instruction RegDst busw 32 Clk RegWr Rd ux imm6 Rt 5 5 Rs

More information

Midterm I March 12, 2003 CS152 Computer Architecture and Engineering

Midterm I March 12, 2003 CS152 Computer Architecture and Engineering University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2003 John Kubiatowicz Midterm I March 2, 2003 CS52 Computer Architecture and Engineering Your Name: SID Number:

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

Recap: A Single Cycle Datapath. CS 152 Computer Architecture and Engineering Lecture 8. Single-Cycle (Con t) Designing a Multicycle Processor

Recap: A Single Cycle Datapath. CS 152 Computer Architecture and Engineering Lecture 8. Single-Cycle (Con t) Designing a Multicycle Processor CS 52 Computer Architecture and Engineering Lecture 8 Single-Cycle (Con t) Designing a Multicycle Processor February 23, 24 John Kubiatowicz (www.cs.berkeley.edu/~kubitron) lecture slides: http://inst.eecs.berkeley.edu/~cs52/

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 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

Lecture 10: Simple Data Path

Lecture 10: Simple Data Path Lecture 10: Simple Data Path Course so far Performance comparisons Amdahl s law ISA function & principles What do bits mean? Computer math Today Take QUIZ 6 over P&H.1-, before 11:59pm today How do computers

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

Lecture 7 Pipelining. Peng Liu.

Lecture 7 Pipelining. Peng Liu. Lecture 7 Pipelining Peng Liu liupeng@zju.edu.cn 1 Review: The Single Cycle Processor 2 Review: Given Datapath,RTL -> Control Instruction Inst Memory Adr Op Fun Rt

More information

CpE 442. Designing a Multiple Cycle Controller

CpE 442. Designing a Multiple Cycle Controller CpE 442 Designing a Multiple Cycle Controller CPE 442 multicontroller.. Outline of Today s Lecture Recap (5 minutes) Review of FSM control (5 minutes) From Finite State Diagrams to Microprogramming (25

More information

Quantifying Performance EEC 170 Fall 2005 Chapter 4

Quantifying Performance EEC 170 Fall 2005 Chapter 4 Quantifying Performance EEC 70 Fall 2005 Chapter 4 Performance Measure, Report, and Summarize Make intelligent choices See through the marketing hype Key to understanding underlying organizational motivation

More information

Topic #6. Processor Design

Topic #6. Processor Design Topic #6 Processor Design Major Goals! To present the single-cycle implementation and to develop the student's understanding of combinational and clocked sequential circuits and the relationship between

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

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

CS152 Computer Architecture and Engineering. Lecture 8 Multicycle Design and Microcode John Lazzaro (www.cs.berkeley.

CS152 Computer Architecture and Engineering. Lecture 8 Multicycle Design and Microcode John Lazzaro (www.cs.berkeley. CS152 Computer Architecture and Engineering Lecture 8 Multicycle Design and Microcode 2004-09-23 John Lazzaro (www.cs.berkeley.edu/~lazzaro) Dave Patterson (www.cs.berkeley.edu/~patterson) www-inst.eecs.berkeley.edu/~cs152/

More information

Lecture 12: Single-Cycle Control Unit. Spring 2018 Jason Tang

Lecture 12: Single-Cycle Control Unit. Spring 2018 Jason Tang Lecture 12: Single-Cycle Control Unit Spring 2018 Jason Tang 1 Topics Control unit design Single cycle processor Control unit circuit implementation 2 Computer Organization Computer Processor Memory Devices

More information

Adding Support for jal to Single Cycle Datapath (For More Practice Exercise 5.20)

Adding Support for jal to Single Cycle Datapath (For More Practice Exercise 5.20) Adding Support for jal to Single Cycle Datapath (For More Practice Exercise 5.20) The MIPS jump and link instruction, jal is used to support procedure calls by jumping to jump address (similar to j ) and

More information

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 19 CPU Design: The Single-Cycle II & Control !

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 19 CPU Design: The Single-Cycle II & Control ! inst.eecs.berkeley.edu/~cs6c CS6C : Machine Structures Lecture 9 CPU Design: The Single-Cycle II & Control 2-7-22!!!Instructor Paul Pearce! Dell may have shipped infected motherboards! Dell is warning

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

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

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

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

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

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

CPU Performance Evaluation: Cycles Per Instruction (CPI) Most computers run synchronously utilizing a CPU clock running at a constant clock rate:

CPU Performance Evaluation: Cycles Per Instruction (CPI) Most computers run synchronously utilizing a CPU clock running at a constant clock rate: CPI CPU Performance Evaluation: Cycles Per Instruction (CPI) Most computers run synchronously utilizing a CPU clock running at a constant clock rate: Clock cycle where: Clock rate = 1 / clock cycle f =

More information

COMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H

COMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface Chapter 4 The Processor: A Based on P&H Introduction We will examine two MIPS implementations A simplified version A more realistic pipelined

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