61C In the News. Processor Design: 5 steps

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

CPU DESIGN The Single-Cycle Implementation

Review. Combined Datapath

Project Two RISC Processor Implementation ECE 485

Processor Design & ALU Design

Implementing the Controller. Harvard-Style Datapath for DLX

CSE Computer Architecture I

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

EC 413 Computer Organization

TEST 1 REVIEW. Lectures 1-5

Simple Instruction-Pipelining. Pipelined Harvard Datapath

Spiral 1 / Unit 3

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

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

L07-L09 recap: Fundamental lesson(s)!

Computer Architecture ELEC2401 & ELEC3441


COVER SHEET: Problem#: Points

Simple Instruction-Pipelining. Pipelined Harvard Datapath

Designing MIPS Processor

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

CSE 140 Lecture 11 Standard Combinational Modules. CK Cheng and Diba Mirza CSE Dept. UC San Diego

Lecture 13: Sequential Circuits, FSM

Review: Single-Cycle Processor. Limits on cycle time

Lecture 3, Performance

Lecture 3, Performance

CprE 281: Digital Logic

Topics: A multiple cycle implementation. Distributed Notes

Lecture 13: Sequential Circuits, FSM

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

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

ALU A functional unit

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

A Second Datapath Example YH16

Design at the Register Transfer Level

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?

Enrico Nardelli Logic Circuits and Computer Architecture

CPSC 3300 Spring 2017 Exam 2

Preparation of Examination Questions and Exercises: Solutions

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

Fundamentals of Digital Design

Simple Instruction-Pipelining (cont.) Pipelining Jumps

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

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

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

State and Finite State Machines

CHAPTER log 2 64 = 6 lines/mux or decoder 9-2.* C = C 8 V = C 8 C * 9-4.* (Errata: Delete 1 after problem number) 9-5.

Spiral 2-1. Datapath Components: Counters Adders Design Example: Crosswalk Controller

Designing Single-Cycle MIPS Processor

Professor Fearing EECS150/Problem Set Solution Fall 2013 Due at 10 am, Thu. Oct. 3 (homework box under stairs)

CPS 104 Computer Organization and Programming Lecture 11: Gates, Buses, Latches. Robert Wagner

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

Design of Digital Circuits Lecture 14: Microprogramming. Prof. Onur Mutlu ETH Zurich Spring April 2017

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

DIGITAL LOGIC CIRCUITS

Numbers and Arithmetic

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

課程名稱 : 數位邏輯設計 P-1/ /6/11

CPU DESIGN The Single-Cycle Implementation

CSCI-564 Advanced Computer Architecture

CS61C : Machine Structures

Microprocessor Power Analysis by Labeled Simulation

Design of Sequential Circuits

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

CS61C : Machine Structures

UNIVERSITY OF WISCONSIN MADISON

SISD SIMD. Flynn s Classification 8/8/2016. CS528 Parallel Architecture Classification & Single Core Architecture C P M

Outcomes. Spiral 1 / Unit 3. The Problem SYNTHESIZING LOGIC FUNCTIONS

CMP 338: Third Class


We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

Arithmetic and Logic Unit First Part

State & Finite State Machines

EXAMPLES 4/12/2018. The MIPS Pipeline. Hazard Summary. Show the pipeline diagram. Show the pipeline diagram. Pipeline Datapath and Control

Computer Architecture

DE58/DC58 LOGIC DESIGN DEC 2014

Hakim Weatherspoon CS 3410 Computer Science Cornell University

INF2270 Spring Philipp Häfliger. Lecture 8: Superscalar CPUs, Course Summary/Repetition (1/2)

ECE/CS 250 Computer Architecture

Mark Redekopp, All rights reserved. Lecture 1 Slides. Intro Number Systems Logic Functions

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Chapter 7. Sequential Circuits Registers, Counters, RAM

Menu. Excitation Tables (Bonus Slide) EEL3701 EEL3701. Registers, RALU, Asynch, Synch

Sample Test Paper - I

Combinational Logic Design Combinational Functions and Circuits

ICS 233 Computer Architecture & Assembly Language

LECTURE 28. Analyzing digital computation at a very low level! The Latch Pipelined Datapath Control Signals Concept of State

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

Different encodings generate different circuits

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Sequential Circuits. Circuits with state. Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. L06-1

Logic and Computer Design Fundamentals. Chapter 8 Sequencing and Control

CSE140: Design of Sequential Logic

Adders, subtractors comparators, multipliers and other ALU elements

Floating Point Representation and Digital Logic. Lecture 11 CS301

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

The goal differs from prime factorization. Prime factorization would initialize all divisors to be prime numbers instead of integers*

Basic Computer Organization and Design Part 3/3

Transcription:

www.eetimes.com/electronics-news/23235/thailand-floods-take-toll-on--makers The Thai floods have already claimed the lives of hundreds of pele, with tens of thousands more having had to flee their homes in Bangkok. On a financial scale too the floods have wreaked havoc Around 25 percent of the world s hard drive manufacturing plants are situated in and around Bangkok 6C In the News Thailand Floods Take Toll on Makers Sylvie Barak //2 Western Digital corp., the world s largest producer of hard disc drives has had to close all its factories in Thailand down completely, as has Toshiba corp. and a number of other smaller HDD makers, leaving the industry with just two months worth of remaining inventory. We epect sales to be lower than epected. As a result, we epect weakness in DRAM prices, a Samsung eecutive said // Fall 2 - - Lecture #29 CS 6C: Great Ideas in Computer Architecture (Machine Structures) Lecture 29: Single- Cycle CPU path Control Part 2 ructors: Mike Franklin Dan Garcia hlp://inst.eecs.berkeley.edu/~cs6c/fa // Fall 2 - - Lecture #29 2 Review: Processor Design 5 steps Step : Analyze instrucuon set to determine datapath Meaning of each instrucuon is given by register transfers path must include storage element for ISA registers path must support each register transfer Step 2: Select set of datapath components & establish clock methodology Step 3: Assemble datapath components that meet the Step : Analyze implementauon of each instrucuon to determine se[ng of control points that realizes the register transfer Step 5: Assemble the control logic // Fall 2 - - Lecture #29 3 Processor Design: 5 steps Step : Analyze instrucuon set to determine datapath Meaning of each instrucuon is given by register transfers path must include storage element for ISA registers path must support each register transfer Step 2: Select set of datapath components & establish clock methodology Step 3: Assemble datapath components that meet the Step : Analyze implementauon of each instrucuon to determine se[ng of control points that realizes the register transfer Step 5: Assemble the control logic Fall 2 - - Lecture #29 Old Value Rs, Rt, Rd, Op, Func Register- Register Timing: One Complete Cycle (Add/Sub) rucuon Access Time Old Value Delay through Control Logic Old Value RegWr Old Value Register File Access Time, B Old Value Delay Old Value RegWr Rd Rs Rt Register Write Occurs Here // Fall 2 - - Lecture #29 5 3c: Logical Op (or) with Immediate R[rt] = R[rs] ZeroEt[] 6 bits 5 bits 5 bits 5 RegDst immediate Wri/ng to Rt register (not Rd)!! What about Rt Read? ZeroEt Src // Fall 2 - - Lecture #29 7

3d: Load OperaUons R[rt] = Mem[R[rs] + SignEt[]] Eample: lw rt,rs, 6 bits 5 bits 5 bits RegDst Rw Ra Rb // Fall 2 - - Lecture #29 9 Src MemtoReg 3e: Store OperaUons Mem[ R[rs] + SignEt[] ] = R[rt] E.: sw rt, rs, 6 bits 5 bits 5 bits RegDst MemtoReg Src In WrEn 3e: Store OperaUons Mem[ R[rs] + SignEt[] ] = R[rt] E.: sw rt, rs, 6 bits 5 bits 5 bits RegDst MemtoReg Src In WrEn 3f: The Branch rucuon 6 bits 5 bits 5 bits beq rs, rt, mem[] Fetch the instrucuon from memory Equal = R[rs] == R[rt] Calculate branch condiuon if (Equal) Calculate the net instrucuon s address = + + ( SignEt() ) else = + path for Branch OperaUons beq rs, rt, 6 bits 5 bits 5 bits path generates condiuon (Equal) Address Equal Already have mu, adder, need special sign etender for, need equal compare (sub?) = ruc2on Fetch Unit including Branch if (Zero == ) then = + + SignEt[]* ; else = + Equal MUX ctrl rucuon<:> How to encode? Direct MUX select? Branch inst. / not branch inst. Let s pick 2nd Uon zero? MUX Fall 2 - - Lecture #27 Q: What logic gate? 2

Pu[ng it All Together:A Single Cycle path <2:25> <:2> <:5> Rs Rt Rd RegDst <:5> Imm Equal ruction<:> Src MemtoReg = In WrEn path Control Signals : zero, sign src: regb; immed : ADD, SUB, OR RegDst Address & Equal Rw Ra Rb : write memory MemtoReg: ; Mem RegDst: rt ; rd RegWr: write register MemtoReg // Fall 2 - - Lecture #29 Src In WrEn Given path: RTL à Control rucuon<:> <26:> <:5> Op Fun <2:25> <:2> Rd <:5> <:5> Imm RegWr RegDst Src Rt Rs Control MemtoReg RTL: The Add rucuon 6 rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits add rd, rs, rt MEM[] Fetch the instrucuon from memory R[rd] = R[rs] + R[rt] The actual erauon = + Calculate the net instrucuon s address DATA PATH // Fall 2 - - Lecture #27 7 Fall 2 - - Lecture #29 8 rucuon Fetch Unit at the Beginning of Add Fetch the instrucuon from rucuon memory: rucuon = MEM[] same for all instrucuons Address rucuon<:> Fall 2 - - Lecture #29 9 Single Cycle path during Add 6 rs rt rd shamt funct R[rd] = R[rs] + R[rt] RegDst= Rd RegWr= Rs Rt =+ Rw Rt Ra Rb = instr fetch unit Rs Rt Rd Imm zero =ADD MemtoReg= Src= rucuon<:> <2:25> = In <:2> = <:5> WrEn <:5> Fall 2 - - Lecture #29 2 3

rucuon Fetch Unit at End of Add = + Same for all instrucuons ecept: Branch and P&H Figure.7 =+ Address Fall 2 - - Lecture #29 2 Fall 2 - - Lecture #29 22 Summary of the Control Signals (/2) inst!register Transfer! add!r[rd] R[rs] + R[rt]; +!!src=regb, = ADD, RegDst=rd, RegWr, = +!! sub!r[rd] R[rs] R[rt]; +!!src=regb, = SUB, RegDst=rd, RegWr, = +! ori!r[rt] R[rs] + zero_et(imm); +!!src=im, Et= Z, = OR, RegDst=rt,RegWr, = +! lw!r[rt] MEM[ R[rs] + sign_et(imm)]; +!!src=im, Et= sn, = ADD, MemtoReg, RegDst=rt, RegWr,! = +! sw!mem[ R[rs] + sign_et(imm)] R[rs]; +!!src=im, Et= sn, = ADD,, = +! beq!if (R[rs] == R[rt]) then + sign_et(imm)]!else +!! = br, = SUB! // Fall 2 - - Lecture #27 23 Summary of the Control Signals (2/2) See func We Don t Care :- ) Appendi A add sub ori lw sw beq RegDst Src MemtoReg RegWrite ite nsel <2:> Add Subtract Or Add Add Subtract 6 R- type rs rt rd shamt funct add, sub I- type // 2 - - Lecture #27 Fall 2? ori, lw, sw, beq Boolean Epressions for Controller Controller ImplementaUon RegDst = add + sub Src = ori + lw + sw MemtoReg = lw RegWrite = add + sub + ori + lw ite = sw nsel = beq = = lw + sw [] = sub + beq (assume is ADD, SUB, OR) [] = or! Where:! rtype = ~ 5 ~ ~ 3 ~ 2 ~ ~, ori = ~ 5 ~ 3 2 ~ lw = 5 ~ ~ 3 ~ 2 sw = 5 ~ 3 ~ 2 beq = ~ 5 ~ ~ 3 2 ~ ~ = ~ 5 ~ ~ 3 ~ 2 ~! How do we implement this in gates? code func AND logic add sub ori lw sw beq OR logic RegDst Src MemtoReg RegWrite ite nsel [] [] add = rtype func 5 ~func ~func 3 ~func 2 ~func ~func sub = rtype func 5 ~func ~func 3 ~func 2 func ~func! // Fall 2 - - Lecture #27 25 // Fall 2 - - Lecture #27 26

Peer rucuon ) We should use the main to compute =+ in order to save some gates 2) The is inacuve for memory reads (loads) or writes (stores). 2 a) FF b) FT c) TF d) TT e) Help! Summary: Single- cycle Processor Five steps to design a processor:. Analyze instrucuon set à Processor datapath Control 2. Select set of datapath components & establish path clock methodology 3. Assemble datapath meeung the. Analyze implementauon of each instrucuon to determine se[ng of control points that effects the register transfer. 5. Assemble the control logic Formulate Logic EquaUons Design Circuits // Fall 2 - - Lecture #27 28 Input Output Bonus Slides How to implement Single Cycle path during New = { [..28],, } = RegDst = RegWr = Rs Rt = - bit Registers = Src = rucxon Fetch Unit In Rt Rs Rd Imm TA26 MemtoReg = Zero = rucuon<:> <2:25> <:2> WrEn <:5> <:5> <:25> Fall 2 - - Lecture #29 29 = Fall 2 - - Lecture #27 3 Single Cycle path during = rucuon<:> =? rucxon Fetch Unit RegDst = RegWr = Rs Rt = Rt Rs Rd Imm TA26 MemtoReg = Zero = - bit Registers WrEn New = { [..28],, } Src = In = Fall 2 - - Lecture #27 <2:25> <:2> <:5> <:5> <:25> ruc2on Fetch Unit at the End of New = { [..28],, } Zero n_mux_sel rucuon<:> How do we modify this to account for s? Fall 2 - - Lecture #27 5

ruc2on Fetch Unit at the End of New = { [..28],, } Zero n_mux_sel TA 26 (MSBs) rucuon<:> Query Can Zero sull get asserted? Does need to be? If not, what? Fall 2 - - Lecture #27 33 6