diff options
Diffstat (limited to 'src/mem/protocol/MOESI_hammer-dir.sm')
-rw-r--r-- | src/mem/protocol/MOESI_hammer-dir.sm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mem/protocol/MOESI_hammer-dir.sm b/src/mem/protocol/MOESI_hammer-dir.sm index 96af4228f..828c762cb 100644 --- a/src/mem/protocol/MOESI_hammer-dir.sm +++ b/src/mem/protocol/MOESI_hammer-dir.sm @@ -232,7 +232,20 @@ machine(Directory, "AMD Hammer-like protocol") } getDirectoryEntry(addr).DirectoryState := state; } - + + AccessPermission getAccessPermission(Address addr) { + TBE tbe := TBEs[addr]; + if(is_valid(tbe)) { + return Directory_State_to_permission(tbe.TBEState); + } + + return Directory_State_to_permission(getDirectoryEntry(addr).DirectoryState); + } + + void setAccessPermission(PfEntry pf_entry, Address addr, State state) { + getDirectoryEntry(addr).changePermission(Directory_State_to_permission(state)); + } + Event cache_request_to_event(CoherenceRequestType type) { if (type == CoherenceRequestType:GETS) { return Event:GETS; |