summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/gpu-cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgpu-sim/gpu-cache.cc')
-rw-r--r--src/gpgpu-sim/gpu-cache.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gpgpu-sim/gpu-cache.cc b/src/gpgpu-sim/gpu-cache.cc
index a687965..d5856aa 100644
--- a/src/gpgpu-sim/gpu-cache.cc
+++ b/src/gpgpu-sim/gpu-cache.cc
@@ -29,6 +29,20 @@
#include "stat-tool.h"
#include <assert.h>
+const char * cache_request_status_str(enum cache_request_status status)
+{
+ static const char * static_cache_request_status_str[] = {
+ "HIT",
+ "HIT_RESERVED",
+ "MISS",
+ "RESERVATION_FAIL"
+ };
+
+ assert(sizeof(static_cache_request_status_str) / sizeof(const char*) == NUM_CACHE_REQUEST_STATUS);
+ assert(status < NUM_CACHE_REQUEST_STATUS);
+
+ return static_cache_request_status_str[status];
+}
void l2_cache_config::init(linear_to_raw_address_translation *address_mapping){
cache_config::init();