Review.

Slides:



Advertisements
Similar presentations
Arrays First step is to reserve sufficient space for the array.
Advertisements

CS 136 Lab 2 MIPS ISA SPIM. Prob 2.30 sll $a2, $a2, 2 sll $a3, $a3, 2 add $v0, $zero, $zero add $t0, $zero, $zero outer:add $t4, $a0, $t0 lw $t4, 0($t4)
CDA 3100 Recitation Week 8. Question 1.data A:.word 21,3,2,9,100,22,6,15,33,90.text.globl main main: la $a0, A li $a1, 17 li $a2, 10 jal funct li $v0,
CDA 3100 Recitation Week 15. What does the function f1 do:.data A:.word 10,21,45,8,100,15,29,12,3,19 B:.word 2,5,33,5,20,1,53,52,5,5 C:.word 6,8,5,4,5,22,53,12,33,89.text.globl.
MIPS Assembly Language CPSC 321 Computer Architecture Andreas Klappenecker.
SPRING 2015 QtSpim Demo & Tutorial. 2 By DGP Outline How to write your own MIPS assembly language program How to use QtSpim simulator.
SPIM and MIPS programming
Syscall in MIPS Xinhui Hu Yuan Wang.
MIPS Function Continued
Assembly Language Working with the CPU.
1 COMS 361 Computer Organization Title: Instructions Date: 9/28/2004 Lecture Number: 10.
Writing an Embedded Controller. It usually consists of two parts – Initialization – A main loop Experience: – The main loop usually has to deal with many.
ECE 0142 Recitation #5.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patternson and Hennessy Text.
Assembly Process. Machine Code Generation Assembling a program entails translating the assembly language into binary machine code This requires more than.
MIPS Coding. Exercise – the bubble sort 5/8/2015week04-3.ppt2.
Computer Architecture Lecture 3 C and Assembly. Intro to Assembly Language MIPS and Intel Variables and Constants int count = 10, I, j, k; count.word.
MIPS Assembly Language I Computer Architecture CPSC 321 Andreas Klappenecker.
Feb 18, 2009 Lecture 4-2 instruction set architecture (Part II of [Parhami]) MIPS encoding of instructions Spim simulator more examples of MIPS programming.
MIPS coding. slt, slti slt $t3, $t1, $t2 – set $t3 to be 1 if $t1 < $t2 ; else clear $t3 to be 0. – “Set Less Than.” slti $t3, $t1, 100 – set $t3 to be.
Ch2b- 2 EE/CS/CPE Computer Organization  Seattle Pacific University Thanks for all the Memory! When 32 registers just won’t do. Many times (almost.
MIPS coding. Review Shifting – Shift Left Logical (sll) – Shift Right Logical (srl) – Moves all of the bits to the left/right and fills in gap with 0’s.
MIPS coding. slt, slti slt $t3, $t1, $t2 – set $t3 to be 1 if $t1 < $t2 ; else clear $t3 to be 0. – “Set Less Than.” slti $t3, $t1, 100 – set $t3 to be.
The Assembly Process Computer Organization and Assembly Language: Module 10.
Control Structures Computer Organization I 1 October 2009 © McQuain, Feng & Ribbens Conditional Control Structure if ( i < j ) goto A; else.
MIPS Coding. Exercise – the bubble sort 7/9/2016week04-3.ppt2.
MIPS Assembly Language Programming
MIPS Assembly Language Programming
Switch Statement Pre-requisites: 1D array addressing Updated 7/11/2013.
Computer Architecture & Operations I
CS2100 Computer Organization
Arrays First step is to reserve sufficient space for the array.
Introduction to Lab #1 José Nelson Amaral.
MIPS Procedures.
MIPS Coding Continued.
Computer Architecture & Operations I
MIPS instructions.
The University of Adelaide, School of Computer Science
MIPS coding.
Single-Cycle CPU DataPath.
MIPS Procedures.
Assembler Directives Example program: .data # DATA segment city: .asciiz “Seattle” .align 2 num: .word 2210, 2341, 26, 0x022ec,
MIPS Functions.
CSCI206 - Computer Organization & Programming
Computer Architecture
MIPS coding.
The University of Adelaide, School of Computer Science
MIPS Functions.
MIPS Functions.
Logical and Decision Operations
MIPS coding.
Компьютерийн зохион байгуулалт, ассемблер CS201
MIPS Procedures.
Review.
MIPS Coding.
MIPS Microarchitecture Multicycle Processor
MIPS function continued
MIPS Functions.
MIPS Coding.
QtSpim Demo & Tutorial SPRING 2011.
MIPS e pipelining Tecniche di base.
MIPS Coding Continued.
MIPS coding.
MIPS Assembly Language Programming Computer Architecture
Program Assembly.
MIPS function continued
Conditional Control Structure
MIPS Functions.
Introduction to SPIM Simulator
Conditional Branching (beq)
Presentation transcript:

Review

MIPS Program Data Segment Text Segment # an example of iteration to compute the sum of every other word .data start: .word 1, 0, 1, 0, 1, 0, 1, 0 .word 1, 0, 1, 0, 1, 0, 1, 0 .text .globl main main: la $t0, start #load start address of array addi $t1, $t0,128 # address of end of array of 64 words add $t2, $zero, $zero #initialize sum loop: lw $t3, 0($t0) #fetch array element add $t2, $t2, $t3 # update sum addi $t0, $t0, 8 # point to next address bne $t1, $t0, loop # if not done, start next iteration li $v0, 10 #load program termination code syscall Data Segment Text Segment Check the class resources page for link to QtSpim simulator

ECE 2020 Datapath X Y http://ece2020.ece.gatech.edu/readings/datapaths/1-cycle-dp.pdf Sample problems at http://ece2020.ece.gatech.edu/problems/datapaths/index.html