Computer Architecture

Slides:



Advertisements
Similar presentations
CS/COE1541: Introduction to Computer Architecture Datapath and Control Review Sangyeun Cho Computer Science Department University of Pittsburgh.
Advertisements

Pipeline Example: cycle 1 lw R10,9(R1) sub R11,R2, R3 and R12,R4, R5 or R13,R6, R7.
The Processor: Datapath & Control
Levels in Processor Design
CMPUT Computer Organization and Architecture II1 CMPUT229 - Fall 2003 TopicE: Building a Data Path and a Control Path for a Microprocessor José Nelson.
331 Lec 14.1Fall 2002 Review: Abstract Implementation View  Split memory (Harvard) model - single cycle operation  Simplified to contain only the instructions:
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
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 Datapath Andreas Klappenecker CPSC321 Computer Architecture.
©UCB CS 161Computer Architecture Chapter 5 Instructor: L.N. Bhuyan LECTURE 10.
The Processor: Datapath & Control. Implementing Instructions Simplified instruction set memory-reference instructions: lw, sw arithmetic-logical instructions:
Chapter 4 Sections 4.1 – 4.4 Appendix D.1 and D.2 Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
Supplementary notes for pipelining LW ____,____ SUB ____,____,____ BEQ ____,____,____ ; assume that, condition for branch is not satisfied OR ____,____,____.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
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.
MIPS processor continued. In Class Exercise Question Show the datapath of a processor that supports only R-type and jr reg instructions.
ECE-C355 Computer Structures Winter 2008 The MIPS Datapath Slides have been adapted from Prof. Mary Jane Irwin ( )
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
PC Instruction Memory Address Instr. [31-0] 4 Fig 4.6 p 309 Instruction Fetch.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 2.
MIPS processor continued
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.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Single-cycle CPU Control
Access the Instruction from Memory
EE204 Computer Architecture
MIPS Microarchitecture Single-Cycle Processor Control
Single Cycle CPU.
CS 230: Computer Organization and Assembly Language
Single-Cycle Datapath and Control
IT 251 Computer Organization and Architecture
Single Cycle Processor
D.4 Finite State Diagram for the Multi-cycle processor
Multi-Cycle CPU.
ECS 154B Computer Architecture II Spring 2009
Discussion Session Week 10
MIPS processor continued
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
Single-cycle datapath, slightly rearranged
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
Systems Architecture II
Datapath & Control MIPS
Levels in Processor Design
Topic 5: Processor Architecture Implementation Methodology
CSE378 Midterm Review Moore’s Law -- What are the two versions?
Composing the Elements
Composing the Elements
The Processor Lecture 3.3: Single-cycle Implementation
The Processor Lecture 3.2: Building a Datapath with Control
Topic 5: Processor Architecture
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Lecture 14: Single Cycle MIPS Processor
Processor: Multi-Cycle Datapath & Control
Control Unit (single cycle implementation)
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
Control Unit (single cycle implementation)
A single-cycle MIPS processor
The Processor: Datapath & Control.
COMS 361 Computer Organization
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Computer Architecture Single-Cycle Implementation

Single-Cycle Datapath PCSrc 0MUX1 Add ALU 4 Add result RegWrite Shift left 2 Instruction [25-21] Read register 1 Read data 1 MemWrite Read address PC Instruction [20-16] Read register 2 ALUSrc MemtoReg Zero Instruction 0MUX1 Read data 2 ALU ALU [31-0] Write register 0MUX1 result Address Read data 1MUX0 Instruction Instruction [15-11] Write data memory Registers Data memory Write data RegDst 16 32 Instruction [15-0] Sign extend ALU control MemRead Instruction [5-0] ALUOp This datapath supports the following instructions: add, sub, and, or, slt, lw, sw, beq

Single-Cycle Control RegDst Select destination register RegWrite Specify if the destination register is written ALUSrc Select whether source is register or immediate ALUOp Specify operation for ALU MemWrite Specify whether memory is to be written MemRead Specify whether memory is to be read MemtoReg Select whether memory or ALU output is used PCSrc Select whether next PC or computed address is used

R-format Instruction Dataflow For add, sub, and, or, slt instructions PCSrc 0MUX1 Add ALU 4 Add result RegWrite Shift left 2 Instruction [25-21] Read register 1 Read data 1 MemWrite Read address PC Instruction [20-16] Read register 2 ALUSrc MemtoReg Zero Instruction 0MUX1 Read data 2 ALU ALU [31-0] Write register 0MUX1 result Address Read data 1MUX0 Instruction Instruction [15-11] Write data memory Registers Data memory Write data RegDst 16 32 Instruction [15-0] Sign extend ALU control MemRead Instruction [5-0] ALUOp

R-format Instruction Control Control signal summary RegDst 1 to select Rd RegWrite 1 to enable writing Rd ALUSrc 0 to select Rt value from register file ALUOp Dependent on operation (see below) MemWrite 0 to disable writing memory MemRead 0 to disable reading memory MemtoReg 0 to select ALU output to register PCSrc 0 to select next PC ALUOp add OP (add) and OP (and) sub OP (sub) or OP (or) slt OP (slt)

I-format Load Instruction Dataflow For lw instruction PCSrc 0MUX1 Add ALU 4 Add result RegWrite Shift left 2 Instruction [25-21] Read register 1 Read data 1 MemWrite Read address PC Instruction [20-16] Read register 2 ALUSrc MemtoReg Zero Instruction 0MUX1 Read data 2 ALU ALU [31-0] Write register 0MUX1 result Address Read data 1MUX0 Instruction Instruction [15-11] Write data memory Registers Data memory Write data RegDst 16 32 Instruction [15-0] Sign extend ALU control MemRead Instruction [5-0] ALUOp

I-format Load Instruction Control Control signal summary RegDst 0 to select Rt RegWrite 1 to enable writing Rt ALUSrc 1 to select immediate field value from instruction ALUOp add MemWrite 0 to disable writing memory MemRead 1 to enable reading memory MemtoReg 1 to select memory output to register PCSrc 0 to select next PC

I-format Store Instruction Dataflow For sw instruction PCSrc 0MUX1 Add ALU 4 Add result RegWrite Shift left 2 Instruction [25-21] Read register 1 Read data 1 MemWrite Read address PC Instruction [20-16] Read register 2 ALUSrc MemtoReg Zero Instruction 0MUX1 Read data 2 ALU ALU [31-0] Write register 0MUX1 result Address Read data 1MUX0 Instruction Instruction [15-11] Write data memory Registers Data memory Write data RegDst 16 32 Instruction [15-0] Sign extend ALU control MemRead Instruction [5-0] ALUOp

I-format Store Instruction Control Control signal summary RegDst x (don’t care) RegWrite 0 to disable writing a register ALUSrc 1 to select Rt value from register file ALUOp add MemWrite 1 to enable writing memory MemRead 0 to disable reading memory MemtoReg x (don’t care) PCSrc 0 to select next PC

I-format Branch Instruction Dataflow For beq instruction 0MUX1 Add ALU 4 Add result RegWrite Shift left 2 PCSrc Instruction [25-21] Read register 1 Read data 1 MemWrite Read address PC Instruction [20-16] Read register 2 ALUSrc MemtoReg Zero Instruction 0MUX1 Read data 2 ALU ALU [31-0] Write register 0MUX1 result Address Read data 1MUX0 Instruction Instruction [15-11] Write data memory Registers Data memory Write data RegDst 16 32 Instruction [15-0] Sign extend ALU control MemRead Instruction [5-0] ALUOp

I-format Branch Instruction Control Control signal summary RegDst x (don’t care) RegWrite 0 to disable writing a register ALUSrc 0 to select Rt value from register file ALUOp sub MemWrite 0 to disable writing memory MemRead 0 to disable reading memory MemtoReg x (don’t care) PCSrc zero

Single-Cycle Control Signals Summary Signal R-fmt I-fmt (lw) I-fmt (sw) I-fmt (beq) RegDst 1 0 x x RegWrite 1 1 0 0 ALUSrc 0 1 1 0 ALUOp OP add add sub MemWrite 0 0 1 0 MemRead 0 1 0 0 MemtoReg 0 1 x x PCSrc 0 0 0 zero

More Details on Control Signal Generation

Review and Projection Single-Cycle implementation is easy Control is based solely on the operation (and results!) dictates ALU operation controls multiplexor selection enables/disables storage elements Processor signals (control and data) stabilize and then any state (register and/or memory) change takes place when the clock cycle ends Multi-Cycle implementation explained in the next class Instruction processing takes multiple steps, one step per cycle Within a given clock cycle, signals stabilize and their local state change takes place when the clock cycle ends