Improve verbose printing
This commit is contained in:
parent
e457f4dee0
commit
ca9f6ddc77
7
csim.c
7
csim.c
@ -125,14 +125,17 @@ int main(int argc, char* argv[])
|
||||
char* end;
|
||||
char op = buffer[1];
|
||||
long address = strtol(buffer+3, &end, 16);
|
||||
long size = strtol(end+1, NULL, 16);
|
||||
if (*end != ',' || !(op == 'S' || op == 'L' || op == 'M')) {
|
||||
printf("Invalid input file, last line:\n%s\n", buffer);
|
||||
return -1;
|
||||
}
|
||||
printf("%c %ld\n", op, address);
|
||||
|
||||
print_cache(cache, set_indices);
|
||||
if(VERBOSE)
|
||||
print_cache(cache, set_indices);
|
||||
|
||||
char r = cache_access(cache, address, set_index_bits, block_bits, num_lines);
|
||||
mprintf(" %c %lx,%lx %c\n", op, address, size, r);
|
||||
increment_result_counters(r, &score);
|
||||
if (op == 'M') { //Access again if modifying
|
||||
r = cache_access(cache, address, set_index_bits, block_bits, num_lines);
|
||||
|
Reference in New Issue
Block a user