summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast/TransitionDeclAST.py
diff options
context:
space:
mode:
authorJoel Hestness <hestness@cs.utexas.edu>2012-07-10 22:51:54 -0700
committerJoel Hestness <hestness@cs.utexas.edu>2012-07-10 22:51:54 -0700
commit467093ebf238a1954e00576daf14a9f246b51e79 (patch)
tree1e3a355e93a62174b112e97e81f5d7aa62299016 /src/mem/slicc/ast/TransitionDeclAST.py
parentc10f348120ae4a61c782815280673fba5ee71157 (diff)
downloadgem5-467093ebf238a1954e00576daf14a9f246b51e79.tar.xz
ruby: tag and data cache access support
Updates to Ruby to support statistics counting of cache accesses. This feature serves multiple purposes beyond simple stats collection. It provides the foundation for ruby to model the cache tag and data arrays as physical resources, as well as provide the necessary input data for McPAT power modeling.
Diffstat (limited to 'src/mem/slicc/ast/TransitionDeclAST.py')
-rw-r--r--src/mem/slicc/ast/TransitionDeclAST.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mem/slicc/ast/TransitionDeclAST.py b/src/mem/slicc/ast/TransitionDeclAST.py
index a941d7b0c..41e5b9aff 100644
--- a/src/mem/slicc/ast/TransitionDeclAST.py
+++ b/src/mem/slicc/ast/TransitionDeclAST.py
@@ -29,9 +29,11 @@ from slicc.ast.DeclAST import DeclAST
from slicc.symbols import Transition
class TransitionDeclAST(DeclAST):
- def __init__(self, slicc, states, events, next_state, pairs, actions):
+ def __init__(self, slicc, request_types, states, events, next_state, pairs,
+ actions):
super(TransitionDeclAST, self).__init__(slicc, pairs)
+ self.request_types = request_types
self.states = states
self.events = events
self.next_state = next_state
@@ -51,6 +53,12 @@ class TransitionDeclAST(DeclAST):
self.error("Invalid action: %s is not part of machine: %s" % \
(action, machine))
+ for request_type in self.request_types:
+ if request_type not in machine.request_types:
+ self.error("Invalid protocol access type: " \
+ "%s is not part of machine: %s" % \
+ (request_type, machine))
+
for state in self.states:
if state not in machine.states:
self.error("Invalid state: %s is not part of machine: %s" % \
@@ -61,5 +69,6 @@ class TransitionDeclAST(DeclAST):
self.error("Invalid event: %s is not part of machine: %s" % \
(event, machine))
t = Transition(self.symtab, machine, state, event, next_state,
- self.actions, self.location, self.pairs)
+ self.actions, self.request_types, self.location,
+ self.pairs)
machine.addTransition(t)