Lecture 7. Building A Simple Processor

Size: px
Start display at page:

Download "Lecture 7. Building A Simple Processor"

Transcription

1 Lectre 7 Bilding A Simple Processor Christos Kozyrakis Stanford University C. Kozyrakis EE8b Lectre 7

2 Annoncements Upcoming deadlines Lab is de today Demo by 5pm, report by midnight HW2 de on Thrsday 2/ PA de on Thrsday 2/8 Lab #2 is ot Learn from previos lab: start early Qiz #: Te 2/6, 7pm 9pm (location TBD) Catch-p with reading material C. Kozyrakis EE8b Lectre 7 2

3 Review: Translation Hierarchy High-level Assembly achine.c C Program Compiler.s Assembly Program Assembler.o achine Object Eectable odle Object Linker Loader emory C. Kozyrakis EE8b Lectre 7 3

4 Review: Code Optimization Goal: Improve performance by: Removing redndant work Unreachable code Common-sbepression elimination Indction variable elimination Creating simpler operations Dealing with constants in the compiler Strength redction anaging registers well Eection Time= Instrctions CPI Clock Cycle Time C. Kozyrakis EE8b Lectre 7 4

5 Assembler Epands macros and psedoinstrctions as well as converts constants Primary prpose is to prodce an object file achine langage instrctions Application Information for memory organization C. Kozyrakis EE8b Lectre 7 5

6 Object File Incldes Object header Describes file organization Tet segment achine code Data segment Static (initialized) Relocation information Symbol table Debgging information Identifies instrction & that depend on absolte address when the program is loaded Lit of labels that are not defined (e.g. eternal references) Describes relationship between sorce code and machine instrctions C. Kozyrakis EE8b Lectre 7 6

7 Linker Linker combines mltiple object modles Identify where code/ will be placed in memory Resolve code/ cross references Prodces eectable if all references fond Steps. Place code and modles in memory 2. Determine the address of and instrction labels 3. Patch both the internal and eternal references Separation between compiler and linker makes standard libraries an efficient soltion to maintaining modlar code C. Kozyrakis EE8b Lectre 7 7

8 Loader Loader sed at rn-time. s eectable file header for size of tet/ segments 2. Create address space sfficiently large 3. Copy program from eectable on disk into memory 4. Copy argments to main program s stack 5. Initialize machine registers and set stack pointer 6. Jmp to start-p rotine 7. Terminate program when eection completes C. Kozyrakis EE8b Lectre 7 8

9 What We Really Want? To go from Some goal like Find N! C. Kozyrakis EE8b Lectre 7 9

10 How to solve a comple problem Specification Break problem into simpler steps Specify goal in eectable forms Algorithm Coding in high langage (like C) Translate into even simpler steps Set of conventions to operate Compiler Translate into simpler instrctions Processor Eecte instrctions as fast as possible C. Kozyrakis EE8b Lectre 7

11 How To Bild A Processor (or any comple hardware) Break operation down to steps even gates can nderstand Generally decompose task into two kinds of operations Things that deal with the real (Datapath) Things that control the stff operating on the real (Control) Find a decomposition that is simple, and efficient Some are obvios, others can be more sbtle We will start simple stff to improve performance C. Kozyrakis EE8b Lectre 7

12 How to Eecte Instrctions First we need to: Fetch the instrction Then we need to: Decode instrction / fetch register operands Then we need to: Do the operation Then we need to: Write the reslt into register-file Finally we need to: Calclate the net instrction address C. Kozyrakis EE8b Lectre 7 2

13 How to Eecte Instrctions First we need to: Fetch the instrction Then we need to: Decode instrction / fetch register operands Then we need to: Do the operation Then we need to: Write the reslt into register-file Finally we need to: Calclate the net instrction address C. Kozyrakis EE8b Lectre 7 3

14 Sbset of Instrctions To simplify or stdy of processor design, we will focs on a sbset of the IPS instrctions emory: lw and sw Arithmetic: add, sb, and, ori, and slt Branch: beq and j The method of implementing other instrctions shold come natrally from these C. Kozyrakis EE8b Lectre 7 4

15 Starting The Design Think of the steps needed for each instrction eection Become clear qickly we need to create a seqential process Instrctions cold take mltiple cycles or one cycle Steps that occr on each instrction: Fetch instrction from memory - address is specified by PC one or two registers Do add/sb/etc. sing ALU (see Appendi B.5) Fetch a vale from memory Store reslts to register-file/memory Needed state for single cycle machine: Instrction pointer (PC), 32 registers, (memory vales) C. Kozyrakis EE8b Lectre 7 5

16 Starting Dataflow ajor fnctional nits ajor connections C. Kozyrakis EE8b Lectre 7 6

17 Logic Design Review Combinational logic Otpt only depends on inpts If yo wait long enogh yo will get the right answer To bild a processor, we also need to bild seqential logic Need to separate signals across clock cycles They also provide temporary storage This is sally done with flip-flops (or latches) We will talk abot flop-based design in this class C. Kozyrakis EE8b Lectre 7 7

18 Combinational Elements Selec t Sm U X er UX 4 ALU control Zero ALU ALU reslt ALU C. Kozyrakis EE8b Lectre 7 8

19 D Flip Flops Samples its inpt on rising edge of clock Holds the vale it samples ntil net rising edge: C. Kozyrakis EE8b Lectre 7 9

20 Critical Timing Isses Clk Flops work great as long as inpt is stable when clock rises Called setp and hold windows Clock skew can case some nasty problems Hold time violations (we won t worry abot this in this class) Cycle Time = Longest Prop Delay + Setp + Clock Skew Setp Hold Don t Care Setp Hold C. Kozyrakis EE8b Lectre 7 2

21 emory Strctre emory strctres are generally specially designed Cold bild them from flops or latches Bt they wold be big, slow, and power hngry So circit designers create the basic design Create a modle generator for logic designers to se C. Kozyrakis EE8b Lectre 7 2

22 emory Diagram C. Kozyrakis EE8b Lectre 7 22

23 from/write to emory Interface to emory can be: Combinational (asynchronos) Clocked (synchronos) Combinational memory: is valid some delay after address lines settle There is no clock. Writes are tricky: mst spply a write plse in the middle of yor address and valid times Clocked memory (most common): emory looks like a standard synchronos device. ress and control signals are sampled on rising edge of clock, and is valid some nmber of cycles later C. Kozyrakis EE8b Lectre 7 23

24 emory Timing Combinational/Asynchronos: Synchronos C. Kozyrakis EE8b Lectre 7 24

25 emories In This Design They will be combinational Otherwise we can t complete an instrction in one cycle! Interface is simple: Inpts: ress DataIn WriteEn (WriteEn mst be a plse) Otpts: DataOt Register file: It has three address, two for reads, and one for write It is called a 3-port, since it can perform 3 accesses per cycle C. Kozyrakis EE8b Lectre 7 25

26 The First Task: Fetching The Instrction (IF) Not that comple Instr = em[pc] Fetch the instrction from memory Update program conter for net cycle What is the address of the net instrction? C. Kozyrakis EE8b Lectre 7 26

27 Datapath: IF Unit 4 PC address Instrction memory Instrction [3 ] C. Kozyrakis EE8b Lectre 7 27

28 What Did We Fetch? R-format I-format J-format OP= rs rt rd sa fnct First Sorce Register Second Sorce Register Reslt Register Shift Amont OP rs rt imm OP First Sorce Register Second Sorce Register 6 26 target Jmp Target ress Immediate Fnction Code C. Kozyrakis EE8b Lectre 7 28

29 Nice Characteristics of IPS achine Code Instrctions are fied length Don t need to decode first instrction to find net one Always add 4 bytes to instrction pointer Register specifiers are always in the same place Destination moves arond some, bt Sorce registers are always in the same place Or yo don t need that register Can fetch the registers BEFORE yo decode instrction Feed bits directly from the instrction memory C. Kozyrakis EE8b Lectre 7 29

30 Register to Register Operations In or sbset this is only add and sb I did not want to worry abot overflow add rd, rs, rt sb rd, rs, rt Operation R[rd] <- R[rs] + R[rt]; R[rd] <- R[rs] - R[rt]; operation Sb operation Bits OP= rs rt rd sa fnct First Sorce Register Second Sorce Register Reslt Register Shift Amont Fnction Code C. Kozyrakis EE8b Lectre 7 3

31 Datapath: Reg/Reg Ops R[rd] <- R[rs] op R[rt]; ALU operation and RegWrite based on decoded instrction Register, Register 2, and Write Register from rs, rt, and rd fields of instrction RegWrite Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers Write register Write 2 ALUOp Zero ALU ALU reslt C. Kozyrakis EE8b Lectre 7 3

32 OR Immediate RTL OR Immediate instrction ori rt, rs, imm R[rt] <- R[rs] OR ZeroEt(imm); eans I need to get instr[5:] into the path, on RT path Bits OP rs rt imm First Sorce Register Second Sorce Register Immediate C. Kozyrakis EE8b Lectre 7 32

33 Datapath: Immediate Ops Etend path to spport immediate operations Write register is rt or rd based on instrction 2 is ignored for immediates Immediates can be sign or zero etended ALUsrc and ALU operation set based on instrction RegWrite Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers Write 2 register Write ALUSrc ALUOp Zero ALU ALU reslt RegDst Instrction [5 ] 6 Sign 32 or Zero etend C. Kozyrakis EE8b Lectre 7 33

34 Load Load instrction lw rt, rs, imm r <- R[rs]+SignEt(imm); R[rt] <- em[r]; Compte memory address Load into register Notice this will se the immediate path as well Bits OP rs rt imm First Sorce Register Second Sorce Register Immediate C. Kozyrakis EE8b Lectre 7 34

35 Datapath: Load Etend path to spport other immediate operations Etender handles either sign or zero etension UX selects between ALU reslt and emory otpt RegWrite Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst register register 2 Registers Write 2 register Write 6 Sign 32 etend ALUSrc ALUOp Zero ALU ALU reslt ress Write emwrite Data memory em emtoreg C. Kozyrakis EE8b Lectre 7 35

36 Store Store instrction sw rt, rs, imm r <- R[rs]+SignEt(imm); em[r] <- R[rt]; Compte memory addr Load into register Bits OP rs rt imm First Sorce Register Second Sorce Register Immediate C. Kozyrakis EE8b Lectre 7 36

37 Datapath: Store Register 2 is passed on to emory emory address calclated jst as in lw case RegWrite Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst register register 2 Registers Write 2 register Write 6 Sign 32 etend ALUSrc ALUOp Zero ALU ALU reslt ress Write emwrite Data memory em emtoreg C. Kozyrakis EE8b Lectre 7 37

38 Branch Branch instrction beq rs, rt, imm Cond <- R[rs] R[rt]; Calclate branch condition if (cond eq ) Test if eqal PC <- PC SignEt(imm)*4 else PC <- PC + 4; Calclate net address Bits OP rs rt imm First Sorce Second Sorce Immediate C. Kozyrakis EE8b Lectre 7 38

39 The Net ress PC is byte-addressed into instrction memory Seqential PC[3:] = PC[3:] + 4 Branch operation PC[3:] = PC[3:] SignEt(imm) 4 Instrction resses PC is byte addressed, bt instrctions are 4 bytes long Simplify hardware by sing 3 bit PC Seqential PC[3:2] = PC[3:2] + Branch operation PC[3:2] = PC[3:2] + + SignEt(imm) C. Kozyrakis EE8b Lectre 7 39

40 Datapath: IF 3 3 ALU reslt Branch Zero PC address Instrction memory Instrction [3 ] Instrction [5 ] 6 Sign 3 etend C. Kozyrakis EE8b Lectre 7 4

41 Jmp RTL Jmp instrction j target PC[3:2] <- PC[3:29] target[25:]; Bits 6 26 OP target Jmp Target ress C. Kozyrakis EE8b Lectre 7 4

42 Datapath: IFU with Jmp UX selects psedodirect jmp target 32 P C [3 28] Instrction [25 ] 4 32 Shift left 2 ALU reslt Jmp Branch Zero PC address Instrction memory Instrction [3 ] C. Kozyrakis EE8b Lectre 7 42

43 Ptting it All Together P C [3 28] Instrction [25 ] 4 Shift left 2 ALU reslt Jmp Branch RegWrite PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst register register 2 Registers Write 2 register Write 6 Sign 32 etend ALUSrc ALUOp Eq ALU ALU reslt ress Write emwrite Data memory em emtoreg C. Kozyrakis EE8b Lectre 7 43

44 Control Since every instrction takes one cycle, control is state free! It is jst decoded instrction bits There are also few control points Control on the mltipleers Operation type for the ALU Write control on the Instrction & Data memories First part of cycle does not have any control Which is good, since we don t have instrction yet Look at setting of the control points for different instrctions C. Kozyrakis EE8b Lectre 7 44

45 At Beginning Of Clock Cycle P C [3 28] Instrction [25 ] 4 Shift left 2 ALU reslt Jmp <prev> Branch <prev> PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst <prev> Write <prev> RegWrite register register 2 Registers Write 2 register 6 Sign 32 etend <prev> ALUSrc <prev> ALUOp Zero ALU ALU reslt ress Write <prev> emwrite Data memory em <prev> <prev> emtoreg <prev> C. Kozyrakis EE8b Lectre 7 45

46 Control for Arithmetic P C [3 28] Instrction [25 ] 4 Shift left 2 ALU reslt Jmp Branch PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst Write RegWrite register register 2 Registers Write 2 register 6 Sign 32 etend X ALUSrc <op> ALUOp Zero ALU ALU reslt ress Write emwrite Data memory em emtoreg C. Kozyrakis EE8b Lectre 7 46

47 Instrction Fetch at End P C [3 28] Instrction [25 ] 4 Shift left 2 ALU reslt Jmp Branch X PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst Write RegWrite register register 2 Registers Write 2 register 6 Sign 32 etend X ALUSrc <op> ALUOp Zero ALU ALU reslt ress Write emwrite Data memory em emtoreg C. Kozyrakis EE8b Lectre 7 47

48 Arithmetic Immediate (ori) P C [3 28] Instrction [25 ] 4 Shift left 2 ALU reslt Jmp Branch PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst Write RegWrite register register 2 Registers Write 2 register 6 Sign 32 etend ALUSrc Or ALUOp Zero ALU ALU reslt ress Write emwrite Data memory em emtoreg C. Kozyrakis EE8b Lectre 7 48

49 Control for Load P C [3 28] Instrction [25 ] 4 Shift left 2 ALU reslt Jmp Branch PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst Write RegWrite register register 2 Registers Write 2 register 6 Sign 32 etend ALUSrc ALUOp Zero ALU ALU reslt ress Write emwrite Data memory em emtoreg C. Kozyrakis EE8b Lectre 7 49

50 Control for Store P C [3 28] Instrction [25 ] 4 Shift left 2 ALU reslt Jmp Branch PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst X Write RegWrite register register 2 Registers Write 2 register 6 Sign 32 etend ALUSrc ALUOp Zero ALU ALU reslt ress Write emwrite Data memory em X emtoreg C. Kozyrakis EE8b Lectre 7 5

51 Control for Branch (beq) P C [3 28] Instrction [25 ] 4 Shift left 2 ALU reslt Jmp Branch PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst X Write RegWrite register register 2 Registers Write 2 register 6 Sign 32 etend X ALUSrc Sb ALUOp Zero ALU ALU reslt ress Write emwrite Data memory em X emtoreg C. Kozyrakis EE8b Lectre 7 5

52 Control for Jmp (j) P C [3 28] Instrction [25 ] 4 Shift left 2 ALU reslt Jmp Branch PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst X Write RegWrite register register 2 Registers Write 2 register 6 Sign 32 etend X X ALUSrc X ALUOp Zero ALU ALU reslt ress Write emwrite Data memory em X emtoreg C. Kozyrakis EE8b Lectre 7 52

53 Smmary of Control Signals fnc RegDst ALUSrc emtoreg RegWrite emwrite Branch Jmp EtOp ALUctr<2:> Not Important op add sb ori lw sw beq jmp Sb Or Sb C. Kozyrakis EE8b Lectre 7 53

54 ltilevel Decoding Since only the ALU needs the fnc field Pass it to the ALU nit, and have a local decoder there op 6 ain Control fnc 6 ALUop N ALU Control (Local) ALUctr 3 ALU C. Kozyrakis EE8b Lectre 7 54

55 ltilevel Decoding (cont) RegDst ALUSrc emtoreg RegWrite emwrite Branch Jmp EtOp ALUop<N:> op R-type ori lw sw beq jmp R-type Or Sbtract C. Kozyrakis EE8b Lectre 7 55

56 Ptting It All Together P C [3 28] Instrction [25 ] 4 Instrction [3 26] Control RegDst Branch em emtoreg ALUOp emwrite ALUSrc RegWrite Shift left 2 ALU reslt Jmp PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers Write 2 register Write Zero ALU ALU reslt ress Write Data memory Instrction [5 ] 6 Sign 32 etend ALU control Instrction [5 ] C. Kozyrakis EE8b Lectre 7 56

57 Single Cycle Processor Advantages Single cycle per instrction makes logic and clock simple Disadvantages Inefficient tilization of memory and fnctional nits since different instrctions take different lengths of time ALU only comptes vales a small amont of the time Cycle time is the worst case path long cycle times Load instrction All machines wold have a CPI of C. Kozyrakis EE8b Lectre 7 57

58 Increasing Parallelism Problem: Each fnctional nit sed once per cycle ost of the time it is sitting waiting for its trn Well it is calclating all the time, bt it is waiting for valid There is no parallelism in this arrangement aking instrctions take more cycles makes machine faster! Increases the parallelism going on in the machine We will look at a 5 stage pipeline odern machines (Pentim 4) have order 2 cycles/instrction C. Kozyrakis EE8b Lectre 7 58

1048: Computer Organization

1048: Computer Organization 48: Compter Organization Lectre 5 Datapath and Control Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A- Introdction In this lectre, we will try to implement simplified IPS which contain emory

More information

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read.

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read. The final path PC 4 Add Reg Shift left 2 Add PCSrc Instrction [3-] Instrction I [25-2] I [2-6] I [5 - ] register register 2 register 2 Registers ALU Zero Reslt ALUOp em Data emtor RegDst ALUSrc em I [5

More information

The extra single-cycle adders

The extra single-cycle adders lticycle Datapath As an added bons, we can eliminate some of the etra hardware from the single-cycle path. We will restrict orselves to sing each fnctional nit once per cycle, jst like before. Bt since

More information

The single-cycle design from last time

The single-cycle design from last time lticycle path Last time we saw a single-cycle path and control nit for or simple IPS-based instrction set. A mlticycle processor fies some shortcomings in the single-cycle CPU. Faster instrctions are not

More information

Computer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University

Computer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University Compter Architectre Chapter 5 Fall 25 Department of Compter Science Kent State University The Processor: Datapath & Control Or implementation of the MIPS is simplified memory-reference instrctions: lw,

More information

Review. A single-cycle MIPS processor

Review. A single-cycle MIPS processor Review If three instrctions have opcodes, 7 and 5 are they all of the same type? If we were to add an instrction to IPS of the form OD $t, $t2, $t3, which performs $t = $t2 OD $t3, what wold be its opcode?

More information

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM Lectre (Wed /5/28) Lab # Hardware De Fri Oct 7 HW #2 IPS programming, de Wed Oct 22 idterm Fri Oct 2 IorD The mlticycle path SrcA Today s objectives: icroprogramming Etending the mlti-cycle path lti-cycle

More information

Review Multicycle: What is Happening. Controlling The Multicycle Design

Review Multicycle: What is Happening. Controlling The Multicycle Design Review lticycle: What is Happening Reslt Zero Op SrcA SrcB Registers Reg Address emory em Data Sign etend Shift left Sorce A B Ot [-6] [5-] [-6] [5-] [5-] Instrction emory IR RegDst emtoreg IorD em em

More information

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 483 Compter Organization Chapter 4.4 A Simple Implementation Scheme Chans Y The Big Pictre The Five Classic Components of a Compter Processor Control emory Inpt path Otpt path & Control 2 path and

More information

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION EXAINATIONS 2010 END OF YEAR COPUTER ORGANIZATION Time Allowed: 3 Hors (180 mintes) Instrctions: Answer all qestions. ake sre yor answers are clear and to the point. Calclators and paper foreign langage

More information

Review: Computer Organization

Review: Computer Organization Review: Compter Organization Pipelining Chans Y Landry Eample Landry Eample Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 3 mintes A B C D Dryer takes 3 mintes

More information

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code:

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code: EE8 Winter 25 Homework #2 Soltions De Thrsday, Feb 2, 5 P. ( points) Consider the following fragment of Java code: for (i=; i

More information

Pipelining. Chapter 4

Pipelining. Chapter 4 Pipelining Chapter 4 ake processor rns faster Pipelining is an implementation techniqe in which mltiple instrctions are overlapped in eection Key of making processor fast Pipelining Single cycle path we

More information

Hardware Design Tips. Outline

Hardware Design Tips. Outline Hardware Design Tips EE 36 University of Hawaii EE 36 Fall 23 University of Hawaii Otline Verilog: some sbleties Simlators Test Benching Implementing the IPS Actally a simplified 6 bit version EE 36 Fall

More information

What do we have so far? Multi-Cycle Datapath

What do we have so far? Multi-Cycle Datapath What do we have so far? lti-cycle Datapath CPI: R-Type = 4, Load = 5, Store 4, Branch = 3 Only one instrction being processed in datapath How to lower CPI frther? #1 Lec # 8 Spring2 4-11-2 Pipelining pipelining

More information

1048: Computer Organization

1048: Computer Organization 48: Compter Organization Lectre 5 Datapath and Control Lectre5B - mlticycle implementation (cwli@twins.ee.nct.ed.tw) 5B- Recap: A Single-Cycle Processor PCSrc 4 Add Shift left 2 Add ALU reslt PC address

More information

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction Review Friday the 2st of October Real world eamples of pipelining? How does pipelining pp inflence instrction latency? How does pipelining inflence instrction throghpt? What are the three types of hazard

More information

Exceptions and interrupts

Exceptions and interrupts Eceptions and interrpts An eception or interrpt is an nepected event that reqires the CPU to pase or stop the crrent program. Eception handling is the hardware analog of error handling in software. Classes

More information

Lecture 6: Microprogrammed Multi Cycle Implementation. James C. Hoe Department of ECE Carnegie Mellon University

Lecture 6: Microprogrammed Multi Cycle Implementation. James C. Hoe Department of ECE Carnegie Mellon University 8 447 Lectre 6: icroprogrammed lti Cycle Implementation James C. Hoe Department of ECE Carnegie ellon University 8 447 S8 L06 S, James C. Hoe, CU/ECE/CALC, 208 Yor goal today Hosekeeping nderstand why

More information

1048: Computer Organization

1048: Computer Organization 8: Compter Organization Lectre 6 Pipelining Lectre6 - pipelining (cwli@twins.ee.nct.ed.tw) 6- Otline An overview of pipelining A pipelined path Pipelined control Data hazards and forwarding Data hazards

More information

CSE Introduction to Computer Architecture Chapter 5 The Processor: Datapath & Control

CSE Introduction to Computer Architecture Chapter 5 The Processor: Datapath & Control CSE-45432 Introdction to Compter Architectre Chapter 5 The Processor: Datapath & Control Dr. Izadi Data Processor Register # PC Address Registers ALU memory Register # Register # Address Data memory Data

More information

Enhanced Performance with Pipelining

Enhanced Performance with Pipelining Chapter 6 Enhanced Performance with Pipelining Note: The slides being presented represent a mi. Some are created by ark Franklin, Washington University in St. Lois, Dept. of CSE. any are taken from the

More information

Computer Architecture

Computer Architecture Compter Architectre Lectre 4: Intro to icroarchitectre: Single- Cycle Dr. Ahmed Sallam Sez Canal University Spring 25 Based on original slides by Prof. Onr tl Review Compter Architectre Today and Basics

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

CS 251, Spring 2018, Assignment 3.0 3% of course mark

CS 251, Spring 2018, Assignment 3.0 3% of course mark CS 25, Spring 28, Assignment 3. 3% of corse mark De onday, Jne 25th, 5:3 P. (5 points) Consider the single-cycle compter shown on page 6 of this assignment. Sppose the circit elements take the following

More information

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13 Comp 33 Compter Architectre A Pipelined path Lectre 3 Pipelined path with Signals PCSrc IF/ ID ID/ EX EX / E E / Add PC 4 Address Instrction emory RegWr ra rb rw Registers bsw [5-] [2-6] [5-] bsa bsb Sign

More information

Lab 8 (All Sections) Prelab: ALU and ALU Control

Lab 8 (All Sections) Prelab: ALU and ALU Control Lab 8 (All Sections) Prelab: and Control Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received nathorized aid on this academic work Objective In this lab yo will

More information

Chapter 6 Enhancing Performance with. Pipelining. Pipelining. Pipelined vs. Single-Cycle Instruction Execution: the Plan. Pipelining: Keep in Mind

Chapter 6 Enhancing Performance with. Pipelining. Pipelining. Pipelined vs. Single-Cycle Instruction Execution: the Plan. Pipelining: Keep in Mind Pipelining hink of sing machines in landry services Chapter 6 nhancing Performance with Pipelining 6 P 7 8 9 A ime ask A B C ot pipelined Assme 3 min. each task wash, dry, fold, store and that separate

More information

Computer Architecture

Computer Architecture Compter Architectre Lectre 4: Intro to icroarchitectre: Single- Cycle Dr. Ahmed Sallam Sez Canal University Based on original slides by Prof. Onr tl Review Compter Architectre Today and Basics (Lectres

More information

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark CS 25, Winter 28, Assignment 4.. 3% of corse mark De Wednesday, arch 7th, 4:3P Lates accepted ntil Thrsday arch 8th, am with a 5% penalty. (6 points) In the diagram below, the mlticycle compter from the

More information

Chapter 6: Pipelining

Chapter 6: Pipelining CSE 322 COPUTER ARCHITECTURE II Chapter 6: Pipelining Chapter 6: Pipelining Febrary 10, 2000 1 Clothes Washing CSE 322 COPUTER ARCHITECTURE II The Assembly Line Accmlate dirty clothes in hamper Place in

More information

CS 251, Winter 2019, Assignment % of course mark

CS 251, Winter 2019, Assignment % of course mark CS 25, Winter 29, Assignment.. 3% of corse mark De Wednesday, arch 3th, 5:3P Lates accepted ntil Thrsday arch th, pm with a 5% penalty. (7 points) In the diagram below, the mlticycle compter from the corse

More information

Quiz #1 EEC 483, Spring 2019

Quiz #1 EEC 483, Spring 2019 Qiz # EEC 483, Spring 29 Date: Jan 22 Name: Eercise #: Translate the following instrction in C into IPS code. Eercise #2: Translate the following instrction in C into IPS code. Hint: operand C is stored

More information

EXAMINATIONS 2003 END-YEAR COMP 203. Computer Organisation

EXAMINATIONS 2003 END-YEAR COMP 203. Computer Organisation EXAINATIONS 2003 COP203 END-YEAR Compter Organisation Time Allowed: 3 Hors (180 mintes) Instrctions: Answer all qestions. There are 180 possible marks on the eam. Calclators and foreign langage dictionaries

More information

PART I: Adding Instructions to the Datapath. (2 nd Edition):

PART I: Adding Instructions to the Datapath. (2 nd Edition): EE57 Instrctor: G. Pvvada ===================================================================== Homework #5b De: check on the blackboard =====================================================================

More information

PS Midterm 2. Pipelining

PS Midterm 2. Pipelining PS idterm 2 Pipelining Seqential Landry 6 P 7 8 9 idnight Time T a s k O r d e r A B C D 3 4 2 3 4 2 3 4 2 3 4 2 Seqential landry takes 6 hors for 4 loads If they learned pipelining, how long wold landry

More information

Chapter 3 & Appendix C Pipelining Part A: Basic and Intermediate Concepts

Chapter 3 & Appendix C Pipelining Part A: Basic and Intermediate Concepts CS359: Compter Architectre Chapter 3 & Appendi C Pipelining Part A: Basic and Intermediate Concepts Yanyan Shen Department of Compter Science and Engineering Shanghai Jiao Tong University 1 Otline Introdction

More information

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark CS 25, Winter 28, Assignment 3.. 3% of corse mark De onday, Febrary 26th, 4:3 P Lates accepted ntil : A, Febrary 27th with a 5% penalty. IEEE 754 Floating Point ( points): (a) (4 points) Complete the following

More information

MIPS Architecture. Fibonacci (C) Fibonacci (Assembly) Another Example: MIPS. Example: subset of MIPS processor architecture

MIPS Architecture. Fibonacci (C) Fibonacci (Assembly) Another Example: MIPS. Example: subset of MIPS processor architecture Another Eample: IPS From the Harris/Weste book Based on the IPS-like processor from the Hennessy/Patterson book IPS Architectre Eample: sbset of IPS processor architectre Drawn from Patterson & Hennessy

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

Overview of Pipelining

Overview of Pipelining EEC 58 Compter Architectre Pipelining Department of Electrical Engineering and Compter Science Cleveland State University Fndamental Principles Overview of Pipelining Pipelined Design otivation: Increase

More information

Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control

Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control Chapter 5 The Processor: Datapath and Control Big Picture: Where are We Now? Performance of a

More information

Review. How to represent real numbers

Review. How to represent real numbers PCWrite PC IorD Review ALUSrcA emread Address Write data emory emwrite em Data IRWrite [3-26] [25-2] [2-6] [5-] [5-] RegDst Read register Read register 2 Write register Write data RegWrite Read data Read

More information

EEC 483 Computer Organization. Branch (Control) Hazards

EEC 483 Computer Organization. Branch (Control) Hazards EEC 483 Compter Organization Section 4.8 Branch Hazards Section 4.9 Exceptions Chans Y Branch (Control) Hazards While execting a previos branch, next instrction address might not yet be known. s n i o

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

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

Lecture 9: Microcontrolled Multi-Cycle Implementations

Lecture 9: Microcontrolled Multi-Cycle Implementations 8-447 Lectre 9: icroled lti-cycle Implementations James C. Hoe Dept of ECE, CU Febrary 8, 29 S 9 L9- Annoncements: P&H Appendi D Get started t on Lab Handots: Handot #8: Project (on Blackboard) Single-Cycle

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

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 83 Compter Organization Chapter.6 A Pipelined path Chans Y Pipelined Approach 2 - Cycle time, No. stages - Resorce conflict E E A B C D 3 E E 5 E 2 3 5 2 6 7 8 9 c.y9@csohio.ed Resorces sed in 5 Stages

More information

Solutions for Chapter 6 Exercises

Solutions for Chapter 6 Exercises Soltions for Chapter 6 Eercises Soltions for Chapter 6 Eercises 6. 6.2 a. Shortening the ALU operation will not affect the speedp obtained from pipelining. It wold not affect the clock cycle. b. If the

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

Chapter 6: Pipelining

Chapter 6: Pipelining Chapter 6: Pipelining Otline An overview of pipelining A pipelined path Pipelined control Data hazards and forwarding Data hazards and stalls Branch hazards Eceptions Sperscalar and dynamic pipelining

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

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

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

4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1

4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage to Describe and odel a Pipeline

More information

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Harware Organization an Design ectre 11: Introction to IPs path apte from Compter Organization an Design, Patterson & Hennessy, CB IPS-lite processor Compter Want to bil a processor for a sbset

More information

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page.

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page. page of 7 University of Calgary Departent of Electrical and Copter Engineering ENCM 369: Copter Organization Lectre Instrctors: Steve Noran and Nor Bartley Winter 23 MIDTERM TEST #2 Wednesday, March 2

More information

Lecture 13: Exceptions and Interrupts

Lecture 13: Exceptions and Interrupts 18 447 Lectre 13: Eceptions and Interrpts S 10 L13 1 James C. Hoe Dept of ECE, CU arch 1, 2010 Annoncements: Handots: Spring break is almost here Check grades on Blackboard idterm 1 graded Handot #9: Lab

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

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

Lecture 10: Pipelined Implementations

Lecture 10: Pipelined Implementations U 8-7 S 9 L- 8-7 Lectre : Pipelined Implementations James. Hoe ept of EE, U Febrary 23, 29 nnoncements: Project is de this week idterm graded, d reslts posted Handots: H9 Homework 3 (on lackboard) Graded

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

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

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

Recap: The MIPS Subset ADD and subtract EEL Computer Architecture shamt funct add rd, rs, rt Single-Cycle Control Logic sub rd, rs, rt

Recap: The MIPS Subset ADD and subtract EEL Computer Architecture shamt funct add rd, rs, rt Single-Cycle Control Logic sub rd, rs, rt Recap: The MIPS Subset EEL-47 - Computer Architecture Single-Cycle Logic ADD and subtract add rd, rs, rt sub rd, rs, rt OR Imm: ori rt, rs, imm 2 rs rt rd shamt t bits 5 bits 5 bits 5 bits 5 bits bits

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

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

Instruction fetch. MemRead. IRWrite ALUSrcB = 01. ALUOp = 00. PCWrite. PCSource = 00. ALUSrcB = 00. R-type completion

Instruction fetch. MemRead. IRWrite ALUSrcB = 01. ALUOp = 00. PCWrite. PCSource = 00. ALUSrcB = 00. R-type completion . (Chapter 5) Fill in the vales for SrcA, SrcB, IorD, Dst and emto to complete the Finite State achine for the mlti-cycle datapath shown below. emory address comptation 2 SrcA = SrcB = Op = fetch em SrcA

More information

Computer Architecture. Lecture 6: Pipelining

Computer Architecture. Lecture 6: Pipelining Compter Architectre Lectre 6: Pipelining Dr. Ahmed Sallam Based on original slides by Prof. Onr tl Agenda for Today & Net Few Lectres Single-cycle icroarchitectres lti-cycle and icroprogrammed icroarchitectres

More information

Animating the Datapath. Animating the Datapath: R-type Instruction. Animating the Datapath: Load Instruction. MIPS Datapath I: Single-Cycle

Animating the Datapath. Animating the Datapath: R-type Instruction. Animating the Datapath: Load Instruction. MIPS Datapath I: Single-Cycle nimating the atapath PS atapath : Single-Cycle npt is either (-type) or sign-etended lower half of instrction (load/store) op offset/immediate W egister File 6 6 + from instrction path beq,, offset if

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

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

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

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

What do we have so far? Multi-Cycle Datapath (Textbook Version)

What do we have so far? Multi-Cycle Datapath (Textbook Version) What do we have so far? ulti-cycle Datapath (Textbook Version) CPI: R-Type = 4, Load = 5, Store 4, Branch = 3 Only one instruction being processed in datapath How to lower CPI further? #1 Lec # 8 Summer2001

More information

ECE473 Computer Architecture and Organization. Processor: Combined Datapath

ECE473 Computer Architecture and Organization. Processor: Combined Datapath Computer Architecture and Organization Processor: Combined path Lecturer: Prof. Yifeng Zhu Fall, 2014 Portions of these slides are derived from: Dave Patterson CB 1 Where are we? Want to build a processor

More information

POWER-OF-2 BOUNDARIES

POWER-OF-2 BOUNDARIES Warren.3.fm Page 5 Monday, Jne 17, 5:6 PM CHAPTER 3 POWER-OF- BOUNDARIES 3 1 Ronding Up/Down to a Mltiple of a Known Power of Ronding an nsigned integer down to, for eample, the net smaller mltiple of

More information

MIPS Architecture. An Example: MIPS. From the Harris/Weste book Based on the MIPS-like processor from the Hennessy/Patterson book

MIPS Architecture. An Example: MIPS. From the Harris/Weste book Based on the MIPS-like processor from the Hennessy/Patterson book An Eample: IPS From the Harris/Weste book Based on the IPS-like processor from the Hennessy/Patterson book IPS Architectre w Eample: sbset of IPS processor architectre n Drawn from Patterson & Hennessy

More information

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed Lecture 3: General Purpose Processor Design CSCE 665 Advanced VLSI Systems Instructor: Saraju P. ohanty, Ph. D. NOTE: The figures, tet etc included in slides are borrowed from various books, websites,

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

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade CSE 141 Compter Architectre Smmer Session I, 2004 Lectres 10 Advanced Topics, emory Hierarchy and Cache Pramod V. Argade CSE141: Introdction to Compter Architectre Instrctor: TA: Pramod V. Argade (p2argade@cs.csd.ed)

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

CSSE232 Computer Architecture I. Mul5cycle Datapath

CSSE232 Computer Architecture I. Mul5cycle Datapath CSSE232 Compter Architectre I Ml5cycle Datapath Class Stats Next 3 days : Ml5cycle datapath ing Ml5cycle datapath is not in the book! How long do instrc5ons take? ALU 2ns Mem 2ns Reg File 1ns Everything

More information

Lecture 5: The Processor

Lecture 5: The Processor Lecture 5: The Processor CSCE 26 Computer Organization Instructor: Saraju P. ohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed from various books, websites, authors pages, and

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

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

Single-Cycle Examples, Multi-Cycle Introduction

Single-Cycle Examples, Multi-Cycle Introduction Single-Cycle Examples, ulti-cycle Introduction 1 Today s enu Single cycle examples Single cycle machines vs. multi-cycle machines Why multi-cycle? Comparative performance Physical and Logical Design of

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

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

PIPELINING. Pipelining: Natural Phenomenon. Pipelining. Pipelining Lessons

PIPELINING. Pipelining: Natural Phenomenon. Pipelining. Pipelining Lessons Pipelining: Natral Phenomenon Landry Eample: nn, rian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 30 mintes C D Dryer takes 0 mintes PIPELINING Folder takes 20 mintes

More information

T = I x CPI x C. Both effective CPI and clock cycle C are heavily influenced by CPU design. CPI increased (3-5) bad Shorter cycle good

T = I x CPI x C. Both effective CPI and clock cycle C are heavily influenced by CPU design. CPI increased (3-5) bad Shorter cycle good CPU performance equation: T = I x CPI x C Both effective CPI and clock cycle C are heavily influenced by CPU design. For single-cycle CPU: CPI = 1 good Long cycle time bad On the other hand, for multi-cycle

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

Laboratory 5 Processor Datapath

Laboratory 5 Processor Datapath Laboratory 5 Processor Datapath Description of HW Instruction Set Architecture 16 bit data bus 8 bit address bus Starting address of every program = 0 (PC initialized to 0 by a reset to begin execution)

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

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

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

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