Week 04 Laboratory Exercises

Objectives

  • learning how function calls are implemented
  • practicing MIPS memory access
  • practicing calculating array indices
  • practicing using MIPS control instructions (branch)
  • practicing running MIPS programs with mipsy and mipsy-web

Preparation

Before the lab you should re-read the relevant lecture slides and their accompanying examples.

Getting Started

Set up for the lab by creating a new directory called lab04 and changing to this directory.
mkdir lab04
cd lab04

There are some provided files for this lab which you can fetch with this command:

1521 fetch lab04

If you're not working at CSE, you can download the provided files as a zip file or a tar file.

Exercise — individual:
MIPS 2d array

INTERNAL ERROR MISSING SOURCE FILE: activities/lookup/index.html

When you think your program is working, you can use autotest to run some simple automated tests:

1521 autotest lookup 

When you are finished working on this exercise, you must submit your work by running give:

give cs1521 lab04_lookup lookup.s

You must run give before Tuesday 08 October 12:00 (midday) (2024-10-08 12:00:00) to obtain the marks for this lab exercise. Note that this is an individual exercise, the work you submit with give must be entirely your own.

Exercise — individual:
MIPS Sieve

INTERNAL ERROR MISSING SOURCE FILE: activities/sieve/index.html

When you think your program is working, you can use autotest to run some simple automated tests:

1521 autotest sieve 

When you are finished working on this exercise, you must submit your work by running give:

give cs1521 lab04_sieve sieve.s

You must run give before Tuesday 08 October 12:00 (midday) (2024-10-08 12:00:00) to obtain the marks for this lab exercise. Note that this is an individual exercise, the work you submit with give must be entirely your own.

Exercise — individual:
MIPS Random Mathematics

INTERNAL ERROR MISSING SOURCE FILE: activities/mathematics/index.html

When you think your program is working, you can use autotest to run some simple automated tests:

1521 autotest mathematics 

When you are finished working on this exercise, you must submit your work by running give:

give cs1521 lab04_mathematics mathematics.s

You must run give before Tuesday 08 October 12:00 (midday) (2024-10-08 12:00:00) to obtain the marks for this lab exercise. Note that this is an individual exercise, the work you submit with give must be entirely your own.

Exercise — individual:
MIPS class management system

INTERNAL ERROR MISSING SOURCE FILE: activities/cms/index.html

When you think your program is working, you can use autotest to run some simple automated tests:

1521 autotest cms 

When you are finished working on this exercise, you must submit your work by running give:

give cs1521 lab04_cms cms.s

You must run give before Tuesday 08 October 12:00 (midday) (2024-10-08 12:00:00) to obtain the marks for this lab exercise. Note that this is an individual exercise, the work you submit with give must be entirely your own.

Challenge Exercise — individual:
MIPS Ackermann Function

INTERNAL ERROR MISSING SOURCE FILE: activities/ackermann/index.html

When you think your program is working, you can use autotest to run some simple automated tests:

1521 autotest ackermann 

When you are finished working on this exercise, you must submit your work by running give:

give cs1521 lab04_ackermann ackermann.s

You must run give before Tuesday 08 October 12:00 (midday) (2024-10-08 12:00:00) to obtain the marks for this lab exercise. Note that this is an individual exercise, the work you submit with give must be entirely your own.

Challenge Exercise — individual:
Polymipsism (Attempt if you dare!)

INTERNAL ERROR MISSING SOURCE FILE: activities/polymipsism/index.html

When you think your program is working, you can use autotest to run some simple automated tests:

1521 autotest polymipsism 

When you are finished working on this exercise, you must submit your work by running give:

give cs1521 lab04_polymipsism polymipsism.s

You must run give before Tuesday 08 October 12:00 (midday) (2024-10-08 12:00:00) to obtain the marks for this lab exercise. Note that this is an individual exercise, the work you submit with give must be entirely your own.

Submission

When you are finished each exercises make sure you submit your work by running give.

You can run give multiple times. Only your last submission will be marked.

Don't submit any exercises you haven't attempted.

If you are working at home, you may find it more convenient to upload your work via give's web interface.

Remember you have until Week 5 Tuesday 12:00:00 (midday) to submit your work without receiving a late penalty.

You cannot obtain marks by e-mailing your code to tutors or lecturers.

You check the files you have submitted here.

Automarking will be run by the lecturer several days after the submission deadline, using test cases different to those autotest runs for you. (Hint: do your own testing as well as running autotest.)

After automarking is run by the lecturer you can view your results here. The resulting mark will also be available via give's web interface.

Lab Marks

When all components of a lab are automarked you should be able to view the the marks via give's web interface or by running this command on a CSE machine:

1521 classrun -sturec