Move print_cache into main loop

This commit is contained in:
Adam Goldsmith 2016-04-28 01:42:24 -04:00
parent 60fc5d1f0a
commit 8548d6ede5

4
csim.c
View File

@ -106,8 +106,6 @@ int main(int argc, char* argv[])
linked_line** cache = make_cache(set_indices, num_lines);
print_cache(cache, set_indices);
/* FILE READING */
FILE* f = fopen(filename, "r");
if(!f)
@ -129,6 +127,8 @@ int main(int argc, char* argv[])
return -1;
}
printf("%c %ld\n", op, address);
print_cache(cache, set_indices);
}
printSummary(score.hits, score.misses, score.evictions);