cachesim
A cache simulator
|
00001 /* -*- mode:c; coding: utf-8 -*- */ 00002 00008 #ifndef ABSTRACT_MEMORY_H_INCLUDED 00009 #define ABSTRACT_MEMORY_H_INCLUDED 00010 00011 #include "common.h" 00012 #include "statistics.h" 00013 00014 struct AbstractMemory; 00015 typedef struct AbstractMemory AbstractMemory; 00016 00020 typedef struct AbstractMemoryOps 00021 { 00027 AbstractMemory *(*free)(AbstractMemory *m); 00035 void (*read)(AbstractMemory *m, memaddr_t addr, int size, MemoryCell *dst); 00043 void (*write)(AbstractMemory *m, memaddr_t addr, int size, const MemoryCell *src); 00054 void (*reveal)(AbstractMemory *m, memaddr_t addr, int size, const MemoryCell *src); 00061 void (*flush)(AbstractMemory *m); 00062 } AbstractMemoryOps; 00063 00067 struct AbstractMemory 00068 { 00069 AbstractMemoryOps *ops; 00070 StatisticsInfo *info; 00071 }; 00072 00073 #endif 00074 00075 /* 00076 * Local variables: 00077 * c-basic-offset: 4 00078 * End: 00079 */