Browse Source

Move print_cache into main loop

master
Adam Goldsmith 6 years ago
parent
commit
8548d6ede5
  1. 4
      csim.c

4
csim.c

@ -106,8 +106,6 @@ int main(int argc, char* argv[]) @@ -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[]) @@ -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);