MOESI_hammer: minor fixes to full-bit dir

This commit is contained in:
Brad Beckmann 2011-03-19 14:17:48 -07:00
parent 541fa1091a
commit dd9083115e

View file

@ -186,7 +186,7 @@ machine(Directory, "AMD Hammer-like protocol")
} }
PfEntry getProbeFilterEntry(Address addr), return_by_pointer="yes" { PfEntry getProbeFilterEntry(Address addr), return_by_pointer="yes" {
if(probe_filter_enabled) { if (probe_filter_enabled || full_bit_dir_enabled) {
PfEntry pfEntry := static_cast(PfEntry, "pointer", probeFilter.lookup(addr)); PfEntry pfEntry := static_cast(PfEntry, "pointer", probeFilter.lookup(addr));
return pfEntry; return pfEntry;
} }
@ -200,8 +200,6 @@ machine(Directory, "AMD Hammer-like protocol")
if (probe_filter_enabled || full_bit_dir_enabled) { if (probe_filter_enabled || full_bit_dir_enabled) {
if (is_valid(pf_entry)) { if (is_valid(pf_entry)) {
assert(pf_entry.PfState == getDirectoryEntry(addr).DirectoryState); assert(pf_entry.PfState == getDirectoryEntry(addr).DirectoryState);
} else {
assert(getDirectoryEntry(addr).DirectoryState == State:E);
} }
} }
return getDirectoryEntry(addr).DirectoryState; return getDirectoryEntry(addr).DirectoryState;
@ -219,6 +217,9 @@ machine(Directory, "AMD Hammer-like protocol")
if (state == State:NX || state == State:NO || state == State:S || state == State:O) { if (state == State:NX || state == State:NO || state == State:S || state == State:O) {
assert(is_valid(pf_entry)); assert(is_valid(pf_entry));
} }
if (state == State:E) {
assert(is_valid(pf_entry) == false);
}
} }
if (state == State:E || state == State:NX || state == State:NO || state == State:S || if (state == State:E || state == State:NX || state == State:NO || state == State:S ||
state == State:O) { state == State:O) {
@ -469,6 +470,7 @@ machine(Directory, "AMD Hammer-like protocol")
peek(requestQueue_in, RequestMsg) { peek(requestQueue_in, RequestMsg) {
set_cache_entry(probeFilter.allocate(address, new PfEntry)); set_cache_entry(probeFilter.allocate(address, new PfEntry));
cache_entry.Owner := in_msg.Requestor; cache_entry.Owner := in_msg.Requestor;
cache_entry.Sharers.setSize(machineCount(MachineType:L1Cache));
} }
} }
} }