* Tests for Marina
*/
public class MarinaTest {
+ public static final MarinaFleet marinaFleet = new MarinaFleet();
+ public static final Dock dock = marinaFleet.getOnlyInputDock();
+
//-------------------------- constants -----------------------------------
private static final String SCAN_CHAIN_XML = "marina.xml";
private static final String NET_LIST = "marina.spi";
public static final int INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ONE = 13;
public static final int INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ZERO = 0;
- public static final Dock DOCK = InstructionStopper.DOCK;
public static final Instruction.Set.FlagFunction CLEAR_FLAG
= Instruction.Set.FlagFunction.ZERO;
public static final Instruction.Set.FlagFunction SET_FLAG
prln("send token");
marina.instrIn.fill(
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
prln("ILC=1");
marina.instrIn.fill(
- new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
+ new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
//getCtrsFlags(marina);
prln("send data");
marina.instrIn.fill(
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
prln("ILC=\\infty");
marina.instrIn.fill(
- new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.Infinity));
+ new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.Infinity));
getCtrsFlags(marina);
private void setOLC(Marina marina, int olc) {
// ugly hack, to be removed when we fix the zero-detect circuit
for(int i=0; i<2; i++) {
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, olc));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, olc));
}
}
setOLC(marina, olc);
prln("Inserting ["+(predicate_olc_nonzero?"olc!=0":"olc==0")+"] send data");
- marina.instrIn.fill(new Instruction.Move(DOCK,
+ marina.instrIn.fill(new Instruction.Move(dock,
predicate_olc_nonzero /* predicate */
? only_if_olc_nonzero
: only_if_olc_zero
for(boolean flag_a : new boolean[] { false, true }) {
for(boolean flag_b : new boolean[] { false, true }) {
prln("Setting flags, a="+flag_a+" b="+flag_b);
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,
flag_a
? Instruction.Set.FlagFunction.ONE
: Instruction.Set.FlagFunction.ZERO,
prln("Attempting send data with a="+flag_a+", b="+flag_b+", predicate="+predicate.getClass().getName());
adjustIndent(2);
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
- marina.instrIn.fill(new Instruction.Move(DOCK,
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
+ marina.instrIn.fill(new Instruction.Move(dock,
predicate, /* predicate */
false, /* torpedoable */
null, /* path */
int inOlc = 0x20 >> i;
prln("Set inOlc="+inOlc);
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, inOlc));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, inOlc));
int outOlc = marina.getOLC();
fatal(outOlc!=inOlc, "walkOneOLC: got="+outOlc+" expected="+inOlc);
}
prln("inIlc="+inIlc);
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, inIlc));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, inIlc));
Ilc ilc = marina.getILC();
int outIlc = ilc.getCount();
}
prln("Now test the infinity bit");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, SetSource.Infinity));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, SetSource.Infinity));
Ilc ilc = marina.getILC();
fatal(!ilc.getInfinity(), "bad Infinity bit: false");
adjustIndent(-2);
prln("Set ILC=63");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, maxIlc));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, maxIlc));
int ilc = marina.getILC().getCount();
fatal(ilc!=maxIlc, "bad ILC count: "+ilc+" expected: "+maxIlc);
prln("execute a move instruction that does nothing except decrement the ILC to zero");
marina.instrIn.fill(
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
adjustIndent(2);
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, maxOlc));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, maxOlc));
for (int i=maxOlc; i>=0; i--) {
prln("OLC should be: "+i);
int olc = marina.getOLC();
fatal(olc!=i, "bad OLC: "+olc+" expected: "+i);
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, SetSource.Decrement));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, SetSource.Decrement));
}
adjustIndent(-2);
}
private static final Instruction NOP =
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
);
private static final Instruction REQUEUEING_NOP =
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
);
private static final Instruction SEND_DATA =
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
);
private static final Instruction RECV_DATA =
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
);
private static final Instruction SEND_TOKEN =
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
);
private static final Instruction RECV_TOKEN =
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
);
private static final Instruction REQUEUEING_SEND_DATA =
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
prln("Executing Set OLC="+olc_value);
setOLC(marina, olc_value);
prln("Executing Set ILC=1");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
// verify state0 "EPI->ring" and 0->1 transition
prln("Executing Send Data (requeueable); this will cause 0->1 transition and be discarded");
// verify state1 "EPI->ring"
prln("Executing Set ILC=1; this will be recirculated");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
prln("Executing Send Data; this will be recirculated");
marina.instrIn.fill(REQUEUEING_SEND_DATA);
prln("Executing Set OLC--; this will be recirculated");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.Decrement));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.Decrement));
// verify state1 "OD waits"
dataItems = marina.data.drainMany(2);
// verify 1->3 transition
prln("Executing Tail; this will cause the 2->3 transition and be discarded");
- marina.instrIn.fill(new Instruction.Tail(DOCK));
+ marina.instrIn.fill(new Instruction.Tail(dock));
// State 3 //////////////////////////////////////////////////////////////////////////////
setOLC(marina, olc_value);
prln("Executing Set ILC=1");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
// insert many non-requeueing "send data item" instructions;
// this will let us single-step the execution point by
marina.instrIn.fill(REQUEUEING_SEND_DATA);
prln("Inserting [Rq] Set OLC--; this will be recirculated");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.Decrement));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.Decrement));
// insert the tail, which will cause the 0->2 transition
prln("Inserting Tail");
- marina.instrIn.fill(new Instruction.Tail(DOCK));
+ marina.instrIn.fill(new Instruction.Tail(dock));
// State 2 //////////////////////////////////////////////////////////////////////////////
}
prln("inserting instruction: [Rq] Set ILC=1");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
prln("inserting instruction: [Rq] Send Data");
marina.instrIn.fill(REQUEUEING_SEND_DATA);
setOLC(marina, 63);
prln("inserting instruction: Set ILC=1");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
// if you uncomment this, then the NOP will be dropped and the test will pass
//prln("inserting instruction: [Rq] Nop; this will cause 0->1 transition and possibly be discarded");
marina.instrIn.fill(REQUEUEING_SEND_DATA);
prln("inserting instruction: [Rq] Set ILC=1");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
prln("inserting instruction: Tail");
- marina.instrIn.fill(new Instruction.Tail(DOCK));
+ marina.instrIn.fill(new Instruction.Tail(dock));
dataItems = marina.data.drainMany(3);
fatal(dataItems.size()<3, "Expected exactly unlimited data items to emerge but got only: "+dataItems.size());
prln((b?"Setting":"Clearing")+" flags");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,
+ Instruction.Set(dock,Predicate.IgnoreFlagD,
b ? one : zero,
b ? one : zero
));
// set A,B flags to a_state and b_state
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,
+ Instruction.Set(dock,Predicate.IgnoreFlagD,
a_state ? one : zero,
b_state ? one : zero
));
if (c_input!=null) func = func.add(c_input);
Instruction inst = new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,
+ Instruction.Set(dock,Predicate.IgnoreFlagD,
!which ? func : zero.add(Predicate.FlagA),
which ? func : zero.add(Predicate.FlagB)
);
prln("Begin recvData");
adjustIndent(2);
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
- marina.instrIn.fill(new Instruction.Move(DOCK,
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
+ marina.instrIn.fill(new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
true, /* torpedoable */
null, /* path */
false, /* dataOut */
false /* tokenOut */
));
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD, SET_FLAG, SET_FLAG));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD, SET_FLAG, SET_FLAG));
prln("checking to confirm that A flag is cleared");
fatal(marina.getFlagA(), "bad A flag: "+marina.getFlagA());
fatal(dataItems.size()!=0,
"found a data item waiting in the north proper stopper, but should not have");
- marina.instrIn.fill(new Instruction.Move(DOCK,
+ marina.instrIn.fill(new Instruction.Move(dock,
Predicate.IgnoreFlagD, // predicate
true, // torpedoable
null, // path
marina.fillNorthProperStopper(new MarinaPacket(data, false, addr));
marina.instrIn.fill(RECV_DATA);
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.DataLatch));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.DataLatch));
int olc = marina.getOLC();
fatal(olc != (1<<bit), "expected olc to be " + (1<<bit) + ", but got " + olc);
data.set(bit, true);
marina.fillNorthProperStopper(new MarinaPacket(data, false, addr));
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
marina.instrIn.fill(RECV_DATA);
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.DataLatch));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.DataLatch));
int ilc = marina.getILC().getCount();
fatal(ilc != (1<<bit), "expected ilc to be " + (1<<bit) + ", but got " + ilc);
for(long val : new long[] { -1, 0, 1, (-1L << 14) }) {
prln("inserting Set Data Latch (sign-extended) 37'b" + Long.toString(val, 1));
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,
Instruction.Set.SetDest.DataLatch,
val));
adjustIndent(2);
prln("clearing the D register");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,
Instruction.Set.SetDest.DataLatch,
0));
new edu.berkeley.fleet.api.BitVector(19);
for(int i=0; i<immediate.length(); i++)
immediate.set(i, (val & (1L << i)) != 0);
- marina.instrIn.fill(new Instruction.Shift(DOCK,Predicate.IgnoreFlagD,immediate));
+ marina.instrIn.fill(new Instruction.Shift(dock,Predicate.IgnoreFlagD,immediate));
// shift over 19 LSB's towards MSB
for(int i=0; i<19; i++)
marina.fillNorthProperStopper(new MarinaPacket(data, false, addr));
prln("clearing flags");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
prln("executing recv data with Dc="+dc);
- marina.instrIn.fill(new Instruction.Move(DOCK,
+ marina.instrIn.fill(new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
true, /* torpedoable */
null, /* path */
));
prln("copying c-flag to a-flag");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,
Instruction.Set.FlagFunction.ZERO.add(Predicate.FlagC),
CLEAR_FLAG
));
for(int i=0; i<4; i++)
bv.set(i, true);
- MarinaPath path = new MarinaPath((MarinaFleet)DOCK.getShip().getFleet(), bv);
+ MarinaPath path = new MarinaPath((MarinaFleet)dock.getShip().getFleet(), bv);
prln("send data with path="+bv);
- marina.instrIn.fill(new Instruction.Move(DOCK,
+ marina.instrIn.fill(new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
path, /* path */
fatalIfBitVectorsDoNotMatch(MarinaUtils.berkToSun(bv), mp.path.get(0,13));
prln("send data with no change to path");
- marina.instrIn.fill(new Instruction.Move(DOCK,
+ marina.instrIn.fill(new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
marina.fillNorthProperStopper(new MarinaPacket(packet_data, false, packet_path));
prln("recv path, send data (using recv'd path)");
- marina.instrIn.fill(new Instruction.Move(DOCK,
+ marina.instrIn.fill(new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
int ilc = bit<0 ? 0 : (1<<bit);
prln("set ilc="+ilc);
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,ilc));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,ilc));
prln("send data");
marina.instrIn.fill(SEND_DATA);
prln("Set OLC = 1");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 1));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 1));
int olc = marina.getOLC();
fatal(olc!=1, "bad OLC: "+olc+" expected: 1");
prln("Set A=0, B=0");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
+ Instruction.Set(dock,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
fatal(marina.getFlagA(), "bad A flag: true");
fatal(marina.getFlagB(), "bad B flag: true");
prln("Set ILC = Infinity");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, SetSource.Infinity));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, SetSource.Infinity));
prln("execute a move instruction that does nothing but loops until torpedo arrives");
marina.instrIn.fill(
- new Instruction.Move(DOCK,
+ new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
true, /* torpedoable */
null, /* path */
prln("A=1, B=1 This instruction should get torpedoed along with the Move");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.Default, SET_FLAG, SET_FLAG));
+ Instruction.Set(dock,Predicate.Default, SET_FLAG, SET_FLAG));
prln("send torpedo. This should clear the OLC");
- marina.instrIn.fill(InstructionStopper.TORPEDO);
+ marina.instrIn.fillTorpedo();
getCtrsFlags(marina);
prln("OLC = 63. Reload OLC after torpedo");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 63));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 63));
olc = marina.getOLC();
fatal(olc!=63, "bad OLC: "+olc+" expected: 63");
prln("Set A=1, B=1 This instruction should execute because OLC!=0");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.Default, SET_FLAG, SET_FLAG));
+ Instruction.Set(dock,Predicate.Default, SET_FLAG, SET_FLAG));
prln("A and B should be true");
fatal(!marina.getFlagA(), "bad A flag: false");
for(boolean torpedoable : new boolean[] { true, false }) {
prln("set ilc=\\infty");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.Infinity));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.Infinity));
prln("nop");
- marina.instrIn.fill(new Instruction.Move(DOCK,
+ marina.instrIn.fill(new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
torpedoable, /* torpedoable */
null, /* path */
fatal(dataItems.size()!=0, "Expected no data item(s) to emerge but got at least: "+dataItems.size()+" data items");
prln("send torpedo");
- marina.instrIn.fill(InstructionStopper.TORPEDO);
+ marina.instrIn.fillTorpedo();
int expected = torpedoable?1:0;
dataItems = marina.data.drainMany(2);
int decr_amount = decr_amounts[which];
prln("inserting set olc="+olc);
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,olc));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,olc));
prln("inserting set ilc=1");
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
// commenting the following four lines causes this test to pass
prln("disabling instruction send");
prln("inserting "+decr_amount+" olc-- instructions");
for(int i=0; i<decr_amount; i++)
- marina.instrIn.fill(new Instruction.Set(DOCK,Predicate.IgnoreFlagD,
+ marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,
SetDest.OuterLoopCounter,SetSource.Decrement));
prln("inserting [olc!=0] send data");
- marina.instrIn.fill(new Instruction.Move(DOCK,
+ marina.instrIn.fill(new Instruction.Move(dock,
Predicate.Default, /* predicate */
false, /* torpedoable */
null, /* path */
int notZero = 32 >> i;
prln("Set ILC=0");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 0));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 0));
prln("Then immediately set ILC="+notZero);
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, notZero));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, notZero));
prln("Verify ILC using scan chain");
Ilc ilc = marina.getILC();
prln("Set ILC="+notZero);
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, notZero));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, notZero));
prln("Then immediately set ILC=0");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 0));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 0));
prln("Verify ILC using scan chain");
ilc = marina.getILC();
prln("Set A=0, B=0");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
+ Instruction.Set(dock,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
for (int i=0; i<6; i++) {
int notZero = 32 >> i;
prln("Set OLC=0");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 0));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 0));
prln("Then immediately set OLC="+notZero);
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, notZero));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, notZero));
prln("Verify OLC count using scan chain");
int outOlc = marina.getOLC();
prln("Verify OLC zero bit using predication");
prln("if (OLC==0) {A=1; B=1;} // should not get executed");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.FlagD, SET_FLAG, SET_FLAG));
+ Instruction.Set(dock,Predicate.FlagD, SET_FLAG, SET_FLAG));
fatal(marina.getFlagA(), "bad A flag. expected: false");
prln("Set OLC="+notZero);
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, notZero));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, notZero));
prln("Then immediately set OLC=0");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 0));
+ Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 0));
prln("Verify OLC count using scan chain");
outOlc = marina.getOLC();
prln("Verify OLC zero bit using predication");
prln("if (OLC!=0) {A=1; B=1;} // should not get executed");
marina.instrIn.fill(new
- Instruction.Set(DOCK,Predicate.Default, SET_FLAG, SET_FLAG));
+ Instruction.Set(dock,Predicate.Default, SET_FLAG, SET_FLAG));
fatal(marina.getFlagA(), "bad A flag. expected: false");
}