18-447 Computer Architecture Lecture 7: Microprogrammed Microarchitectures Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 1/30/2013.

Slides:



Advertisements
Similar presentations
Control Unit Implemntation
Advertisements

6-1 Chapter 6 - Datapath and Control Department of Information Technology, Radford University ITEC 352 Computer Organization Principles of Computer Architecture.
Fall 2012SYSC 5704: Elements of Computer Systems 1 MicroArchitecture Murdocca, Chapter 5 (selected parts) How to read Chapter 5.
Give qualifications of instructors: DAP
1/1/ /e/e eindhoven university of technology Microprocessor Design Course 5Z008 Dr.ir. A.C. (Ad) Verschueren Eindhoven University of Technology Section.
Computer Architecture
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
Computer Architecture Lecture 6: Multi-Cycle and Microprogrammed Microarchitectures Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 1/27/2014.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
CS-447– Computer Architecture Lecture 12 Multiple Cycle Datapath
Chapter 16 Control Unit Operation No HW problems on this chapter. It is important to understand this material on the architecture of computer control units,
The Processor Data Path & Control Chapter 5 Part 3 - Microprogrammed Control Unit N. Guydosh 3/1/04+
CS364 CH17 Micro-programmed Control
Microprogramming Andreas Klappenecker CPSC321 Computer Architecture.
1 COMP541 Sequencing – III (Sequencing a Computer) Montek Singh April 9, 2007.
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Preparation for Midterm Binary Data Storage (integer, char, float pt) and Operations, Logic, Flip Flops, Switch Debouncing, Timing, Synchronous / Asynchronous.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
Lecture 16: Basic CPU Design
Datapath and Control Andreas Klappenecker CPSC321 Computer Architecture.
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
The Processor Data Path & Control Chapter 5 Part 1 - Introduction and Single Clock Cycle Design N. Guydosh 2/29/04.
Lecture 24: CPU Design Today’s topic –Multi-Cycle ALU –Introduction to Pipelining 1.
Lecture 16 Today’s topics: –MARIE Instruction Decoding and Control –Hardwired control –Micro-programmed control 1.
6-1 Chapter 6 - Datapath and Control Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of.
Multiple-bus organization
Lecture 8: Processors, Introduction EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014,
1 COMP541 Multicycle MIPS Montek Singh Apr 4, 2012.
Chapter 5 Processor Design. Spring 2005 ELEC 5200/6200 From Patterson/Hennessey Slides We're ready to look at an implementation of the MIPS Simplified.
CSE 340 Computer Architecture Summer 2014 Basic MIPS Pipelining Review.
MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.
5-1 Chapter 5 - Datapath and Control Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring Computer Architecture.
Microprogrammed Control Chapter11:. Two methods for generating the control signals are: 1)Hardwired control o Sequential logic circuit that generates.
PART 6: (1/2) Enhancing CPU Performance CHAPTER 16: MICROPROGRAMMED CONTROL 1.
Processor Architecture
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Microarchitecture. Outline Architecture vs. Microarchitecture Components MIPS Datapath 1.
Processor Data Path and Control How they work together.
MICROPROGRAMMED CONTROL
1  2004 Morgan Kaufmann Publishers No encoding: –1 bit for each datapath operation –faster, requires more memory (logic) –used for Vax 780 — an astonishing.
15-740/ Computer Architecture Lecture 12: Issues in OoO Execution Prof. Onur Mutlu Carnegie Mellon University Fall 2011, 10/7/2011.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Computer Architecture Lecture 6: Multi-Cycle and Microprogrammed Microarchitectures Prof. Onur Mutlu Carnegie Mellon University Spring 2015, 1/28/2015.
Design a MIPS Processor (II)
11/4/2017 CIS-550 Advanced Computer Architecture Lecture 6: Multi-Cycle and Microprogrammed Microarchitectures Dr. Muhammad Abid DCIS, PIEAS Spring 2017.
Design of Digital Circuits Lecture 14: Microprogramming
Design of Digital Circuits Lecture 13: Multi-Cycle Microarch.
15-740/ Computer Architecture Lecture 4: Pipelining
Micro-programmed Control
Systems Architecture I
Computer Organization & Design Microcode for Control Sec. 5
15-740/ Computer Architecture Lecture 7: Pipelining
Computer Architecture Lecture 6: Multi-cycle Microarchitectures
Processor: Finite State Machine & Microprogramming
Computer Architecture
Chapter Five The Processor: Datapath and Control
A Multiple Clock Cycle Instruction Implementation
Chapter Five The Processor: Datapath and Control
The Processor Data Path & Control Chapter 5 Part 3 - Microprogrammed Control Unit N. Guydosh 3/1/04+
Systems Architecture I
Topic 6: Pipelining and Pipelined Architecture
Computer System Design Lecture 6
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Computer Architecture
Systems Architecture I
Presentation transcript:

Computer Architecture Lecture 7: Microprogrammed Microarchitectures Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 1/30/2013

Homework 2 Homework 2 out  Due February 11  LC-3b microcode  ISA concepts, ISA vs. microarchitecture, microcoded machines 2

Reminder: Lab Assignment 1 Due this Friday (Feb 1), at the end of Friday lab A functional C-level simulator for a subset of the MIPS ISA Study the MIPS ISA Tutorial Go to the Lab Sessions, especially if you need help 3

Lookahead: Lab Assignment 2 Lab Assignment 1.5  Verilog practice  Not to be turned in Lab Assignment 2  Due Feb 15  Single-cycle MIPS implementation in Verilog  All labs are individual assignments  No collaboration; please respect the honor code 4

Lookahead: Extra Credit for Lab Assignment 2 Complete your normal (single-cycle) implementation first, and get it checked off in lab. Then, implement the MIPS core using a microcoded approach similar to what we will discuss in class. We are not specifying any particular details of the microcode format or the microarchitecture; you can be creative. For the extra credit, the microcoded implementation should execute the same programs that your ordinary implementation does, and you should demo it by the normal lab deadline. You will get partial credit for the extra credit Document what you have done and demonstrate well 5

Readings for Next Lecture Pipelining  P&H Chapter Pipelined LC-3b Microarchitecture  a=18447-lc3b-pipelining.pdf a=18447-lc3b-pipelining.pdf 6

Today’s Agenda Finish the Microprogrammed LC-3b Design Do some microprogramming Start pipelining 7

Review: Last Lecture Finished single-cycle microarchitectures Microarchitecture design principles Basic performance evaluation (execution time equation) What does it mean to design for the common case (or bread and butter design)?  If memory takes 90% of execution time … How does the single cycle microarchitecture make “critical path design” difficult? Remember the performance equation that consists of three components… How can you improve each component in a multi-cycle microarchitecture? 8

Review: Microarchitecture Design Principles Critical path design  Find the maximum combinational logic delay and decrease it Bread and butter (common case) design  Spend time and resources on where it matters i.e., improve what the machine is really designed to do  Common case vs. uncommon case Balanced design  Balance instruction/data flow through hardware components  Balance the hardware needed to accomplish the work 9

Review: Multi-Cycle Microarchitectures Goal: Let each instruction take (close to) only as much time it really needs Idea  Determine clock cycle time independently of instruction processing time  Each instruction takes as many clock cycles as it needs to take Multiple state transitions per instruction The states followed by each instruction is different 10

Quick Review: A Microprogrammed Multi-Cycle Microarchitecture 11

Review: The Instruction Processing Cycle  Fetch  Decode  Evaluate Address  Fetch Operands  Execute  Store Result 12

Review: A Basic Multi-Cycle Microarchitecture Instruction processing cycle divided into “states” A stage in the instruction processing cycle can take multiple states A multi-cycle microarchitecture sequences from state to state to process an instruction The behavior of the machine in a state is completely determined by control signals in that state The behavior of the entire processor is specified fully by a finite state machine In a state (clock cycle), control signals control How the datapath should process the data How to generate the control signals for the next clock cycle 13

Review: Microprogrammed Control Terminology Control signals associated with the current state  Microinstruction Act of transitioning from one state to another  Determining the next state and the microinstruction for the next state  Microsequencing Control store stores control signals for every possible state  Store for microinstructions for the entire FSM Microsequencer determines which set of control signals will be used in the next clock cycle (i.e. next state) 14

Review: A Simple LC-3b Control and Datapath 15

Review: An LC-3b State Machine Patt and Patel, App C, Figure C.2 Each state must be uniquely specified  Done by means of state variables 31 distinct states in this LC-3b state machine  Encoded with 6 state variables Examples  State 18,19 correspond to the beginning of the instruction processing cycle  Fetch phase: state 18, 19  state 33  state 35  Decode phase: state 32 16

Review: LC-3b State Machine: Some Questions How many cycles does the fastest instruction take? How many cycles does the slowest instruction take? Why does the BR take as long as it takes in the FSM? What determines the clock cycle? Is this a Mealy machine or a Moore machine? 17

LC-3b Datapath Patt and Patel, App C, Figure C.3 Single-bus datapath design  At any point only one value can be “gated” on the bus (i.e., can be driving the bus)  Advantage: Low hardware cost: one bus  Disadvantage: Reduced concurrency – if instruction needs the bus twice for two different things, these need to happen in different states Control signals (26 of them) determine what happens in the datapath in one clock cycle  Patt and Patel, App C, Table C.1 18

LC-3b Datapath: Some Questions How does instruction fetch happen in this datapath according to the state machine? What is the difference between gating and loading? Is this the smallest hardware you can design? 22

LC-3b Microprogrammed Control Structure Patt and Patel, App C, Figure C.4 Three components:  Microinstruction, control store, microsequencer Microinstruction: control signals that control the datapath (26 of them) and determine the next state (9 of them) Each microinstruction is stored in a unique location in the control store (a special memory structure) Unique location: address of the state corresponding to the microinstruction  Remember each state corresponds to one microinstruction Microsequencer determines the address of the next microinstruction (i.e., next state) 23

LC-3b Microsequencer Patt and Patel, App C, Figure C.5 The purpose of the microsequencer is to determine the address of the next microinstruction (i.e., next state) Next address depends on 9 control signals 27

The Microsequencer: Some Questions When is the IRD signal asserted? What happens if an illegal instruction is decoded? What are condition (COND) bits for? How is variable latency memory handled? How do you do the state encoding?  Minimize number of state variables  Start with the 16-way branch  Then determine constraint tables and states dependent on COND 29

An Exercise in Microprogramming 30

Handouts 7 pages of Microprogrammed LC-3b design als als edia=lc3b-figures.pdf edia=lc3b-figures.pdf 31

A Simple LC-3b Control and Datapath 32

State 18 (010010) State 33 (100001) State 35 (100011) State 32 (100000) State 6 (000110) State 25 (011001) State 27 (011011) State Machine for LDW Microsequencer

End of the Exercise in Microprogramming 42

Homework 2 You will write the microcode for the entire LC-3b as specified in Appendix C 43