Decode and Operand Read

Slides:



Advertisements
Similar presentations
Adding the Jump Instruction
Advertisements

Arithmetic Logic Unit (ALU)
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University RISC Pipeline See: P&H Chapter 4.6.
S. Barua – CPSC 240 CHAPTER 5 THE LC-3 Topics Memory organization Registers Instruction set Opcodes.
CMPUT Computer Organization and Architecture II1 CMPUT229 - Fall 2003 TopicE: Building a Data Path and a Control Path for a Microprocessor José Nelson.
Lec 8: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
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.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 TopicH: Building a Data Path and a Control Path for a Microprocessor José Nelson.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
Design and Synthesis of a RISC Stored-Program Machine
Computer Science 210 Computer Organization The Instruction Execution Cycle.
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Chapter 5 Basic Processing Unit
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Ceng 450 Project. Pinout of Processor Interrupt is optional Processor in_port[7:0] out_port[7:0] clock rst interrupt.
Chapter 4 The Von Neumann Model
Processor: Datapath and Control
Chapter 5 The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Data Movement Instructions Load --
A Simple Computer Architecture Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Instruction Set Architecture ISA = All of the.
Electrical and Computer Engineering University of Cyprus LAB 2: MIPS.
CDA 3101 Fall 2013 Introduction to Computer Organization Multicycle Datapath 9 October 2013.
Dale & Lewis Chapter 5 Computing components
Our programmer needs to do this !
CSE431 L06 Basic MIPS Pipelining.1Irwin, PSU, 2005 MIPS Pipeline Datapath Modifications  What do we need to add/modify in our MIPS datapath? l State registers.
Lecture 15: Pipelined Datapath Soon Tee Teoh CS 147.
CMPE 421 REVIEW: MIDTERM 1. A MODIFIED FIVE-Stage Pipeline PC A Y R MD1 addr inst Inst Memory Imm Ext add rd1 GPRs rs1 rs2 ws wd rd2 we wdata addr wdata.
MIPS Processor.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Chapter 5 Computer Organization TIT 304/TCS 303. Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can.
SRC: instruction formats Op-coderarb rc c Type D Op-code Type Aunused Op-codera Type Bc1 21 Op-coderarb.
CS161 – Design and Architecture of Computer Systems
Electrical and Computer Engineering University of Cyprus
Block diagram of a Microcoded Control unit
Lecture 13 - Introduction to the Central Processing Unit (CPU)
A Uni-bus Data Path Implementation for the SRC
Chapter 4 The Von Neumann Model
A 3-bus implementation for the SRC
Structural RTL for the br and brl instructions
ELEN 468 Advanced Logic Design
Chapter 4 The Von Neumann Model
Instruction Execution (Load and Store instructions)
External CPU Bus Activity
Chapter 4 The Von Neumann Model
Computer Science 210 Computer Organization
The fetch-execute cycle
Chapter 4 The Von Neumann Model
Computer Science 210 Computer Organization
Computer Organization “Central” Processing Unit (CPU)
Design of the Control Unit for One-cycle Instruction Execution
Chapter 5: Processor Design—Advanced Topics
Systems Architecture II
MIPS Processor.
Rocky K. C. Chang 6 November 2017
SRC Exception Processing Mechanism
Computer Science 210 Computer Organization
Composing the Elements
Fields in the FALCON-A Instruction
Composing the Elements
Computer Science 210 Computer Organization
IR <2..0> CON 3-to-8 Decoder Never Branch Always Branch
Chapter 4 The Von Neumann Model
Data Dependence Distances
The Stored Program Computer
RTL for the SRC pipeline registers
Reverse Assembly Typical problem:
MIPS Processor.
Presentation transcript:

Decode and Operand Read SRC Pipelined Hardware Block Diagram Pipeline Stages Instruction Fetch IR2 PC2 Decode and Operand Read IR3 X3 Y3 MD3 Pipeline Registers ALU Operation IR4 Z4 MD4 Memory Access Z5 IR5 There are also two separate memories and several multiplexers involved in pipeline operation Register Writeback

SRC Pipeline registers Between stage 1 and 2 IR2 contains the full instruction PC2 holds the incremented address Between stage 2 and 3 IR3 holds opcode and ra (used in stage 5) X3 holds first operand Y3 holds second operand MD3 holds reg. value to be stored in memory

SRC pipeline registers Between stage 3 and 4 IR4 holds opcode and ra Z4 holds result from ALU MD4 holds value to be stored in memory Between stage 4 and 5 IR5 holds opcode and ra Z5 has value to be stored in register

SRC pipeline stages Stage 1. Instruction fetch PC incremented or replaced by a new address specified by branch Stage 2. Instruction decode Ld/str get operand for address calculation ALU operations get operand values from registers or constants Stage 3. ALU operation Calculates address or execute arithmetic/logic Br instructions just pass on to next stage

SRC pipeline stages Stage 4. Memory access Stage 5. Write back ALU instructions pass data from Z4 to Z5 Ld access memory address given in Z4 Str completes by writing into data memory Stage 5. Write back The contents of Z5 are written to register. It maybe the ALU result, effective address, PC link value or fetched data.

Decode and Operand Read ALU Instruction Instruction Memory PC Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ••• c2 ra Decode and Operand Read MUX Mp4 X3 Y3 … decoder ALU Operation ALU Z4 Memory Access Register Writeback

ALU Instruction … Instruction Memory PC Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ••• c2 ra Decode and Operand Read X3 and Y3 are temporary reg to hold the values between pipeline stages MUX Mp4 X3 Y3 … decoder ALU Operation ALU Z4 Memory Access Register Writeback

ALU Instruction … Instruction Memory PC Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ••• c2 ra Decode and Operand Read X3 and Y3 are temporary reg to hold the values between pipeline stages MUX Mp4 X3 Y3 ALU computes the result … decoder ALU Operation ALU Z4 Memory Access Register Writeback

ALU Instruction … Instruction Memory PC Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ••• c2 ra Decode and Operand Read X3 and Y3 are temporary reg to hold the values between pipeline stages MUX Mp4 X3 Y3 ALU computes the result … decoder ALU Operation ALU No memory access for ALU inst. Z4 Memory Access Register Writeback

ALU Instruction … Instruction Memory PC Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ••• c2 ra Decode and Operand Read X3 and Y3 are temporary reg to hold the values between pipeline stages MUX Mp4 X3 Y3 ALU computes the result … decoder ALU Operation ALU No memory access for ALU inst. Z4 Memory Access Result stored In destination Register Writeback

Decode and Operand Read Load/Store Instruction (ld, ldr, st, str) Instruction Memory PC Instruction Fetch Inc4 Op code ra c1 Register File R[rb] R[rc] R[ra] regwrite PC2 Decode and Operand Read MUX Mp4 MUX Mp3 Y3 X3 add … decoder ALU Operation ALU Z4 Data Memory Memory Access Mp5 MUX Z5 Register Writeback

Decode and Operand Read Load/Store Instruction (ld, ldr, st, str) Instruction Memory PC Instruction Fetch Inc4 regwrite Op code ra c1 or c2 Register File R[rb] R[rc] R[ra] PC2 c1 or c2 are selected depending on the addressing mode Decode and Operand Read MUX Mp4 MUX Mp3 Y3 X3 … decoder add ALU Operation ALU Z4 Data Memory Memory Access Mp5 MUX Z5 Register Writeback

Decode and Operand Read Load/Store Instruction (ld, ldr, st, str) Instruction Memory PC Instruction Fetch Inc4 regwrite Op code ra c1 Register File R[rb] R[rc] R[ra] PC2 c1 or c2 are selected depending on the addressing mode c1 or c2 are selected depending on the addressing mode Decode and Operand Read MUX Mp4 MUX Mp3 Y3 X3 ALU computes the address ALU computes the address add … decoder ALU Operation ALU Z4 Data Memory Memory Access Mp5 MUX Z5 Register Writeback

Decode and Operand Read Load/Store Instruction (ld, ldr, st, str) Instruction Memory PC Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ra c1 PC2 c1 or c2 are selected depending on the addressing mode c1 or c2 are selected depending on the addressing mode Decode and Operand Read MUX Mp4 MUX Mp3 Y3 X3 ALU computes the address ALU computes the address add … decoder ALU Operation ALU Store instruction completed Z4 Data Memory Memory Access Mp5 MUX Z5 Register Writeback

Decode and Operand Read Load/Store Instruction (ld, ldr, st, str) Instruction Memory PC Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ra c1 PC2 c1 or c2 are selected depending on the addressing mode c1 or c2 are selected depending on the addressing mode Decode and Operand Read MUX Mp4 MUX Mp3 Y3 X3 ALU computes the address ALU computes the address add … decoder ALU Operation ALU Store instruction completed Z4 Data Memory Memory Access Mp5 MUX Z5 Load instruction completed Register Writeback

Decode and Operand Read Branch Instruction Instruction Memory MUX PC Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ••• c2 ra PC2 Decode and Operand Read Branch Logic ALU Operation condition Memory Access Register Writeback

Branch Instruction Instruction Memory MUX PC PC incremented as usual Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ••• c2 ra PC2 Decode and Operand Read Branch Logic ALU Operation condition Memory Access Register Writeback

Branch Instruction Instruction Memory MUX PC PC incremented as usual Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ••• c2 ra PC2 Decode and Operand Read Branch Logic Condition decides new PC value ALU Operation condition Memory Access Register Writeback

Branch Instruction Instruction Memory MUX PC PC incremented as usual Instruction Fetch Inc4 Register File R[rb] R[rc] R[ra] regwrite Op code ••• c2 ra PC2 Decode and Operand Read Branch Logic Condition decides new PC value ALU Operation condition No memory access Memory Access Register Writeback

Branch Instruction PC Inc4 MUX Instruction Memory PC incremented as usual Instruction Fetch Register File R[rb] R[rc] R[ra] regwrite Op code ••• c2 ra PC2 Decode and Operand Read Branch Logic Condition decides new PC value ALU Operation condition No memory access Memory Access Only brl instructions write register Register Writeback

The complete pipeline data path Instruction Memory MUX PC Inc4 IR2 regwrite Register File R[rb] R[rc] R[ra] opcode ra rb rc c PC2 MUX Mp3 Mp2 MUX Mp4 MUX Y3 X3 IR3 MD3 … decoder ALU IR4 Z4 MD4 Data Memory MUX Mp5 IR5 Z5

Control signals for pipeline stages branch := br ~ brl cond := (IR2<2..0>=1)~(IR2<2..1>=1)&(IR2<0>^R[rc]=1>))~ ((IR2<2..1>=2)&(!IR2<0>^R[rc]<31>)) sh:=shr~shra~shl~shc alu:=add~addi~sub~neg~and~andi~or~ori~not~sh imm:=addi~andi~ori~(sh&(IR<4…0>!=0)) load:=ld~ldr store:=st~str l-s:=load~ladr~store regwrite:=load~ladr~brl~alu dsp:=ld~st~la rl:=ldr~str~lar

Control signals for pipeline stages MP1 (!(branch2&cond):inc4), ((branch2&cond):R1) Instruction Fetch (!store:rc),(store:ra) MP2 MP3 (rl~branch:PC2), (dsp~alu:R1) Decode and Operand Read MP4 ( rl:c1),(dsp~imm:c2),alu&imm!imm:R2) ALU Operation (!load:Z4), (load:mem data) MP5 Memory Access Register Writeback

CS501 Advanced Computer Architecture Lecture19 Dr.Noor Muhammad Sheikh

Review

Pipelining

Classification of Instructions

SRC Pipelining Hardware

Complete Pipeline data path

CS501 Advanced Computer Architecture