Docsity

Homework 1 - Computer Architecture - Fall 2004 | ECE 484, Assignments of Computer Architecture and Organization

Toggle sidebar
bg1
ECE 484/584 Fall 2004
Homework Assignment #1
In this assignment you are responsible for writing a MIPS subroutine and a stub calling
function (main) using the PCSPIM simulator.
The subroutine takes four input parameters and returns two values back to the calling
function, the input parameter having the maximum value and the input parameter having
the lowest value. The subroutine MUST use at least one saved register in some capacity.
If you fail to use a saved register within the subroutine, the program will not be accepted
and you will receive a grade of zero on the assignment.
You must also write a stub calling function that can be used to call your subroutine. This
calling function must be named main and must expect the four input parameters to be
located in registers $s0 - $s3. It must also put the maximum return value in register $s4
and the minimum return value in register $s5.
The assignment is due on September 30, 2004 by 6:00 p.m. Each student must demo the
program to Smita Potdar BEFORE the deadline. The computers in the ECE labs (Houser
Hall rooms 221 and 222) can be used, or you can use a personal laptop for demonstration
purposes. Smita will use a standard set of test data that she will input to the appropriate
registers just before executing your code. She will then verify that the correct results are
located in the correct registers upon the completion of your code.
You should use the standard MIPS conventions for register usage and preserve only those
registers that should be preserved across the function call.
Late assignments will not be accepted.

Partial preview of the text

Download Homework 1 - Computer Architecture - Fall 2004 | ECE 484 and more Assignments Computer Architecture and Organization in PDF only on Docsity!

ECE 484/584 Fall 2004 Homework Assignment # In this assignment you are responsible for writing a MIPS subroutine and a stub calling function (main) using the PCSPIM simulator. The subroutine takes four input parameters and returns two values back to the calling function, the input parameter having the maximum value and the input parameter having the lowest value. The subroutine MUST use at least one saved register in some capacity. If you fail to use a saved register within the subroutine, the program will not be accepted and you will receive a grade of zero on the assignment. You must also write a stub calling function that can be used to call your subroutine. This calling function must be named main and must expect the four input parameters to be located in registers $s0 - $s3. It must also put the maximum return value in register $s and the minimum return value in register $s5. The assignment is due on September 30, 2004 by 6:00 p.m. Each student must demo the program to Smita Potdar BEFORE the deadline. The computers in the ECE labs (Houser Hall rooms 221 and 222) can be used, or you can use a personal laptop for demonstration purposes. Smita will use a standard set of test data that she will input to the appropriate registers just before executing your code. She will then verify that the correct results are located in the correct registers upon the completion of your code. You should use the standard MIPS conventions for register usage and preserve only those registers that should be preserved across the function call. Late assignments will not be accepted.