Register to reply

Detect hazard in MIPS- repost

by brad sue
Tags: detect, hazard, mips, repost
Share this thread:
brad sue
#1
Nov27-08, 09:43 PM
P: 284
hi please I would some help with the MIPS hazard.

Loop:

      add $t0, $t0, $v0
      addi $v0, $v0, -1
      bnez $v0, Loop

      li $v0, 4
      la $a0, result
      syscall

      li $v0, 1
      move $a0, $t0
      syscall

      b main
I see an hazard at the instructions that are bolded
What I would do is take the underlined instructions and put it like this:
addi $v0, $v0, -1
la $a0, result      
bnez $v0, Loop
Do I get it right? do I miss another hazard?

thank you
b
Phys.Org News Partner Science news on Phys.org
Security CTO to detail Android Fake ID flaw at Black Hat
Huge waves measured for first time in Arctic Ocean
Mysterious molecules in space

Register to reply

Related Discussions
Hazard function Set Theory, Logic, Probability, Statistics 3
MIPS help Programming & Computer Science 7
Pros and cons of MIPS relative to instruction set choices Electrical Engineering 1
Help with MIPS Programming & Computer Science 0
Small MIPS programmes Introductory Physics Homework 2