add FpgaDestination.getPathLength() for measuring hop counts
[fleet.git] / src / edu / berkeley / fleet / fpga / FpgaDestination.java
index 79eb4bd..37677ce 100644 (file)
@@ -32,6 +32,12 @@ public class FpgaDestination extends Destination implements FabricElement {
     public Module.Port getInputPort()  { throw new RuntimeException(); }
     public void addOutput(FabricElement out, Module.Port outPort) { throw new RuntimeException(); }
 
+    public int      getPathLength(FpgaDestination dest) {
+        if (dest==this) {
+            return isInstructionDestination ? 0 : FpgaDock.DATA_FIFO_SIZE;
+        }
+        return 0;
+    }
     public FpgaPath getPath(FpgaDestination dest, BitVector signal) {
         if (dest==this) return FpgaPath.emptyPath(this, signal);
         return null;