From: Adam Megacz Date: Sat, 22 Aug 2009 21:32:31 +0000 (-0700) Subject: Interpreter: use Packet.send() more often X-Git-Url: http://git.megacz.com/?p=fleet.git;a=commitdiff_plain;h=c6d2282ef483917ac627b8511a6eda556d75b5c1 Interpreter: use Packet.send() more often --- diff --git a/src/edu/berkeley/fleet/interpreter/Interpreter.java b/src/edu/berkeley/fleet/interpreter/Interpreter.java index 53868ff..5f10626 100644 --- a/src/edu/berkeley/fleet/interpreter/Interpreter.java +++ b/src/edu/berkeley/fleet/interpreter/Interpreter.java @@ -177,13 +177,11 @@ public class Interpreter extends FleetTwoFleet { public synchronized void sendWord(Destination d, BitVector word) { sendWord(d, word, null); } public synchronized void sendWord(Destination d, BitVector word, BitVector signal) { InterpreterPath path = (InterpreterPath)debugShip.getDock("in").getPath(d, signal==null?new BitVector(1):signal); - ((InterpreterDestination)d). - addDataFromFabric(new Packet(path, word, false)); + new Packet(path, word, false).send(); } public synchronized void sendToken(Destination d) { InterpreterPath path = (InterpreterPath)debugShip.getDock("in").getPath(d, new BitVector(1)); - ((InterpreterDestination)d). - addDataFromFabric(new Packet(path, new BitVector(getWordWidth()), true)); + new Packet(path, new BitVector(getWordWidth()), true).send(); } public InterpreterProcess(Instruction[] instructions) { this.instructions = instructions;