add FpgaDestination.getPathLength() for measuring hop counts
[fleet.git] / src / edu / berkeley / fleet / fpga / Fpga.java
index eaa559c..372b9fb 100644 (file)
@@ -78,8 +78,8 @@ public class Fpga extends FleetTwoFleet {
         this.top = top;
         debugShip = createShip("Debug");
 
-        //boolean small = true;
-        boolean small = false;
+        boolean small = true;
+        //boolean small = false;
 
         if (small) {
             for(int i=0; i<2; i++) createShip("Alu");
@@ -92,21 +92,15 @@ public class Fpga extends FleetTwoFleet {
             createShip("Timer");
             createShip("DDR2");
             createShip("Dvi");
-            createShip("ZBT");
 
         } else {
 
             for(int i=0; i<3; i++)  createShip("Memory");
             for(int i=0; i<3; i++)  createShip("Alu");
             for(int i=0; i<2; i++)  createShip("Fifo");
-            for(int i=0; i<11; i++) createShip("Counter");
-
-            /*
-            for(int i=0; i<3; i++)  createShip("Memory");
-            for(int i=0; i<3; i++)  createShip("Alu");
-            for(int i=0; i<2; i++)  createShip("Fifo");
             for(int i=0; i<14; i++) createShip("Counter");
 
+            /*
             // "really big" configuration: 138 docks
             for(int i=0; i<4; i++)  createShip("Alu");
             */
@@ -118,7 +112,6 @@ public class Fpga extends FleetTwoFleet {
             createShip("Timer");
             createShip("DDR2");
             createShip("Dvi");
-            //createShip("ZBT");
         }
 
         // for FifoShip
@@ -142,6 +135,7 @@ public class Fpga extends FleetTwoFleet {
                 final Module.SourcePort sp = sp0;
                 sources.add(new FabricElement.AbstractFabricElement() {
                         private FabricElement upstream;
+                        public int      getPathLength(FpgaDestination dest) { return upstream.getPathLength(dest); }
                         public FpgaPath getPath(FpgaDestination dest, BitVector signal) { return upstream.getPath(dest, signal); }
                         public void addOutput(FabricElement out, Module.Port outPort) {
                             this.upstream = out;