From e7f2da517adbc9ba4ed1b33de102126260a0d587 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Fri, 20 Aug 2010 11:46:14 -0700 Subject: 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 --- src/mem/slicc/ast/PeekStatementAST.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mem/slicc/ast/PeekStatementAST.py') diff --git a/src/mem/slicc/ast/PeekStatementAST.py b/src/mem/slicc/ast/PeekStatementAST.py index 18244f507..cc3091c8a 100644 --- a/src/mem/slicc/ast/PeekStatementAST.py +++ b/src/mem/slicc/ast/PeekStatementAST.py @@ -77,6 +77,14 @@ class PeekStatementAST(StatementAST): } ''') + if self.pairs.has_key("wake_up"): + address_field = self.pairs['wake_up'] + code(''' + if (m_waiting_buffers.count(in_msg_ptr->m_$address_field) > 0) { + wakeUpBuffers(in_msg_ptr->m_$address_field); + } + ''') + # The other statements self.statements.generate(code, return_type) self.symtab.popFrame() -- cgit v1.2.3