This Unit: Processor Design. What Is Control? Example: Control for sw. Example: Control for add

Similar documents
ECE 250 / CPS 250 Computer Architecture. Processor Design Datapath and Control

Pipeline Example: Cycle 1. Pipeline Example: Cycle 2. Pipeline Example: Cycle 4. Pipeline Example: Cycle 3. 3 instructions. 3 instructions.

MIPS I/O and Interrupt

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

s1 s2 d B (F/D.IR.RS1 == D/X.IR.RD) (F/D.IR.RS2 == D/X.IR.RD) (F/D.IR.RS1 == X/M.IR.RD) (F/D.IR.RS2 == X/M.IR.RD) = 1 = 1

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers

Questions About Numbers. Number Systems and Arithmetic. Introduction to Binary Numbers. Negative Numbers?

Register Transfer Level (RTL) Design

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers

EasyMP Network Projection Operation Guide

Engineer To Engineer Note

Engineer-to-Engineer Note

Introduction to hardware design using VHDL

Computer Arithmetic Logical, Integer Addition & Subtraction Chapter

Digital Design. Chapter 1: Introduction. Digital Design. Copyright 2006 Frank Vahid

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment

Overview. Making the Fast Case Common and the Uncommon Case Simple in Unbounded Transactional Memory. Running Example. Background

Engineer To Engineer Note

Enginner To Engineer Note

Small Business Networking

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits

Scanner Termination. Multi Character Lookahead. to its physical end. Most parsers require an end of file token. Lex and Jlex automatically create an

Migrating vrealize Automation to 7.3 or March 2018 vrealize Automation 7.3

Basics of Logic Design Arithmetic Logic Unit (ALU)

CS2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

Chapter 1: Introduction

Small Business Networking

Today s Lecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Recursive Example. Review: The C / C++ code. Recursive Example (Continued)

EasyMP Network Projection Operation Guide

Small Business Networking

In the last lecture, we discussed how valid tokens may be specified by regular expressions.

pdfapilot Server 2 Manual

Mid-term exam. Scores. Fall term 2012 KAIST EE209 Programming Structures for EE. Thursday Oct 25, Student's name: Student ID:

Datapath Background. This Unit: (Scalar In-Order) Pipelining. CIS 501 Computer Architecture. Readings

Address/Data Control. Port latch. Multiplexer

Small Business Networking

Engineer To Engineer Note

Small Business Networking

Small Business Networking

Release Notes for. LANCOM Advanced VPN Client 4.10 Rel

ECE 468/573 Midterm 1 September 28, 2012

Agilent Mass Hunter Software

Today. Search Problems. Uninformed Search Methods. Depth-First Search Breadth-First Search Uniform-Cost Search

Stack Manipulation. Other Issues. How about larger constants? Frame Pointer. PowerPC. Alternative Architectures

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus

IZT DAB ContentServer, IZT S1000 Testing DAB Receivers Using ETI

Small Business Networking

EasyMP Multi PC Projection Operation Guide

Engineer-to-Engineer Note

UT1553B BCRT True Dual-port Memory Interface

Epson iprojection Operation Guide (Windows/Mac)

- 2 U NIX FILES 1. Explin different file types vilble in UNIX or P OSIX s ystem. ( 08 mrks) ( My-08/Dec-08/My-10/My- 12) 2. Wht is n API? How is it di

Tilt-Sensing with Kionix MEMS Accelerometers

License Manager Installation and Setup

Small Business Networking

Information regarding

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5

How to Design REST API? Written Date : March 23, 2015

SoC Architecture Design Approaches

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012

Small Business Networking

LING/C SC/PSYC 438/538. Lecture 21 Sandiway Fong

Epson Projector Content Manager Operation Guide

CS 268: IP Multicast Routing

Midterm 2 Sample solution

Passwords Passwords Changing Passwords... <New Passwords> 130 Setting UIM PIN... <UIM PIN/UIM PIN2> 130 Unlocking a Locked UIM...

Math 464 Fall 2012 Notes on Marginal and Conditional Densities October 18, 2012

Easy Interactive Tools Ver.3.0 Operation Guide

style type="text/css".wpb_animate_when_almost_visible { opacity: 1; }/style

CS 221: Artificial Intelligence Fall 2011

Distributed Systems Principles and Paradigms

12-B FRACTIONS AND DECIMALS

5 Regular 4-Sided Composition

Transparent neutral-element elimination in MPI reduction operations

This Unit: (Scalar In-Order) Pipelining. CIS 501 Computer Architecture. Readings. Pre-Class Exercises

Digital Design. Chapter 6: Optimizations and Tradeoffs

Data Flow on a Queue Machine. Bruno R. Preiss. Copyright (c) 1987 by Bruno R. Preiss, P.Eng. All rights reserved.

Fig.25: the Role of LEX

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών

EasyMP Multi PC Projection Operation Guide

EE320 Computer Organization. Project: Single Cycle Processor

CSCI 446: Artificial Intelligence

Section 3.1: Sequences and Series

6/23/2011. Review: IEEE-754. CSE 2021: Computer Organization. Exercises. Examples. Shakil M. Khan (adapted from Profs. Roumani & Asif)

MATH 25 CLASS 5 NOTES, SEP

Caches I. CSE 351 Autumn Instructor: Justin Hsia

CS 130 : Computer Systems - II. Shankar Balachandran Dept. of Computer Science & Engineering IIT Madras

EECS150 - Digital Design Lecture 23 - High-level Design and Optimization 3, Parallelism and Pipelining

Scanner Termination. Multi Character Lookahead

Engineer To Engineer Note

Voltage Monitoring Products

Pin-down Cache: A Virtual Memory Management Technique for Zero-copy Communication

EasyMP Multi PC Projection Operation Guide

A New Learning Algorithm for the MAXQ Hierarchical Reinforcement Learning Method

Introduction to CMOS VLSI Design. Lecture 2: MIPS Processor Example. David Harris. Harvey Mudd College Spring Outline

McAfee Network Security Platform

2014 Haskell January Test Regular Expressions and Finite Automata

CS201 Discussion 10 DRAWTREE + TRIES

vcloud Director Service Provider Admin Portal Guide vcloud Director 9.1

How. Without. project. your. wanting. personal. Corey. by Galen E

Transcription:

This Unit: rocessor Design Appliction O ompiler U ory Firmwre I/O Digitl ircuits Gtes & Trnsistors pth components n timing s n register files ories (RAMs) locking strtegies Mpping n IA to tpth ontrol Exceptions from Roth EE15 9 Wht Is ontrol? s1 s Rwe Rst 9 signls control flow of t through this tpth MU selectors, or register/memory write enble signls pth of current microprocessor core hs 100s of control signls from Roth EE15 30 ALUop BR DMwe J Rw Exmple: ontrol for Exmple: ontrol for sw BR=0 J=0 BR=0 J=0 s1 s Rw=0 s1 s Rw= Rwe=1 ALUop=0 DMwe=0 Rwe=0 ALUop=0DMwe=1 Rst=1 =0 Rst= =1 Difference between sw n n is 5 signls 3 if you on t count the ( on t cre ) signls from Roth EE15 31 from Roth EE15 3

Exmple: ontrol for beq $1,$,trget How Is ontrol Implemente? BR=1 J=0 BR J s1 s Rw= s1 s Rw Rwe=0 ALUop=1DMwe=0 Rwe ALUop DMwe Rst= =0 Difference between store n brnch is only signls Rst ontrol? from Roth EE15 33 from Roth EE15 3 Implementing ontrol Ech instruction hs unique set of control signls Most signls re function of opcoe ome my be encoe in the instruction itself E.g., the ALUop signl is some portion of the MI Func fiel implifies controller implementtion Requires creful IA esign ontrol Implementtion: ROM ROM (re only memory): like RAM but unwritble Bits in t wors re control signls Lines inexe by opcoe Exmple: ROM control for our simple tpth Options for implementing control 1. Use instruction type to look up control signls in tble. Design FM whose outputs re control signls Either wy, gol is sme: turn instruction into control signls opcoe BR J ALUop DMwe Rwe Rst Rw 0 0 0 0 0 1 1 0 i 0 0 1 0 0 1 1 0 lw 0 0 1 0 0 1 0 1 sw 0 0 1 0 1 0 0 0 beq 1 0 0 1 0 0 0 0 j 0 1 0 0 0 0 0 0 from Roth EE15 35 from Roth EE15 36

ROM vs. ombintionl Logic A control ROM is fine for 6 insns n 9 control signls A rel mchine hs 100 insns n 300 control signls Even RI s hve lots of instructions 30,000 control bits (~KB) Not huge, but hr to mke fst ontrol must be fster thn tpth Alterntive: combintionl logic EE 5 strikes bck! Exploits observtion: mny signls hve few 1s or few 0s ontrol Implementtion: ombintionl Logic Exmple: combintionl logic control for our simple tpth opcoe i lw sw beq j BR J DMwe Rwe Rw Rst ALUop from Roth EE15 37 from Roth EE15 38 pth n ontrol Timing This Unit: rocessor Design s1 s ontrol (ROM or combintionl logic) Appliction O ompiler Firmwre U I/O ory Digitl ircuits Gtes & Trnsistors pth components n timing s n register files ories (RAMs) locking strtegies Mpping n IA to tpth ontrol Exceptions Re I Re s Re DMEM Write DMEM (Re ontrol ROM) Write s Write from Roth EE15 39 from Roth EE15 0

Exceptions Exceptions n interrupts Infrequent (exceptionl!) events I/O, ivie-by-0, illegl instruction, pge fult, protection fult, ctrl-, ctrl-z, timer Hnling requires intervention from operting system En progrm: ivie-by-0, protection fult, illegl insn, ^ Fix n restrt progrm: I/O, pge fult, ^Z, timer Hnling shoul be trnsprent to ppliction coe Don t wnt to (cn t) constntly check for these using insns Wnt Fix n restrt equivlent to never hppene Exception Hnling Wht oes exception hnling look like to softwre? When exception hppens ontrol trnsfers to O t pre-specifie exception hnler ress O hs privilege ccess to registers user processes o not see These registers hol informtion bout exception use of exception (e.g., pge fult, rithmetic overflow) Other exception info (e.g., ress tht cuse pge fult) of ppliction insn to return to fter exception is fixe O uses privilege (n non-privilege) registers to o its thing O returns control to user ppliction me mechnism vilble progrmmticlly vi YALL from Roth EE15 1 from Roth EE15 MI Exception Hnling MI uses registers to hol stte uring exception hnling These registers live on coprocessor 0 $1: E (hols of user progrm uring exception hnling) $13: exception type (YALL, overflow, etc.) $8: virtul ress (tht prouce pge/protection fult) $1: exception msk (which exceptions trigger O) Exception registers ccesse using two privilege instructions mfc0, mtc0 rivilege = user process cn t execute them mfc0: move (register) from coprocessor 0 (to user reg) mtc0: move (register) to coprocessor 0 (from user reg) rivilege instruction rfe restores user moe Kernel executes this instruction to restore user progrm from Roth EE15 3 Implementing Exceptions Why o rchitects cre bout exceptions? Becuse we use tpth n control to implement them More precisely to implement spects of exception hnling Recognition of exceptions Trnsfer of control to O rivilege O moe from Roth EE15

pth with upport for Exceptions ummry Rs R Rr Rw I R o-procesor Rwe s1 s A ALUinA B O D w We now know how to buil fully functionl processor But We re still treting memory s blck box (ctully two green boxes, to be precise) Our fully functionl processor is slow. Relly, relly slow. o-processor register (R) file neen t be implemente s RF Inepenent registers connecte irectly to pertinent muxes R (processor sttus register): in privilege moe? from Roth EE15 5 from Roth EE15 6 ingle-ycle erformnce This Unit: rocessor Design Useful metric: cycles per instruction (I) Esy to clculte for single-cycle processor: I = 1 econs/progrm = (insns/progrm) * 1 I * (N secons/cycle) IQ: How mny cycles/secon in 3.8 GHz processor? low! lock perio must be elongte to ccommote longest opertion In our tpth: lw Goes through five structures in series: insn mem, register file (re), ALU, t mem, register file gin (write) No one will buy mchine with slow clock Not even your grnprents! Appliction O ompiler Firmwre U I/O ory Digitl ircuits Gtes & Trnsistors pth components n timing s n register files ories (RAMs) locking strtegies Mpping n IA to tpth ontrol Next up: ipelining from Roth EE15 7 from Roth EE15 8