package edu.berkeley.fleet.marina;
-import edu.berkeley.fleet.api.*;
import com.sun.electric.tool.simulation.test.*;
-import com.sun.electric.tool.simulation.test.BitVector;
+import edu.berkeley.fleet.api.*;
+import edu.berkeley.fleet.api.BitVector;
+import edu.berkeley.fleet.two.*;
+import edu.berkeley.fleet.*;
+import java.util.*;
+
+public class Marina extends FleetTwoFleet {
-public class Marina extends MarinaFleet {
+ MarinaShip fakeShip = new MarinaShip(this);
+ MarinaDock onlyDock = new MarinaDock(fakeShip, true);
+
+ public BitVector encodeInstruction(Dock dispatchFrom, Instruction instruction) {
+ return encodeInstruction(instruction, dispatchFrom);
+ }
+
+ public Iterator<Ship> iterator() {
+ HashSet hs = new HashSet<Ship>();
+ hs.add(fakeShip);
+ return hs.iterator();
+ }
+
+ public Ship getShip(String type, int ordinal) {
+ throw new RuntimeException("not implemented");
+ }
+
+ public FleetProcess run(Instruction[] instructions) {
+ throw new RuntimeException("not implemented");
+ }
+
+ public BitVector getDestAddr(Path path) {
+ if (path==null) return new BitVector(0);
+ return ((MarinaPath)path).bv;
+ }
+
+ public Dock getOnlyDock() {
+ return onlyDock;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
JtagLogicLevel mc0;
JtagLogicLevel mc1;
ChipModel model,
boolean clockHack,
Indenter indenter) {
+ // use "internal encoding"
+ super(true);
+
this.controlChain = controlChain;
this.dataChain = dataChain;
this.dukeChain = dukeChain;
private int value;
private Ilc() {
reportChain.shift(REPORT_CHAIN, true, false);
- BitVector odd = reportChain.getOutBits(REPORT_CHAIN+"."+ILC_PATH_ODD).bitReverse().not();
- BitVector even = reportChain.getOutBits(REPORT_CHAIN+"."+ILC_PATH_EVEN).bitReverse().not();
- BitVector ret = new BitVector(8, "olc");
+ com.sun.electric.tool.simulation.test.BitVector odd = reportChain.getOutBits(REPORT_CHAIN+"."+ILC_PATH_ODD).bitReverse().not();
+ com.sun.electric.tool.simulation.test.BitVector even = reportChain.getOutBits(REPORT_CHAIN+"."+ILC_PATH_EVEN).bitReverse().not();
+ com.sun.electric.tool.simulation.test.BitVector ret = new com.sun.electric.tool.simulation.test.BitVector(8, "olc");
for(int i=0; i<4; i++) {
ret.set(i*2+1, odd.get(i));
ret.set(i*2, even.get(i));
public int getOLC() {
reportChain.shift(REPORT_CHAIN, true, false);
if (omegaCounter) {
- BitVector bits = null;
+ com.sun.electric.tool.simulation.test.BitVector bits = null;
for(int i=0; i<4; i++) {
- BitVector x = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_KESSEL+i);
+ com.sun.electric.tool.simulation.test.BitVector x = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_KESSEL+i);
//System.out.println("bits are: " + x);
bits = bits==null ? x : bits.cat(x);
}
System.out.println();
return ret;
} else if (kesselsCounter) {
- BitVector bits = null;
+ com.sun.electric.tool.simulation.test.BitVector bits = null;
for(int i=0; i<4; i++) {
- BitVector x = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_KESSEL+i);
+ com.sun.electric.tool.simulation.test.BitVector x = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_KESSEL+i);
//System.out.println("bits are: " + x);
bits = bits==null ? x : bits.cat(x);
}
);
return (first+second);
} else {
- BitVector odd = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_ODD).bitReverse();
- BitVector even = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_EVEN).bitReverse();
+ com.sun.electric.tool.simulation.test.BitVector odd = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_ODD).bitReverse();
+ com.sun.electric.tool.simulation.test.BitVector even = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_EVEN).bitReverse();
odd = odd.not();
even = even.not();
- BitVector bv = new BitVector(6, "olc");
+ com.sun.electric.tool.simulation.test.BitVector bv = new com.sun.electric.tool.simulation.test.BitVector(6, "olc");
for(int i=0; i<3; i++) {
bv.set(i*2, odd.get(i));
bv.set(i*2+1, even.get(i));
public int getNumTokens() {
reportChain.shift(REPORT_CHAIN, true, false);
// get the token successor and token FIFO wires
- BitVector bv = reportChain.getOutBits(REPORT_CHAIN+"."+TOK_FIFO_PATH);
+ com.sun.electric.tool.simulation.test.BitVector bv = reportChain.getOutBits(REPORT_CHAIN+"."+TOK_FIFO_PATH);
int sz = bv.getNumBits();
MarinaTest.fatal(sz!=3, "wrong token FIFO size: "+sz+" expected: 3");
// get the token predecessor wire
- BitVector pred = reportChain.getOutBits(REPORT_CHAIN+"."+TOK_PRED_PATH);
+ com.sun.electric.tool.simulation.test.BitVector pred = reportChain.getOutBits(REPORT_CHAIN+"."+TOK_PRED_PATH);
sz = pred.getNumBits();
MarinaTest.fatal(sz!=1, "wrong token predecessor size: "+sz+" expected: 1");
+++ /dev/null
-package edu.berkeley.fleet.marina;
-import edu.berkeley.fleet.api.*;
-import edu.berkeley.fleet.two.*;
-import edu.berkeley.fleet.*;
-import java.util.*;
-
-public class MarinaFleet extends FleetTwoFleet {
-
- MarinaShip fakeShip = new MarinaShip(this);
- MarinaDock onlyDock = new MarinaDock(fakeShip, true);
-
- public MarinaFleet() {
- // use "internal encoding"
- super(true);
- }
-
- public BitVector encodeInstruction(Dock dispatchFrom, Instruction instruction) {
- return encodeInstruction(instruction, dispatchFrom);
- }
-
- public Iterator<Ship> iterator() {
- HashSet hs = new HashSet<Ship>();
- hs.add(fakeShip);
- return hs.iterator();
- }
-
- public Ship getShip(String type, int ordinal) {
- throw new RuntimeException("not implemented");
- }
-
- public FleetProcess run(Instruction[] instructions) {
- throw new RuntimeException("not implemented");
- }
-
- public BitVector getDestAddr(Path path) {
- if (path==null) return new BitVector(0);
- return ((MarinaPath)path).bv;
- }
-
- public Dock getOnlyDock() {
- return onlyDock;
- }
-}