Instruction Execution in Simple Computer

Slides:



Advertisements
Similar presentations
13 Instruction Execution Steps
Advertisements

The Processor: Datapath & Control
CPSC CPSC 3615 Computer Architecture Chapter 3 Instructions and Addressing (Text Book: Chapter 5)
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.
14 Control Unit Synthesis
Copyright 1998 Morgan Kaufmann Publishers, Inc. All rights reserved. Digital Architectures1 Machine instructions execution steps (1) FETCH = Read the instruction.
Feb 18, 2009 Lecture 4-1 instruction set architecture (Part II of [Parhami]) MIPS assembly language instructions MIPS assembly programming.
The Processor: Datapath & Control. Implementing Instructions Simplified instruction set memory-reference instructions: lw, sw arithmetic-logical instructions:
FAMU-FSU College of Engineering 1 Computer Architecture EEL 4713/5764, Spring 2006 Dr. Michael Frank Module #13 – Instruction Execution Steps (in a Single-Cycle.
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.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
A Small Set of Instructions Fig MicroMIPS instruction formats and naming of the various fields. Seven R-format ALU instructions ( add, sub,
The CPU Processor (CPU): the active part of the computer, which does all the work (data manipulation and decision-making) Datapath: portion of the processor.
1. 2 Instructions: Words of the language understood by CPU Instruction set: CPU’s vocabulary Instruction Set Architecture (ISA): CPU’s vocabulary together.
Part IV Data Path and Control
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.
July 2005Computer Architecture, Data Path and ControlSlide 1 Part IV Data Path and Control.
EE 3755 Datapath Presented by Dr. Alexander Skavantzos.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
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.
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:
Single Cycle CPU - Control
CS161 – Design and Architecture of Computer Systems
CS 230: Computer Organization and Assembly Language
Single-Cycle Datapath and Control
Computer Architecture
Part IV Data Path and Control
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for Single-Cycle Instruction Execution
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
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
Systems Architecture II
Datapath & Control MIPS
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
Topic 5: Processor Architecture
Part II Instruction-Set Architecture
Part IV Data Path and Control
Systems Architecture I
COMS 361 Computer Organization
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Part IV Data Path and Control
14.1 A Multicycle Implementation
Lecture 14: Single Cycle MIPS Processor
COMP541 Datapaths I Montek Singh Mar 18, 2010.
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
Control Unit (single cycle implementation)
The Processor: Datapath & Control.
COMS 361 Computer Organization
CPU Design use pipeline
7/6/
MIPS Processor.
9/13/
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Instruction Execution in Simple Computer Instruction fetch Instruction decode Oprand fetch Execute PC update

13.1 A Small Set of Instruction MicroMIPS: Hardware realizations of 22-instruction version MiniMIPS.

Table 13.1 The MicroMIPS instruction set.*

Figure 13.1 MicroMIPS instruction formats and naming of the various fields.

Execution sequence of 7 R-format instructions (add, sub, slt, and, or, xor, nor) Read out the contents of source register rs and rt, and forward them as inputs to ALU. Tell ALU what operation to perform. Write the output of ALU in destination register rd.

Execution sequence of 6 I-format instructions (lui, addi, slti, andi, ori, andi, ori, xori) Read out the contents of source register rs. Add the number read out from rs to the immediate value in the instruction to form a memory address. Read from or write into memory as the specified address. In the case of lw, place the word read out from memory into rs.

Branch instruction (beq, bne) Compare the contents rs and rt. If condition holds, the immediate field is added to (PC)+4 and result is written back into PC; otherwise (PC)+4 is written back into PC. Branch instruction (bltz) Branch decision is based on sign bit of content rs rather than comparison of two register contents.

Jump instruction (j, jal) PC is unconditionally modified to allow the next instruction to be fetched from the target address. Jump target address comes from the instruction itself. System call (syscall) Jump target address is a known constant associated with the location of an operating system routine.

13.2 Instruction Execution Unit Figure 13.2 Abstract view of the instruction execution unit for MicroMIPS.For naming of instruction fields, see Figure 13.1.

13.3 A Single-Cycle Data Path $31 RegDst 00: rt, 01: rd, 10: $31 (jal) ALUSrc 0: rt, 1:imm. oprand, sign extension RegInSrc 00: data cache, 01:ALU, 10: Inc. PC

13.4 Branching and Jumping

(j inst) (jr inst) Figure 13.4 Next-address logic for MicroMIPS (see the top part of Figure 13.3).

13.5 Deriving the Control Signals 17 control signals for 22 MicroMIPS instructions. Table 13.2 Control signals for the single-cycle MicroMIPS implementation.

17 Boolean functions for 12 inputs (6 bits for op, 6 bits for fn) Table 13.3 Control signal settings for the single-cycle MicroMIPS instruction execution unit.*

Drawback of above method If we later decide to modify the instruction set of the machine or add new instructions to it, the entire design must be changed.

Two-step approach to the synthesis of control circuits Figure 13.5 Instruction decoder for MicroMIPS built of two 6-to-64 decoders.

Consider some of the control signals have a large number of entries in their truth table, thus requiring multi-level ORing. Here, we introduce auxiliary signals. Auxiliary signals: arithInst = addInst  subInst  sltInst  addiInst  sltiInst logicInst = andInst  orInst  xorInst  norInst  andiInst  oriInst  xori immInst = luiInst  addiInst  sltiInst  andiInst  oriInst  xoriInst Then, for example, RegWrite = luiInst  arithInst  logicInst  lwInst  jal

13.6 Performance of Single-Cycle Design In above implementation, each instruction is executed in one machine cycle. That is, CPI =1.The performance is determined by the slowest instruction, lw. This corresponds to 125MHz, and a performance of 125MIPS.

Signal propagation path in MicroMIPS Figure 13.6 The MicroMIPS data path unfolded (by depicting the register write step as a separate block) to allow better visualization of the critical-path latencies for various instruction classes.

MicroMIPS with mixed instruction set. The average performance is 157MIPS.