summaryrefslogtreecommitdiff
path: root/src/mem/protocol/MI_example-dir.sm
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-03-21 21:22:21 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-03-21 21:22:21 -0700
commit92cfd1cac7f6f2d0abf64808f08f063cd0db1263 (patch)
treea69a2964f7342083cd8aaca5ed32df207a1edea8 /src/mem/protocol/MI_example-dir.sm
parentb5e4c3cbf2de32e18029b44b16b307a773b6ecf7 (diff)
downloadgem5-92cfd1cac7f6f2d0abf64808f08f063cd0db1263.tar.xz
ruby: Ruby support for sparse memory
The patch includes direct support for the MI example protocol.
Diffstat (limited to 'src/mem/protocol/MI_example-dir.sm')
-rw-r--r--src/mem/protocol/MI_example-dir.sm18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/mem/protocol/MI_example-dir.sm b/src/mem/protocol/MI_example-dir.sm
index 3fc814315..cab90b9a7 100644
--- a/src/mem/protocol/MI_example-dir.sm
+++ b/src/mem/protocol/MI_example-dir.sm
@@ -98,15 +98,18 @@ machine(Directory, "Directory protocol")
if (directory.isPresent(addr)) {
- if (state == State:I) {
- assert(getDirectoryEntry(addr).Owner.count() == 0);
- assert(getDirectoryEntry(addr).Sharers.count() == 0);
- } else if (state == State:M) {
+ if (state == State:M) {
assert(getDirectoryEntry(addr).Owner.count() == 1);
assert(getDirectoryEntry(addr).Sharers.count() == 0);
}
getDirectoryEntry(addr).DirectoryState := state;
+
+ if (state == State:I) {
+ assert(getDirectoryEntry(addr).Owner.count() == 0);
+ assert(getDirectoryEntry(addr).Sharers.count() == 0);
+ directory.invalidateBlock(addr);
+ }
}
}
@@ -264,10 +267,6 @@ machine(Directory, "Directory protocol")
}
}
- action(d_deallocateDirectory, "\d", desc="Deallocate Directory Entry") {
- directory.invalidateBlock(address);
- }
-
action(e_ownerIsRequestor, "e", desc="The owner is now the requestor") {
peek(requestQueue_in, RequestMsg) {
getDirectoryEntry(address).Owner.clear();
@@ -527,7 +526,6 @@ machine(Directory, "Directory protocol")
transition(M_DRDI, Memory_Ack, I) {
l_sendWriteBackAck;
w_deallocateTBE;
- d_deallocateDirectory;
l_popMemQueue;
}
@@ -550,7 +548,6 @@ machine(Directory, "Directory protocol")
l_sendWriteBackAck;
da_sendDMAAck;
w_deallocateTBE;
- d_deallocateDirectory;
l_popMemQueue;
}
@@ -572,7 +569,6 @@ machine(Directory, "Directory protocol")
w_writeDataToMemoryFromTBE;
l_sendWriteBackAck;
w_deallocateTBE;
- d_deallocateDirectory;
l_popMemQueue;
}