new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
SEND_DATA,
});
- dataItems = marina.data.drainMany(1);
- fatal(dataItems.size()!=0, "Expected exactly no data items to emerge but got at least: "+dataItems.size());
- marina.instrIn.fill(new Instruction.Tail(dock));
- BitVector bv = marina.data.drain();
- fatal(bv==null, "Expected at least one data item to emerge but got none");
+ expectNorthFifoExactly(0);
+ marina.instrIn.fill(new Instruction.Tail(dock));
+ expectNorthFifoAtLeast(1);
adjustIndent(-2);
prln("End testHeadWaitsForTail");
prln("End testTorpedoOnAnInfinite");
}
+ private void testDFlagWhenTorpedoLyingInWait(Marina marina) {
+ marina.fillSouthProperStopper(new Instruction[] {
+ RECV_DATA,
+ TORPEDOABLE_RECV_DATA,
+ marina.kesselsCounter ? null : FLAG_NOP,
+ SEND_DATA_IF_D_SET,
+ });
+ marina.instrIn.fillTorpedo();
+ model.waitNS(64 * CYCLE_TIME_NS);
+ marina.fillNorthProperStopper();
+ model.waitNS(64 * CYCLE_TIME_NS);
+ expectNorthFifoExactly(1);
+ }
+
+ private void testSetOlcFollowedByDPredicated(Marina marina) {
+ for(boolean d_set : new boolean[] { false, true }) {
+ prln("");
+ marina.fillSouthProperStopper(new Instruction[] {
+ setOlc(0),
+ marina.kesselsCounter ? null : FLAG_NOP,
+ d_set ? SEND_DATA_IF_D_SET : SEND_DATA_IF_D_NOT_SET,
+ });
+ expectNorthFifoExactly(d_set ? 1 : 0);
+
+ prln("");
+ marina.fillSouthProperStopper(new Instruction[] {
+ setOlc(32),
+ marina.kesselsCounter ? null : FLAG_NOP,
+ d_set ? SEND_DATA_IF_D_SET : SEND_DATA_IF_D_NOT_SET,
+ });
+ expectNorthFifoExactly(d_set ? 0 : 1);
+
+ if (marina.kesselsCounter) {
+ marina.masterClear();
+ marina.enableInstructionSend(true);
+ }
+ }
+ }
+
private void testOlcDecrementAtHighSpeed(Marina marina) {
prln("Begin testOlcDecrementAtHighSpeed");
adjustIndent(2);