ENE 334 Microprocessors

Size: px
Start display at page:

Download "ENE 334 Microprocessors"

Transcription

1 ENE 334 Microprocessors Lecture 6: Datapath and Control : Dejwoot KHAWPARISUTH Adapted from Computer Organization and Design, 3 th & 4 th Edition, Patterson & Hennessy, 2005/2008, Elsevier (MK)

2 Outlines: ENE 334 Datapath and Control Page 2 Arithmetic Logic Unit(ALU) The datapath A Single Cycle Implementation A Multicycle Implementation The Control unit

3 Logic Circuits: ENE 334 Datapath and Control Page 3 Combinational Logic: Decoders

4 Logic Circuits: ENE 334 Datapath and Control Page 4 Combinational Logic: Multiplexors I

5 Logic Circuits: ENE 334 Datapath and Control Page 5 Combinational Logic: Multiplexors II

6 Logic Circuits: ENE 334 Datapath and Control Page 6 Combinational Logic: Adder

7 ENE 334 Datapath and Control Page 7 ALU: 1-Bit The device that performs the arithmetic operations like addition and subtraction or logical operations like AND and OR.

8 ALU: 1-Bit ENE 334 Datapath and Control Page 8 Subtraction?

9 ALU: 1-Bit ENE 334 Datapath and Control Page 9 NOR?

10 ALU: 32-Bit ENE 334 Datapath and Control Page 10

11 ALU: MIPS ENE 334 Datapath and Control Page 11

12 ALU: MIPS bit0-bit30 ENE 334 Datapath and Control Page 12

13 ALU: MIPS bit31 ENE 334 Datapath and Control Page 13

14 ALU: 32-bit ENE 334 Datapath and Control Page 14

15 ALU: ENE 334 Datapath and Control Page 15

16 Datapath: ENE 334 Datapath and Control Page 16 The core MIPS instruction set: - the memory-reference instructions: load word(lw) and store word(sw) - the arithmetic-logical instructions: add, sub, and, or and slt - the instructions: branch equal(beq) and jump (j)

17 Datapath: ENE 334 Datapath and Control Page 17 For every instruction, the first two steps are identical: 1] Send the program counter(pc) to the memory that contains the code and fetch the instruction from that memory. 2] Read one or two registers, using fields of the instruction. All instructions use the ALU after reading the registers Why? memory-reference? arithmetic? control flow?

18 MIPS: Implementation ENE 334 Datapath and Control Page 18 Abstract / Simplified View: Two types of functional units: elements that operate on data values (combinational) elements that contain state (sequential)

19 MIPS: Implementation ENE 334 Datapath and Control Page 19

20 Logic Design Basics ENE 334 Datapath and Control Page 20

21 Sequential Elements ENE 334 Datapath and Control Page 21

22 Sequential Elements ENE 334 Datapath and Control Page 22

23 Logic Design conventions: Clocks Clock methodology: Any input to a state element must reach a stable value before the active clock edge causes the state to be updated ENE 334 Datapath and Control Page 23

24 Logic Design conventions: Clocks ENE 334 Datapath and Control Page 24 Clock methodology: The clock period must be as large as : t prop +t combination +t setup

25 Logic Design conventions: Clocks ENE 334 Datapath and Control Page 25 Clock methodology: The clock period must be as large as : t prop +t combination +t setup +t skew

26 Logic Design conventions: Clocks ENE 334 Datapath and Control Page 26 Clock methodology: An edge-triggered methodology allows a state element to be read and written in the same clock cycle

27 Building a Datapath: ENE 334 Datapath and Control Page 27 Datapath elements: We need: a memory unit to store a program and supply instructions given an address.

28 Building a Datapath: ENE 334 Datapath and Control Page 28 Fetching instructions and incrementing the PC: We need: a memory unit to store a program and supply instructions given an address.

29 R-Format Instruction ENE 334 Datapath and Control Page 29

30 Building a Datapath: R-format ENE 334 Datapath and Control Page 30 Datapath elements: Ex: add $s1,$s2,$s opcode rs rt rd shamt funct We need: the register file and the ALU to implement R-format ALU operations.

31 Load/Store Instruction ENE 334 Datapath and Control Page 31

32 Branch Instruction ENE 334 Datapath and Control Page 32

33 Building a Datapath: I-format ENE 334 Datapath and Control Page 33 Datapath elements: Ex: lw $s1,100($s2) opcode rs rt immediate We need: the data memory unit and a unit to sign-extend for lw, sw

34 ENE 334 Datapath and Control Page 34 Building a Datapath: I,R-format opcode rs rt rd shamt funct opcode rs rt immediate

35 Building a Datapath:beq(I-format) ENE 334 Datapath and Control Page 35 Datapath elements: Ex: beq $t1,$t2,offset -branch target address -branch taken -branch not taken o opcode rs rt immediate

36 ENE 334 Datapath and Control Page 36 Building a Datapath: I,R-format opcode rs rt rd shamt funct opcode rs rt immediate

37 A Simple Scheme: ALU Control ENE 334 Datapath and Control Page 37 ALU control lines Function 0000 AND 0001 OR 0010 add 0110 subtract 0111 set on less than 1100 NOR lw,sw and,or,add,subtract,set on less than Beq Why is the code for subtract 0110 and not 0011? - Why is the code for subtract 0110 and not 0011?

38 ENE 334 Datapath and Control Page 38 A Simple Scheme: ALU Control Instruction opcode ALUOp Instruction operation Funct field Desired ALU action ALU control input LW 00 load word XXXXXX add 0010 SW 00 store word XXXXXX add 0010 Branch equal 01 branch equal XXXXXX subtract 0110 R-type 10 add add 0010 R-type 10 subtract subtract 0110 R-type 10 AND and 0000 R-type 10 OR or 0001 R-type 10 set on less than set on less than 0111 ALUOp,Funct field: ALU control lines

39 ENE 334 Datapath and Control Page 39 A Simple Scheme: ALU Control ALUOp Funct field Operations ALUOp1 ALUOp0 F5 F4 F3 F2 F1 F0 0 0 X X X X X X 0010 X 1 X X X X X X X X X X X X X X X X X X X X X The truth table for the three ALU control bits

40 A Simple Scheme: ENE 334 Datapath and Control Page 40 a.) R-type instruction opcode rs rt rd shamt funct b.) Load or store instruction opcode rs rt immediate c.) Branch instruction opcode rs rt immediate

41 A Simple Scheme: control lines ENE 334 Datapath and Control Page 41

42 ENE 334 Datapath and Control Page 42 A Simple Scheme: the main control Instruction RegDst ALUSrc Memto Reg Reg Write Mem Read Mem Write Branch ALUOp1 ALUOp0 R-format lw sw X 1 X beq X 0 X ALUOpcode: control lines

43 ENE 334 Datapath and Control Page 43 A Simple Scheme: the main control Simple combinational logic (truth tables) Inputs ALUOp ALUOp0 ALUOp1 ALU control block Op5 Op4 Op3 Op2 Op1 Op0 F (5 0) F3 F2 F1 F0 Operation2 Operation1 Operation0 Operation R-format Iw sw beq Outputs RegDst ALUSrc MemtoReg RegWrite MemRead MemWrite Branch ALUOp1 ALUOpO

44 A Simple Scheme: Datapath+control ENE 334 Datapath and Control Page 44

45 A Simple Scheme: R-type ENE 334 Datapath and Control Page 45

46 A Simple Scheme: a load instruction ENE 334 Datapath and Control Page 46

47 A Simple Scheme: a beq instr. ENE 334 Datapath and Control Page 47

48 A Simple Scheme: the control table Input or Output Inputs Outputs ENE 334 Datapath and Control Page 48 Signal name R-format lw sw beq Op Op Op Op Op Op RegDst 1 0 X X ALUSrc MemtoReg 0 1 X X RegWrite MemRead MemWrite Branch ALUOp ALUOp

49 Implementing Jumps ENE 334 Datapath and Control Page 49

50 A Simple Scheme: jump ENE 334 Datapath and Control Page 50

51 Performance Issues ENE 334 Datapath and Control Page 51

52 Pipelineing Analogy ENE 334 Datapath and Control Page 52

53 Single Cycle Implementation ENE 334 Datapath and Control Page 53 Calculate cycle time assuming negligible delays except: memory (200ps), ALU and adders (100ps), register file access (50ps) PCSrc Add M ux 4 Add ALU result Shift left 2 PC Read address Instruction Instruction memory Read register 1 Read register 2 Registers Write register Write data RegWrite Read data 1 Read data 2 ALUSrc M ux 4 ALU ALU operation Zero ALU result Address Write data MemWrite Read data Data memory MemtoReg M ux 16 Sign 32 extend MemRead

54 Where we are headed ENE 334 Datapath and Control Page 54 Single Cycle Problems: what if we had a more complicated instruction like floating point? wasteful of area One Solution: use a smaller cycle time have different instructions take different numbers of cycles a multicycle datapath: PC Address Instruction or data Memory Data Instruction register Memory data register Data Register # Registers Register # Register # A B ALU ALUOut

55 Basic: the multicycle datapath ENE 334 Datapath and Control Page 55 The Approach: - Break up the instructions into steps, each step takes a cycle - balance each step - reuse functional units - Store values at the end of a cycle - for later cycles - introduce additional registers

56 Basic: the multicycle datapath ENE 334 Datapath and Control Page 56 IR with write input MDR R R R Share functional units

57 Basic: the multicycle datapath ENE 334 Datapath and Control Page 57

58 MIPS: with the control lines ENE 334 Datapath and Control Page 58

59 MIPS: with the control lines ENE 334 Datapath and Control Page 59 - Neither register A nor B requires a write signal, since their contents are only read on the cycle immediately after it is written. - the clock cycle cannot accommodate the time required for both the memory access and the register file write. MDR

60 MIPS: the complete datapath ENE 334 Datapath and Control Page 60

61 MIPS: Multicycle steps ENE 334 Datapath and Control Page 61 1) Instruction fetch: IR <= Memory[PC] PC <= PC + 4 the control signals: MemRead, IRWrite, IorD,... 2) Instruction decode and register fetch: A <= Reg[IR[25:21]]; B <= Reg[IR[20:16]]; ALUOut <= PC+SignExtend(IR[15:00]<<2);

62 MIPS: Multicycle steps ENE 334 Datapath and Control Page 62 3) Execution, memory address computation, or branch completion: determined by the instruction class: Memory reference (lw, sw): ALUOp = 00 ALUOut <= A+(SignExtend(IR[15:00])); Arithmetic-logical instruction (R-type): ALUOp = 10 ALUOut <= A op B;

63 MIPS: Multicycle steps ENE 334 Datapath and Control Page 63 3) Execution, memory address computation, or branch completion: determined by the instruction class: Branch: ALUOp = 01 if (A==B) PC <= ALUOut; Jump: PC <= {PC[31:28],IR[25:0],2'b00};

64 MIPS: Multicycle steps ENE 334 Datapath and Control Page 64 4) Memory access or R-type instruction completion: Memory reference (lw, sw): MDR <= Memory[ALUOut]; or Memory[ALUOut] <= B; Arithmetic-logical instruction (R-type): Reg[IR[15:11]] <= ALUOut;

65 MIPS: Multicycle steps ENE 334 Datapath and Control Page 65 5) Memory read completion: load: Reg[IR[20:16]] <= MDR;

66 MIPS: Multicycle steps ENE 334 Datapath and Control Page 66

67 MIPS: Question ENE 334 Datapath and Control Page 67 How many cycles will it take to execute this code? Loop: sll $t1,$s3,2 # $t1 = 4*i add $t1,$t1,$s6 # $t1 = addr lw $t0,0($t1) # $t0 = save[i] bne $t0,$s5,exit # save[i]=k? addi $s3,$s3,1 # i = i+1 j Loop # go to Loop Exit:

68 Control: techniques ENE 334 Datapath and Control Page 68 1) Finite State Machine: 2) Microprogramming: 3) Sequencer:

69 FSM: Finite State Machine ENE 334 Datapath and Control Page 69

70 FSM: Implementation ENE 334 Datapath and Control Page 70

71 FSM: The high level ENE 334 Datapath and Control Page 71

72 FSM: Step 1, 2 ENE 334 Datapath and Control Page 72

73 FSM: memory-reference instr. ENE 334 Datapath and Control Page 73 Step 3, 4,...

74 FSM: R-type instr. ENE 334 Datapath and Control Page 74 Step 3, 4

75 FSM: branch instr. ENE 334 Datapath and Control Page 75 Step 3

76 FSM: jump instr. ENE 334 Datapath and Control Page 76 Step 3

77 FSM: implementation ENE 334 Datapath and Control Page 77

78 FSM: the complete ENE 334 Datapath and Control Page states:? bits S3,S2,S1,S0

79 FSM: the control unit ENE 334 Datapath and Control Page 79 NS: Next State

80 PLA Implementation ENE 334 Datapath and Control Page 80 If I picked a horizontal or vertical line could you explain it? Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0 PCWrite PCWriteCond IorD MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDst NS3 NS2 NS1 NS0

81 ROM Implementation ENE 334 Datapath and Control Page 81 ROM = "Read Only Memory" values of memory locations are fixed ahead of time A ROM can be used to implement a truth table if the address is m-bits, we can address 2 m entries in the ROM. our outputs are the bits of data that the address points to. m is the "height", and n is the "width" m n

82 ROM Implementation ENE 334 Datapath and Control Page 82 How many inputs are there? 6 bits for opcode, 4 bits for state = 10 address lines (i.e., 2 10 = 1024 different addresses) How many outputs are there? 16 datapath-control outputs, 4 state bits = 20 outputs ROM is 2 10 x 20 = 20K bits (and a rather unusual size) Rather wasteful, since for lots of the entries, the outputs are the same i.e., opcode is often ignored

83 ENE 334 Datapath and Control Page 83 ROM vs PLA Break up the table into two parts 4 state bits tell you the 16 outputs, 2 4 x 16 bits of ROM 10 bits tell you the 4 next state bits, 2 10 x 4 bits of ROM Total: 4.3K bits of ROM PLA is much smaller can share product terms only need entries that produce an active output can take into account don't cares Size is (#inputs #product-terms) + (#outputs #product-terms) For this example = (10x17)+(20x17) = 510 PLA cells PLA cells usually about the size of a ROM cell (slightly bigger)

84 Another Implementation Style ENE 334 Datapath and Control Page 84 Op[5 0] Complex instructions: the "next state" is often current state + 1 Control unit PLA or ROM Input 1 Outputs PCWrite PCWriteCond IorD MemRead MemWrite IRWrite BWrite MemtoReg PCSource ALUOp ALUSrcB ALUSrcA RegWrite RegDst AddrCtl Adder State Address select logic Instruction register opcode field

85 Another Implementation Style ENE 334 Datapath and Control Page 85 Dispatch ROM 1 Dispatch ROM 2 Op Opcode name Value Op Opcode name Value R-format lw jmp sw beq lw sw PLA or ROM State Adder Mux AddrCtl 0 Dispatch ROM 2 Dispatch ROM 1 Address select logic State number Address-control action Value of AddrCtl 0 Use incremented state 3 1 Use dispatch ROM Use dispatch ROM Use incremented state 3 4 Replace state number by Replace state number by Use incremented state 3 7 Replace state number by Replace state number by Replace state number by 0 0 Instruction register opcode field

86 Microprogramming ENE 334 Datapath and Control Page 86 Control unit Microcode memory Outputs Input 1 PCWrite PCWriteCond IorD MemRead MemWrite IRWrite BWrite MemtoReg PCSource ALUOp ALUSrcB ALUSrcA RegWrite RegDst AddrCtl Datapath Adder Microprogram counter Address select logic Instruction register opcode field What are the microinstructions?

87 Microprogramming ENE 334 Datapath and Control Page 87 A specification methodology appropriate if hundreds of opcodes, modes, cycles, etc. signals specified symbolically using microinstructions Label ALU control SRC1 SRC2 Register control Memory PCWrite control Sequencing Fetch Add PC 4 Read PC ALU Seq Add PC Extshft Read Dispatch 1 Mem1 Add A Extend Dispatch 2 LW2 Read ALU Seq Write MDR Fetch SW2 Write ALU Fetch Rformat1 Func code A B Seq Write ALU Fetch BEQ1 Subt A B ALUOut-cond Fetch JUMP1 Jump address Fetch Will two implementations of the same architecture have the same microcode? What would a microassembler do?

88 Microprogramming Field name Value Signals active Comment Add ALUOp = 00 Cause the ALU to add. ALU control Subt ALUOp = 01 Cause the ALU to subtract; this implements the compare for branches. Func code ALUOp = 10 Use the instruction's function code to determine ALU control. SRC1 PC ALUSrcA = 0 Use the PC as the first ALU input. A ALUSrcA = 1 Register A is the first ALU input. B ALUSrcB = 00 Register B is the second ALU input. SRC2 4 ALUSrcB = 01 Use 4 as the second ALU input. Extend ALUSrcB = 10 Use output of the sign extension unit as the second ALU input. Extshft ALUSrcB = 11 Use the output of the shift-by-two unit as the second ALU input. Read Read two registers using the rs and rt fields of the IR as the register numbers and putting the data into registers A and B. Write ALU RegWrite, Write a register using the rd field of the IR as the register number and Register RegDst = 1, the contents of the ALUOut as the data. control MemtoReg = 0 Write MDR RegWrite, Write a register using the rt field of the IR as the register number and RegDst = 0, the contents of the MDR as the data. MemtoReg = 1 Read PC MemRead, Read memory using the PC as address; write result into IR (and lord = 0 the MDR). Memory Read ALU MemRead, Read memory using the ALUOut as address; write result into MDR. lord = 1 Write ALU MemWrite, Write memory using the ALUOut as address, contents of B as the lord = 1 data. ALU PCSource = 00 Write the output of the ALU into the PC. PCWrite PC write control ALUOut-cond PCSource = 01, If the Zero output of the ALU is active, write the PC with the contents PCWriteCond of the register ALUOut. jump address PCSource = 10, Write the PC with the jump address from the instruction. PCWrite Seq AddrCtl = 11 Choose the next microinstruction sequentially. Sequencing Fetch AddrCtl = 00 Go to the first microinstruction to begin a new instruction. Dispatch 1 AddrCtl = 01 Dispatch using the ROM 1. Dispatch 2 AddrCtl = 10 Dispatch using the ROM 2. ENE 334 Datapath and Control Page 88

89 Maximally vs. Minimally Encoded ENE 334 Datapath and Control Page 89 No encoding: 1 bit for each datapath operation faster, requires more memory (logic) used for Vax 780 an astonishing 400K of memory! Lots of encoding: send the microinstructions through logic to get control signals uses less memory, slower Historical context of CISC: Too much logic to put on a single chip with everything else Use a ROM (or even RAM) to hold the microcode It s easy to add new instructions

90 Microcode: Trade-offs Distinction between specification and implementation is sometimes blurred Specification Advantages: Easy to design and write Design architecture and microcode in parallel Implementation (off-chip ROM) Advantages Easy to change since values are in memory Can emulate other architectures Can make use of internal registers Implementation Disadvantages, SLOWER now that: Control is implemented on same chip as processor ROM is no longer faster than RAM No need to go back and make changes ENE 334 Datapath and Control Page 90

91 Historical Perspective ENE 334 Datapath and Control Page 91 In the 60s and 70s microprogramming was very important for implementing machines This led to more sophisticated ISAs and the VAX In the 80s RISC processors based on pipelining became popular Pipelining the microinstructions is also possible! Implementations of IA-32 architecture processors since 486 use: hardwired control for simpler instructions (few cycles, FSM control implemented using PLA or random logic) microcoded control for more complex instructions (large numbers of cycles, central control store) The IA-64 architecture uses a RISC-style ISA and can be implemented without a large central control store

92 Exceptions: or Interrupts ENE 334 Datapath and Control Page 92 An unscheduled event that disrupts program execution. - I/O device request - Invoke the operating system from user program - Arithmetic overflow - Using an undefined instruction - Hardware malfunction

93 Exceptions: How to handle ENE 334 Datapath and Control Page 93 Save the address of the offending instruction in the exception program counter (EPC) then transfer control to the operating system (OS) at the specified address. I/O device request OS then take appropriate actions and can restart the execution using EPC by means of: - a status register - vectored interrupts

94 Exceptions: Implementation ENE 334 Datapath and Control Page 94 Two more registers: - EPC - Cause Control signals: - EPCWrite - CauseWrite - IntCause: set the low-order bit of the Cause register appropriately (bit '0' = undefined instruction, bit '1' = arithmetic overflow) Need to be able to write the exception address into the PC.

95 Exceptions: Implementation ENE 334 Datapath and Control Page 95

96 Exceptions: Control Checks ENE 334 Datapath and Control Page 96

97 Pentium 4 ENE 334 Datapath and Control Page 97 Somewhere in all that control we must handle complex instructions Control Control I/O interface Instruction cache Enhanced floating point and multimedia Control Data cache Integer datapath Secondary cache and memory interface Advanced pipelining hyperthreading support Control Processor executes simple microinstructions, 70 bits wide (hardwired) 120 control lines for integer datapath (400 for floating point) If an instruction requires more than 4 microinstructions to implement, control from microcode ROM (8000 microinstructions) Its complicated!

98 ENE 334 Datapath and Control Page 98 Conclusions: If we understand the instructions We can build a simple processor! If instructions take different amounts of time, multi-cycle is better Datapath implemented using: Combinational logic for arithmetic State holding elements to remember bits Control implemented using: Combinational logic for single-cycle implementation Finite state machine for multi-cycle implementation

99 Questions?: ENE 334 Datapath and Control Page 99 Midterm: Thursday 11 th oct, 2012: 9am-12pm

Multicycle Approach. Designing MIPS Processor

Multicycle Approach. Designing MIPS Processor CSE 675.2: Introduction to Computer Architecture Multicycle Approach 8/8/25 Designing MIPS Processor (Multi-Cycle) Presentation H Slides by Gojko Babić and Elsevier Publishing We will be reusing functional

More information

The Processor: Datapath & Control

The Processor: Datapath & Control Chapter Five 1 The Processor: Datapath & Control We're ready to look at an implementation of the MIPS Simplified to contain only: memory-reference instructions: lw, sw arithmetic-logical instructions:

More information

Chapter 4 The Processor (Part 2)

Chapter 4 The Processor (Part 2) Department of Electr rical Eng ineering, Chapter 4 The Processor (Part 2) 王振傑 (Chen-Chieh Wang) ccwang@mail.ee.ncku.edu.tw ncku edu Feng-Chia Unive ersity Outline A Multicycle Implementation Mapping Control

More information

Lets Build a Processor

Lets Build a Processor Lets Build a Processor Almost ready to move into chapter 5 and start building a processor First, let s review Boolean Logic and build the ALU we ll need (Material from Appendix B) operation a 32 ALU result

More information

Implementing the Control. Simple Questions

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

More information

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

Systems Architecture I

Systems Architecture I Systems Architecture I Topics A Simple Implementation of MIPS * A Multicycle Implementation of MIPS ** *This lecture was derived from material in the text (sec. 5.1-5.3). **This lecture was derived from

More information

CC 311- Computer Architecture. The Processor - Control

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

More information

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

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

More information

Lecture 5 and 6. ICS 152 Computer Systems Architecture. Prof. Juan Luis Aragón

Lecture 5 and 6. ICS 152 Computer Systems Architecture. Prof. Juan Luis Aragón ICS 152 Computer Systems Architecture Prof. Juan Luis Aragón Lecture 5 and 6 Multicycle Implementation Introduction to Microprogramming Readings: Sections 5.4 and 5.5 1 Review of Last Lecture We have seen

More information

CPE 335. Basic MIPS Architecture Part II

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

More information

EECE 417 Computer Systems Architecture

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

More information

RISC Processor Design

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

More information

Processor: Multi- Cycle Datapath & Control

Processor: Multi- Cycle Datapath & Control Processor: Multi- Cycle Datapath & Control (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann, 27) COURSE

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

ALUOut. Registers A. I + D Memory IR. combinatorial block. combinatorial block. combinatorial block MDR

ALUOut. Registers A. I + D Memory IR. combinatorial block. combinatorial block. combinatorial block MDR Microprogramming Exceptions and interrupts 9 CMPE Fall 26 A. Di Blas Fall 26 CMPE CPU Multicycle From single-cycle to Multicycle CPU with sequential control: Finite State Machine Textbook Edition: 5.4,

More information

Mapping Control to Hardware

Mapping Control to Hardware C A P P E N D I X A custom format such as this is slave to the architecture of the hardware and the instruction set it serves. The format must strike a proper compromise between ROM size, ROM-output decoding,

More information

CSE 2021 COMPUTER ORGANIZATION

CSE 2021 COMPUTER ORGANIZATION CSE 22 COMPUTER ORGANIZATION HUGH CHESSER CHESSER HUGH CSEB 2U 2U CSEB Agenda Topics:. Sample Exam/Quiz Q - Review 2. Multiple cycle implementation Patterson: Section 4.5 Reminder: Quiz #2 Next Wednesday

More information

LECTURE 6. Multi-Cycle Datapath and Control

LECTURE 6. Multi-Cycle Datapath and Control LECTURE 6 Multi-Cycle Datapath and Control SINGLE-CYCLE IMPLEMENTATION As we ve seen, single-cycle implementation, although easy to implement, could potentially be very inefficient. In single-cycle, we

More information

RISC Architecture: Multi-Cycle Implementation

RISC Architecture: Multi-Cycle Implementation RISC Architecture: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay

More information

CSE 2021 COMPUTER ORGANIZATION

CSE 2021 COMPUTER ORGANIZATION CSE 2021 COMPUTER ORGANIZATION HUGH LAS CHESSER 1012U HUGH CHESSER CSEB 1012U W10-M Agenda Topics: 1. Multiple cycle implementation review 2. State Machine 3. Control Unit implementation for Multi-cycle

More information

RISC Architecture: Multi-Cycle Implementation

RISC Architecture: Multi-Cycle Implementation RISC Architecture: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay

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

EECE 417 Computer Systems Architecture

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

More information

RISC Design: Multi-Cycle Implementation

RISC Design: Multi-Cycle Implementation RISC Design: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay http://www.ee.iitb.ac.in/~viren/

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

Inf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle

Inf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle Inf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle Boris Grot School of Informatics University of Edinburgh Previous lecture: single-cycle processor Inf2C Computer Systems - 2017-2018. Boris

More information

Microprogramming. Microprogramming

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

More information

Initial Representation Finite State Diagram. Logic Representation Logic Equations

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

More information

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Data Paths and Microprogramming

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Data Paths and Microprogramming Computer Science 324 Computer Architecture Mount Holyoke College Fall 2007 Topic Notes: Data Paths and Microprogramming We have spent time looking at the MIPS instruction set architecture and building

More information

CO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19

CO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19 CO2-3224 Computer Architecture and Programming Languages CAPL Lecture 8 & 9 Dr. Kinga Lipskoch Fall 27 Single Cycle Disadvantages & Advantages Uses the clock cycle inefficiently the clock cycle must be

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 Science 141 Computing Hardware

Computer Science 141 Computing Hardware Computer Science 4 Computing Hardware Fall 6 Harvard University Instructor: Prof. David Brooks dbrooks@eecs.harvard.edu Upcoming topics Mon, Nov th MIPS Basic Architecture (Part ) Wed, Nov th Basic Computer

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

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

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

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

More information

Multiple Cycle Data Path

Multiple Cycle Data Path Multiple Cycle Data Path CS 365 Lecture 7 Prof. Yih Huang CS365 1 Multicycle Approach Break up the instructions into steps, each step takes a cycle balance the amount of work to be done restrict each cycle

More information

Alternative to single cycle. Drawbacks of single cycle implementation. Multiple cycle implementation. Instruction fetch

Alternative to single cycle. Drawbacks of single cycle implementation. Multiple cycle implementation. Instruction fetch Drawbacks of single cycle implementation Alternative to single cycle All instructions take the same time although some instructions are longer than others; e.g. load is longer than add since it has to

More information

Chapter 5 Solutions: For More Practice

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

More information

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 8: Control COS / ELE 375. Computer Architecture and Organization. Princeton University Fall Prof. David August

Lecture 8: Control COS / ELE 375. Computer Architecture and Organization. Princeton University Fall Prof. David August Lecture 8: Control COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 Datapath and Control Datapath The collection of state elements, computation elements,

More information

Points available Your marks Total 100

Points available Your marks Total 100 CSSE 3 Computer Architecture I Rose-Hulman Institute of Technology Computer Science and Software Engineering Department Exam Name: Section: 3 This exam is closed book. You are allowed to use the reference

More information

ECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours.

ECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours. This exam is open book and open notes. You have 2 hours. Problems 1-4 refer to a proposed MIPS instruction lwu (load word - update) which implements update addressing an addressing mode that is used in

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

CS152 Computer Architecture and Engineering Lecture 13: Microprogramming and Exceptions. Review of a Multiple Cycle Implementation

CS152 Computer Architecture and Engineering Lecture 13: Microprogramming and Exceptions. Review of a Multiple Cycle Implementation CS152 Computer Architecture and Engineering Lecture 13: Microprogramming and Exceptions March 3, 1995 Dave Patterson (patterson@cs) and Shing Kong (shing.kong@eng.sun.com) Slides available on http://http.cs.berkeley.edu/~patterson

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

Design of the MIPS Processor

Design of the MIPS Processor Design of the MIPS Processor We will study the design of a simple version of MIPS that can support the following instructions: I-type instructions LW, SW R-type instructions, like ADD, SUB Conditional

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

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

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

Computer Organization & Design The Hardware/Software Interface Chapter 5 The processor : Datapath and control

Computer Organization & Design The Hardware/Software Interface Chapter 5 The processor : Datapath and control Computer Organization & Design The Hardware/Software Interface Chapter 5 The processor : Datapath and control Qing-song Shi http://.24.26.3 Email: zjsqs@zju.edu.cn Chapter 5 The processor : Datapath and

More information

Single vs. Multi-cycle Implementation

Single vs. Multi-cycle Implementation Single vs. Multi-cycle Implementation Multicycle: Instructions take several faster cycles For this simple version, the multi-cycle implementation could be as much as 1.27 times faster (for a typical instruction

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

ECE 3056: Architecture, Concurrency and Energy of Computation. Single and Multi-Cycle Datapaths: Practice Problems

ECE 3056: Architecture, Concurrency and Energy of Computation. Single and Multi-Cycle Datapaths: Practice Problems ECE 3056: Architecture, Concurrency and Energy of Computation Single and Multi-Cycle Datapaths: Practice Problems 1. Consider the single cycle SPIM datapath. a. Specify the values of the control signals

More information

Multicycle conclusion

Multicycle conclusion Multicycle conclusion The last few lectures covered a lot of material! We introduced a multicycle datapath, where different instructions take different numbers of cycles to execute. A multicycle unit is

More information

Control Unit for Multiple Cycle Implementation

Control Unit for Multiple Cycle Implementation Control Unit for Multiple Cycle Implementation Control is more complex than in single cycle since: Need to define control signals for each step Need to know which step we are on Two methods for designing

More information

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

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

More information

THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination

THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination May 23, 2014 Name: Email: Student ID: Lab Section Number: Instructions: 1. This

More information

Design of the MIPS Processor (contd)

Design of the MIPS Processor (contd) Design of the MIPS Processor (contd) First, revisit the datapath for add, sub, lw, sw. We will augment it to accommodate the beq and j instructions. Execution of branch instructions beq $at, $zero, L add

More information

Outline. Combinational Element. State (Sequential) Element. Clocking Methodology. Input/Output of Elements

Outline. Combinational Element. State (Sequential) Element. Clocking Methodology. Input/Output of Elements Outline ombinational Element ombinational & sequential logic Single-cycle PU ulti-cycle PU Examples of ombinational Elements State (Sequential) Element! "#$$$ #$$ #$$ #$ # & & ) *.// * - + #3, * + - locking

More information

Microprogrammed Control Approach

Microprogrammed Control Approach Microprogrammed Control Approach Considering the FSM for our MIPS subset has 10 states, the complete MIPS instruction set, which contains more than 100 instructions, and considering that these instructions

More information

ECE 313 Computer Organization EXAM 2 November 9, 2001

ECE 313 Computer Organization EXAM 2 November 9, 2001 ECE 33 Computer Organization EA 2 November 9, 2 This exam is open book and open notes. You have 5 minutes. Credit for problems requiring calculation will be given only if you show your work. Choose and

More information

5.7. Microprogramming: Simplifying Control Design 5.7

5.7. Microprogramming: Simplifying Control Design 5.7 5.7 Microprogramming: Simplifying Control Design 5.7 For the of our simple MIPS subset, a graphical representation of the finite state machine, as in Figure 5.40 on page 345, is certainly adequate. We

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

ECE 313 Computer Organization FINAL EXAM December 11, Multicycle Processor Design 30 Points

ECE 313 Computer Organization FINAL EXAM December 11, Multicycle Processor Design 30 Points This exam is open book and open notes. Credit for problems requiring calculation will be given only if you show your work. 1. Multicycle Processor Design 0 Points In our discussion of exceptions in the

More information

Introduction. ENG3380 Computer Organization and Architecture MIPS: Data Path Design Part 3. Topics. References. School of Engineering 1

Introduction. ENG3380 Computer Organization and Architecture MIPS: Data Path Design Part 3. Topics. References. School of Engineering 1 ENG8 Computer Organization and rchitecture MIPS: Data Path Design Part Winter 7 S. reibi School of Engineering University of Guelph Introduction Topics uilding a Complete Data Path for MIPS Multi Cycle

More information

Note- E~ S. \3 \S U\e. ~ ~s ~. 4. \\ o~ (fw' \i<.t. (~e., 3\0)

Note- E~ S. \3 \S U\e. ~ ~s ~. 4. \\ o~ (fw' \i<.t. (~e., 3\0) 5.4 A Multicycle Implementation 377 Similarly, if we had a machine with more powerful operations and addressing modes, instructions could vary from three or four functional unit delays to tens or even

More information

LECTURE 5. Single-Cycle Datapath and Control

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

More information

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

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

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

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

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

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

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

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

More information

Processor (multi-cycle)

Processor (multi-cycle) CS359: Computer Architecture Processor (multi-cycle) Yanyan Shen Department of Computer Science and Engineering Five Instruction Steps ) Instruction Fetch ) Instruction Decode and Register Fetch 3) R-type

More information

ECE468 Computer Organization and Architecture. Designing a Multiple Cycle Controller

ECE468 Computer Organization and Architecture. Designing a Multiple Cycle Controller ECE468 Computer Organization and Architecture Designing a Multiple Cycle Controller ECE468 multicontroller Review of a Multiple Cycle Implementation The root of the single cycle processor s problems: The

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

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

Multi-cycle Approach. Single cycle CPU. Multi-cycle CPU. Requires state elements to hold intermediate values. one clock cycle or instruction

Multi-cycle Approach. Single cycle CPU. Multi-cycle CPU. Requires state elements to hold intermediate values. one clock cycle or instruction Multi-cycle Approach Single cycle CPU State element Combinational logic State element clock one clock cycle or instruction Multi-cycle CPU Requires state elements to hold intermediate values State Element

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

Processor Implementation in VHDL. University of Ulster at Jordanstown University of Applied Sciences, Augsburg

Processor Implementation in VHDL. University of Ulster at Jordanstown University of Applied Sciences, Augsburg University of Ulster at Jordanstown University of Applied Sciences, Augsburg Master of Engineering VLSI Design Project Report Processor Implementation in VHDL According to Computer Organisation & Design

More information

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Computer Organization and Structure. Bing-Yu Chen National Taiwan University Computer Organization and Structure Bing-Yu Chen National Taiwan University The Processor Logic Design Conventions Building a Datapath A Simple Implementation Scheme An Overview of Pipelining Pipelined

More information

Lecture 10 Multi-Cycle Implementation

Lecture 10 Multi-Cycle Implementation Lecture 10 ulti-cycle Implementation 1 Today s enu ulti-cycle machines Why multi-cycle? Comparative performance Physical and Logical Design of Datapath and Control icroprogramming 2 ulti-cycle Solution

More information

Single Cycle Datapath

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

More information

CS232 Final Exam May 5, 2001

CS232 Final Exam May 5, 2001 CS232 Final Exam May 5, 2 Name: This exam has 4 pages, including this cover. There are six questions, worth a total of 5 points. You have 3 hours. Budget your time! Write clearly and show your work. State

More information

Using a Hardware Description Language to Design and Simulate a Processor 5.8

Using a Hardware Description Language to Design and Simulate a Processor 5.8 5.8 Using a Hardware Description Language to Design and Simulate a Processor 5.8 As mentioned in Appix B, Verilog can describe processors for simulation or with the intention that the Verilog specification

More information

Lecture 9: Microcontrolled Multi-Cycle Implementations. Who Am I?

Lecture 9: Microcontrolled Multi-Cycle Implementations. Who Am I? 18-447 Lecture 9: Microcontrolled Multi-Cycle Implementations S 10 L9-1 James C. Hoe José F. Martínez Electrical & Computer Engineering Carnegie Mellon University February 1, 2010 Who Am I? S 10 L9-2 Associate

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

CSE 2021: Computer Organization Fall 2010 Solution to Assignment # 3: Multicycle Implementation

CSE 2021: Computer Organization Fall 2010 Solution to Assignment # 3: Multicycle Implementation CSE 2021: Computer Organization Fall 2010 Solution to Assignment # 3: Multicycle Implementation Note that these questions are taken from the previous final exmas of CSE2021 and should serve as practice

More information

The MIPS Processor Datapath

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

More information

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

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

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

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

Single Cycle Datapath

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

More information

CSE Computer Architecture I Fall 2009 Lecture 13 In Class Notes and Problems October 6, 2009

CSE Computer Architecture I Fall 2009 Lecture 13 In Class Notes and Problems October 6, 2009 CSE 30321 Computer Architecture I Fall 2009 Lecture 13 In Class Notes and Problems October 6, 2009 Question 1: First, we briefly review the notion of a clock cycle (CC). Generally speaking a CC is the

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