Starting from:

$30

MIPS Assignment #2

Purpose:    Become familiar with RISC Architecture concepts, the MIPS Architecture, and SPIM
(the MIPS simulator).
Points:    50


Assignment:

Write a MIPS assembly language program to calculate the total surface area of each three dimensional trapezoid in a series of trapezoids.

The total surface area of a three dimensional trapezoid is computed as follows:






aSide

cSide
dSide
height


length
bSide


surfaceAreas[ n] = aSides [n] × (lengths[ n] × heights [ n] ) + bSides[ n] × (lengths [n] × heights[ n] ) + lengths[ n] × cSides[ n] + lengths[ n] × dSides [n]

Once the values are computed, the program should find the minimum, maximum, middle value, and average for the computed total surface areas.


The program should display the results to the console window. The output should look like the following ,with the correct answers displayed. The numbers should be displayed with two (2) spaces before each number, and 5 numbers displayed per line. There should be one (1) blank line before the numbers and one (1) after the numbers. The instructions to display the headers and answers are included in the template.

Of course, you will need to calculate the correct answers first.


MIPS Assignment #2
3D Trapezoid Total Surface Areas Program: Also finds minimum, middle value, maximum, sum, and average for the surface areas.

3876255    5944478    5378724    6346388    4267454

4715891 5316165 8480070 6917925 8121600 [ ... truncated for space ... ]
Surface Areas Minimum = ?

Surface Areas Middle    = ?
Surface Areas Maximum = ?

Surface Areas Sum    = ?
Surface Areas Average = ?
Submission:

    • All source files must assemble and execute with QtSpim/SPIM MIPS simulator.

    • Submit source file
        ◦ Submit a copy of the program source file via the on-line submission

    • Once you submit, the system will score the project and provide feedback.
        ◦ If you do not get full score, you can (and should) correct and resubmit.
        ◦ You can re-submit an unlimited number of times before the due date/time.

    • Late submissions will be accepted for a period of 24 hours after the due date/time for any given lab. Late submissions will be subject to a ~2% reduction in points per an hour late. If you submit 1 minute - 1 hour late -2%, 1-2 hours late -4%, … , 23-24 hours late -50%. This means after 24 hours late submissions will receive an automatic 0.


Program Header Block

All source files must include your name, section number, assignment, NSHE number, and program description. The required format is as follows:

    • Name: <your name>
    • NSHE ID: <your id>
    • Section: <section>
    • Assignment: <assignment number>
    • Description: <short description of program goes here>

Failure to include your name in this format will result in a reduction of points.


Scoring Rubric

Scoring will include functionality, code quality, and documentation. Below is a summary of the scoring rubric for this assignment.

Criteria
Weight
Summary
Assemble
-
Failure to assemble will result in a score


of 0.



Program Header
3%
Must include header block in the


required format (see above).



General Comments
7%
Must include an appropriate level of


program documentation.



Program Functionality
90%
Program must meet the functional
(and on-time)

requirements as outlined in the


assignment. Must be submitted on time


for full score.



MIPS Assignment #2 – Data Declarations

Use the following data declarations:

aSides:
.word
10,
14,
13,
37,
54

.word
31,
13,
20,
61,
36

.word
14,
53,
44,
19,
42

.word
27,
41,
53,
62,
10

.word
19,
28,
14,
10,
15

.word
15,
11,
22,
33,
70

.word
15,
23,
15,
63,
26

.word
24,
33,
10,
61,
15

.word
14,
34,
13,
71,
81
bSides:
.word
38,
73,
29,
17,
93

.word
233,
214,
273,
231,
215

.word
264,
273,
274,
223,
256

.word
244,
252,
231,
242,
256

.word
215,
224,
236,
275,
246

.word
213,
223,
253,
267,
235

.word
204,
229,
264,
267,
234

.word
216,
213,
264,
253,
265

.word
226,
212,
257,
267,
234

.word
217,
214,
217,
225,
253
cSides:
.word
223,
273,
215,
206,
213

.word
125,
124,
113,
117,
123

.word
134,
134,
156,
164,
142

.word
206,
212,
112,
131,
246

.word
150,
154,
178,
188,
192

.word
182,
195,
117,
112,
127

.word
117,
167,
179,
188,
194

.word
134,
152,
174,
186,
197

.word
104,
116,
112,
136,
153

.word
132,
151,
136,
187,
190
dSides:
.word
120,
111,
123,
132,
145

.word
157,
187,
199,
111,
123

.word
124,
125,
126,
175,
194

.word
149,
126,
162,
131,
127

.word
177,
199,
197,
175,
114

.word
164,
141,
142,
173,
166

.word
104,
146,
123,
156,
163

.word
121,
118,
177,
143,
178

.word
112,
111,
110,
135,
110

.word
127,
144,
210,
172,
124
heights:
.word
125,
116,
162,
128,
192

.word
117,
114,
115,
172,
124

.word
125,
116,
162,
138,
192

.word
111,
183,
133,
130,
127

.word
111,
115,
158,
113,
115

.word
117,
126,
116,
117,
227

.word
177,
199,
177,
175,
114

.word
194,
124,
112,
143,
176

.word
134,
126,
132,
156,
163

.word
124,
119,
122,
183,
110
lengths:
.word
191,
192,
129,
129,
122

.word
135,
226,
162,
137,
127

.word
127,
159,
177,
175,
144

.word
179,
153,
136,
140,
235

.word
112,
154,
128,
113,
132

.word
161,
192,
151,
213,
126

.word
169,
114,
122,
115,
131

.word
194,
124,
114,
143,
176

.word
134,
126,
122,
156,
163

.word
149,
144,
114,
134,
167

.word
143,
129,
161,
165,
136

surfaceAreas:
.space
200
len:
.word
50
saMin:
.word
0
saMid:
.word
0
saMax:
.word
0
saSum:
.word
0
saAve:
.word
0

Note, the  .space 200 directive reserves 200 bytes which will be used to store 50 words.

More products