finish overhaul of interpreter
[fleet.git] / src / edu / berkeley / fleet / interpreter / InterpreterDestination.java
index 6bb3971..e228a4d 100644 (file)
@@ -8,8 +8,13 @@ class InterpreterDestination extends Destination {
 
     int addr;
 
+    Queue<Packet> packets = new LinkedList<Packet>();
+
+    private boolean isInstructionDestination;
+
     public InterpreterDestination(InterpreterDock d, boolean isInstructionDestination) {
         super(d);
+        this.isInstructionDestination = isInstructionDestination;
         synchronized(InterpreterDestination.class) {
             this.addr = max_dest;
             max_dest += 2;
@@ -18,11 +23,10 @@ class InterpreterDestination extends Destination {
 
     /** adds the included datum to the port from the switch fabric  side */
     public void addDataFromFabric(Packet packet) {
-        throw new RuntimeException();
+        packets.add(packet);
     }
 
-
     public String toString() {
-        return "";
+        return getDock()+(isInstructionDestination ? ":i" : "");
     }
 }