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
Scientists develop 'electronic nose' for rapid detection of C. diff infection
Why plants in the office make us more productive
Tesla Motors dealing as states play factory poker

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