CSE 378 - Autumn 2002

Machine Organization and Assembly Language Programming

Assignment #7

Due Monday, December 9

The goal of this assignment is to teach you to design and implement the datapath and control needed to build and evaluate a level-1 data cache.

Again, this is a group project. Your partner should be someone that you have not worked with before, and you should turn in one copy of the assignment.

For this assignment, you will be using SMOK to design and implement the level-1 data cache. You can install this cache in your Homework 6 machine.  You'll need the set-less-than operations, which you didn't have to implement for homework 6, so you should include it now. The cache should have the following configuration:

The cache controller will have to check the cache on each data memory reference, decomposing its address into tag, index, and byte offset components. Next, it should take the appropriate action, for example, change valid or dirty bits, replace blocks, etc., depending on whether the reference was a load or store and whether there was a cache hit or miss. If a miss, then the hardware should get the data from memory.

The cache controller should stall the rest of the machine on a miss, and fetch the appropriate data into the cache. A hit (and any necessary updates to your cache) should execute in one cycle, without stalling the machine. The design of the cache controller is the major component of this homework.

In addition to correctly handling data assesses, the data cache controller should also keep some statistics on data cache performance. Implement integer counters that will enable you to report on the following statistics:

More credit will be given for counter designs that minimize the number of counters needed to collect the information you need for the statistics.

You should write a program: please see the appendix for details.

For the purposes of debugging, you are encouraged to test your program on a smaller size cache.

Again, you should turn in a short written report (one page is sufficent). In it please describe how you built your cache design in SMOK, and how you tested it. Describe how your search algorithm works as well as where the array and three-symbol sequence is located in your smokmem file.  Include the data cache performance statsitics above that are based on the values in your performance counters. Also give the distribution of work between partners.

Turn in the code using the turnin form here . The written portion will be due in class. You should turn in your smok and smokmem files for the cached machine and sorting example. Please make sure to turn in any additional memory or support files. Also, turn in the assembly code for your sorting algorithm.

Hints: