Move print_cache into main loop
This commit is contained in:
parent
60fc5d1f0a
commit
8548d6ede5
4
csim.c
4
csim.c
@ -106,8 +106,6 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
linked_line** cache = make_cache(set_indices, num_lines);
|
linked_line** cache = make_cache(set_indices, num_lines);
|
||||||
|
|
||||||
print_cache(cache, set_indices);
|
|
||||||
|
|
||||||
/* FILE READING */
|
/* FILE READING */
|
||||||
FILE* f = fopen(filename, "r");
|
FILE* f = fopen(filename, "r");
|
||||||
if(!f)
|
if(!f)
|
||||||
@ -129,6 +127,8 @@ int main(int argc, char* argv[])
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
printf("%c %ld\n", op, address);
|
printf("%c %ld\n", op, address);
|
||||||
|
|
||||||
|
print_cache(cache, set_indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
printSummary(score.hits, score.misses, score.evictions);
|
printSummary(score.hits, score.misses, score.evictions);
|
||||||
|
Reference in New Issue
Block a user