summaryrefslogtreecommitdiff
path: root/src/mem/slicc/symbols
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2011-06-08 11:58:09 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2011-06-08 11:58:09 -0500
commit67bb3070032fcb944a63aabb4ecfff692840e7bf (patch)
tree104a8558a460aed6bc716f624bdd156b8f12f28d /src/mem/slicc/symbols
parent1f7a6274017821d58f3087120079477ac211ceaf (diff)
downloadgem5-67bb3070032fcb944a63aabb4ecfff692840e7bf.tar.xz
Ruby: Correctly set access permissions for directory entries
The access permissions for the directory entries are not being set correctly. This is because pointers are not used for handling directory entries. function. get and set functions for access permissions have been added to the Controller state machine. The changePermission() function provided by the AbstractEntry and AbstractCacheEntry classes has been exposed to SLICC code once again. The set_permission() functionality has been removed. NOTE: Each protocol will have to define these get and set functions in order to compile successfully.
Diffstat (limited to 'src/mem/slicc/symbols')
-rw-r--r--src/mem/slicc/symbols/StateMachine.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index 09e17aee9..a3a95002d 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -348,8 +348,6 @@ static int m_num_controllers;
// Set and Reset for cache_entry variable
void set_cache_entry(${{self.EntryType.c_ident}}*& m_cache_entry_ptr, AbstractCacheEntry* m_new_cache_entry);
void unset_cache_entry(${{self.EntryType.c_ident}}*& m_cache_entry_ptr);
-// Set permissions for the cache_entry
-void set_permission(${{self.EntryType.c_ident}}*& m_cache_entry_ptr, AccessPermission perm);
''')
if self.TBEType != None:
@@ -864,15 +862,6 @@ $c_ident::unset_cache_entry(${{self.EntryType.c_ident}}*& m_cache_entry_ptr)
{
m_cache_entry_ptr = 0;
}
-
-void
-$c_ident::set_permission(${{self.EntryType.c_ident}}*& m_cache_entry_ptr,
- AccessPermission perm)
-{
- if (m_cache_entry_ptr != NULL) {
- m_cache_entry_ptr->changePermission(perm);
- }
-}
''')
if self.TBEType != None:
@@ -1116,14 +1105,16 @@ ${ident}_Controller::doTransition(${ident}_Event event,
''')
if self.TBEType != None and self.EntryType != None:
code('setState(m_tbe_ptr, m_cache_entry_ptr, addr, next_state);')
- code('set_permission(m_cache_entry_ptr, ${ident}_State_to_permission(next_state));')
+ code('setAccessPermission(m_cache_entry_ptr, addr, next_state);')
elif self.TBEType != None:
code('setState(m_tbe_ptr, addr, next_state);')
+ code('setAccessPermission(addr, next_state);')
elif self.EntryType != None:
code('setState(m_cache_entry_ptr, addr, next_state);')
- code('set_permission(m_cache_entry_ptr, ${ident}_State_to_permission(next_state));')
+ code('setAccessPermission(m_cache_entry_ptr, addr, next_state);')
else:
code('setState(addr, next_state);')
+ code('setAccessPermission(addr, next_state);')
code('''
} else if (result == TransitionResult_ResourceStall) {