CS/COE0447 Computer Organization & Assembly Language

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
1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and 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:
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.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 TopicH: Building a Data Path and a Control Path for a Microprocessor José Nelson.
Chapter Five The Processor: Datapath and Control.
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:
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
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
1 CS/COE0447 Computer Organization & Assembly Language Multi-Cycle Execution.
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.
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.
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.
MIPS Processor.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3.
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
CS 230: Computer Organization and Assembly Language
Single-Cycle Datapath and Control
Computer Architecture
Multi-Cycle CPU.
ECS 154B Computer Architecture II Spring 2009
MIPS Processor.
CS/COE0447 Computer Organization & Assembly Language
MIPS processor continued
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
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
MIPS Processor.
Datapath & Control MIPS
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
Topic 5: Processor Architecture
COMS 361 Computer Organization
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Lecture 14: Single Cycle MIPS Processor
Control Unit (single cycle implementation)
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:

CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 1

Memory reference instructions Arithmetic-logical instructions We will study the datapath and control using only these instructions [similar ideas apply to others] Memory reference instructions lw (load word) and sw (store word) Arithmetic-logical instructions add, sub, and, or, and slt Control-transfer instructions beq (branch if equal) j (unconditional jump)

An Abstract Implementation (fig 5.1) Combinational logic ALU, adder Sequential logic Register file, instruction memory, data memory

Building Blocks (figs 5.7-5.8)

from which instruction Instruction Fetch Instruction width is 4 bytes! PC keeps the current memory address from which instruction is fetched Instruction memory here is read-only!

Instruction Execution lw (load word) Fetch instruction lw $t0,-12($t1) Read a base register $t1 Sign-extend the immediate offset fff4  fffffff4 Add two values to get address X = fffffff4 + $t1 Access data memory with the address M[X] Store the memory data to the destination register $t0

Memory + R-Instructions (fig 5.10) E.G: lw $t0,8($t1) Load data from memory Imm. offset for address To be in a register!

Instruction Execution, cont’d add Fetch instruction Read two source registers Add two values Store the result to the destination register

Memory + R-Instructions (fig 5.10) E.G: add $t2,$t1,$t0

Instruction Execution, cont’d j Fetch instruction Take the 26-bit immediate field Shift left by 2 (to make 28-bit immediate) Get 4 bits from the current PC and attach to the left of the immediate Assign the value to PC

Branch Datapath (fig. 5.9)

Memory + R-Instructions (fig 5.10) E.G: sw $t0,8($t1)

Memory + R-Instructions (fig 5.10) E.G: add $t0,$t1,$t2; MUX selections are reversed

Datapath so far (fig 5.11) j not considered so far!

Instruction Format

More Elaborated Design (fig 5.15) Write register # selection ALU control bits from I[5:0]

A First Look at Control (fig 5.17)

Control Signals Overview RegDst: which instr. field to use for dst. register specifier? instruction[20:16] vs. instruction[15:11] ALUSrc: which one to use for ALU src 2? immediate vs. register read port 2 MemtoReg: is it memory load? RegWrite: update register? MemRead: read memory? MemWrite: write to memory? Branch: is it a branch? ALUop: what type of ALU operation?

Generic Control Sequence For each fetched instruction (decoding) Select two registers to read from register file Select the 2nd ALU input Select ALU operation Select if data memory is to be accessed Select if register file is updated Select what to assign to PC