Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'dcf'

  • Loading branch information...
commit 72bf494522213d4351baa86ed3ad90f5763e1008 2 parents b60753f + d1edc3b
@pksunkara authored
Showing with 17 additions and 1 deletion.
  1. +1 −0  Access.cpp
  2. +12 −0 Cache.cpp
  3. +4 −1 Cache.h
View
1  Access.cpp
@@ -17,6 +17,7 @@ void Access::print(void) {
cout << "\t\tAccesses:" << this->accesses << endl;
cout << "\t\tHits: " << this->cache->get_hits() << endl;
cout << "\t\tMisses: " << this->cache->get_misses() << endl;
+ cout << "\t\tCold Misses: " << this->cache->get_cold_misses() << endl;
cout << endl << endl;
}
View
12 Cache.cpp
@@ -54,6 +54,18 @@ int Cache::get_misses(void) {
return this->misses[0];
}
+int Cache::get_cold_misses(void) {
+ return this->misses[1];
+}
+
+int Cache::get_capacity_misses(void) {
+ return this->misses[2];
+}
+
+int Cache::get_conflict_misses(void) {
+ return this->misses[3];
+}
+
int Cache::get_cached(int address) {
int set_num = this->set_mul & address;
int tag_num = this->tag_mul & address;
View
5 Cache.h
@@ -27,8 +27,11 @@ class Cache {
int get_hits(void);
int get_misses(void);
- int get_cached(int address);
+ int get_cold_misses(void);
+ int get_capacity_misses(void);
+ int get_conflict_misses(void);
+ int get_cached(int address);
void restart(void);
void insert_block(int address, Block* new_block);
Please sign in to comment.
Something went wrong with that request. Please try again.