split Fpga.java into two implementations, large and small
authoradam <adam@megacz.com>
Mon, 27 Oct 2008 07:44:19 +0000 (08:44 +0100)
committeradam <adam@megacz.com>
Mon, 27 Oct 2008 07:44:19 +0000 (08:44 +0100)
src/edu/berkeley/fleet/fpga/Fpga.java

index 491ca45..5e5c434 100644 (file)
@@ -65,25 +65,33 @@ public class Fpga extends FleetTwoFleet {
         this.top = top;
         debugShip = createShip("Debug",     "debug");
 
+        boolean small = false;
+
         createShip("Memory",      "memory1");
-        //createShip("Memory",    "memory2");
-        //createShip("Memory",    "memory3");
 
-        for(int i=0; i<5; i++)
-            createShip("Alu",       "alu"+i);
+        if (small) {
+            createShip("Fifo", "fifo");
+            createShip("Alu",  "alu");
+        } else {
+            //createShip("Memory",    "memory2");
+            //createShip("Memory",    "memory3");
+
+            for(int i=0; i<5; i++)
+                createShip("Alu",       "alu"+i);
 
-        for(int i=0; i<2; i++)
-            createShip("Fifo",      "fifo"+i);
+            for(int i=0; i<2; i++)
+                createShip("Fifo",      "fifo"+i);
 
-        for(int i=0; i<13; i++)
-            createShip("Counter",  "counter"+i);
+            for(int i=0; i<13; i++)
+                createShip("Counter",  "counter"+i);
 
-        createShip("CarrySaveAdder",  "csa1");
-        createShip("Rotator",         "rotator");
-        createShip("Lut3",            "lut");
+            createShip("CarrySaveAdder",  "csa1");
+            createShip("Rotator",         "rotator");
+            createShip("Lut3",            "lut");
 
+            //createShip("DDR2",    "ddr2");
+        }
         createShip("DRAM",    "dram");
-        //createShip("DDR2",    "ddr2");
         createShip("Video",   "video");
 
         //Module.SourcePort  debug_in    = top.createWireSourcePort("debug_in", WIDTH_PACKET);