import static edu.berkeley.fleet.api.Instruction.*;
import static edu.berkeley.fleet.api.Predicate.*;
+/** common subclass for the "FleetTwo" generation of processors, all 37-bit wide, with AM33 encoding */
public abstract class FleetTwoFleet extends Fleet {
public static final Mask PACKET_TOKEN = new Mask("v.................................................");
public static final Mask SET_TAPL_FROM_IMMEDIATE = new Mask("................1000001.vvvvvvvvvvvvv");
+ // Misc //////////////////////////////////////////////////////////////////////////////
- public static final long DataLatch_WIDTH = SET_IMMEDIATE.valmaskmax-SET_IMMEDIATE.valmaskmin+1; // FIXME: this is an abstraction breakage
- private static final long mask = ~(-1L << DataLatch_WIDTH);
- public static boolean isSmallEnoughToFit(long immediate) {
- if ((immediate & ~mask) == 0) return true;
- if ((immediate | mask) == -1L) return true;
- return false;
- }
+ public static final long DataLatch_WIDTH = SET_IMMEDIATE.valmaskmax-SET_IMMEDIATE.valmaskmin+1; // FIXME: this is an abstraction breakage
+ private static final long mask = ~(-1L << DataLatch_WIDTH);
+ public static boolean isSmallEnoughToFit(long immediate) {
+ if ((immediate & ~mask) == 0) return true;
+ if ((immediate | mask) == -1L) return true;
+ return false;
+ }
+
+ public int getWordWidth() { return 37; }
+
+ //////////////////////////////////////////////////////////////////////////////
/** get the bits describing this box's location on the DESTINATION HORN */
+ // FIXME this should use a BitVector not a long!
protected abstract long getDestAddr(Path box);
/** decode a path, given the starting point and the bits that comprise it */
+ // FIXME this should use a BitVector not a long!
protected abstract Path getPathByAddr(Dock source, long dest);
/** FIXME: this is a hack for now */
}
return ret;
}
+
}