#ifndef _TRACE_H #define _TRACE_H typedef enum { TraceOk = 0, TraceRead = 1, TraceWrite = 2, TraceEOF = 3, TraceFileOpenFailed = -1, TraceBadTraceFile = -2, TraceNoTraceFile = -3, TraceBadArgs = -4, } TraceCode; typedef enum { DirectMapped, TwoWayLRU } org_type; typedef enum { WriteThrough, WriteBack } policy_type; typedef struct { int cachesize; org_type organization; int blocksize; policy_type policy; } CacheInfo; void parse_args( CacheInfo*, int, char** ); TraceCode start_trace_file( char* fn ); TraceCode get_next_reference( unsigned int* address, int* count ); void show_statistics( int rh, int rm, int wh, int wm, int br, int bw ); #endif