summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/gpu-cache.h
diff options
context:
space:
mode:
authorTayler Hetherington <[email protected]>2013-07-29 14:38:26 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:58 -0700
commit8be43f1e6ad924271cf30cf23f66e180bc67c3f6 (patch)
treed603e7aed1100e6985c81b0f1c047c2a0dbf95f4 /src/gpgpu-sim/gpu-cache.h
parent84f63f6996db657fe1291b4cc6e08b66422918c4 (diff)
Review 77001: Fixing Writeback/Write allocate hard coded memory_access_types for specific caches.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 16683]
Diffstat (limited to 'src/gpgpu-sim/gpu-cache.h')
-rw-r--r--src/gpgpu-sim/gpu-cache.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/gpgpu-sim/gpu-cache.h b/src/gpgpu-sim/gpu-cache.h
index 9a0ea4b..a775ac9 100644
--- a/src/gpgpu-sim/gpu-cache.h
+++ b/src/gpgpu-sim/gpu-cache.h
@@ -694,10 +694,13 @@ class data_cache : public baseline_cache {
public:
data_cache( const char *name, cache_config &config,
int core_id, int type_id, mem_fetch_interface *memport,
- mem_fetch_allocator *mfcreator, enum mem_fetch_status status )
+ mem_fetch_allocator *mfcreator, enum mem_fetch_status status,
+ mem_access_type wr_alloc_type, mem_access_type wrbk_type )
: baseline_cache(name,config,core_id,type_id,memport,status)
{
init( mfcreator );
+ m_wr_alloc_type = wr_alloc_type;
+ m_wrbk_type = wrbk_type;
}
virtual ~data_cache() {}
@@ -751,11 +754,19 @@ protected:
mem_fetch_interface *memport,
mem_fetch_allocator *mfcreator,
enum mem_fetch_status status,
- tag_array* new_tag_array )
+ tag_array* new_tag_array,
+ mem_access_type wr_alloc_type,
+ mem_access_type wrbk_type)
: baseline_cache(name, config, core_id, type_id, memport,status, new_tag_array)
{
init( mfcreator );
+ m_wr_alloc_type = wr_alloc_type;
+ m_wrbk_type = wrbk_type;
}
+
+ mem_access_type m_wr_alloc_type; // Specifies type of write allocate request (e.g., L1 or L2)
+ mem_access_type m_wrbk_type; // Specifies type of writeback request (e.g., L1 or L2)
+
//! A general function that takes the result of a tag_array probe
// and performs the correspding functions based on the cache configuration
// The access fucntion calls this function
@@ -891,7 +902,7 @@ public:
l1_cache(const char *name, cache_config &config,
int core_id, int type_id, mem_fetch_interface *memport,
mem_fetch_allocator *mfcreator, enum mem_fetch_status status )
- : data_cache(name,config,core_id,type_id,memport,mfcreator,status){}
+ : data_cache(name,config,core_id,type_id,memport,mfcreator,status, L1_WR_ALLOC_R, L1_WRBK_ACC){}
virtual ~l1_cache(){}
@@ -912,7 +923,7 @@ protected:
tag_array* new_tag_array )
: data_cache( name,
config,
- core_id,type_id,memport,mfcreator,status, new_tag_array ){}
+ core_id,type_id,memport,mfcreator,status, new_tag_array, L1_WR_ALLOC_R, L1_WRBK_ACC ){}
};
@@ -923,7 +934,7 @@ public:
l2_cache(const char *name, cache_config &config,
int core_id, int type_id, mem_fetch_interface *memport,
mem_fetch_allocator *mfcreator, enum mem_fetch_status status )
- : data_cache(name,config,core_id,type_id,memport,mfcreator,status){}
+ : data_cache(name,config,core_id,type_id,memport,mfcreator,status, L2_WR_ALLOC_R, L2_WRBK_ACC){}
virtual ~l2_cache() {}