cachesim
A cache simulator
|
00001 /* -*- mode:c; coding: utf-8 -*- */ 00002 00008 #ifndef TRACE_H_INCLUDED 00009 #define TRACE_H_INCLUDED 00010 00011 #include "common.h" 00012 00013 #include <stdio.h> 00014 00019 typedef struct TraceStep 00020 { 00021 char op; 00022 char mem; 00023 memaddr_t addr; 00024 int size; 00025 MemoryCell value[8]; 00026 } TraceStep; 00027 00032 struct Trace; 00033 typedef struct Trace Trace; 00034 00041 Trace *trace_open(const char *path, FILE *log_f); 00042 00047 Trace *trace_close(Trace *t); 00048 00057 int trace_next(Trace *t); 00058 00064 TraceStep *trace_get(Trace *t); 00065 00066 #endif 00067 00068 /* 00069 * Local variables: 00070 * c-basic-offset: 4 00071 * End: 00072 */