Programming Assignment 3

CS 5621

15 points, Due Thursday, March 22


Overview

For this assignment, you will write a program that analyses MIPS program traces to evaluate performance with various models of branch handling in a pipeline. For this assignment, the branch handling model can be specified in terms of the number of stall cycles for branch and jump instructions.

Materials for the Assignment

The materials that you will need to do this assignment can be found in the directory ~gshute/public/cs5621/pa3, or follow this link. There you will find an assembly language program, trace.s, that can be used to create execution traces for MIPS assembly language programs. The directory also contains the following execution trace files.

These files are traces of the execution of programs that were used to test trace.s.

You can also create execution traces for your own MIPS programs. The comments at the top of the file trace.s describe how to do this.

Execution Trace Format

The execution trace generated by trace.s on a MIPS program contains the traced program output mixed with a description of each instruction executed in the traced program. Each instruction execution description has the following form.

@@! instruction address instruction classification extra
    
The instruction address and instruction are displayed as signed decimal numbers. The classification is one of the following strings. For LOAD and STORE, addr is the decimal address of the load or store.

Your software will need to discard the traced program output. If the traced program generates output with an immediate newline character, that output will appear on a line by itself. If the traced program generates output without an immediate newline character, that output will appear at the beginning of the trace information for the next executed instruction. The file output.trace.out demonstrates this.

Specifications for Your Software

The software that you write for this assignment should allow the user to specify the following parameters.

The software should display the following information to the user.

You can write the software in any language, including scripting languages such as perl. If you want, you can write multiple programs that interact through a pipe.

What to Turn In

You will nedd to demonstrate your program on the due date. For the demonstration, you will need to set up for accessing the software that you have written, then let the TA execute your software. You should provide clear written documentation describing how to run the software. You may lose some points if the TA needs verbal explanation to run the software.

When you have demonstrated your software, you should also turn copies of all files that you have written.