summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast/PeekStatementAST.py
diff options
context:
space:
mode:
authorDerek Hower <drh5@cs.wisc.edu>2010-01-22 17:23:21 -0600
committerDerek Hower <drh5@cs.wisc.edu>2010-01-22 17:23:21 -0600
commit589218168c5ae1ed143372e43dbc468369a1bb8f (patch)
tree5e5154c08e7def83b49b16769c213b0e78ea41fb /src/mem/slicc/ast/PeekStatementAST.py
parent1c448e2ab00acb05d368c9de62c5cf08e64c6213 (diff)
parentf7de30ab1a9e1655de8bf7d4c15007a682a2a629 (diff)
downloadgem5-589218168c5ae1ed143372e43dbc468369a1bb8f.tar.xz
Automated merge with ssh://hg@m5sim.org/m5
Diffstat (limited to 'src/mem/slicc/ast/PeekStatementAST.py')
-rw-r--r--src/mem/slicc/ast/PeekStatementAST.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mem/slicc/ast/PeekStatementAST.py b/src/mem/slicc/ast/PeekStatementAST.py
index 5186bf0d5..b63ce6516 100644
--- a/src/mem/slicc/ast/PeekStatementAST.py
+++ b/src/mem/slicc/ast/PeekStatementAST.py
@@ -29,8 +29,8 @@ from slicc.ast.StatementAST import StatementAST
from slicc.symbols import Var
class PeekStatementAST(StatementAST):
- def __init__(self, slicc, queue_name, type_ast, statements, method):
- super(PeekStatementAST, self).__init__(slicc)
+ def __init__(self, slicc, queue_name, type_ast, pairs, statements, method):
+ super(PeekStatementAST, self).__init__(slicc, pairs)
self.queue_name = queue_name
self.type_ast = type_ast
@@ -63,6 +63,17 @@ class PeekStatementAST(StatementAST):
in_msg_ptr = dynamic_cast<const $mtid *>(($qcode).${{self.method}}());
assert(in_msg_ptr != NULL);
''')
+ if self.pairs.has_key("block_on"):
+ address_field = self.pairs['block_on']
+ code('''
+ if ( (m_is_blocking == true) &&
+ (m_block_map.count(in_msg_ptr->m_$address_field) == 1) ) {
+ if (m_block_map[in_msg_ptr->m_$address_field] != &$qcode) {
+ $qcode.delayHead();
+ continue;
+ }
+ }
+ ''')
# The other statements
self.statements.generate(code, return_type)