EEC 483 Computer Organization

Similar documents
1048: Computer Organization

The single-cycle design from last time

The extra single-cycle adders

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.

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

Quiz #1 EEC 483, Spring 2019

Review. A single-cycle MIPS processor

Review Multicycle: What is Happening. Controlling The Multicycle Design

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

Review: Computer Organization

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

CS 251, Winter 2018, Assignment % of course mark

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

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13

What do we have so far? Multi-Cycle Datapath

comp 180 Lecture 25 Outline of Lecture The ALU Control Operation & Design The Datapath Control Operation & Design HKUST 1 Computer Science

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

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

CS 251, Winter 2019, Assignment % of course mark

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

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

CS 251, Winter 2018, Assignment % of course mark

Exceptions and interrupts

1048: Computer Organization

Lecture 7. Building A Simple Processor

PS Midterm 2. Pipelining

ECE232: Hardware Organization and Design

Hardware Design Tips. Outline

EEC 483 Computer Organization

Enhanced Performance with Pipelining

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION

Computer Architecture

Computer Architecture

Chapter 6: Pipelining

Solutions for Chapter 6 Exercises

1048: Computer Organization

Pipelining. Chapter 4

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

CPE 335 Computer Organization. Basic MIPS Architecture Part I

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

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

EEC 483 Computer Organization. Branch (Control) Hazards

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

ECE473 Computer Architecture and Organization. Processor: Combined Datapath

Review: Abstract Implementation View

EXAMINATIONS 2003 END-YEAR COMP 203. Computer Organisation

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

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

CSE140: Components and Design Techniques for Digital Systems

Processor (I) - datapath & control. Hwansoo Han

CENG 3420 Lecture 06: Datapath

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

The overall datapath for RT, lw,sw beq instrucution

Lecture 5: The Processor

Chapter 6: Pipelining

Overview of Pipelining

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

Ch 5: Designing a Single Cycle Datapath

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

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W9-W

Lecture 9: Microcontrolled Multi-Cycle Implementations

CSSE232 Computer Architecture I. Mul5cycle Datapath

Single-Cycle Examples, Multi-Cycle Introduction

LECTURE 5. Single-Cycle Datapath and Control

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

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

Merging datapaths: (add,lw, sw)

ECE 313 Computer Organization Name SOLUTION EXAM 2 November 3, Floating Point 20 Points

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

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

ECE260: Fundamentals of Computer Engineering

Chapter 4. The Processor

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

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

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

Chapter 5: The Processor: Datapath and Control

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

Chapter 4. The Processor

Computer Architecture. Lecture 6: Pipelining

Systems Architecture I

The Processor: Datapath & Control

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

POWER-OF-2 BOUNDARIES

Review. How to represent real numbers

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.

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

Lecture 10: Pipelined Implementations

Systems Architecture

Lets Build a Processor

Inf2C - Computer Systems Lecture Processor Design Single Cycle

The MIPS Processor Datapath

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W12-M

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

Laboratory 5 Processor Datapath

Multiple Cycle Data Path

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

Decoders. 3-Input Full Decoder

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization

4.13. An Introduction to Digital Design Using a Hardware Design Language to Describe and Model a Pipeline and More Pipelining Illustrations

Transcription:

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 Control path Between memory,, register When a 32-bit instrction is ready It is decoded to obtain opcode, register nmbers, nmbers go to register and the register vales become ready Immediate vale becomes ready emory is read and ready Control Need to decide which inpts shold be sed (mltipleors) control sch as operation, binvert, carryin, signal (register write, memory write) 3 Control Signal When does the contents of state element change? Edge triggered methodology Every inpt to pdate state element mst be stable at the active clock edge Feedback cannot occr within the same clock cycle (no race) If the contents of state element change every clock cycle, it s OK. If not??? We need a write control signal that mst be asserted for a write to occr at the clock edge. => Reg, em, em State element Combinational logic 4 2

Generation of Control Signals 32-bit instrction 6-bit opcode Control Logic 9 control signals 5 Control Signals (9) ltipletor selector Src RegDst emtoreg PCSrc control Op Op : second operand for : destination reg. no. for register : destination reg. for reg. :??? (the only eception that cannot be set based on the given instrction) signals Reg : what happen add $s, $s, $s2??? em / em 6 3

Signal add $8, $7, $8 op rs rt rd shamt fnct lw $, ($2) op rs rt 6 bit offset ( write reqired) 7 emory (emory read reqired) ( write reqired) Signal sw $, ($2) op rs rt 6 bit offset emory (emory write reqired) 8 4

Signal nmbers 5 control 3 register 5 5 register 2 s register 2 Reg add, lw: sw, beq:??? Zero reslt add, lw, sw, beq:??? Address em memory em add, lw, sw, beq:??? What happen before write vale to $ is ready? => need some time to be stabilized => this will be the longest path (critical path) => determines the clock cycle for the CPU 9 Control Signals (9) 3 write signals emto- Reg em em (PCSrc) Instrction RegDst Src Reg Branch Op p R-format lw sw X X beq X X 9 control signals 5

IPS Instrction Types add/ sb (destination) reg reg reg 32/34 and/ or slt reg reg reg 36/37 reg reg reg 42 6 5 5 5 5 6 R-type lw sw beq (destination) 35 reg reg address (destination) 43 reg reg address 4 reg reg address 6 5 5 6 I-type ltipleer Selector 4 Add RegDst Branch Shift left 2 Add reslt PCSrc em Instrction [3 26] emtoreg Control Op em Src Reg PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 s register 2 Zero reslt Address memory Instrction [5 ] RegDst Src emtoreg 6 32 Sign etend control Instrction [5 ] 2 6

ltipleor Selector Src add: lw: 3 control add: lw: RegDst Inst. : rt => Inst. : 6-bit offset m Zero reslt Inst. : rd Inst. : rt m nmbers 5 5 5 register register 2 s register 2 memory m Reg 3 add: lw: emtoreg ltipleer Selector add $8, $7, $8 op rs rt rd shamt fnct lw $, ($2) op rs rt 6 bit offset Src emory In case of sw RegDst emtoreg X (don t care) X (don t care) 4 7

One ore ltipleor Selector PC ADD 4 S.E.(6-bit)<<2 ADD PCSrc Branch Zero flag 5 Control Signals (9) 4 mltipleor selectors emto- Reg em em (PCSrc) Instrction RegDst Src Reg Branch Op p R-format lw sw X X beq X X 9 control signals 6 8

Control What shold the do with this instrction? Information comes from the 32 bits of the instrction 's operation based on instrction type and fnction code lti-level control (for simplifying control logic) Instrction s opcode (bit3-bit26) => Op & Op (with instrction s fnct (bit4-bit)) => inpts: binvert (= carryin), operation 7 Generation of Control Signals 32-bit instrction 6-bit opcode 6-bit fnc Control Logic 9 control signals OP/ Control 3 control Zero reslt 8 9

9 Control control inpts binvert=carryin operation opcode lw 2 <= add for address calclation sw 2 <= add for address calclation beq 2 <= sb for comparison add 2 sb 2 and or slt 3 2

Control: lti-level st level control: Instrction s opcode (bit3-bit26) => Op & Op lw () => sw () => Op compted from instrction beq () => type (mltiple levels of control to arithmetic () => redce the size of control nit) 2 nd level control: Op & Op + fnct (bit5-bit) => binvert (=carryin), operation lw/sw beq arithmetic Op Fnct field Operation Op Op F5 F4 F3 F2 F F X X X X X X X X X X X X X X X X X X X X X X X X X X X X add add add () sb () and () or () slt () 2 Implement with gates based on this trth table e.g. bit=a(f3+f) since there is only one for F3 and F Control st describe hardware to compte 4-bit control inpt given instrction type = lw, sw = beq, = arithmetic fnction code for arithmetic Describe it sing a trth table (can trn into gates): Op compted from instrction type 22

Control Signals (9) Simple combinational logic (trth tables) Inpts Op control block Op Op Opcode (bit3-26) Op5 Op4 Op3 Op2 Op F (5 ) F3 F2 F F Operation2 Operation Operation Operation Op R-format Iw sw beq Otpts RegDst Src e.g. bit=a(f3+f) emtoreg Reg em em Branch Op OpO 23 Control Signals (9) Add reslt 4 Add RegDst Branch Shift left 2 em Instrction [3 26] emtoreg Control Op em Src Reg PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 s register 2 Zero reslt Address memory Instrction [5 ] 6 32 Sign etend control Instrction [5 ] 24 2

Control Signals (9) 4 mltipleor selectors 2 write signals 2 controls emto- Reg em em (PCSrc) Instrction RegDst Src Reg Branch Op p R-format lw sw X X beq X X 9 control signals 25 Or Simple Control Strctre All of the logic is combinational We wait for everything to settle down, and the right thing to be done might not prodce right answer right away we se write signals along with clock to determine when to write Cycle time determined by length of the longest path State element Combinational logic State element 2 Clock cycle We are ignoring some details like setp and hold times 26 3

Single Cycle Implementation Calclate cycle time assming negligible delays ecept: memory (2ns), and adders (2ns), register access (ns) PCSrc 4 Add Reg Shift left 2 Add reslt PC address Instrction [3 ] Instrction memory Instrction [25 2] Instrction [2 6] Instrction [5 ] RegDst Instrction [5 ] register register 2 register 2 s 6 Sign 32 etend Src control Zero reslt em Address memory em emtoreg Instrction [5 ] Op 27 Where we are headed Single Cycle Problems: what if we had a more complicated instrction like floating point? wastefl of area (dplicated fnction blocks) One Soltion: se a smaller cycle time have different instrctions take different nmbers of cycles a mlticycle path: PC Address emory Instrction or Instrction register emory register # s # # A B Ot 28 4