/** the width of the immediate field in the "set data latch" instruction */
public abstract int getSetWidth();
+
+ /** FIXME: this will soon become a property of individual memories rather than the entire Fleet */
+ public abstract int getMaxCodeBagSize();
+
+ /** FIXME: this will soon become a property of individual memories rather than the entire Fleet */
+ public abstract BitVector makeCodeBagDescriptor(long offset, long length);
/**
* Encodes an instruction as a BitVector
public FleetProcess run(Instruction[] program) {
throw new RuntimeException("class " + this.getClass().getName() + " does not implement method run()");
}
+
+ /** Assumes that the system property "fleet.impl" holds the name of a subclass to instantiate */
+ public static Fleet getDefaultImpl() {
+ String impl = System.getProperty("fleet.impl");
+ if (impl==null) throw new RuntimeException("You must invoke the JVM with -Dfleet.impl=<impl>");
+ try {
+ return (Fleet)Class.forName(impl).newInstance();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
}