prln("Begin sendToken");
adjustIndent(2);
- prln("ILC=1");
- marina.instrIn.fill(
- new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1));
-
getCtrsFlags(marina);
prln("send token");
adjustIndent(2);
for (int i=0; i<7; i++) {
int inOlc = 0x20 >> i;
- prln("inOlc="+inOlc);
+ prln("Set inOlc="+inOlc);
marina.instrIn.fill(new
Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter, inOlc));
int outOlc = marina.getOLC();
boolean inZero = inIlc==0;
boolean outZero = ilc.getZero();
fatal(outZero!=inZero, "bad ILC zero: "+outZero);
+ fatal(ilc.getInfinity(), "bad Infinity bit: true");
}
+ prln("Now test the infinity bit");
+ marina.instrIn.fill(new
+ Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, SetSource.Infinity));
+ Ilc ilc = marina.getILC();
+ fatal(!ilc.getInfinity(), "bad Infinity bit: false");
adjustIndent(-2);
prln("End walkOneILC");
}
prln("Begin sendTorpedo");
adjustIndent(2);
- prln("OLC = 63");
+ prln("Set OLC = 1");
marina.instrIn.fill(new
- Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter, 63));
+ Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter, 1));
int olc = marina.getOLC();
- fatal(olc!=63, "bad OLC: "+olc+" expected: 63");
+ fatal(olc!=1, "bad OLC: "+olc+" expected: 1");
- prln("A=0, B=0");
+ prln("Set A=0, B=0");
marina.instrIn.fill(new
Instruction.Set(DOCK,false,Predicate.IgnoreOLC, CLEAR_FLAG, CLEAR_FLAG));
fatal(marina.getFlagA(), "bad A flag: true");
fatal(marina.getFlagB(), "bad B flag: true");
- prln("ILC = Infinity");
+ prln("Set ILC = Infinity");
marina.instrIn.fill(new
Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, SetSource.Infinity));
false /* tokenOut */
));
- prln("NOP This instruction can't predicate on OLC because of a hardware bug");
- marina.instrIn.fill(new
- Instruction.Set(DOCK,false,Predicate.Default, A_FLAG, B_FLAG));
-
prln("A=1, B=1 This instruction should get torpedoed along with the Move");
marina.instrIn.fill(new
Instruction.Set(DOCK,false,Predicate.Default, SET_FLAG, SET_FLAG));
getCtrsFlags(marina);
+ // Note: It's tempting to test that OLC==0 here. However, hardware doesn't
+ // actually set counter bits to zero; it just sets the OLCZERO bit
+
prln("A and B should remain false");
fatal(marina.getFlagA(), "bad A flag: true");
fatal(marina.getFlagB(), "bad B flag: true");
olc = marina.getOLC();
fatal(olc!=63, "bad OLC: "+olc+" expected: 63");
- prln("A=1, B=1 This instruction should execute because OLC!=0");
+ prln("Set A=1, B=1 This instruction should execute because OLC!=0");
marina.instrIn.fill(new
Instruction.Set(DOCK,false,Predicate.Default, SET_FLAG, SET_FLAG));