You are Here! Processor Design Process. Agenda. Agenda 10/25/12. CS 61C: Great Ideas in Computer Architecture Single Cycle MIPS CPU Part II

Similar documents
EECS150 - Digital Design Lecture 2 - Synchronous Digital Systems Review Part 1. Outline

LECTURE 8. Pipelining: Datapath and Control

Instructor: Randy H. Katz Fall Lecture #17. Warehouse Scale Computer

RISC Design: Pipelining

Asanovic/Devadas Spring Pipeline Hazards. Krste Asanovic Laboratory for Computer Science M.I.T.

Selected Solutions to Problem-Set #3 COE 608: Computer Organization and Architecture Single Cycle Datapath and Control

IF ID EX MEM WB 400 ps 225 ps 350 ps 450 ps 300 ps

Computer Architecture

Pipelined Processor Design

7/11/2012. Single Cycle (Review) CSE 2021: Computer Organization. Multi-Cycle Implementation. Single Cycle with Jump. Pipelining Analogy

CS 110 Computer Architecture Lecture 11: Pipelining

IF ID EX MEM WB 400 ps 225 ps 350 ps 450 ps 300 ps

CS61C : Machine Structures

Lecture Topics. Announcements. Today: Pipelined Processors (P&H ) Next: continued. Milestone #4 (due 2/23) Milestone #5 (due 3/2)

EE 457 Homework 5 Redekopp Name: Score: / 100_

CS420/520 Computer Architecture I

Chapter 4. Pipelining Analogy. The Processor. Pipelined laundry: overlapping execution. Parallelism improves performance. Four loads: Non-stop:

Instruction Level Parallelism. Data Dependence Static Scheduling

CS 61C: Great Ideas in Computer Architecture Lecture 10: Finite State Machines, Func/onal Units. Machine Interpreta4on

Computer Architecture Lab Session

Single-Cycle CPU The following exercises are taken from Hennessy and Patterson, CO&D 2 nd, 3 rd, and 4 th Ed.

CMSC 611: Advanced Computer Architecture

CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units

CZ3001 ADVANCED COMPUTER ARCHITECTURE

CS 61C: Great Ideas in Computer Architecture. Pipelining Hazards. Instructor: Senior Lecturer SOE Dan Garcia

Computer Elements and Datapath. Microarchitecture Implementation of an ISA

Registers. CS152 Computer Architecture and Engineering Lecture 3

CS 61C: Great Ideas in Computer Architecture Synchronous Digital Systems. Anything can be represented as a number, i.e., data or instrucrons

Instructor: Randy H. Katz hap://inst.eecs.berkeley.edu/~cs61c/fa13. Fall Lecture #20. Warehouse Scale Computer

Pipelining A B C D. Readings: Example: Doing the laundry. Ann, Brian, Cathy, & Dave. each have one load of clothes to wash, dry, and fold

EECE 321: Computer Organiza5on

ECE473 Computer Architecture and Organization. Pipeline: Introduction

Single vs. Mul2- cycle MIPS. Single Clock Cycle Length

Performance Metrics, Amdahl s Law

A B C D. Ann, Brian, Cathy, & Dave each have one load of clothes to wash, dry, and fold. Time

7/19/2012. IF for Load (Review) CSE 2021: Computer Organization. EX for Load (Review) ID for Load (Review) WB for Load (Review) MEM for Load (Review)

CSE 2021: Computer Organization

RISC Central Processing Unit

CSEN 601: Computer System Architecture Summer 2014

Lec 24: Parallel Processors. Announcements

Lecture 4: Introduction to Pipelining

Pipelining and ISA Design

EECS 470 Lecture 4. Pipelining & Hazards II. Winter Prof. Ronald Dreslinski h8p://

CS 61C Great Ideas in Computer Architecture (a.k.a. Machine Structures) Lecture 1: Course Introduction

Understanding Engineers #2

CS61C : Machine Structures

CS61c: Introduction to Synchronous Digital Systems

CS250 VLSI Systems Design. Lecture 3: Physical Realities: Beneath the Digital Abstraction, Part 1: Timing

CS521 CSE IITG 11/23/2012

CS152 Computer Architecture and Engineering Lecture 3: ReviewTechnology & Delay Modeling. September 3, 1997

6.S084 Tutorial Problems L19 Control Hazards in Pipelined Processors

ECE 4750 Computer Architecture, Fall 2016 T09 Advanced Processors: Superscalar Execution

Computer Science 246. Advanced Computer Architecture. Spring 2010 Harvard University. Instructor: Prof. David Brooks

Out-of-Order Execution. Register Renaming. Nima Honarmand

Pipelined Beta. Handouts: Lecture Slides. Where are the registers? Spring /10/01. L16 Pipelined Beta 1

CS61C : Machine Structures

CS4617 Computer Architecture

EE382V-ICS: System-on-a-Chip (SoC) Design

Suggested Readings! Lecture 12" Introduction to Pipelining! Example: We have to build x cars...! ...Each car takes 6 steps to build...! ! Readings!

Project 5: Optimizer Jason Ansel

CS Computer Architecture Spring Lecture 04: Understanding Performance


CSE502: Computer Architecture CSE 502: Computer Architecture

CSE502: Computer Architecture CSE 502: Computer Architecture

Low Power Design Part I Introduction and VHDL design. Ricardo Santos LSCAD/FACOM/UFMS

CSE502: Computer Architecture CSE 502: Computer Architecture

7.1. Unit 7. Fundamental Digital Building Blocks: Decoders & Multiplexers

CSE502: Computer Architecture Welcome to CSE 502

Controller Implementation--Part I. Cascading Edge-triggered Flip-Flops

Instructor: Dr. Mainak Chaudhuri. Instructor: Dr. S. K. Aggarwal. Instructor: Dr. Rajat Moona

Metrics How to improve performance? CPI MIPS Benchmarks CSC3501 S07 CSC3501 S07. Louisiana State University 4- Performance - 1

7.1. Unit 7. Fundamental Digital Building Blocks: Decoders & Multiplexers

Lecture 02: Digital Logic Review

Computer Architecture ( L), Fall 2017 HW 3: Branch handling and GPU SOLUTIONS

CMSC 611: Advanced Computer Architecture

U. Wisconsin CS/ECE 752 Advanced Computer Architecture I

CS 61C: Great Ideas in Computer Architecture (a.k.a. Machine Structures) Lecture 1: Course Introduc-on, Number Representa-on

ECE 2300 Digital Logic & Computer Organization. More Pipelined Microprocessor

Department Computer Science and Engineering IIT Kanpur

OOO Execution & Precise State MIPS R10000 (R10K)

CS 61C: Great Ideas in Computer Architecture (a.k.a. Machine Structures) CS61C is NOT really about C Programming

1 Solutions. Solution Computer used to run large problems and usually accessed via a network: 5 supercomputers

FMP For More Practice

Computer Architecture and Organization:

UC Berkeley CS61C : Machine Structures

Computer Aided Design of Electronics

CHAPTER 4 FIELD PROGRAMMABLE GATE ARRAY IMPLEMENTATION OF FIVE LEVEL CASCADED MULTILEVEL INVERTER

Computer Hardware. Pipeline

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #14

Low Power VLSI Circuit Synthesis: Introduction and Course Outline

Datorstödd Elektronikkonstruktion

UC Berkeley CS61C : Machine Structures

CSE502: Computer Architecture CSE 502: Computer Architecture

Arithmetic Circuits. (Part II) Randy H. Katz University of California, Berkeley. Fall Overview BCD Circuits. Combinational Multiplier Circuit

Welcome to 6.S084! Computation Structures (special)

EN164: Design of Computing Systems Lecture 22: Processor / ILP 3

Instruction Level Parallelism III: Dynamic Scheduling

0 A. Review. Lecture #16. Pipeline big-delay CL for faster clock Finite State Machines extremely useful You!ll see them again in 150, 152 & 164

CS 61C: Great Ideas in Computer Architecture Pipelining. Anything can be represented as a number, i.e., data or instrucvons

EECS 470. Tomasulo s Algorithm. Lecture 4 Winter 2018

Transcription:

/26/2 CS 6C: Great Ideas in Computer Architecture Single Cycle MIPS CPU Part II /25/2 ructors: Krste Asanovic, Randy H. Katz hcp://inst.eecs.berkeley.edu/~cs6c/fa2 Fall 22 - - Lecture #26 Parallel Requests Assigned to computer e.g., Search Katz Parallel Threads Assigned to core e.g., Lookup, Ads Soware Parallel ructons > ucton @ one Tme e.g., 5 pipelined uctons Parallel > data item @ one Tme e.g., Add of pairs of words Hardware descriptons All gates @ one Tme Programming Languages You are Here! Harness Parallelism & Achieve High Performance Hardware Warehouse Scale Computer Core Input/Output ructon Unit(s) Cache Core Smart Phone Logic Gates /25/2 Fall 22 - - Lecture #26 2 Computer (Cache) Core FuncTonal Unit(s) A +B A +B A 2 +B 2 A 3 +B 3 Today Levels of RepresentaTon/ InterpretaTon High Level Language Program (e.g., C) Compiler Assembly Language Program (e.g., MIPS) Machine Interpretaon Assembler Machine Language Program (MIPS) Hardware Architecture DescripCon (e.g., block diagrams) Architecture Implementaon temp v[k]; v[k] v[k+]; v[k+] temp; lw $t, ($2) lw $t, ($2) sw $t, ($2) sw $t, ($2) Anything can be represented as a number, i.e., data or uctons! Logic Circuit DescripCon /25/2 (Circuit SchemaCc Diagrams) Fall 22 - - Lecture #26 3 Processor Design Process Five steps to design a processor:. Analyze ucton set à Processor datapath requirements Control 2. Select set of datapath components & establish path clock methodology 3. Assemble datapath meetng the requirements. Analyze implementaton of each ucton to determine sehng of control points that effects the register transfer. 5. Assemble the control logic Formulate Logic EquaTons Design Circuits /25/2 Fall 22 - - Lecture #26 Input Output path Control path Control /25/2 Fall 22 - - Lecture #26 5 /25/2 Fall 22 - - Lecture #26 6

/26/2 ADDU and SUBU addu rd,rs,rt subu rd,rs,rt OR Immediate: ori rt,rs,imm6 LOAD and 3 STORE Word lw rt,rs,imm6 sw rt,rs,imm6 3 BRANCH: beq rs,rt,imm6 The MIPS- lite Subset 3 26 2 6 6 op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits 3 26 2 6 6 bits 5 bits 5 bits 6 bits 26 2 6 6 bits 5 bits 5 bits 6 bits 26 2 6 6 bits 5 bits 5 bits 6 bits /25/2 Fall 22 - - Lecture #26 7 Register Transfer Language (RTL) RTL gives the meaning of the uctons {op, rs, rt, rd, shamt, funct} MEM[ ]! {op, rs, rt, Imm6} MEM[ ]! All start by ing the ucton Register Transfers! ADDU R[rd] R[rs] + R[rt]; +! SUBU R[rd] R[rs] R[rt]; +! ORI R[rt] R[rs] zero_et(imm6); +! LOAD R[rt] MEM[ R[rs] + sign_et(imm6)]; +! STORE MEM[ R[rs] + sign_et(imm6) ] R[rt]; +! BEQ if ( R[rs] R[rt] ) then + + (sign_et(imm6) ) else +! /25/2 Fall 22 - - Lecture #26 8 RTL: The Add ructon 3 26 2 6 6 op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits add rd, rs, rt MEM[] Fetch the ucton from memory R[rd] R[rs] + R[rt] The actual operaton + Calculate the net ucton s address ructon Fetch Unit at the Beginning of Add Fetch the ucton from ructon memory: ructon MEM[] same for all uctons Et n_sel Mu Address ructon<3:> /26/2 Spring 22 - - Lecture #26 9 imm6 /26/2 Spring 22 - - Lecture #26 Single Cycle path during Add 3 26 2 6 6 op rs rt rd shamt funct R[rd] R[rs] + R[rt] RegDst rd n_sel+ rt RegWr rs rt imm6 6 EtOp Rs Imm6 zero ctradd MemtoReg Src ructon<3:> <2:25> In <6:2> MemWr <:5> <:5> /26/2 Spring 22 - - Lecture #26 ructon Fetch Unit at End of Add + Same for all uctons ecept: Branch and Jump Et imm6 n_sel+ Mu Address /26/2 Spring 22 - - Lecture #26 2 2

/26/2 Single Cycle path during Or Immediate 3 26 2 6 R[rt] R[rs] OR ZeroEt[Imm6] RegDst RegWr Rs n_sel imm6 6 EtOp Rs Imm6 zero ctr MemtoReg Src ructon<3:> <2:25> In <6:2> MemWr <:5> <:5> /25/2 Fall 22 - - Lecture #26 3 Student RouleCe Single Cycle path during Or Immediate 3 26 R[rt] R[rs] OR ZeroEt[Imm6] RegDst RegWr Rs n_sel+ imm6 6 EtOpzero 2 6 Rs Imm6 zero ctror MemtoReg /25/2 Fall 22 - - Lecture #26 Src ructon<3:> <2:25> In <6:2> MemWr <:5> <:5> Single Cycle path during Load 3 26 2 6 R[rt] {R[rs] + SignEt[imm6]} RegDst RegWr Rs n_sel imm6 6 EtOp Rs Imm6 zero ctr MemtoReg Src ructon<3:> <2:25> In <6:2> MemWr <:5> /25/2 Fall 22 - - Lecture #26 5 <:5> Student RouleCe Single Cycle path during Load 3 26 2 6 R[rt] {R[rs] + SignEt[imm6]} RegDst RegWr Rs n_sel+ imm6 6 EtOpsign Rs Imm6 zero ctradd MemtoReg Src ruction<3:> <2:25> In <6:2> MemWr <:5> <:5> /25/2 Fall 22 - - Lecture #26 6 Single Cycle path during Store 3 26 2 6 {R[rs] + SignEt[imm6]} R[rt] RegDst RegWr Rs n_sel imm6 6 EtOp Rs Imm6 zero ctr MemtoReg Src ructon<3:> <2:25> In <6:2> MemWr <:5> <:5> /25/2 Fall 22 - - Lecture #26 7 Student RouleCe Single Cycle path during Store 3 26 2 6 {R[rs] + SignEt[imm6]} R[rt] RegDst RegWr Rs n_sel+ imm6 6 EtOpsign Rs Imm6 zero ctradd MemtoReg Src ructon<3:> <2:25> In <6:2> MemWr <:5> <:5> /25/2 Fall 22 - - Lecture #26 8 3

/26/2 Single Cycle path during Branch 3 26 2 6 if (R[rs] - R[rt] ) then Zero ; else Zero RegDst RegWr Rs n_sel imm6 6 EtOp Rs Imm6 zero ctr MemtoReg Src ructon<3:> <2:25> In <6:2> MemWr <:5> <:5> /25/2 Fall 22 - - Lecture #26 9 Single Cycle path during Branch 3 26 2 6 if (R[rs] - R[rt] ) then Zero ; else Zero RegDst RegWr Rs n_selbr imm6 6 EtOp Rs Imm6 zero ctrsub MemtoReg Src ructon<3:> <2:25> In <6:2> MemWr <:5> <:5> /25/2 Fall 22 - - Lecture #26 2 ructon Fetch Unit at the End of Branch 3 26 2 6 if (Zero ) then + + SignEt[imm6]* ; else + n_sel Zero imm6 Et MUX n_sel ctrl Mu Adr ructon<3:> What is encoding of n_sel? Direct MUX select? Branch inst. / not branch Let s pick 2nd opton n_sel zero? MUX Fall 22 - - Lecture #26 Q: What logic gate? /25/2 2 Summary: path s Control Signals EtOp: zero, sign src: regb; immed ctr: ADD, SUB, OR Et Address n_sel Mu RegDst RegWr Rs imm6 6 EtOp MemWr: write memory MemtoReg: ; Mem RegDst: rt ; rd RegWr: write register ctr MemtoReg MemWr /25/2 Fall 22 - - Lecture #26 22 imm6 Src In CS6c in the News path Control /25/2 Fall 22 - - Lecture #26 23 /26/2 Fall 22 - - Lecture #26 2

/26/2 path Control /26/2 Fall 22 - - Lecture #26 25 /25/2 Fall 22 - - Lecture #26 26 Given path: RTL à Control Adr ructon<3:> <26:3> <:5> Op Fun <2:25> <6:2> <:5> <:5> Imm6 n_sel RegWr RegDst EtOp Src ctr Rs Control DATA PATH MemWr MemtoReg inst Summary of the Control Signals (/2)!Register Transfer! add!r[rd] R[rs] + R[rt]; +!!srcregb, ctr ADD, RegDstrd, RegWr, n_sel +!! sub!r[rd] R[rs] R[rt]; +!!srcregb, ctr SUB, RegDstrd, RegWr, n_sel +! ori!r[rt] R[rs] + zero_et(imm6); +!!srcim, Etop Z, ctr OR, RegDstrt,RegWr, n_sel +! lw!r[rt] MEM[ R[rs] + sign_et(imm6)]; +!!srcim, Etop sn, ctr ADD, MemtoReg, RegDstrt, RegWr,!n_sel +! sw!mem[ R[rs] + sign_et(imm6)] R[rs]; +!!srcim, Etop sn, ctr ADD, MemWr, n_sel +! beq!if (R[rs] R[rt]) then + sign_et(imm6)]!else +!!n_sel br, ctr SUB! /25/2 Fall 22 - - Lecture #26 27 /25/2 Fall 22 - - Lecture #26 28 Summary of the Control Signals (2/2) See func We Don t Care :- ) Appendi A op add sub ori lw sw beq RegDst Src MemtoReg RegWrite MemWrite nsel Jump EtOp ctr<2:> Add Subtract Or Add Add Subtract 3 26 2 6 6 R- type op rs rt rd shamt funct add, sub I- type ori, lw, sw, beq /25/2 Fall 22 - - Lecture #26 29 Boolean Epressions for Controller RegDst add + sub Src ori + lw + sw MemtoReg lw RegWrite add + sub + ori + lw MemWrite sw nsel beq Jump jump EtOp lw + sw ctr[] sub + beq (assume ctr is ADD, : SUB, : OR) ctr[] or! Where:! rtype ~op 5 ~op ~op 3 ~op 2 ~op ~op, ori ~op 5 ~op op 3 op 2 ~op op lw op 5 ~op ~op 3 ~op 2 op op sw op 5 ~op op 3 ~op 2 op op beq ~op 5 ~op ~op 3 op 2 ~op ~op jump ~op 5 ~op ~op 3 ~op 2 op ~op! How do we implement this in gates? add rtype func 5 ~func ~func 3 ~func 2 ~func ~func sub rtype func 5 ~func ~func 3 ~func 2 func ~func! /25/2 Fall 22 - - Lecture #26 3 5

/26/2 Controller ImplementaTon AND Control in Logisim opcode func AND logic add sub ori lw sw beq OR logic RegDst Src MemtoReg RegWrite MemWrite nsel EtOp ctr[] ctr[] /25/2 Fall 22 - - Lecture #26 3 /25/2 Fall 22 - - Lecture #26 OR Control Logic in Logisim /25/2 Fall 22 - - Lecture #26 33 Single Cycle Performance Assume Tme for actons are ps for register read or write; 2ps for other events Clock rate is? r r Register read op /25/2 Fall 22 - - Lecture #26 access Register write Total time lw 2ps ps 2ps 2ps ps 8ps sw 2ps ps 2ps 2ps 7ps R-format 2ps ps 2ps ps 6ps beq 2ps ps 2ps 5ps What can we do to improve clock rate? Will this improve performance as well? Want increased clock rate to mean faster programs 3 Student RouleCe? And in Conclusion, Single- Cycle Processor Five steps to design a processor:. Analyze ucton set à Processor datapath requirements Control 2. Select set of datapath components & establish path clock methodology 3. Assemble datapath meetng the requirements. Analyze implementaton of each ucton to determine sehng of control points that effects the register transfer. 5. Assemble the control logic Formulate Logic EquaTons Design Circuits /25/2 Fall 2 - - Lecture #26 35 Input Output 6