} catch (Exception e) { throw new RuntimeException(e); }
}
+ public BitVector getDestAddr(Path path) {
+ return ((FpgaPath)path).toBitVector();
+ }
+
// Setup //////////////////////////////////////////////////////////////////////////////
public Ship createShip(String type, String name) throws IOException {
createShip("Memory", "memory1");
if (small) {
- createShip("Fifo", "fifo");
- createShip("Alu", "alu");
+ createShip("Fifo", "fifo");
+ createShip("Alu", "alu");
+ createShip("Counter", "counter");
+ createShip("CarrySaveAdder", "csa1");
+ createShip("Rotator", "rotator");
+ createShip("Lut3", "lut");
} else {
//createShip("Memory", "memory2");
//createShip("Memory", "memory3");
dests.addAll(outbox_dests);
top_horn = mkNode((FabricElement[])dests.toArray(new FabricElement[0]), true);
FabricElement source = mkNode((FabricElement[])sources.toArray(new FabricElement[0]), false);
- FunnelModule.FunnelInstance top_funnel = new FunnelModule.FunnelInstance(top, null, source.getOutputPort());
+ FunnelModule.FunnelInstance top_funnel = new FunnelModule.FunnelInstance(this, top, null, source.getOutputPort());
((FunnelModule.FunnelInstance)source).out = top_funnel;
//top_horn.addInput(top_funnel, top_funnel.getOutputPort());
top_funnel.addOutput(top_horn, top_horn.getInputPort());
FabricElement leftPort = mkNode(ports, is_horn, start, (end+start)/2);
FabricElement rightPort = mkNode(ports, is_horn, (end+start)/2, end);
return is_horn
- ? new HornModule.HornInstance(top, leftPort, rightPort)
- : new FunnelModule.FunnelInstance(top, leftPort, rightPort);
+ ? new HornModule.HornInstance(this, top, leftPort, rightPort)
+ : new FunnelModule.FunnelInstance(this, top, leftPort, rightPort);
}
}
}
} catch (Exception e) { throw new RuntimeException(e); }
}
- public long getDestAddr(Path path) {
- return ((FpgaPath)path).toLong();
- }
- public Dock getBoxByInstAddr(long dest) {
- for(Ship ship : Fpga.this)
- for(Dock bb : ship)
- if (((FpgaDestination)((FpgaDock)bb).getInstructionDestination()).getAddr() == dest)
- return bb;
- return null;
- }
-
}