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
1 change: 1 addition & 0 deletions src/cpu/o3/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ if 'O3CPU' in env['CPU_MODELS']:
DebugFlag('Scoreboard')
DebugFlag('StoreSet')
DebugFlag('Writeback')
DebugFlag('ViolationCheck')

CompoundFlag('O3CPUAll', [ 'Fetch', 'Decode', 'Rename', 'IEW', 'Commit',
'IQ', 'ROB', 'FreeList', 'LSQ', 'LSQUnit', 'StoreSet', 'MemDepUnit',
Expand Down
66 changes: 42 additions & 24 deletions src/cpu/o3/store_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "base/trace.hh"
#include "cpu/o3/store_set.hh"
#include "debug/StoreSet.hh"
#include "debug/ViolationCheck.hh"

StoreSet::StoreSet(uint64_t clear_period, int _SSIT_size, int _LFST_size)
: clearPeriod(clear_period), SSITSize(_SSIT_size), LFSTSize(_LFST_size)
Expand Down Expand Up @@ -177,6 +178,8 @@ StoreSet::violation(Addr store_PC, Addr load_PC)
} else {
SSIT[load_index] = store_SSID;

DPRINTF(ViolationCheck, "Load Index: %d, Store Index: %d", load_index, store_index);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the case in violation() that we care about, but I am going to email the TA


DPRINTF(StoreSet, "StoreSet: Store had smaller store set: %i; "
"for load %#x, store %#x\n",
store_SSID, load_PC, store_PC);
Expand Down Expand Up @@ -239,34 +242,49 @@ StoreSet::checkInst(Addr PC)
{
int index = calcIndex(PC);

int inst_SSID;
int inst_SSID = SSIT[index];

assert(index < SSITSize);

if (!validSSIT[index]) {
DPRINTF(StoreSet, "Inst %#x with index %i had no SSID\n",
PC, index);

// Return 0 if there's no valid entry.
return 0;
} else {
inst_SSID = SSIT[index];

assert(inst_SSID < LFSTSize);

if (!validLFST[inst_SSID]) {

DPRINTF(StoreSet, "Inst %#x with index %i and SSID %i had no "
"dependency\n", PC, index, inst_SSID);

return 0;
} else {
DPRINTF(StoreSet, "Inst %#x with index %i and SSID %i had LFST "
"inum of %i\n", PC, index, inst_SSID, LFST[inst_SSID]);

return LFST[inst_SSID];
}
assert(inst_SSID < LFSTSize);

if (index == 504 ||
index == 88 ||
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far these are the ones I had taken care of.

index == 211 ||
index == 207 ||
index == 241 ||
index == 237 ||
index == 272 ||
index == 322 ||
index == 215 ||
index == 245 ||
index == 280 ||
index == 333 ||
index == 216 ||
index == 232 ||
index == 246 ||
index == 281 ||
index == 268 ||
index == 195 ||
index == 508 ||
index == 531 ||
index == 524 ||
index == 739 ||
index == 254 ||
index == 263 ||
index == 333 ||
index == 195 ||
index == 255 ||
index == 815 ||
index == 721 ||
index == 290 ||
index == 338 ||
index == 509
) {
return LFST[inst_SSID];
}

return 0;
}

void
Expand Down