summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.cc
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2013-04-11 05:17:09 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:46 -0700
commit918b3ef50790f0ae7c8c079754f7332933572d5b (patch)
tree161654598f0190244978e330173b3828a42a3f2d /src/abstract_hardware_model.cc
parent3164bfc1910cf17e7dd4033cd07ac264f656336f (diff)
Replaced the legacy L2 cache access stats with more meaningful breakdown that categorize access by their access type (global memory read/write, local memory read/write, instruction read, ... etc.).
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15784]
Diffstat (limited to 'src/abstract_hardware_model.cc')
-rw-r--r--src/abstract_hardware_model.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc
index cb6f141..5ef7599 100644
--- a/src/abstract_hardware_model.cc
+++ b/src/abstract_hardware_model.cc
@@ -108,6 +108,28 @@ address_type line_size_based_tag_func(new_addr_type address, new_addr_type line_
return address & ~(line_size-1);
}
+const char * mem_access_type_str(enum mem_access_type access_type)
+{
+ static const char * access_type_str[] = {
+ "GLOBAL_ACC_R",
+ "LOCAL_ACC_R",
+ "CONST_ACC_R",
+ "TEXTURE_ACC_R",
+ "GLOBAL_ACC_W",
+ "LOCAL_ACC_W",
+ "L1_WRBK_ACC",
+ "L2_WRBK_ACC",
+ "INST_ACC_R",
+ "L2_WR_ALLOC_R"
+ };
+
+ assert(sizeof(access_type_str) / sizeof(const char*) == NUM_MEM_ACCESS_TYPE);
+ assert(access_type < NUM_MEM_ACCESS_TYPE);
+
+ return access_type_str[access_type];
+}
+
+
void warp_inst_t::clear_active( const active_mask_t &inactive ) {
active_mask_t test = m_warp_active_mask;
test &= inactive;