Reading and writing to data memory

Slides:



Advertisements
Similar presentations
CS/COE0447 Computer Organization & Assembly Language
Advertisements

Pipeline Example: cycle 1 lw R10,9(R1) sub R11,R2, R3 and R12,R4, R5 or R13,R6, R7.
MIPS processor continued. Review Different parts in the processor should be connected appropriately to be able to carry out the functions. Connections.
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 5: Data Transfer Instructions / Control Flow Instructions Partially adapted from Computer.
The University of Adelaide, School of Computer Science
©UCB CS 161Computer Architecture Chapter 5 Lecture 9 Instructor: L.N. Bhuyan Adapted from notes by Dave Patterson (http.cs.berkeley.edu/~patterson)
The Processor: Datapath & Control
PCPC addr instr INSTR MEM R1 R2 WR W Data R Data 1 R Data 2 ALU DATA MEM ALU CTRL rs rt op +4 shift 2 zero BRANCH CTRL muxmux sign extend immed 1632 ADDADD.
CMPUT Computer Organization and Architecture II1 CMPUT229 - Fall 2003 TopicE: Building a Data Path and a Control Path for a Microprocessor José Nelson.
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.
Computer Engineering AddSub page 1 Basic Building Blocks Multiplexer + Demultiplexer Adder.
Fall EE 333 Lillevik 333f06-l7 University of Portland School of Engineering Computer Organization Lecture 7 ALU design MIPS data path.
Character Data and 32-bit Constants (Lecture #20) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying.
1. Building A CPU  We’ve built a small ALU l Add, Subtract, SLT, And, Or l Could figure out Multiply and Divide  What about the rest l How do.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /22/2013 Lecture 12: Character Data Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE.
EE 3755 Datapath Presented by Dr. Alexander Skavantzos.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 7, 8 Instruction Set Architecture.
MIPS Instruction Set Architecture Prof. Sirer CS 316 Cornell University.
PC Instruction Memory Address Instr. [31-0] 4 Fig 4.6 p 309 Instruction Fetch.
MicroComputer Engineering BranchProcCall page Addiu$t1 $r0 3 Addiu$t1 $t1 5 Addiu$t1 $t1 7 Example.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
Memory Access Instructions Load and Store Addressing Modes Memory Addressing. Base addressing mode. Load byte and store byte: lb, lbu, sb Address alignment.
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

Instructor: Prof. Hany H Ammar, LCSEE, WVU
Memory Access Instructions
Example Addiu $t1 $r0 3 Addiu $t1 $t1 5 Addiu $t1 $t1 7.
Morgan Kaufmann Publishers
Single Cycle Processor
ADITI SHINDE CHIDAMBARAM ALAGAPPAN
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
Han Wang CS3410, Spring 2012 Computer Science Cornell University
Single-Cycle CPU DataPath.
Control Flow and Arrays
CS/COE0447 Computer Organization & Assembly Language
MPIS Instructions Functionalities of instructions Instruction format
The University of Adelaide, School of Computer Science
CSCI206 - Computer Organization & Programming
MIPS Processor.
Datapath & Control MIPS
Instruction encoding The ISA defines Format = Encoding
The Processor Lecture 3.2: Building a Datapath with Control
MIPS Microarchitecture Multicycle Processor
COMS 361 Computer Organization
Computer Instructions
Basic Building Blocks Multiplexer Demultiplexer Adder +
Instruction encoding The ISA defines Format = Encoding
Access the Instruction from Memory
COMP541 Datapaths I Montek Singh Mar 18, 2010.
Instruction encoding The ISA defines Format = Encoding
ECE 463/563 Fall `18 RISC-V instruction formats
The branch instruction
Review Fig 4.15 page 320 / Fig page 322
Delayed Load What will happen if lw $6 $0($1) add $4 $6 $1
Basic Building Blocks Multiplexer Demultiplexer Adder +
MIPS Instruction Set Architecture
Instruction encoding The ISA defines Format = Encoding
Acceleration How to improve speed? At what costs?.
CS352H Computer Systems Architecture
CS/COE0447 Computer Organization & Assembly Language
COMS 361 Computer Organization
MIPS Pipelined Datapath
MIPS Processor.
Control Flow and Arrays
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Reading and writing to data memory rs Imm Lw rt Imm(rs) 5 16 Register file Sign extend Offset 32 Base address + Data address to data memory

Reading and writing to data memory Lb rt Imm(rs) Address (32 bits) Data (8 bits) Data memory Sign extension Lbu: Zero extend There are also Lh and Lhu

Reading and writing to data memory Sw rt Imm(rs) Sh rt Imm(rs) Sb rt Imm(rs) Remember: Alignment for Sw and Sh

Read and write from/ to the data memory Lw rt Imm(rs) Sw rt Imm(rs) Lh rt Imm(rs) Sh rt Imm(rs) Lhu rt Imm(rs) Lb rt Imm(rs) Sb rt Imm(rs) Lbu rt Imm(rs)

Zero ext. Branch logic A ALU 4 B + 31 + Sgn/Ze extend Lw rt Imm(rs)

Zero ext. Branch logic A ALU 4 B + 31 + Sgn/Ze extend Lw rt Imm(rs)

Lw rt Imm(rs) Read Data Zero ext. Branch logic A ALU 4 B + 31 + Sgn/Ze A ALU 4 B + 31 + Sgn/Ze extend Lw rt Imm(rs) Read Data

Lw rt Imm(rs) … next instr Zero ext. Branch logic A ALU 4 B + 31 + Sgn/Ze extend Lw rt Imm(rs) … next instr

Zero ext. Branch logic A ALU 4 B + 31 + Sgn/Ze extend Sw rt Imm(rs)

Sw rt Imm(rs) Write Data Zero ext. Branch logic A ALU 4 B + 31 + Sgn/Ze extend Sw rt Imm(rs) Write Data