Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions simulators/drrip/llc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void LLC::Init()
m_dType_elemSz.resize(numMainDataTypes);

m_tagArray = new intptr_t* [m_numSets];
m_dirty = new uint8_t [m_numSets];
m_dirty = new uint16_t [m_numSets];
m_referenceCtr = new stat_t* [m_numSets];
m_setLocks = new PIN_LOCK [m_numSets];
m_rrpv = new uint8_t* [m_numSets];
Expand Down Expand Up @@ -347,7 +347,7 @@ bool LLC::isCacheHit(intptr_t addr, int setID, bool isWrite, bool updateReplacem
if (isWrite == true)
{
//m_dirty[setID][way] = 1;
uint8_t mask = 1 << way;
uint16_t mask = 1 << way;
m_dirty[setID] = m_dirty[setID] | (mask);
}
m_referenceCtr[setID][way]++;
Expand All @@ -362,8 +362,8 @@ bool LLC::installNewLine(intptr_t addr, int setID, intptr_t &evictedAddr, bool i
int index = getReplacementIndex(setID, setType, tid);
//evictedAddr = m_tagArray[setID][index] * m_lineSz; //line to be kicked out
evictedAddr = m_tagArray[setID][index]; //line to be kicked out
uint8_t mask = 1 << index;
uint8_t retVal = m_dirty[setID] & mask;
uint16_t mask = 1 << index;
uint16_t retVal = m_dirty[setID] & mask;
assert(retVal == 0 || retVal == mask);
if (evictedAddr == -1 * m_lineSz)
assert(retVal == 0);
Expand Down
2 changes: 1 addition & 1 deletion simulators/drrip/llc.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class LLC

/* tag store */
intptr_t** m_tagArray; //[numSets][numWays];
uint8_t* m_dirty;
uint16_t* m_dirty;
stat_t** m_referenceCtr; //keep track of no. of references between insertion & eviction
PIN_LOCK* m_setLocks; //[numSets]; //per-set lock

Expand Down
8 changes: 4 additions & 4 deletions simulators/lru/llc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void LLC::Init()
m_dType_elemSz.resize(numMainDataTypes);

m_tagArray = new intptr_t* [m_numSets];
m_dirty = new uint8_t [m_numSets];
m_dirty = new uint16_t [m_numSets];
m_referenceCtr = new stat_t* [m_numSets];
m_setLocks = new PIN_LOCK [m_numSets];
m_lru_bits = new uint8_t* [m_numSets];
Expand Down Expand Up @@ -339,7 +339,7 @@ bool LLC::isCacheHit(intptr_t addr, int setID, bool isWrite, bool updateReplacem
if (isWrite == true)
{
//m_dirty[setID][way] = 1;
uint8_t mask = 1 << way;
uint16_t mask = 1 << way;
m_dirty[setID] = m_dirty[setID] | (mask);
}
m_referenceCtr[setID][way]++;
Expand All @@ -354,8 +354,8 @@ bool LLC::installNewLine(intptr_t addr, int setID, intptr_t &evictedAddr, bool i
int index = getReplacementIndex(setID, tid);
//evictedAddr = m_tagArray[setID][index] * m_lineSz; //line to be kicked out
evictedAddr = m_tagArray[setID][index]; //line to be kicked out
uint8_t mask = 1 << index;
uint8_t retVal = m_dirty[setID] & mask;
uint16_t mask = 1 << index;
uint16_t retVal = m_dirty[setID] & mask;
assert(retVal == 0 || retVal == mask);
if (evictedAddr == -1 * m_lineSz)
assert(retVal == 0);
Expand Down
2 changes: 1 addition & 1 deletion simulators/lru/llc.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class LLC

/* tag store */
intptr_t** m_tagArray; //[numSets][numWays];
uint8_t* m_dirty;
uint16_t* m_dirty;
stat_t** m_referenceCtr; //keep track of no. of references between insertion & eviction
PIN_LOCK* m_setLocks; //[numSets]; //per-set lock

Expand Down
8 changes: 4 additions & 4 deletions simulators/opt-ideal/llc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void LLC::Init()
m_dType_elemSz.resize(numMainDataTypes);

m_tagArray = new intptr_t* [m_numSets];
m_dirty = new uint8_t [m_numSets];
m_dirty = new uint16_t [m_numSets];
m_referenceCtr = new stat_t* [m_numSets];
m_setLocks = new PIN_LOCK [m_numSets];
PIN_MutexInit(&m_dstLock);
Expand Down Expand Up @@ -371,7 +371,7 @@ bool LLC::isCacheHit(intptr_t addr, int setID, bool isWrite, bool updateReplacem
if (isWrite == true)
{
//m_dirty[setID][way] = 1;
uint8_t mask = 1 << way;
uint16_t mask = 1 << way;
m_dirty[setID] = m_dirty[setID] | (mask);
}
m_referenceCtr[setID][way]++;
Expand All @@ -386,8 +386,8 @@ bool LLC::installNewLine(intptr_t addr, int setID, intptr_t &evictedAddr, bool i
int index = getReplacementIndex(addr, setID, setType, tid);
//evictedAddr = m_tagArray[setID][index] * m_lineSz; //line to be kicked out
evictedAddr = m_tagArray[setID][index]; //line to be kicked out
uint8_t mask = 1 << index;
uint8_t retVal = m_dirty[setID] & mask;
uint16_t mask = 1 << index;
uint16_t retVal = m_dirty[setID] & mask;
assert(retVal == 0 || retVal == mask);
if (evictedAddr == -1 * m_lineSz)
assert(retVal == 0);
Expand Down
2 changes: 1 addition & 1 deletion simulators/opt-ideal/llc.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class LLC

/* tag store */
intptr_t** m_tagArray; //[numSets][numWays];
uint8_t* m_dirty;
uint16_t* m_dirty;
stat_t** m_referenceCtr; //keep track of no. of references between insertion & eviction
PIN_LOCK* m_setLocks; //[numSets]; //per-set lock

Expand Down
8 changes: 4 additions & 4 deletions simulators/popt-8b/llc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void LLC::Init()
m_dType_elemSz.resize(numMainDataTypes);

m_tagArray = new intptr_t* [m_numSets];
m_dirty = new uint8_t [m_numSets];
m_dirty = new uint16_t [m_numSets];
m_referenceCtr = new stat_t* [m_numSets];
m_setLocks = new PIN_LOCK [m_numSets];
PIN_MutexInit(&m_dstLock);
Expand Down Expand Up @@ -432,7 +432,7 @@ bool LLC::isCacheHit(intptr_t addr, int setID, bool isWrite, bool updateReplacem
if (isWrite == true)
{
//m_dirty[setID][way] = 1;
uint8_t mask = 1 << way;
uint16_t mask = 1 << way;
m_dirty[setID] = m_dirty[setID] | (mask);
}
m_referenceCtr[setID][way]++;
Expand All @@ -447,8 +447,8 @@ bool LLC::installNewLine(intptr_t addr, int setID, intptr_t &evictedAddr, bool i
int index = getReplacementIndex(addr, setID, setType, tid);
//evictedAddr = m_tagArray[setID][index] * m_lineSz; //line to be kicked out
evictedAddr = m_tagArray[setID][index]; //line to be kicked out
uint8_t mask = 1 << index;
uint8_t retVal = m_dirty[setID] & mask;
uint16_t mask = 1 << index;
uint16_t retVal = m_dirty[setID] & mask;
assert(retVal == 0 || retVal == mask);
if (evictedAddr == -1 * m_lineSz)
assert(retVal == 0);
Expand Down
2 changes: 1 addition & 1 deletion simulators/popt-8b/llc.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class LLC

/* tag store */
intptr_t** m_tagArray; //[numSets][numWays];
uint8_t* m_dirty;
uint16_t* m_dirty;
stat_t** m_referenceCtr; //keep track of no. of references between insertion & eviction
PIN_LOCK* m_setLocks; //[numSets]; //per-set lock

Expand Down