From 92cfd1cac7f6f2d0abf64808f08f063cd0db1263 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Sun, 21 Mar 2010 21:22:21 -0700 Subject: ruby: Ruby support for sparse memory The patch includes direct support for the MI example protocol. --- src/mem/protocol/MI_example-dir.sm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/mem/protocol/MI_example-dir.sm') 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; } -- cgit v1.2.3