change benkobox=>pump
authoradam <adam@megacz.com>
Sat, 25 Aug 2007 02:51:04 +0000 (03:51 +0100)
committeradam <adam@megacz.com>
Sat, 25 Aug 2007 02:51:04 +0000 (03:51 +0100)
22 files changed:
src/edu/berkeley/fleet/api/Destination.java
src/edu/berkeley/fleet/api/Instruction.java
src/edu/berkeley/fleet/api/Pump.java [moved from src/edu/berkeley/fleet/api/BenkoBox.java with 55% similarity]
src/edu/berkeley/fleet/api/Ship.java
src/edu/berkeley/fleet/assembler/Parser.java
src/edu/berkeley/fleet/doc/Doc.java
src/edu/berkeley/fleet/doc/PumpDescription.java [moved from src/edu/berkeley/fleet/doc/BenkoBoxDescription.java with 86% similarity]
src/edu/berkeley/fleet/doc/ShipDescription.java
src/edu/berkeley/fleet/f0/Fleet.lhs
src/edu/berkeley/fleet/fpga/Fpga.java
src/edu/berkeley/fleet/fpga/FpgaPump.java [moved from src/edu/berkeley/fleet/fpga/FpgaBenkoBox.java with 83% similarity]
src/edu/berkeley/fleet/fpga/FpgaShip.java
src/edu/berkeley/fleet/fpga/Generator.java
src/edu/berkeley/fleet/ies44/InstructionEncoder.java
src/edu/berkeley/fleet/interpreter/Inbox.java
src/edu/berkeley/fleet/interpreter/InstructionPump.java [moved from src/edu/berkeley/fleet/interpreter/InstructionBenkoBox.java with 95% similarity]
src/edu/berkeley/fleet/interpreter/Interpreter.java
src/edu/berkeley/fleet/interpreter/InterpreterPump.java [moved from src/edu/berkeley/fleet/interpreter/InterpreterBenkoBox.java with 77% similarity]
src/edu/berkeley/fleet/interpreter/InterpreterShip.java
src/edu/berkeley/fleet/interpreter/Log.java
src/edu/berkeley/fleet/interpreter/Outbox.java
src/edu/berkeley/fleet/interpreter/Packet.java

index 3127836..eeda1d2 100644 (file)
@@ -2,7 +2,7 @@ package edu.berkeley.fleet.api;
 
 public abstract class Destination {
 
-    /** return the Ship to which this BenkoBox belongs */
+    /** return the Ship to which this Pump belongs */
     public abstract Ship   getShip();
 
     /**
index 33c49a4..a32b8d0 100644 (file)
@@ -4,11 +4,11 @@ public abstract class Instruction {
 
     public static class Kill extends Instruction {
 
-        public final BenkoBox benkoBox;
+        public final Pump pump;
         public final int      count;
         public final boolean  killOnlyStandingInstructions;
-        public Kill(BenkoBox benkoBox, int count, boolean killOnlyStandingInstructions) {
-            this.benkoBox=benkoBox;
+        public Kill(Pump pump, int count, boolean killOnlyStandingInstructions) {
+            this.pump=pump;
             this.count=count;
             this.killOnlyStandingInstructions = killOnlyStandingInstructions;
             if (killOnlyStandingInstructions && count !=1)
@@ -20,7 +20,7 @@ public abstract class Instruction {
 
     public static class Executable extends Instruction {
 
-        public final BenkoBox    benkoBox;
+        public final Pump    pump;
         public final Destination dest;
         public final int         count;
 
@@ -33,7 +33,7 @@ public abstract class Instruction {
         public final boolean  requeue;
 
         /** count=0 denotes a standing move */
-        public Executable(BenkoBox    benkoBox,
+        public Executable(Pump    pump,
                           Destination dest,
                           int         count,
                           boolean     tokenIn,
@@ -43,7 +43,7 @@ public abstract class Instruction {
                           boolean     dataOut,
                           boolean     tokenOut,
                           boolean     requeue) {
-            this.benkoBox = benkoBox;
+            this.pump = pump;
             this.dest = dest;
             this.count = count;
             this.tokenIn = tokenIn;
@@ -63,12 +63,12 @@ public abstract class Instruction {
 
         public Instruction.Executable decrementCount() {
             if (count==1) return null;
-            return new Executable(benkoBox, dest, count==0 ? 0 : count-1,
+            return new Executable(pump, dest, count==0 ? 0 : count-1,
                                   tokenIn, dataIn, latch, dataOutDest, dataOut, tokenOut, requeue);
         }
 
         public String toString() {
-            String ret = benkoBox.toString() + ": ";
+            String ret = pump.toString() + ": ";
             if (count==0 || count>1 || requeue) {
                 ret += requeue ? "(" : "[";
                 if (count>1) ret += count;
@@ -78,7 +78,7 @@ public abstract class Instruction {
             boolean needcomma = false;
             if (tokenIn)           { ret += (needcomma ? ", " : "") + "wait";    needcomma = true; }
             if (dataIn && latch)  {
-                if (benkoBox.isInbox())
+                if (pump.isInbox())
                     ret += (needcomma ? ", " : "") + "receive";
                 else
                     ret += (needcomma ? ", " : "") + "take";
@@ -86,7 +86,7 @@ public abstract class Instruction {
             }
             if (dataIn && !latch)  { ret += (needcomma ? ", " : "") + "dismiss"; needcomma = true; }
             if (dataOut)  {
-                if (benkoBox.isInbox() || dest==null)
+                if (pump.isInbox() || dest==null)
                     ret += (needcomma ? ", " : "") + "deliver";
                 else
                     ret += (needcomma ? ", " : "") + "sendto "+dest;
similarity index 55%
rename from src/edu/berkeley/fleet/api/BenkoBox.java
rename to src/edu/berkeley/fleet/api/Pump.java
index bf892ad..a5e04ff 100644 (file)
@@ -1,17 +1,17 @@
 package edu.berkeley.fleet.api;
 import java.util.*;
 
-public abstract class BenkoBox {
+public abstract class Pump {
 
-    public BenkoBox() { }
+    public Pump() { }
 
-    /** the descriptive name of this benkobox (relative to its ship) */
+    /** the descriptive name of this pump (relative to its ship) */
     public abstract String getName();
 
-    /** return the Ship to which this BenkoBox belongs */
+    /** return the Ship to which this Pump belongs */
     public abstract Ship   getShip();
 
-    /** the maximum number of instructions we can put in the BenkoBox instruction fifo,
+    /** the maximum number of instructions we can put in the Pump instruction fifo,
      *  or Integer.MAX_VALUE if unbounded */
     public abstract int getInstructionFifoLength();
 
@@ -21,14 +21,14 @@ public abstract class BenkoBox {
     /** returns true if this is an outbox */
     public abstract boolean isOutbox();
 
-    /** get all destinations associated with this BenkoBox; default implementation: just itself */
+    /** get all destinations associated with this Pump; default implementation: just itself */
     public abstract Iterable<Destination> getDestinations();
 
     /** default implementation: the empty string */
     public String getDestinationName() { return ""; }
 
-    /** return the BenkoBox which is the destination of this Box's shortcut (if any) */
-    public BenkoBox getShortcut() { return null; }
+    /** return the Pump which is the destination of this Box's shortcut (if any) */
+    public Pump getShortcut() { return null; }
 
     public abstract long resolveLiteral(String literal);
 }            
index c96d584..0f207da 100644 (file)
@@ -10,11 +10,11 @@ public abstract class Ship {
     /** returns the type of the ship ("Fetch", "ALU", etc) */
     public abstract String getType();
     
-    /** return all benkoboxes which feed this ship; order is NOT significant */
-    public abstract Iterable<BenkoBox> getBenkoBoxes();
+    /** return all pumps which feed this ship; order is NOT significant */
+    public abstract Iterable<Pump> getPumps();
 
-    public BenkoBox getBenkoBox(String s) {
-        for(BenkoBox b : getBenkoBoxes())
+    public Pump getPump(String s) {
+        for(Pump b : getPumps())
             if (b.getName().equals(s))
                 return b;
         throw new RuntimeException("unknown port \""+getType()+"."+s+"\"");
index 21f870b..c649529 100644 (file)
@@ -164,33 +164,33 @@ public class Parser {
         Ship ship = shipMap.get(shipName);
         if (ship==null) throw new RuntimeException("no such ship \""+shipName+"\"");
         Destination ret = null;
-        BenkoBox bb = null;
-        for(BenkoBox b : ship.getBenkoBoxes())
+        Pump bb = null;
+        for(Pump b : ship.getPumps())
             if (b.getName().equals(portName)) {
                 bb = b;
             }
         if (bb==null)
-            throw new RuntimeException("no such benkobox \""+portName+"\"");
+            throw new RuntimeException("no such pump \""+portName+"\"");
         if (subPort==null) subPort="";
         for(Destination d : bb.getDestinations())
             if (d.getDestinationName().equals(subPort))
                 return d;
         if (ret==null)
-            throw new RuntimeException("no such benkobox \""+portName+"\" on ships of type \""+ship.getType()+"\"");
+            throw new RuntimeException("no such pump \""+portName+"\" on ships of type \""+ship.getType()+"\"");
         return ret;
     }
 
-    BenkoBox benkoBox(Tree<String> t) {
+    Pump pump(Tree<String> t) {
         if (!"Port".equals(t.head()) && !"SubPort".equals(t.head()) && !"ShipSpecificLiteral".equals(t.head())) return null;
         String shipName = name(t.child(0));
         String portName = name(t.child(1));
         Ship ship = shipMap.get(shipName);
         if (ship==null) throw new RuntimeException("no such ship \""+shipName+"\"");
-        BenkoBox bb = null;
-        for(BenkoBox b : ship.getBenkoBoxes())
+        Pump bb = null;
+        for(Pump b : ship.getPumps())
             if (b.getName().equals(portName))
                 return b;
-        throw new RuntimeException("no such benkobox \""+portName+"\"");
+        throw new RuntimeException("no such pump \""+portName+"\"");
     }
 
     private HashMap<String,Integer> numAllocated = new HashMap<String,Integer>();
@@ -229,7 +229,7 @@ public class Parser {
                     break;
                 }
             }
-            BenkoBox chosenport = chosenship.getBenkoBox(portName);
+            Pump chosenport = chosenship.getPump(portName);
             Tree specs = t.child(0).child(2);
             long literal = 0;
             for(int i=0; i<specs.size(); i++) {
@@ -248,7 +248,7 @@ public class Parser {
             cb.add(new Instruction.Literal.CodeBagDescriptor(portReference(t.child(1)), cb2.getFakeAddress(), 0));
 
         } else if (t.head().equals("Fiber")) {
-            BenkoBox benkobox = (BenkoBox)benkoBox(t.child(0));
+            Pump pump = (Pump)pump(t.child(0));
             
             OUTER: for(Tree tt : t.child(1)) {
                 int count = 1;
@@ -283,10 +283,10 @@ public class Parser {
                     if      ("Wait".equals(ttt.head()))    { tokenIn = true; }
                     else if ("Nop".equals(ttt.head()))     { }
                     else if ("KillStar".equals(ttt.head()))    {
-                        cb.add(new Instruction.Kill(benkobox, count, true));
+                        cb.add(new Instruction.Kill(pump, count, true));
                         continue OUTER;
                     } else if ("Kill".equals(ttt.head()))    {
-                        cb.add(new Instruction.Kill(benkobox, count, false));
+                        cb.add(new Instruction.Kill(pump, count, false));
                         continue OUTER;
                     }
                     else if ("Discard".equals(ttt.head())) { dataIn = true; latch = false; }
@@ -296,7 +296,7 @@ public class Parser {
                     else if ("Deliver".equals(ttt.head())) { dataOut = true;  }
                     else if ("Ack".equals(ttt.head()))     { tokenOut = true; dest = portReference(ttt.child(0)); }
                 }
-                cb.add(new Instruction.Executable(benkobox,
+                cb.add(new Instruction.Executable(pump,
                                                   dest, count, tokenIn, dataIn,
                                                   latch, dataOutDest, dataOut, tokenOut, requeue));
             }
index caa70b0..27b162d 100644 (file)
@@ -26,7 +26,7 @@ public class Doc {
         String tex = sd.getSection("tex");
         if (tex!=null)
             pw.println(tex);
-        for(BenkoBoxDescription bbd : sd) {
+        for(PumpDescription bbd : sd) {
             pw.println("\\subsection*{"+(bbd.isInbox() ? "Inbox: " : "Outbox: ")+"{\\tt "+bbd.getName()+"}}");
         }
     }
@@ -3,7 +3,7 @@ package edu.berkeley.fleet.doc;
 import java.io.*;
 import java.util.*;
 
-public class BenkoBoxDescription implements Iterable<String> {
+public class PumpDescription implements Iterable<String> {
 
     public String getName() { return name; }
     public boolean isInbox() { return inbox; }
@@ -24,10 +24,10 @@ public class BenkoBoxDescription implements Iterable<String> {
     // FIXME
     public HashMap<String,Constant> constants = new HashMap<String,Constant>();
 
-    BenkoBoxDescription(ShipDescription ship, String name, boolean tokenOnly, boolean inbox) {
+    PumpDescription(ShipDescription ship, String name, boolean tokenOnly, boolean inbox) {
         this(ship, name, tokenOnly, inbox, null);
     }
-    BenkoBoxDescription(ShipDescription ship, String name, boolean tokenOnly, boolean inbox, String shortcut) {
+    PumpDescription(ShipDescription ship, String name, boolean tokenOnly, boolean inbox, String shortcut) {
         this.ship = ship;
         this.name = name;
         this.inbox = inbox;
@@ -54,7 +54,7 @@ public class BenkoBoxDescription implements Iterable<String> {
             hasval = true;
         }
         Constant c = getConstant(s);
-        if (c==null) throw new RuntimeException("no constant " + s + " on benkobox " + this);
+        if (c==null) throw new RuntimeException("no constant " + s + " on pump " + this);
         ret |= c.setbits;
         ret &= ~c.clearbits;
         if (hasval)
index 6ea4241..df63596 100644 (file)
@@ -4,11 +4,11 @@ import java.io.*;
 import java.util.*;
 
 /** the Java representation of a .ship file */
-public class ShipDescription implements Iterable<BenkoBoxDescription> {
+public class ShipDescription implements Iterable<PumpDescription> {
 
     public String getName() { return name; }
     public String getSection(String sectionName) { return sections.get(sectionName); }
-    public Iterator<BenkoBoxDescription> iterator() { return benkoBoxes.iterator(); }
+    public Iterator<PumpDescription> iterator() { return pumps.iterator(); }
 
     public ShipDescription(String name, BufferedReader r) throws IOException {
         if (name.endsWith(".ship"))
@@ -43,7 +43,7 @@ public class ShipDescription implements Iterable<BenkoBoxDescription> {
     private String texDocumentation;
 
     // must keep proper ordering for FPGA (FIXME: should alphabetize when synthesizing)
-    private ArrayList<BenkoBoxDescription> benkoBoxes = new ArrayList<BenkoBoxDescription>();
+    private ArrayList<PumpDescription> pumps = new ArrayList<PumpDescription>();
 
     private HashMap<String,String> sections = new HashMap<String,String>();
 
@@ -78,7 +78,7 @@ public class ShipDescription implements Iterable<BenkoBoxDescription> {
         } else if (section.equals("ports")) {
             BufferedReader br = new BufferedReader(new StringReader(sections.get(section)));
             boolean rightSide = false;
-            BenkoBoxDescription p = null;
+            PumpDescription p = null;
             for(String s = br.readLine(); s != null; s = br.readLine()) {
                 if (s.trim().length()==0) { rightSide = true; continue; }
 
@@ -106,13 +106,13 @@ public class ShipDescription implements Iterable<BenkoBoxDescription> {
                 String val = s.substring(s.indexOf(':')+1).trim();
                 String boxname = val.indexOf('.') != -1 ? val.substring(0, val.indexOf('.')) : val;
                 String dest    = val.indexOf('.') != -1 ? val.substring(val.indexOf('.')+1)  : "";
-                for (BenkoBoxDescription b : benkoBoxes)
+                for (PumpDescription b : pumps)
                     if (b.getName().equals(boxname)) { p = b; break; }
-                if (p==null) p = new BenkoBoxDescription(this, boxname, tokenOnly, inbox);
+                if (p==null) p = new PumpDescription(this, boxname, tokenOnly, inbox);
                 p.addDest(dest);
             }
         }
     }
 
-    void add(BenkoBoxDescription b) { benkoBoxes.add(b); }
+    void add(PumpDescription b) { pumps.add(b); }
 }
\ No newline at end of file
index d73471e..2432f80 100644 (file)
@@ -5,19 +5,19 @@ import Util
 
 itake  box = IMove { m_count=1, m_recycle=False, m_tokenIn=False, m_dataIn=True,
                      m_latch=True, m_dataOut=False, m_tokenOut=False, m_dest=Nothing,
-                     m_benkobox=box }
+                     m_pump=box }
 move   box = (itake box){ m_dataOut=True }
 copy   box = (move box){ m_dataIn=False }
 send   box = (move box){ m_dataIn=False, m_latch=False }
 notify box dest = IMove { m_count=1, m_recycle=False, m_tokenIn=False, m_dataIn=False,
                           m_latch=False, m_dataOut=False, m_tokenOut=True, m_dest=(Just dest),
-                          m_benkobox=box }
+                          m_pump=box }
 wait box = IMove { m_count=1, m_recycle=False, m_tokenIn=True, m_dataIn=False,
                    m_latch=False, m_dataOut=False, m_tokenOut=False, m_dest=Nothing,
-                   m_benkobox=box }
+                   m_pump=box }
 dismiss box = IMove { m_count=1, m_recycle=False, m_tokenIn=False, m_dataIn=True,
                       m_latch=False, m_dataOut=False, m_tokenOut=False, m_dest=Nothing,
-                      m_benkobox=box }
+                      m_pump=box }
 accept box = move box
 
 -- Port ------------------------------------------------------------------------------
@@ -34,14 +34,14 @@ instance FromTree Port where
  fromTree (Tree "Port" [a,b] _) = ShipPort (fromTree a) (fromTree b)
  fromTree t = error (show t)
 
-type BenkoBox = Port
+type PortBox = Port
 data Inst =
-    IKill        BenkoBox Int
-  | ILiteral     Int           BenkoBox
-  | ILiteralBag  String        BenkoBox
+    IKill        PortBox Int
+  | ILiteral     Int           PortBox
+  | ILiteralBag  String        PortBox
   | IBagDef      String        [Inst]
-  | IMove   { m_benkobox :: BenkoBox ,
-              m_dest     :: Maybe BenkoBox ,
+  | IMove   { m_pump :: PortBox ,
+              m_dest     :: Maybe PortBox ,
               m_count    :: Int ,
               m_recycle  :: Bool ,
               m_tokenIn  :: Bool ,
@@ -61,7 +61,7 @@ instance Show Inst where
  show (ILiteral lit bb) = (show lit)++": sendto "++(show bb)++";"
  show (ILiteralBag bagname bb) = bagname++": sendto "++(show bb)++";"
  show (IBagDef bagname is) = bagname++": {\n  "++(join "" $ map (\i -> (show i)++"\n  ") is)++"}\n"
- show m@(_)             = (show $ m_benkobox m) ++
+ show m@(_)             = (show $ m_pump m) ++
                          ": "++
                          (showCount (m_count m) $ m_recycle m) ++
                          (join ", " $ showrest m)++
index 5c9494a..919ca3f 100644 (file)
@@ -76,43 +76,43 @@ public class Fpga extends Fleet {
         // FIXME: this is really ugly: the order of port declarations in
         //        the XXXShip.java file must match the order in the .balsa file!
 
-        ArrayList instructionports = new ArrayList<FpgaBenkoBox>();
+        ArrayList instructionports = new ArrayList<FpgaPump>();
         for(FpgaShip ship : shiplist)
-            for(BenkoBox port : ship.getBenkoBoxes())
-                if (!((FpgaBenkoBox)port).special())
+            for(Pump port : ship.getPumps())
+                if (!((FpgaPump)port).special())
                     instructionports.add(port);
         FabricTree instructions =
-            new FabricTree((FpgaBenkoBox[])instructionports.toArray(new FpgaBenkoBox[0]),
+            new FabricTree((FpgaPump[])instructionports.toArray(new FpgaPump[0]),
                            "ihorn",
                            "instruction");
 
-        ArrayList inputports = new ArrayList<FpgaBenkoBox>();
+        ArrayList inputports = new ArrayList<FpgaPump>();
         for(FpgaShip ship : shiplist)
-            for(BenkoBox port : ship.getBenkoBoxes())
-                if (!((FpgaBenkoBox)port).special())
+            for(Pump port : ship.getPumps())
+                if (!((FpgaPump)port).special())
                     inputports.add(port);
         FabricTree inputs =
-            new FabricTree((FpgaBenkoBox[])inputports.toArray(new FpgaBenkoBox[0]),
+            new FabricTree((FpgaPump[])inputports.toArray(new FpgaPump[0]),
                            "horn",
                            "dest");
 
-        ArrayList outputports = new ArrayList<FpgaBenkoBox>();
+        ArrayList outputports = new ArrayList<FpgaPump>();
         for(FpgaShip ship : shiplist)
-            for(BenkoBox port : ship.getBenkoBoxes())
-                if (!((FpgaBenkoBox)port).special() || ((FpgaBenkoBox)port).dhorn())
+            for(Pump port : ship.getPumps())
+                if (!((FpgaPump)port).special() || ((FpgaPump)port).dhorn())
                     outputports.add(port);
         FabricTree outputs =
-            new FabricTree((FpgaBenkoBox[])outputports.toArray(new FpgaBenkoBox[0]),
+            new FabricTree((FpgaPump[])outputports.toArray(new FpgaPump[0]),
                            "funnel",
                            "source");
 
-        ArrayList ihornports = new ArrayList<FpgaBenkoBox>();
+        ArrayList ihornports = new ArrayList<FpgaPump>();
         for(FpgaShip ship : shiplist)
-            for(BenkoBox port : ship.getBenkoBoxes())
-                if (((FpgaBenkoBox)port).ihorn())
+            for(Pump port : ship.getPumps())
+                if (((FpgaPump)port).ihorn())
                     ihornports.add(port);
         FabricTree ihorns =
-            new FabricTree((FpgaBenkoBox[])ihornports.toArray(new FpgaBenkoBox[0]),
+            new FabricTree((FpgaPump[])ihornports.toArray(new FpgaPump[0]),
                            "funnel",
                            "ihorn");
 
@@ -138,8 +138,8 @@ public class Fpga extends Fleet {
         inputs.dumpChannels(true);
         ihorns.dumpChannels(true);
         for(FpgaShip ship : shiplist)
-            for(BenkoBox port : ship.getBenkoBoxes())
-                if (!((FpgaBenkoBox)port).special() || ((FpgaBenkoBox)port).dhorn())
+            for(Pump port : ship.getPumps())
+                if (!((FpgaPump)port).special() || ((FpgaPump)port).dhorn())
                     System.out.println("  wire [(`PACKET_WIDTH-1):0] data_"
                                        +getUniqueName(ship)+"_"+port.getName()+";");
 
@@ -160,12 +160,12 @@ public class Fpga extends Fleet {
             System.out.print("krunk"+(krunk++));
             System.out.print("(clk, ");
             boolean first = true;
-            for(BenkoBox port : ship.getBenkoBoxes()) {
+            for(Pump port : ship.getPumps()) {
                 if (!first) System.out.print(", ");
                 first = false;
                 String prefix = "data_";
-                if (((FpgaBenkoBox)port).ihorn()) prefix = "ihorn_";
-                if (((FpgaBenkoBox)port).dhorn()) prefix = "source_";
+                if (((FpgaPump)port).ihorn()) prefix = "ihorn_";
+                if (((FpgaPump)port).dhorn()) prefix = "source_";
                 System.out.print(prefix+getUniqueName(port.getShip())+"_"+port.getName()+"_r, ");
                 System.out.print(prefix+getUniqueName(port.getShip())+"_"+port.getName()+"_a, ");
                 System.out.print(prefix+getUniqueName(port.getShip())+"_"+port.getName());
@@ -173,9 +173,9 @@ public class Fpga extends Fleet {
             }
             System.out.println(");");
 
-            for(BenkoBox port : ship.getBenkoBoxes()) {
-                if (((FpgaBenkoBox)port).special()) continue;
-                if (((FpgaBenkoBox)port).inbox) {
+            for(Pump port : ship.getPumps()) {
+                if (((FpgaPump)port).special()) continue;
+                if (((FpgaPump)port).inbox) {
                     System.out.print("inbox");
                 } else {
                     System.out.print("outbox");
@@ -223,15 +223,15 @@ public class Fpga extends Fleet {
         String prefix;
         Node root;
         public void dumpChannels(boolean decl) { root.dumpChannels(0, decl); }
-        public FabricTree(FpgaBenkoBox[] ports, String component, String prefix) {
+        public FabricTree(FpgaPump[] ports, String component, String prefix) {
             this.prefix = prefix;
             root = (Node)mkNode("", component, ports, 0, ports.length, 0, 0);
         }
-        private Object mkNode(String name, String component, FpgaBenkoBox[] ports,
+        private Object mkNode(String name, String component, FpgaPump[] ports,
                               int start, int end, int addr, int bits) {
             if (end-start == 0) return null;
             if (end-start == 1) {
-                FpgaBenkoBox p = ports[start];
+                FpgaPump p = ports[start];
                 if (prefix.equals("instruction")) {
                     p.instr_addr = (addr<<1);
                     p.instr_bits = bits+1;
@@ -239,11 +239,11 @@ public class Fpga extends Fleet {
                     p.addr = (addr << 1) | 1;
                     p.bits = bits+1;
                     if (bits >= 11)
-                        throw new RuntimeException("too many benkoboxen!");
+                        throw new RuntimeException("too many pumps!");
                     int count = 0;
                     for(Destination d : p.getDestinations()) {
-                        if (!(d instanceof FpgaBenkoBox.VirtualPort)) continue;
-                        FpgaBenkoBox.VirtualPort vp = (FpgaBenkoBox.VirtualPort)d;
+                        if (!(d instanceof FpgaPump.VirtualPort)) continue;
+                        FpgaPump.VirtualPort vp = (FpgaPump.VirtualPort)d;
                         vp.addr = p.addr | (count << bits);
                         count++;
                     }
@@ -274,8 +274,8 @@ public class Fpga extends Fleet {
         }
         private String describe(String prefix, Object o) {
             if (o==null) return null;
-            if (o instanceof FpgaBenkoBox) {
-                FpgaBenkoBox p = (FpgaBenkoBox)o;
+            if (o instanceof FpgaPump) {
+                FpgaPump p = (FpgaPump)o;
                 return prefix+"_"+getUniqueName(p.getShip())+"_"+p.getName();
             }
             if (o instanceof Node) {
@@ -374,7 +374,7 @@ public class Fpga extends Fleet {
                 pw.println("`include \"macros.v\"");
                 pw.println();
                 pw.println("module " + filename + "( clk");
-                for(BenkoBoxDescription bb : sd) {
+                for(PumpDescription bb : sd) {
                     String bb_name = bb.getName();
                     pw.print("        ");
                     if (bb.isInbox()) {
@@ -391,7 +391,7 @@ public class Fpga extends Fleet {
                 pw.println("        );");
                 pw.println();
                 pw.println("    input clk;");
-                for(BenkoBoxDescription bb : sd) {
+                for(PumpDescription bb : sd) {
                     String bb_name = bb.getName();
                     pw.print("        ");
                     if (bb.isInbox()) {
@@ -440,20 +440,20 @@ public class Fpga extends Fleet {
     public void writeInstruction(DataOutputStream os, Instruction d) throws IOException { iie.writeInstruction(os, d); }
 
     private class FpgaInstructionEncoder extends InstructionEncoder {
-        public long getDestAddr(Destination box) { return ((FpgaBenkoBox.VirtualPort)box).addr; }
-        public long getBoxInstAddr(BenkoBox box) { return ((FpgaBenkoBox)box).instr_addr; }
+        public long getDestAddr(Destination box) { return ((FpgaPump.VirtualPort)box).addr; }
+        public long getBoxInstAddr(Pump box) { return ((FpgaPump)box).instr_addr; }
         public Destination getDestByAddr(long dest) {
             for(Ship ship : Fpga.this)
-                for(BenkoBox bb : ship.getBenkoBoxes())
+                for(Pump bb : ship.getPumps())
                     for(Destination d : bb.getDestinations())
                         if (getDestAddr(d)==dest)
                             return d;
             return null;
         }
-        public BenkoBox getBoxByInstAddr(long dest) {
+        public Pump getBoxByInstAddr(long dest) {
             for(Ship ship : Fpga.this)
-                for(BenkoBox bb : ship.getBenkoBoxes())
-                    if (((FpgaBenkoBox)bb).instr_addr == dest)
+                for(Pump bb : ship.getPumps())
+                    if (((FpgaPump)bb).instr_addr == dest)
                         return bb;
             return null;
         }
similarity index 83%
rename from src/edu/berkeley/fleet/fpga/FpgaBenkoBox.java
rename to src/edu/berkeley/fleet/fpga/FpgaPump.java
index 413a3c1..0346b8d 100644 (file)
@@ -2,11 +2,11 @@ package edu.berkeley.fleet.fpga;
 import edu.berkeley.fleet.doc.*;
 import edu.berkeley.fleet.api.*;
 import edu.berkeley.fleet.api.*;
-import edu.berkeley.fleet.api.BenkoBox;
+import edu.berkeley.fleet.api.Pump;
 import java.util.*;
 
 /** anything that has a destination address on the switch fabric */
-public class FpgaBenkoBox extends BenkoBox {
+public class FpgaPump extends Pump {
         
     private final String name;
     private final FpgaShip ship;
@@ -24,7 +24,7 @@ public class FpgaBenkoBox extends BenkoBox {
     public int addr = (default_addr++);
     public int instr_bits;
     public int instr_addr = (default_instr_addr++);
-    private final BenkoBoxDescription bbd;
+    private final PumpDescription bbd;
     protected boolean special = false;
     protected boolean ihorn = false;
     protected boolean dhorn = false;
@@ -38,13 +38,13 @@ public class FpgaBenkoBox extends BenkoBox {
     public long resolveLiteral(String literal) {
         return bbd.resolveLiteral(literal);
     }
-    public FpgaBenkoBox(BenkoBoxDescription bbd, boolean inbox, FpgaShip ship, String name) {
+    public FpgaPump(PumpDescription bbd, boolean inbox, FpgaShip ship, String name) {
         this(bbd, inbox, ship, name, false, false, false);
     }
-    public FpgaBenkoBox(BenkoBoxDescription bbd, boolean inbox, FpgaShip ship, String name, boolean special) {
+    public FpgaPump(PumpDescription bbd, boolean inbox, FpgaShip ship, String name, boolean special) {
         this(bbd, inbox, ship, name, special, false, false);
     }
-    public FpgaBenkoBox(BenkoBoxDescription bbd, boolean inbox, FpgaShip ship, String name, boolean special, boolean ihorn, boolean dhorn) {
+    public FpgaPump(PumpDescription bbd, boolean inbox, FpgaShip ship, String name, boolean special, boolean ihorn, boolean dhorn) {
         this.bbd = bbd;
         this.inbox = inbox;
         this.special = special;
@@ -56,7 +56,7 @@ public class FpgaBenkoBox extends BenkoBox {
         this.ports = new Destination[ports.length];
         for(int i=0; i<ports.length; i++)
             this.ports[i] = new VirtualPort(ports[i]);
-        ship.addBenkoBox(name, this);
+        ship.addPump(name, this);
     }
 
     public void addDestination(String dest) {
@@ -70,8 +70,8 @@ public class FpgaBenkoBox extends BenkoBox {
         public String name;
         public VirtualPort(String name) { this.name = name; }
         public String getDestinationName() { return name; }
-        public Ship getShip() { return FpgaBenkoBox.this.getShip(); }
-        public void addDataFromFabric(long data) { FpgaBenkoBox.this.addDataFromFabric(name, (int)data); }
+        public Ship getShip() { return FpgaPump.this.getShip(); }
+        public void addDataFromFabric(long data) { FpgaPump.this.addDataFromFabric(name, (int)data); }
         public String toString() { return getShip()+"."+getName(); }
         // fixme
         public long addr = (default_addr++);
index 68cf609..5658fde 100644 (file)
@@ -10,24 +10,24 @@ public class FpgaShip extends Ship {
     /** You should instantiate a bunch of Inboxes and Outboxes in your constructor */
     public FpgaShip(Fpga fleet, String name, String type, ShipDescription sd) {
         this.fleet = fleet; this.type = type;
-        for(BenkoBoxDescription sdbb : sd) {
-            FpgaBenkoBox sbb = new FpgaBenkoBox(sdbb, sdbb.isInbox(), this, sdbb.getName());
+        for(PumpDescription sdbb : sd) {
+            FpgaPump sbb = new FpgaPump(sdbb, sdbb.isInbox(), this, sdbb.getName());
             for(String port : sdbb) {
                 if (port.equals("")) continue;
                 sbb.addDestination(port);
             }
         }
         if        (type.equals("Debug")) {
-            new FpgaBenkoBox(null, false, this, "out", true);
+            new FpgaPump(null, false, this, "out", true);
             
         } else if (type.equals("Execute")) {
-            new FpgaBenkoBox(null, false, this, "ihorn", true, true, false);
-            new FpgaBenkoBox(null, false, this, "dhorn", true, false, true);
+            new FpgaPump(null, false, this, "ihorn", true, true, false);
+            new FpgaPump(null, false, this, "dhorn", true, false, true);
             
         } else if (type.equals("Memory")) {
-            new FpgaBenkoBox(null, true,  this, "command", true);
-            new FpgaBenkoBox(null, false, this, "ihorn",   true, true, false);
-            new FpgaBenkoBox(null, false, this, "dhorn",   true, false, true);
+            new FpgaPump(null, true,  this, "command", true);
+            new FpgaPump(null, false, this, "ihorn",   true, true, false);
+            new FpgaPump(null, false, this, "dhorn",   true, false, true);
         }
     }
 
@@ -47,14 +47,14 @@ public class FpgaShip extends Ship {
     }
 
     // this is dumb, the fpga fleet currently requires these in declaration-order; it shouldn't
-    private ArrayList<FpgaBenkoBox> portlist = new ArrayList<FpgaBenkoBox>();
-    private HashMap<String,FpgaBenkoBox> ports = new HashMap<String,FpgaBenkoBox>();
+    private ArrayList<FpgaPump> portlist = new ArrayList<FpgaPump>();
+    private HashMap<String,FpgaPump> ports = new HashMap<String,FpgaPump>();
 
-    public Iterable<BenkoBox> getBenkoBoxes() { return (Iterable<BenkoBox>)(Object)portlist; }
+    public Iterable<Pump> getPumps() { return (Iterable<Pump>)(Object)portlist; }
     public String getType()                   { return type; }
     public Fleet  getFleet()                  { return fleet; }
     public Fpga  getSlipway()              { return fleet; }
 
-    void addBenkoBox(String name, FpgaBenkoBox port) { ports.put(name, port); portlist.add(port); }
+    void addPump(String name, FpgaPump port) { ports.put(name, port); portlist.add(port); }
 
 }
index 8cd21cc..87a12e6 100644 (file)
@@ -406,7 +406,7 @@ public class Generator {
         pw = new PrintWriter(new OutputStreamWriter(new FileOutputStream(prefix+"/bitfields.v")));
         pw.println("`define DATAWIDTH                "+WIDTH_WORD);
         pw.println("`define CODEBAG_SIZE_BITS        "+WIDTH_CODEBAG_SIZE);
-        pw.println("`define BENKOBOX_ADDRESS_BITS    "+WIDTH_PUMP_ADDR);
+        pw.println("`define PUMP_ADDRESS_BITS    "+WIDTH_PUMP_ADDR);
         pw.println("`define DESTINATION_ADDRESS_BITS "+WIDTH_DEST_ADDR);
         pw.println("`define COUNT_BITS               "+WIDTH_COUNT);
         pw.println("`define COUNT_WIDTH              "+WIDTH_COUNT);
index 8ec338f..032e57b 100644 (file)
@@ -27,12 +27,12 @@ public abstract class InstructionEncoder {
     protected abstract long getDestAddr(Destination box);
 
     /** get the bits describing this box's location on the INSTRUCTION HORN */
-    protected abstract long getBoxInstAddr(BenkoBox box);
+    protected abstract long getBoxInstAddr(Pump box);
 
-    /** given an INSTRUCTION HORN address, retrieve the corresponding BenkoBox object */
-    protected abstract BenkoBox getBoxByInstAddr(long dest);
+    /** given an INSTRUCTION HORN address, retrieve the corresponding Pump object */
+    protected abstract Pump getBoxByInstAddr(long dest);
     
-    /** given a DESTINATION HORN address, retrieve the corresponding BenkoBox object */
+    /** given a DESTINATION HORN address, retrieve the corresponding Pump object */
     protected abstract Destination getDestByAddr(long dest);
 
     /** read a machine-formatted instruction from a file (into a Java object) */
@@ -55,7 +55,7 @@ public abstract class InstructionEncoder {
         long inst = instr;
         switch((int)getField(WIDTH_WORD-1, WIDTH_WORD-2, inst)) {
             case 0: {
-                BenkoBox name    = getBoxByInstAddr(getIntField(OFFSET_PUMP_ADDR+WIDTH_PUMP_ADDR-1, OFFSET_PUMP_ADDR, inst));
+                Pump name    = getBoxByInstAddr(getIntField(OFFSET_PUMP_ADDR+WIDTH_PUMP_ADDR-1, OFFSET_PUMP_ADDR, inst));
                 Destination dest = getDestByAddr   (getIntField(OFFSET_DEST+WIDTH_DEST_ADDR-1,      OFFSET_DEST,      inst));
                 int count        = getIntField(                 OFFSET_COUNT+WIDTH_COUNT-1,         OFFSET_COUNT,     inst);
                 boolean tokenIn     = getBit(OFFSET_TI, instr);
@@ -98,13 +98,13 @@ public abstract class InstructionEncoder {
         // Kill is encoded as Execute with the illegal combination (Latch & ~DataIn)
         if (d instanceof Instruction.Kill) {
             Instruction.Kill k = (Instruction.Kill)d;
-            d = new Instruction.Executable(k.benkoBox, null, k.count, k.killOnlyStandingInstructions,
+            d = new Instruction.Executable(k.pump, null, k.count, k.killOnlyStandingInstructions,
                                            false, true, false, false, false, false);
         }
 
         if (d instanceof Instruction.Executable) {
             Instruction.Executable inst = (Instruction.Executable)d;
-            instr |= putField(OFFSET_PUMP_ADDR+WIDTH_PUMP_ADDR-1, OFFSET_PUMP_ADDR,   getBoxInstAddr(inst.benkoBox));
+            instr |= putField(OFFSET_PUMP_ADDR+WIDTH_PUMP_ADDR-1, OFFSET_PUMP_ADDR,   getBoxInstAddr(inst.pump));
             instr |= putField(OFFSET_DEST+WIDTH_DEST_ADDR-1,      OFFSET_DEST,        inst.dest==null?0:getDestAddr(inst.dest));
             instr |= putField(OFFSET_COUNT+WIDTH_COUNT-1,         OFFSET_COUNT,       inst.count);
             instr |= putField(OFFSET_TI,                          OFFSET_TI,          inst.tokenIn?1:0);
index d9b9f29..b2dcc81 100644 (file)
@@ -4,7 +4,7 @@ import edu.berkeley.fleet.api.*;
 import java.util.*;
 
 /** this is a generic inbox which stores <32-bit items (tokens or data) */
-public class Inbox extends InstructionBenkoBox {
+public class Inbox extends InstructionPump {
 
     public boolean dataReadyForShip()            { return itemReadyForShip; }
     public Packet removePacketForShip()          { remove(); return register; }
@@ -7,7 +7,7 @@ import edu.berkeley.fleet.api.Instruction;
 import java.util.*;
 
 /** anything that has a source (instruction horn) address on the switch fabric */
-abstract class InstructionBenkoBox extends InterpreterBenkoBox {
+abstract class InstructionPump extends InterpreterPump {
 
     /** the currently executing instruction */
     private Instruction.Executable executing = null;
@@ -18,7 +18,7 @@ abstract class InstructionBenkoBox extends InterpreterBenkoBox {
     /** count of how many "standing instruction only" kills remain to be executed */
     private int killNextStandingInstruction = 0;
 
-    InstructionBenkoBox(InterpreterShip ship, String name, String[] ports) {
+    InstructionPump(InterpreterShip ship, String name, String[] ports) {
         super(ship, name, ports);
     }
 
index 5996334..dda42a7 100644 (file)
@@ -82,8 +82,8 @@ public class Interpreter extends Fleet implements Fleet.WithDynamicShips {
     public void dispatch(Instruction i, long address) {
         Log.dispatch(i);
         if (i instanceof Instruction.Executable) {
-            InterpreterBenkoBox sourceBenkoBox = (InterpreterBenkoBox)(((Instruction.Executable)i).benkoBox);
-            ((InstructionBenkoBox)sourceBenkoBox).addInstruction(((Instruction.Executable)i));
+            InterpreterPump sourcePump = (InterpreterPump)(((Instruction.Executable)i).pump);
+            ((InstructionPump)sourcePump).addInstruction(((Instruction.Executable)i));
 
         } else if (i instanceof Instruction.Literal.CodeBagDescriptor) {
             Instruction.Literal.CodeBagDescriptor cbd = (Instruction.Literal.CodeBagDescriptor)i;
@@ -96,8 +96,8 @@ public class Interpreter extends Fleet implements Fleet.WithDynamicShips {
                        (InterpreterDestination)(((Instruction.Literal.Absolute)i).dest)).send();
 
         } else if (i instanceof Instruction.Kill) {
-            InterpreterBenkoBox benkoBox = (InterpreterBenkoBox)(((Instruction.Kill)i).benkoBox);
-            ((InstructionBenkoBox)benkoBox).kill(((Instruction.Kill)i).count,
+            InterpreterPump pump = (InterpreterPump)(((Instruction.Kill)i).pump);
+            ((InstructionPump)pump).kill(((Instruction.Kill)i).count,
                                              ((Instruction.Kill)i).killOnlyStandingInstructions);
 
         } else {
@@ -140,18 +140,18 @@ public class Interpreter extends Fleet implements Fleet.WithDynamicShips {
     public void writeInstruction(DataOutputStream os, Instruction d) throws IOException { iie.writeInstruction(os, d); }
     public class InterpreterInstructionEncoder extends InstructionEncoder {
         public long getDestAddr(Destination box) { return ((InterpreterDestination)box).getDestAddr(); }
-        public long getBoxInstAddr(BenkoBox box) { return ((InterpreterBenkoBox)box).getDestAddr(); }
+        public long getBoxInstAddr(Pump box) { return ((InterpreterPump)box).getDestAddr(); }
         public Destination getDestByAddr(long dest) {
             for(Ship ship : Interpreter.this)
-                for(BenkoBox bb : ship.getBenkoBoxes())
+                for(Pump bb : ship.getPumps())
                     for(Destination d : bb.getDestinations())
                         if (getDestAddr(d)==dest)
                             return d;
             return null;
         }
-        public BenkoBox getBoxByInstAddr(long dest) {
+        public Pump getBoxByInstAddr(long dest) {
             for(Ship ship : Interpreter.this)
-                for(BenkoBox bb : ship.getBenkoBoxes())
+                for(Pump bb : ship.getPumps())
                     if (getBoxInstAddr(bb) == dest)
                         return bb;
             return null;
@@ -179,7 +179,7 @@ public class Interpreter extends Fleet implements Fleet.WithDynamicShips {
             pw.println("");
             pw.println("public class "+filename+" extends InterpreterShip {");
             pw.println("");
-            for(BenkoBoxDescription b : sd) {
+            for(PumpDescription b : sd) {
                 String name = b.getName();
                 pw.print("    ");
                 if ( b.isInbox()) pw.print("Inbox");
@@ -201,8 +201,8 @@ public class Interpreter extends Fleet implements Fleet.WithDynamicShips {
             pw.println("");
             pw.println("    public "+filename+"(Interpreter fleet, String name) {");
             pw.println("       super(fleet, name, \""+filename+"\");");
-            for(BenkoBoxDescription b : sd)
-                pw.println("       addBenkoBox(\""+b.getName()+"\", box_"+b.getName()+");");
+            for(PumpDescription b : sd)
+                pw.println("       addPump(\""+b.getName()+"\", box_"+b.getName()+");");
             pw.println("    }");
             pw.println("");
             pw.println(sd.getSection("fleeterpreter"));
@@ -1,32 +1,32 @@
 package edu.berkeley.fleet.interpreter;
 import edu.berkeley.fleet.doc.*;
 import edu.berkeley.fleet.api.*;
-import edu.berkeley.fleet.api.BenkoBox;
+import edu.berkeley.fleet.api.Pump;
 import java.util.*;
 
 /** anything that has a destination address on the switch fabric */
-public abstract class InterpreterBenkoBox extends BenkoBox {
+public abstract class InterpreterPump extends Pump {
         
     private final String name;
     private final InterpreterShip ship;
     private final Destination[] ports;
     private final int addr = max_addr++;
-    private  BenkoBoxDescription bbd;
+    private  PumpDescription bbd;
 
-    public void setDescription(BenkoBoxDescription bbd) {
+    public void setDescription(PumpDescription bbd) {
         this.bbd = bbd;
     }
     public long resolveLiteral(String literal) {
         return bbd.resolveLiteral(literal);
     }
     
-    public InterpreterBenkoBox(InterpreterShip ship, String name, String[] ports) {
+    public InterpreterPump(InterpreterShip ship, String name, String[] ports) {
         this.ship = ship;
         this.name = name;
         this.ports = new Destination[ports.length];
         for(int i=0; i<ports.length; i++)
             this.ports[i] =
-                new InterpreterBenkoBoxDestination(ports[i]);
+                new InterpreterPumpDestination(ports[i]);
     }
 
     public Iterable<Destination> getDestinations() {
@@ -54,13 +54,13 @@ public abstract class InterpreterBenkoBox extends BenkoBox {
 
     private static int max_addr;
 
-    private class InterpreterBenkoBoxDestination extends InterpreterDestination {
+    private class InterpreterPumpDestination extends InterpreterDestination {
         public String name;
         public long addr = max_addr++;
-        public InterpreterBenkoBoxDestination(String name)          { this.name = name; }
+        public InterpreterPumpDestination(String name)          { this.name = name; }
         public String getDestinationName()               { return name; }
-        public Ship getShip()                    { return InterpreterBenkoBox.this.getShip(); }
-        public void addDataFromFabric(Packet packet) { InterpreterBenkoBox.this.addDataFromFabric(packet); }
+        public Ship getShip()                    { return InterpreterPump.this.getShip(); }
+        public void addDataFromFabric(Packet packet) { InterpreterPump.this.addDataFromFabric(packet); }
         public String toString()                 { return getShip()+"."+getName(); }
         public long getDestAddr() { return addr; }
     }
index 6bfe2b2..83fdaec 100644 (file)
@@ -15,16 +15,16 @@ abstract class InterpreterShip extends Ship {
 
     private Interpreter  fleet;
     private String       type;
-    private HashMap<String,InterpreterBenkoBox> ports = new HashMap<String,InterpreterBenkoBox>();
+    private HashMap<String,InterpreterPump> ports = new HashMap<String,InterpreterPump>();
 
-    public Iterable<BenkoBox> getBenkoBoxes()  { return (Iterable<BenkoBox>)(Object)ports.values(); }
+    public Iterable<Pump> getPumps()  { return (Iterable<Pump>)(Object)ports.values(); }
     public String             getType()        { return type; }
     public Fleet              getFleet()       { return fleet; }
     public Interpreter        getInterpreter() { return fleet; }
 
     public void setShipDescription(ShipDescription sd) {
-        for(InterpreterBenkoBox ibb : ports.values()) {
-            for(BenkoBoxDescription bbd : sd) {
+        for(InterpreterPump ibb : ports.values()) {
+            for(PumpDescription bbd : sd) {
                 if (bbd.getName().equals(ibb.getName()))
                     ibb.setDescription(bbd);
             }
@@ -39,16 +39,16 @@ abstract class InterpreterShip extends Ship {
     public abstract void service();
 
     public final void _service() {
-        for(InterpreterBenkoBox p : ports.values()) p.service();
+        for(InterpreterPump p : ports.values()) p.service();
         service();
     }
 
-    protected void addBenkoBox(String name, InterpreterBenkoBox port) {
+    protected void addPump(String name, InterpreterPump port) {
         ports.put(name, port);
     }
 
     public void shutdown() {
-        for(InterpreterBenkoBox p : ports.values())
+        for(InterpreterPump p : ports.values())
             p.shutdown();
     }
 }
index 18e8d01..e012e32 100644 (file)
@@ -36,13 +36,13 @@ public class Log {
         println(ANSI.green("dispatch: " + indent(d+"", "          ")));
     }
 
-    public static void data(String data, BenkoBox source, Destination dest) {
+    public static void data(String data, Pump source, Destination dest) {
         println(("    data: ") + indent(ANSI.purple(data) +
                                         (source==null ? "" :
                                          (" : " + source))+(" -> "+ANSI.purple(""+dest)), "          "));
     }
 
-    public static void token(BenkoBox source, Destination dest) {
+    public static void token(Pump source, Destination dest) {
         println(ANSI.purple("   token: ") + (source + " -> " + ANSI.purple(dest+"")));
     }
 
index 1f80d0e..1de6c45 100644 (file)
@@ -4,7 +4,7 @@ import edu.berkeley.fleet.api.*;
 import edu.berkeley.fleet.ies44.*;
 import edu.berkeley.fleet.api.Instruction;
 
-public class Outbox extends InstructionBenkoBox {
+public class Outbox extends InstructionPump {
 
     /** are we ready to accept another item from the ship? */
     private boolean readyForDataFromShip = false;
index 7591c56..3042201 100644 (file)
@@ -15,7 +15,7 @@ class Packet {
     long        value;
     InterpreterDestination destination;
 
-    public Packet(Interpreter interpreter, InterpreterBenkoBox source, long value, InterpreterDestination destination) {
+    public Packet(Interpreter interpreter, InterpreterPump source, long value, InterpreterDestination destination) {
         Log.data(value+"", source, (Destination)destination);
         this.interpreter = interpreter;
         this.value = value;