add FpgaDestination.getPathLength() for measuring hop counts
[fleet.git] / src / edu / berkeley / fleet / fpga / FpgaDock.java
index b7212e8..d8bbef1 100644 (file)
@@ -21,7 +21,7 @@ public class FpgaDock extends FleetTwoDock implements FabricElement {
     private static final int INSTRUCTION_FIFO_SIZE = 12;
     private static final int EPILOGUE_FIFO_SIZE    = 0;
     //private static final int DATA_FIFO_SIZE        = 4;
-    private static final int DATA_FIFO_SIZE        = 8;
+    static final int DATA_FIFO_SIZE        = 8;
         
     private FpgaDestination dataDestination;
     private FpgaDestination instructionDestination;
@@ -58,6 +58,7 @@ public class FpgaDock extends FleetTwoDock implements FabricElement {
     public Module.Port getInputPort()  { throw new RuntimeException(); }
     public Path getPath(Destination dest,BitVector signal) { return getPath((FpgaDestination)dest, signal); }
     public FpgaPath getPath(FpgaDestination dest,BitVector signal) { return upstream.getPath(dest, signal); }
+    public int      getPathLength(FpgaDestination dest) { return upstream.getPathLength(dest)-1; }
     public void addInput(FabricElement in, Module.Port inPort) { throw new RuntimeException(); }
     public void addOutput(FabricElement out, Module.Port outPort) {
         this.upstream = out;