Topic 5: Processor Architecture

Slides:



Advertisements
Similar presentations
The Processor: Datapath & Control
Advertisements

331 W9.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 9 Building a Single-Cycle Datapath [Adapted from Dave Patterson’s.
331 Lec 14.1Fall 2002 Review: Abstract Implementation View  Split memory (Harvard) model - single cycle operation  Simplified to contain only the instructions:
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Copyright 1998 Morgan Kaufmann Publishers, Inc. All rights reserved. Digital Architectures1 Machine instructions execution steps (1) FETCH = Read the instruction.
The Processor: Datapath & Control. Implementing Instructions Simplified instruction set memory-reference instructions: lw, sw arithmetic-logical instructions:
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Processor: Datapath and Control
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
CDA 3101 Fall 2013 Introduction to Computer Organization
CS2100 Computer Organisation The Processor: Datapath (AY2015/6) Semester 1.
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
D ATA P ATH OF A PROCESSOR (MIPS) Module 1.1 : Elements of computer system UNIT 1.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Access the Instruction from Memory
EE204 Computer Architecture
CS Computer Architecture Week 10: Single Cycle Implementation
CS161 – Design and Architecture of Computer Systems
CS 230: Computer Organization and Assembly Language
Single-Cycle Datapath and Control
Computer Architecture
Introduction CPU performance factors
/ Computer Architecture and Design
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers
Morgan Kaufmann Publishers The Processor
MIPS Processor.
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for Single-Cycle Instruction Execution
MIPS processor continued
Designing MIPS Processor (Single-Cycle) Presentation G
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for One-cycle Instruction Execution
CSCI206 - Computer Organization & Programming
MIPS Processor.
Chapter Five The Processor: Datapath and Control
Levels in Processor Design
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
Composing the Elements
Composing the Elements
The Processor Lecture 3.2: Building a Datapath with Control
Systems Architecture I
COMS 361 Computer Organization
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Lecture 14: Single Cycle MIPS Processor
Computer Architecture Processor: Datapath
Chapter Four The Processor: Datapath and Control
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
Control Unit (single cycle implementation)
The Processor: Datapath & Control.
COMS 361 Computer Organization
MIPS Processor.
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Topic 5: Processor Architecture 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

Reading List Slides: Topic5x Henn & Patt: Chapter 5 Other papers as assigned in class or homework 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

ABET Outcomes Ability to apply knowledge of science (e.g., computer architecture and system organization, and related computer science issues), and engineering (e.g., performance analysis and benchmarking, ISA simulation and verification) Ability to use the techniques, skills and modern engineering tools necessary for engineering practice Knowledge of related topics in computer science discipline 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

Outline An overview Datapath building blocks Implementation of a simple (single-cycle) datapath Why we will go beyond single-cycle implementation ? 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

Overview The basic instruction execution flow Some conventions 32 bit datapath clocking strategy (edge-triggered) We focus on a subset of MIPS Memory-reference instructions: lw, sw ALU ops: add, sub, and, or Branch equal instructions (beq) and the jump instruction (J) 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

An abstract view of the implementation of the MIPS PC Instruction memory Data Register # Registers ALU Address Memory An abstract view of the implementation of the MIPS subset showing the major functional units and the major connections between them. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

Datapath Components Common to all instructions: Instruction memory PC and its update Datapath of R-R type instructions ALU Register set Datapath of memory-reference instructions ALU (for address calculation) Sign extension unit data memory Datapath for a branch inst. (e.g. beq $1, $2, offset) Sign extension + 2bit shifter Reg Adder ALU (zero output) 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

Instruction memory address ALU Sum PC Write a. Instruction memory b. Program counter c. Adder Two state elements are needed to store and access instructions, and an adder is needed to compute the next instruction address. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

A portion of the datapath used for fetching instructions memory Read address PC Add 4 A portion of the datapath used for fetching instructions and incrementing the program counter. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

The two elements needed to implement R-format ALU result ALU operation Registers Read register 1 data 1 register 2 Write register Data data 2 a. Registers b. ALU Register numbers The two elements needed to implement R-format ALU operation are the register file and the ALU 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

The datapath for R-type instruction Registers Read register 1 data 1 register 2 Write register Data data 2 ALU result Zero Instruction The datapath for R-type instruction 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

Data memory Read address data Write Sign extend 16 32 a. Data memory unit b. Sign-extension unit The two units needed to implement loads and stores are the data memory unit and the sign-extension unit, in addition to the register file and ALU 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

The datapath for a load or store that does a register access memory Read address data Write ALU result Zero Registers register 1 data 1 register 2 register data 2 16 32 Sign extend Instruction The datapath for a load or store that does a register access 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

The datapath for a branch uses an ALU for evaluation of the branch Registers Read register 1 data 1 register 2 Write register Data data 2 Adder Sum ALU Zero 16 32 Shift left 2 Sign extend PC + 4 from instruction datapath Branch target To branch control logic Instruction The datapath for a branch uses an ALU for evaluation of the branch condition and a separate adder for computing the branch target as the sum of the incremented PC and the sign-extended, lower 16 bits of the I instruction (the branch displacement) shifted left 2 bits. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

A Simple (one-cycle) Datapath Implementation No resource can be used more than once by an instruction If used more than once ==> duplicate it! Sharing a resource by 2 or more instructions are done through multiplexing. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

Combining the datapaths for the memory instructions and the R-type instructions 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

The instruction fetch portion of the datapath is appended to the datapath that handles memory and ALU instructions. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

The simple datapath for the MIPS architecture combines the elements required by different instruction classes. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

ALU Control ALU ALU operation Zero Result Overflow a b CarryOut The symbol commonly used to represent an ALU. This symbol is also used to represent an adder, so it is normally labeled either with ALU or Adder. The control lines labeled ALUOperation . Their values and the ALU operation are found in the next figure. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

ALU Control cont’d ALU Control lines Function 000 And 001 Or 010 Add 110 Subtract 111 Set-on-less-than The values of the three ALU Control lines and the corresponding ALU operations. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

This table shows how the ALU control bits are set depending on the ALUOp control bits and the different function codes for the R-type instruction. The opcode, listed in the first column, determines the setting of the ALUOp bits. All the encoding are shown in binary. Notice that when the ALUOp code is 00 or 01, the output fields do not depend on the function code field; in this case, we say that we “don’t care” about the value of the function code, and the function field is shown as XXXXXX. When the ALUOp value is 10, the function code is used to set the ALU control input. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

Instructions using ALU Load/store: address calculation - add Branch eq: subtract add/subtract R-type: and/or set-on-less-than need function code 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

ALU Control Design The truth table for the three ALU control bits as a function of the ALUOp and function code field. Some don’t care entries have been added. For example, the ALUOp does not use the encoding 11, so the truth table can contain entries 1X, and X1 rather than 10 and 01.. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

The ALU control block generates the three ALU control bits, ALUOp ALU control block ALUOp0 ALUOp1 Operation 2 F3 F2 F1 F0 Operation F (5-0) Operation 1 Operation 0 The ALU control block generates the three ALU control bits, based on the function code and ALUOp bits. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

Features of MIPS Instruction Format Field 0 rs rt rd shamt funct Bit positions 31-26 25-21 20-16 15-11 10-6 5-0 a. R-type instruction Field 35 or 43 rs rt address Bit positions 31-26 25-21 20-16 10-6 b. Load or store instruction Field 4 rs rt address Bit positions 31-26 25-21 20-16 15-0 c. branch instruction 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

Features of MIPS Instruction Format cont’d The op field, also called the opcode, is always contained in bits 31-26. We will refer to this field as Op[5-0]. The two registers to be read are always specified by the rs and rt fields, at positions 25-21 and 20-16. This is true for the R-type instructions, branch equal, and for store. The base register for load and store instructions is always in bit positions 25-21 (rs). The 16-bit offset for branch equal, load, and store is always in positions 15-0. The destination register is in one of two places. For a load it is in bit positions 20-16 (rt), while for an R-type instruction it is in bit positions 15-11 (rd). Thus, we will need to add a multiplex or to select which field of the instruction is used to indicate the register number to be written. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt

The datapath with all necessary multiplexors ALU Add result M u x 1 Read address Instructin memory Instruction (31-0) PC 4 register 1 register 2 Write register data data 1 data 2 Sign extend control Data Zero MemRead Instruction(25-21) Instruction(20-16) Instruction(15-0) RegDst PCSrc MeWrite MemtoReg ALUOp 16 32 Shift left 2 RegWrite Instruction(5-0) Instruction(15:11) The datapath with all necessary multiplexors and all control lines identified. 1/14/2019 \course\cpeg323-08F\Topic5-323.ppt