-
Notifications
You must be signed in to change notification settings - Fork 1
/
CacheTable.h
35 lines (31 loc) · 843 Bytes
/
CacheTable.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class CacheTable{
private:
char *data;
bool *valid;
long long int *tag;
bool *dirty;
int *lru;
int set_num;
int line_num;
int offset_num;
public:
CacheTable();
CacheTable(int set_num_,int line_num_,int offset_num_);
~CacheTable();
bool getValid(int set,int line);//get
long long int getTag(int set,int line);
char getData(int set,int line,int offset);
bool getDirty(int set,int line);
int getLRU(int set,int line);
int getSet_num();
int getLine_num();
int getOffset_num();
bool setValid(int set,int line,bool value);//set
bool setTag(int set,int line,long long int value);
bool setData(int set,int line,int offset,char value);
bool setSet_num(int value);
bool setLine_num(int value);
bool setOffset_num(int value);
bool setDirty(int set,int line,bool value);
bool setLRU(int set,int line, int value);
};