Introduction to Computer Architecture Floating-Point Operations
For this assignment, you will write a handful of functions that perform floating-poing
computations.
area(r) Calculates the area of a circle.
volume(r, h)Calculates the volume of a cylinder.
area(l, w)Calculates the area of a rectangle.
volume(l, w, h) Calculates the volume of a box.
mean(a) Calculates the mean of an array of numbers.
variance(a)Calculates the variance of an array of numbers.
You should not need to modify the test suite.You only need to write your functions.Since QT
SPIM expects all of your code to be in a single file, you can concatenate them together in a few ways.If
you are on Windows, you can use the included batch file to do the work for you.Simply dragging your
source file and dropping it on the batch file should be sufficient.If you are having trouble with the batch
file, make sure that your file names match those below.You can also use a command line operation.
Windows:copy /Y
Unix:cat
Your program should include appropriate comments indicating what the code should be doing and
what registers are being used for.After displaying the results, your program should exit cleanly.You should
test your programs using the SPIM simulator to ensure their functionality before submitting them.You
should only submit your functions.You will not receive credit if you submit the test suite in any form.You
should also not include any driver or debug code in your submission.
Objectives:
1. To introduce floating-point operations in the MIPS assembly language.
2. To review array access.
3. To review parameter santization.
Reviews
There are no reviews yet.