prln("Begin testWaitForTail");
adjustIndent(2);
- prln("inserting instruction: Set OLC=5");
- marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter,1));
+ prln("inserting instruction: Set OLC=63");
+ marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter,63));
prln("inserting instruction: [Rq] Nop; this will cause 0->1 transition and possibly be discarded");
marina.instrIn.fill(REQUEUEING_NOP);
prln("End testWaitForTail");
}
+ private void testRequeueStageDrop(Marina marina) {
+ List<BitVector> dataItems;
+
+ prln("Begin testRequeueStageDrop");
+ adjustIndent(2);
+
+ prln("inserting instruction: Set OLC=63");
+ marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter,63));
+
+ prln("inserting instruction: Set ILC=1");
+ marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,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_NOP);
+ */
+
+ prln("inserting instruction: [Rq] Send Data; this will cause 0->1 transition and be discarded");
+ marina.instrIn.fill(REQUEUEING_SEND_DATA);
+
+ prln("inserting instruction: [Rq] Set ILC=1");
+ marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter,1));
+
+ prln("inserting instruction: Tail");
+ 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());
+
+ adjustIndent(-2);
+ prln("End testRequeueStageDrop");
+ }
+
private void testFlagAB(Marina marina) {
prln("Begin testFlagAB");
case 3006: sendData(marina); break;
case 3007: testRequeueStage0to1to3to0(marina); break;
case 3008: testWaitForTail(marina); break;
+ case 3009: testRequeueStageDrop(marina); break;
default:
fatal(true, "Test number: "+testNum+" doesn't exist.");