-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsimple_cache_defs.h
More file actions
68 lines (58 loc) · 2.49 KB
/
simple_cache_defs.h
File metadata and controls
68 lines (58 loc) · 2.49 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef SIMPLE_CACHE_DEFS_H
#define SIMPLE_CACHE_DEFS_H
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// //
// This file is distributed as part of the Cache Replacement Championship //
// workshop held in conjunction with ISCA'2010. //
// //
// //
// Everyone is granted permission to copy, modify, and/or re-distribute //
// this software. //
// //
// Please contact Aamer Jaleel <ajaleel@gmail.com> should you have any //
// questions //
// //
////////////////////////////////////////////////////////////////////////////////
// --- DO NOT EDIT THIS FILE --- DO NOT EDIT THIS FILE --- DO NOT EDIT THIS FILE ---
// --- DO NOT EDIT THIS FILE --- DO NOT EDIT THIS FILE --- DO NOT EDIT THIS FILE ---
// --- DO NOT EDIT THIS FILE --- DO NOT EDIT THIS FILE --- DO NOT EDIT THIS FILE ---
// IMPORTANT NOTE: DO NOT CHANGE ANYTHING IN THIS HEADER FILE. Changing anything
// in here will violate the competition rules.
// ASIM core
#include "asim-defs.h"
typedef UINT64 Addr_t;
typedef UINT64 BITVECTOR;
typedef UINT64 COUNTER;
typedef enum
{
EVICTED = 0,
PENDING_EVICT = 0,
READY = 0
} EvictState;
typedef struct
{
Addr_t tag; // Tag of line
bool valid; // Is line valid?
bool exclusive; // Is line exclusive?
bool dirty; // Is line dirty?
bool shared_upgrading; // Is line in process of begin upgraded from shared to exclusive?
EvictState evict_state;
// BITVECTOR sharing_dir; // Directory of which core accessed this line
} LINE_STATE;
typedef enum
{
ACCESS_IFETCH = 0,
ACCESS_LOAD = 1,
ACCESS_STORE = 2,
ACCESS_INSPECT = 3,
ACCESS_UNSUPPORT1 = 4,
ACCESS_PREFETCH = 5,
ACCESS_WRITEBACK = 6,
ACCESS_RFO = 7,
ACCESS_UPGRADE = 8,
ACCESS_SNOOP = 9,
ACCESS_MAX = 10
} AccessTypes;
#define IS_STORE(X) (X == ACCESS_STORE || X == ACCESS_WRITEBACK)
#endif