Initial version of cache adaption for mutator
[IRC.git] / Robust / src / Runtime / bamboo / multicorecache.h
1 #ifndef BAMBOO_MULTICORE_CACHE_H
2 #define BAMBOO_MULTICORE_CACHE_H
3
4 #ifdef MULTICORE_GC
5 #ifdef GC_CACHE_ADAPT
6 #define GC_CACHE_SAMPLING_UNIT 100000000
7 #define GC_TILE_TIMER_EVENT_SETTING 100000000  
8 #define GC_NUM_SAMPLING 24
9
10 // should be consistent with multicoreruntime.h
11 typedef union
12 {
13   unsigned int word;
14   struct
15   {
16     // policy type
17     unsigned int cache_mode   : 2;
18         // Reserved.
19     unsigned int __reserved_0 : 6;
20         // Location Override Target Y
21     unsigned int lotar_y      : 4;
22     // Reserved.
23     unsigned int __reserved_1 : 4;
24     // Location Override Target X
25     unsigned int lotar_x      : 4;
26     // Reserved.
27     unsigned int __reserved_2 : 12;
28   };
29 } bamboo_cache_policy_t;
30
31 #define BAMBOO_CACHE_MODE_LOCAL 0
32 #define BAMBOO_CACHE_MODE_HASH 1
33 #define BAMBOO_CACHE_MODE_NONE 2
34 #define BAMBOO_CACHE_MODE_COORDS 3
35
36 #endif // GC_CACHE_ADAPT
37 #endif // MULTICORE_GC
38
39 #endif