summaryrefslogtreecommitdiff
path: root/src/mem/slicc/parser.py
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:14 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:14 -0700
commite7f2da517adbc9ba4ed1b33de102126260a0d587 (patch)
treedc45a1acf1843da774f55fb1a5e27333804c4910 /src/mem/slicc/parser.py
parentaf6b97e3ee2d73fcb2d4bcdbdffc9a6534dfdac8 (diff)
downloadgem5-e7f2da517adbc9ba4ed1b33de102126260a0d587.tar.xz
ruby: Stall and wait input messages instead of recycling
This patch allows messages to be stalled in their input buffers and wait until a corresponding address changes state. In order to make this work, all in_ports must be ranked in order of dependence and those in_ports that may unblock an address, must wake up the stalled messages. Alot of this complexity is handled in slicc and the specification files simply annotate the in_ports. --HG-- rename : src/mem/slicc/ast/CheckAllocateStatementAST.py => src/mem/slicc/ast/StallAndWaitStatementAST.py rename : src/mem/slicc/ast/CheckAllocateStatementAST.py => src/mem/slicc/ast/WakeUpDependentsStatementAST.py
Diffstat (limited to 'src/mem/slicc/parser.py')
-rw-r--r--src/mem/slicc/parser.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mem/slicc/parser.py b/src/mem/slicc/parser.py
index 1505e1d0c..ce665465f 100644
--- a/src/mem/slicc/parser.py
+++ b/src/mem/slicc/parser.py
@@ -157,6 +157,8 @@ class SLICC(Grammar):
'external_type' : 'EXTERN_TYPE',
'enumeration' : 'ENUM',
'peek' : 'PEEK',
+ 'stall_and_wait' : 'STALL_AND_WAIT',
+ 'wake_up_dependents' : 'WAKE_UP_DEPENDENTS',
'enqueue' : 'ENQUEUE',
'copy_head' : 'COPY_HEAD',
'check_allocate' : 'CHECK_ALLOCATE',
@@ -499,7 +501,8 @@ class SLICC(Grammar):
def p_pair__assign(self, p):
"""pair : ident '=' STRING
- | ident '=' ident"""
+ | ident '=' ident
+ | ident '=' NUMBER"""
p[0] = ast.PairAST(self, p[1], p[3])
def p_pair__literal(self, p):
@@ -547,6 +550,14 @@ class SLICC(Grammar):
"statement : ENQUEUE '(' var ',' type pairs ')' statements"
p[0] = ast.EnqueueStatementAST(self, p[3], p[5], p[6], p[8])
+ def p_statement__stall_and_wait(self, p):
+ "statement : STALL_AND_WAIT '(' var ',' var ')' SEMI"
+ p[0] = ast.StallAndWaitStatementAST(self, p[3], p[5])
+
+ def p_statement__wake_up_dependents(self, p):
+ "statement : WAKE_UP_DEPENDENTS '(' var ')' SEMI"
+ p[0] = ast.WakeUpDependentsStatementAST(self, p[3])
+
def p_statement__peek(self, p):
"statement : PEEK '(' var ',' type pairs ')' statements"
p[0] = ast.PeekStatementAST(self, p[3], p[5], p[6], p[8], "peek")