This directory contains the following files: big.o 17-Nov-97 15:37 97k big.s 17-Nov-97 15:37 234k genS.c 17-Nov-97 15:37 1k s4.caches+bpred 17-Nov-97 15:37 43k t.o 17-Nov-97 15:37 1k t.s 17-Nov-97 15:37 1k big.o is the LC-897 executable file for big.s big.s is a large example of execution, wherein three arrays are manipulated. here is the code: lw 1 0 a1addr lw 2 0 a2addr lw 3 0 a3addr lw 4 0 len lw 5 0 n1 loop lw 6 1 0 lw 7 2 0 add 6 6 7 sw 6 3 0 lw 6 0 p1 add 4 4 5 add 1 1 6 add 2 2 6 add 3 3 6 beq 4 0 out beq 0 0 loop out halt a1addr .fill a1 a2addr .fill a2 a3addr .fill a3 len .fill 10000 n1 .fill -1 p1 .fill 1 we first load in the addresses of arrays a1, a2, and a3 into registers 1, 2, and 3, respectively. we then load in the length of the arrays (stored in len). this is placed in r4. then we load the value -1 into r5. we will use this to decrement the array size -- we perform the loop until the value in r4 (the array size) hits zero. for each iteration, we load values from a1 and a2, add them, and then store them to a3. the values in the arrays look like: array a1: array a2: 0x1001 0x2001 0x1002 0x2002 0x1003 0x2003 ... ... array a3 initially has all zeroes in it. the nice thing about this configuration is that it is easy to tell what should be in the data cache at any given moment, and where it should be. after we perform the add, we store the value to a3, increment each of the arrray pointers (in r1, r2, r3), decrement the counter (in r4), and try the loop. t.s/t.o are exactly like big.s and big.o except that they only have 50 values in their arrays, while big.s has 10 thousand (it should take roughly 5 minutes to finish executing big.o, while it should take a fraction of a second to finish executing t.o). genS.c is a C file that will generate assembly-code files of the form seen in t.s and big.s. once compiled, it takes the following argument: genS s4 my simulator that implements caches and branch prediction, to allow you to write your own test programs and see what the difference is. note that mine MAY have bugs in it ... please let me know if you see any weirdness.