X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Ffleet%2Ffpga%2FFpga.java;h=20567ed8b581a16e2113966a11529ed54036b670;hb=481948af3ebfcf0ee6ac5933ceb5dcdb0fab9058;hp=e00c6e48b08f3c427c5fd5d3967f95880c8ab609;hpb=119575d3d51369d0b407e9e30e0c2766707dcd07;p=fleet.git diff --git a/src/edu/berkeley/fleet/fpga/Fpga.java b/src/edu/berkeley/fleet/fpga/Fpga.java index e00c6e4..20567ed 100644 --- a/src/edu/berkeley/fleet/fpga/Fpga.java +++ b/src/edu/berkeley/fleet/fpga/Fpga.java @@ -64,7 +64,7 @@ public class Fpga extends FleetTwoFleet { // Setup ////////////////////////////////////////////////////////////////////////////// Ship createShip(String type) throws IOException { - ShipDescription sd = new ShipDescription(type, new BufferedReader(new InputStreamReader(new FileInputStream("ships/"+type+".ship")))); + ShipDescription sd = new ShipDescription(this, type, new BufferedReader(new InputStreamReader(new FileInputStream("ships/"+type+".ship")))); int count = 0; for(Ship ship : ships.values()) if (ship.getType().equals(type)) count++; String name = type+count; @@ -89,36 +89,26 @@ public class Fpga extends FleetTwoFleet { createShip("CarrySaveAdder"); createShip("Rotator"); createShip("Lut3"); - createShip("Timer"); - createShip("DDR2"); - createShip("Dvi"); } 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"); - */ + for(int i=0; i<2; i++) createShip("Memory"); + for(int i=0; i<6; i++) createShip("Alu"); + //for(int i=0; i<2; i++) createShip("Fifo"); + for(int i=0; i<12; i++) createShip("Counter"); + //for(int i=0; i<2; i++) createShip("Null"); //createShip("CarrySaveAdder"); //createShip("Rotator"); - //createShip("Lut3"); + createShip("Random"); + createShip("Button"); - createShip("Timer"); - createShip("DDR2"); - createShip("Dvi"); } + createShip("Timer"); + createShip("DDR2"); + createShip("Dvi"); + // for FifoShip new Module.InstantiatedModule(top, new FifoModule(8, WIDTH_WORD)); @@ -140,6 +130,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;