Designing Single-Cycle MIPS Processor

Similar documents
Review. Combined Datapath

Designing MIPS Processor

Instruction register. Data. Registers. Register # Memory data register

Topics: A multiple cycle implementation. Distributed Notes

CPU DESIGN The Single-Cycle Implementation

Pipelined Datapath. Reading. Sections Practice Problems: 1, 3, 8, 12 (2) Lecture notes from MKP, H. H. Lee and S.

Computer Engineering Department. CC 311- Computer Architecture. Chapter 4. The Processor: Datapath and Control. Single Cycle

CPU DESIGN The Single-Cycle Implementation

Lecture 12: Pipelined Implementations: Control Hazards and Resolutions

Processor Design & ALU Design

Computer Architecture Lecture 5: ISA Wrap-Up and Single-Cycle Microarchitectures

Lecture 9: Control Hazard and Resolution. James C. Hoe Department of ECE Carnegie Mellon University

Building a Computer. Quiz #2 on 10/31, open book and notes. (This is the last lecture covered) I wonder where this goes? L16- Building a Computer 1

CSc 256 Midterm 2 Fall 2010

L07-L09 recap: Fundamental lesson(s)!

Control. Control. the ALU. ALU control signals 11/4/14. Next: control. We built the instrument. Now we read music and play it...

Pipelining. Traditional Execution. CS 365 Lecture 12 Prof. Yih Huang. add ld beq CS CS 365 2

Concepts Introduced. Digital Electronics. Logic Blocks. Truth Tables

[2] Predicting the direction of a branch is not enough. What else is necessary?

Pipeline Datapath. With some slides from: John Lazzaro and Dan Garcia

CSCI-564 Advanced Computer Architecture

Fast Path-Based Neural Branch Prediction

[2] Predicting the direction of a branch is not enough. What else is necessary?

CSE Computer Architecture I

Computer Architecture ELEC2401 & ELEC3441

EC 413 Computer Organization

3. (2) What is the difference between fixed and hybrid instructions?

Pipeline Datapath. With some slides from: John Lazzaro and Dan Garcia

Implementing the Controller. Harvard-Style Datapath for DLX

1. (2 )Clock rates have grown by a factor of 1000 while power consumed has only grown by a factor of 30. How was this accomplished?

4. (3) What do we mean when we say something is an N-operand machine?

Project Two RISC Processor Implementation ECE 485

Arithmetic and Logic Unit First Part

A Second Datapath Example YH16

Pulses on a Struck String

UNCERTAINTY FOCUSED STRENGTH ANALYSIS MODEL

Lecture 13: Sequential Circuits, FSM

Linear System Theory (Fall 2011): Homework 1. Solutions

6 PM Midnight A B C D. Time. T a s k. O r d e r. Computer Architecture CTKing/TTHwang. Pipelining-1. Pipelining-3 CTKing/TTHwang

Chapter 4 Supervised learning:

Computer Architecture. ECE 361 Lecture 5: The Design Process & ALU Design. 361 design.1

Problem Class 4. More State Machines (Problem Sheet 3 con t)

中村宏 工学部計数工学科 情報理工学系研究科システム情報学専攻 計算システム論第 2 1

Setting The K Value And Polarization Mode Of The Delta Undulator

A Model-Free Adaptive Control of Pulsed GTAW

We automate the bivariate change-of-variables technique for bivariate continuous random variables with

FEA Solution Procedure

Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

61C In the News. Processor Design: 5 steps

4.2 First-Order Logic

2

1. Tractable and Intractable Computational Problems So far in the course we have seen many problems that have polynomial-time solutions; that is, on

CA Compiler Construction

On the circuit complexity of the standard and the Karatsuba methods of multiplying integers

Designing of Virtual Experiments for the Physics Class

3 2D Elastostatic Problems in Cartesian Coordinates

PREDICTABILITY OF SOLID STATE ZENER REFERENCES

CS/COE0447: Computer Organization and Assembly Language

Lecture 13: Sequential Circuits, FSM

Uncertainties of measurement

OPTIMUM EXPRESSION FOR COMPUTATION OF THE GRAVITY FIELD OF A POLYHEDRAL BODY WITH LINEARLY INCREASING DENSITY 1

Spiral 1 / Unit 3

Sources of Non Stationarity in the Semivariogram

Lecture 3, Performance

Simple Instruction-Pipelining. Pipelined Harvard Datapath

Formal Methods for Deriving Element Equations

Convergence analysis of ant colony learning

Lecture 3, Performance

Study on the Mathematic Model of Product Modular System Orienting the Modular Design

Decision Making in Complex Environments. Lecture 2 Ratings and Introduction to Analytic Network Process

A Note on Johnson, Minkoff and Phillips Algorithm for the Prize-Collecting Steiner Tree Problem

Lecture Notes On THEORY OF COMPUTATION MODULE - 2 UNIT - 2

Sareban: Evaluation of Three Common Algorithms for Structure Active Control

ECE 3401 Lecture 23. Pipeline Design. State Table for 2-Cycle Instructions. Control Unit. ISA: Instruction Specifications (for reference)

Chapter 2 Difficulties associated with corners

Affine Invariant Total Variation Models

Simple Instruction-Pipelining (cont.) Pipelining Jumps

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University

CS61C : Machine Structures

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

Workshop on Understanding and Evaluating Radioanalytical Measurement Uncertainty November 2007

Passivity-based Control of NPC Three-level Inverter

CS61C : Machine Structures

Assignment Fall 2014

Comparison of Monte Carlo and deterministic simulations of a silicon diode Jose A. Carrillo Λ, Irene M. Gamba y, Orazio Muscato z and Chi-Wang Shu x N

Decoder Error Probability of MRD Codes

Discussion of The Forward Search: Theory and Data Analysis by Anthony C. Atkinson, Marco Riani, and Andrea Ceroli

Step-Size Bounds Analysis of the Generalized Multidelay Adaptive Filter

Simulation investigation of the Z-source NPC inverter

Outcomes. Spiral 1 / Unit 2. Boolean Algebra BOOLEAN ALGEBRA INTRO. Basic Boolean Algebra Logic Functions Decoders Multiplexers

INPUT-OUTPUT APPROACH NUMERICAL EXAMPLES

Review: Single-Cycle Processor. Limits on cycle time

Optimization in Predictive Control Algorithm

where v ij = [v ij,1,..., v ij,v ] is the vector of resource

Joint Transfer of Energy and Information in a Two-hop Relay Channel

Introdction Finite elds play an increasingly important role in modern digital commnication systems. Typical areas of applications are cryptographic sc

Visualisations of Gussian and Mean Curvatures by Using Mathematica and webmathematica

Control Performance Monitoring of State-Dependent Nonlinear Processes

CSE140: Components and Design Techniques for Digital Systems. Decoders, adders, comparators, multipliers and other ALU elements. Tajana Simunic Rosing

I block CLK 1 CLK 2. Oscillator - Delay block. circuit. US Al. Jun.28,2011 P21 P11 P22 P12. PlN P2N. (19) United States

Transcription:

CSE 32: Introdction to Compter Architectre Designing Single-Cycle IPS Processor Presentation G Stdy:.-. Gojko Babić 2/9/28 Introdction We're now ready to look at an implementation of the system that incldes IPS processor and. The design will inclde spport for eection of only: -reference instrctions: lw & sw, arithmetic-logical instrctions: add, sb, and, or, slt & nor, control flow instrctions: beq & j, eception handling: illegal instrction & overflow. Bt that design will provide s with principles, so many more instrctions cold be easily added sch as: add, lb, lb, li, addi, addi, slt, slti, andi, ori, or, ori, jal, jr, jalr, bne, beqz, bgtz, bltz, nop, mfhi, mflo, mfepc, mfco, lwc, swc, etc. g. babic Presentation G 2

Single Cycle Design We shall first design a simpler processor that eectes each instrction in only one clock cycle time. This is not efficient from performance point of view, since: a clock cycle time (i.e. clock rate) mst be chosen sch that the longest instrction can be eected in one clock cycle and that makes shorter instrctions eecte in one nnecessarily long cycle. itionally, no resorce in the design may be sed more than once per instrction, ths some resorces will be dplicated. Ths, the singe cycle design will reqire: two memories (instrction and ), two additional adders. g. babic Presentation G 3 Elements for path Design a. Program conter ALU control res lt overflow ress em 6 Sign c. ALU em g. Sign-etension nit e. nit Register nmbers 5 5 5 2 Reg Sm d. er em= em = f. Shift Left 2 h. Shift left 2 b. Register File An edge triggered methodology g. babic Presentation G 2

Abstract / Simplified View Figre. Use the program conter () to spply instrction, Get the instrction from, s and se the instrction opcode to decide what to do is incremented by most instrctions, and + offset by branches Jmp instrctions change differently (not shown). g. babic Presentation G 5 Incrementing & Fetching A d d P C a d d r e s s In s tr c tio n In s tr c tio n m e m o r y Figre.6 with addition in red g. babic Presentation G 6 3

path for R-type s R e g W r ite I 25-2 ALU control In s tr c tio n I 2-6 Z e r o I 5- R e g is t e r s W r ite A L U A L U re s lt W r ite 2 d a t a add = sb = 3 3 26 25 2 2 6 5 6 5 slt = 2 R-type rs rt rd fnct and = 36 or = 37 g. babic Presentation G nor = 39 7 Complete path for R-type s Based on contents of op-code and fnct fields, Control Unit sets ALU control appropriately and asserts Reg, i.e. Reg =. R e g W r ite I 25-2 I 2-6 re g is te r re g is te r 2 d a ta ALU control Z e r o clock I 5- R e g is t e r s W r ite re g is te r d a ta 2 W r ite A L U A L U re s lt d a t a g. babic Presentation G 8

path for LW and SW s 3 26 25 2 2 6 5 sw or lw opcode rs rt offset R e g W r ite em In strc tion I 25-2 I 2-6 I 2-6 2 ALU control ress em I 5-6 Sign em Control Unit sets: ALU control = (add) for calclation for both lw and sw em=, em= and Reg= for sw em=, em= and Reg= for lw g. babic Presentation G 9 path for R-type, LW & SW s Reg em In str ction em = em = rs rt rd registe r registe r 2 6 Sign offset A L U control ress em emtoreg Let s determine setting of control lines for R-type, lw & sw instrctions. g. babic Presentation G 5

path for BEQ 3 26 25 2 2 6 5 beq rs rt offset Branch target = [] + + offset + from instrction path Sm Branch target Shift left 2 Instrc tio n rs rt 2 A L U control ALU To branch control logic Reg offset 6 Sign Figre.9 with additions in red g. babic Presentation G path for R-type, LW, SW & BEQ branch Src Reg Shift left 2 ALU em clock [3 ] em= em= [25 2] rs [2 6] rt [5 ] rd [5 ] offset 2 6 Sign ress em emtoreg ALU control Figre.5 with additions in red g. babic Presentation G 2 6

Control Unit and path ALU Branch Shift left 2 Src em [3 26] opcode Control emtoreg ALUOp em [3 ] em= em= [25 2] [2 6] rt [5 ] rd [5 ] rs Reg anded 2 6 offset Sign ALU control ress anded [5 ] fnct Figre.7 with additions in red g. babic Presentation G 3 Trth Table for (ain) Control Unit Inpt Otpt Figre.8 emto- Reg em em Op-code Reg Branch ALUOp ALUp R-type lw sw beq d d d d d d ALUOp[-] = signal to ALU Control nit for ALU to perform add fnction, i.e. set Ainvert =, Binvert= and Operation= ALUOp[-] = signal to ALU Control nit for ALU to perform sbtract fnction, i.e. set Ainvert =, Binvert= and Operation= ALUOp[-] = signal to ALU Control nit to look at bits I [5-] and based on its pattern to set Ainvert, Binvert and Operation so that ALU performs appropriate fnction, i.e. add, sb, slt, and, or & nor g. babic Presentation G 7

Trth Table of ALU Control Unit Inpt Otpt ALUOp Fnct field ALU ALUOp ALUOp F5 F F3 F2 F F Control d d d d d d d d d d d d add sb add sb and or slt nor Ainvert Bivert Operation g. babic Presentation G 5 Design of (ain) Control Unit Op-code bits emto- Reg em em 5 3 2 Reg Branch ALUOp ALUp d d d d d d Inpts Op5 Op =Op 5 Op Op 3 Op 2 Op Op Op3 Op2 Op Op = Op 5 Op Op 3 Op 2 Op Op +Op 5 Op Op 3 Op 2 Op Op R-format Iw sw beq Otpts emtoreg Reg em em Branch ALUOp ALUOpO g. babic Presentation G 6 8

path for R-type, LW, SW, BEQ & J 3 26 25 j jmp_target 3-28 jmp_target 2 zeros [3-28] [25 ] Shift Jmp [3 ] left 2 26 28 + [3 28] Jmp Branch shift left 2 ALU [3 26] em Control emtoreg ALUOp em Reg [3 ] [25 2] [2 6] [5 ] 2 ress Figre.2 with correction in red [5 ] 6 Sign [5 ] ALU control g. babic Presentation G 7 Design of Control Unit (J inclded) Op-code bits 5 3 2 emto- Reg Reg em em Branch ALUOp ALUp d d d d d d J d d d d d d d Jmp =Op 5 Op Op 3 Op 2 Op Op Inpts Op5 Op Op3 Op2 Op Op Jmp R-format Iw sw beq Jmp No changes in ALU Control nit emtoreg Reg em em Branch ALUOp ALUOpO g. babic Presentation G 8 9

Design of ALU Control Unit Withot NOR Inpt Otpt ALUOp Fnct field ALU ALUOp ALUOp F5 F F3 F2 F F Control d d d d d d d d d d d d ALUOP ALUOP add sb add sb and or slt Bivert Operation F5 F F3 F2 ALU Control Lines (Binvert & Operation) F F g. babic 9 Cycle Time Calclation Let s assme that the only delays introdced are by the following tasks: emory access (read and write time = 3 nsec) Register file access (read and write time = nsec) ALU to perform fnction (= 2 nsec) Under those assmption here are instrction eection times: Instr Reg ALU Reg fetch read oper write Total R-type 3 + + 2 + = 7 nsec lw 3 + + 2 + 3 + = nsec sw 3 + + 2 + 3 = 9 nsec branch 3 + + 2 = 6 nsec jmp 3 = 3 nsec Ths a clock cycle time has to be nsec, and clock rate = / nsec = Hz g. babic Presentation G 2

Single Cycle Processor: Conclsion Single Cycle Problems: what if we had a more complicated instrction like floating point? a clock cycle wold be mch longer, ths for shorter and more often sed instrctions, sch as add & lw, wastefl of time. One Soltion: se a smaller cycle time, and have different instrctions take different nmbers of cycles. And that is a mlti-cycle processor. g. babic Presentation G 2