The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
MIPS/ ASSEMBLY Program
Hi, could you please help me with the following task.
The deliverables include: 2 .asm files
Â
1) Demonstrates a data hazard in a pipeline implementation (let's name it datahazard.asm)
Write a short program 2-5 instructions, that exhibits a data hazard.
Â
2) Pipelined implementation of datahazard_fix.asm (resolves the data hazard given a pipeline implementation)
Re-vise and submit a pipelined implementation of the short program written in (part 1) datahazard_fix.asm
Â
Â
Please see a sample of my homework attached.
Thank you in advance.
Â
.datastring1:.asciiz "Hello world!\n"string2:.asciiz "The second string\n".textmain:la $a0, string1# Print the first string outli $v0, 4syscall# Now call the function() with no arguments.# We use the jal instruction. This store the# address of the instruction after the jal into# the $ra (return address) register, and then# jumps to the first instruction of the functionjal functionli $v0, 4# $a0 should still contain a pointer to the firstsyscall# string, shouldn't it? So let's print it outagainli $v0, 10# Finally, exit the programsyscall# This function is called from main(). It prints a string and returnsfunction:la $a0, string2li $v0, 4syscall# Print out the stringjr $ra# Jump back to the instruction that the $ra# register points to
-----------