false /* tokenOut */
);
+ private static final Instruction SEND_DATA =
+ new Instruction.Move(DOCK,
+ false, /* requeueing */
+ Predicate.IgnoreOLC, /* predicate */
+ false, /* torpedoable */
+ null, /* path */
+ false, /* tokenIn */
+ false, /* dataIn */
+ false, /* latchData */
+ false, /* latchPath */
+ true, /* dataOut */
+ false /* tokenOut */
+ );
+
+ private static final Instruction REQUEUEING_SEND_DATA =
+ new Instruction.Move(DOCK,
+ true, /* requeueing */
+ Predicate.IgnoreOLC, /* predicate */
+ false, /* torpedoable */
+ null, /* path */
+ false, /* tokenIn */
+ false, /* dataIn */
+ false, /* latchData */
+ false, /* latchPath */
+ true, /* dataOut */
+ false /* tokenOut */
+ );
+
private void testRequeueStage0(Marina marina) {
prln("Begin testRequeueStage0");
adjustIndent(2);
}
private void testRequeueStage0to1to3(Marina marina) {
+ List<BitVector> dataItems;
+
prln("Begin testRequeueStage0to1to3");
adjustIndent(2);
marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1));
prln("Executing Send Data (requeueable); this will cause 0->1 transition and be discarded");
- marina.instrIn.fill(new Instruction.Move(DOCK,
- false, /* requeueing */
- Predicate.IgnoreOLC, /* predicate */
- false, /* torpedoable */
- null, /* path */
- false, /* tokenIn */
- false, /* dataIn */
- false, /* latchData */
- false, /* latchPath */
- true, /* dataOut */
- false /* tokenOut */
- ));
+ marina.instrIn.fill(REQUEUEING_SEND_DATA);
prln("Executing Set ILC=1 (requeueable); this will be requeued once TAIL happens");
marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1));
prln("Executing Send Data (requeueable); this will be recirculated");
- marina.instrIn.fill(new Instruction.Move(DOCK,
- false, /* requeueing */
- Predicate.IgnoreOLC, /* predicate */
- false, /* torpedoable */
- null, /* path */
- false, /* tokenIn */
- false, /* dataIn */
- false, /* latchData */
- false, /* latchPath */
- true, /* dataOut */
- false /* tokenOut */
- ));
+ marina.instrIn.fill(SEND_DATA);
prln("Executing Set ILC=1 (requeueable); this will be recirculated");
marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1));
- List<BitVector> dataItems;
-
+ // at this point we have inserted two "move" instructions; we
+ // want to make sure that only the first one is executed
dataItems = marina.data.drainMany(2);
fatal(dataItems.size()!=1, "Expected exactly one data item to emerge but got: "+dataItems.size()+" data items");
- // now we should be in state 1
- prln("Executing Tail");
+ // by now we should be in state 1; we insert another
+ // REQUEUEING_SEND_DATA in order to be sure that the epi fifo
+ // is still accepting input
+ prln("Executing Send Data (requeueable); this will be recirculated");
+ marina.instrIn.fill(REQUEUEING_SEND_DATA);
+
+ prln("Executing Set ILC=1 (requeueable); this will be recirculated");
+ marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1));
+
+ prln("Executing Tail; this will cause the 2->3 transition and be discarded");
marina.instrIn.fill(new Instruction.Tail(DOCK));
// now we should be in state 3