1 package edu.berkeley.fleet.fpga;
2 import edu.berkeley.fleet.api.*;
3 import edu.berkeley.fleet.two.*;
4 import edu.berkeley.fleet.*;
5 import java.lang.reflect.*;
6 import edu.berkeley.sbp.chr.*;
7 import edu.berkeley.sbp.misc.*;
8 import edu.berkeley.sbp.meta.*;
9 import edu.berkeley.sbp.util.*;
12 import static edu.berkeley.fleet.two.FleetTwoFleet.*;
13 import static edu.berkeley.fleet.fpga.verilog.Verilog.*;
16 public interface FabricElement {
18 public FpgaPath getPath(FpgaDestination dest, BitVector signal);
19 public int getPathLength(FpgaDestination dest);
21 public void addInput(FabricElement in, Module.Port inPort);
22 public void addOutput(FabricElement out, Module.Port outPort);
24 public Module.SourcePort getOutputPort();
25 public Module.Port getInputPort();
27 public static abstract class AbstractFabricElement implements FabricElement {
28 public abstract FpgaPath getPath(FpgaDestination dest, BitVector signal);
29 public abstract int getPathLength(FpgaDestination dest);
30 public void addInput(FabricElement in, Module.Port inPort) { throw new RuntimeException(); }
31 public void addOutput(FabricElement out, Module.Port outPort) { throw new RuntimeException(); }
32 public Module.SourcePort getOutputPort() { throw new RuntimeException(); }
33 public Module.Port getInputPort() { throw new RuntimeException(); }