From fba964dabfff3be02e1c2a4ac292c94d8b20803b Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Sat, 29 Aug 2009 17:12:10 -0700 Subject: [PATCH] MemoryNode: make sure not to do phase 0 of reset on out port --- src/edu/berkeley/fleet/dataflow/MemoryNode.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/edu/berkeley/fleet/dataflow/MemoryNode.java b/src/edu/berkeley/fleet/dataflow/MemoryNode.java index a892672..e72f1c1 100644 --- a/src/edu/berkeley/fleet/dataflow/MemoryNode.java +++ b/src/edu/berkeley/fleet/dataflow/MemoryNode.java @@ -80,6 +80,12 @@ public class MemoryNode extends Node { public void sendToken(LoopFactory lf) { inAddrWrite.peer.sendToken(lf); } public void recvWord(LoopFactory lf) { lf.recvWord(); } public int getTokensToAbsorb() { return 0; } + public int reset(CodeBag ctx, int phase, Destination ackDestination) { + // ugly-ass hack + if (phase!=0) + return DoneNode.doReset(ctx, phase, dock, this, peer, ackDestination, true); + return 0; + } protected void build(CodeBag ctx, LoopFactory lf) { lf = lf.makeNext(0); lf.abortLoopIfTorpedoPresent(); -- 1.7.10.4