prln("Begin testRequeueStageDrop");
adjustIndent(2);
+ // We have decided that this issue will not be fixed in
+ // Marina. Therefore, the test is commented out.
+
+ /*
prln("inserting instruction: Set OLC=63");
setOLC(marina, 63);
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] 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);
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");
adjustIndent(-2);
prln("End testFlagAB");
}
+
+
+ private void recvData(Marina marina) {
+ prln("Begin recvData");
+ adjustIndent(2);
+
+ marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC, CLEAR_FLAG, CLEAR_FLAG));
+ marina.instrIn.fill(new Instruction.Move(DOCK,
+ false, /* requeueing */
+ Predicate.IgnoreOLC, /* predicate */
+ true, /* torpedoable */
+ null, /* path */
+ false, /* tokenIn */
+ true, /* dataIn */
+ false, /* latchData */
+ false, /* latchPath */
+ false, /* dataOut */
+ false /* tokenOut */
+ ));
+ marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC, SET_FLAG, SET_FLAG));
+
+ prln("checking to confirm that A flag is cleared");
+ fatal(marina.getFlagA(), "bad A flag: "+marina.getFlagA());
+
+ prln("inserting data item in north fifo ring");
+ BitVector data = new BitVector(37, "empty");
+ BitVector addr = new BitVector(14, "empty");
+ for(int i=0; i<data.getNumBits(); i++) data.set(i, false);
+ for(int i=0; i<addr.getNumBits(); i++) addr.set(i, false);
+ marina.fillNorthProperStopper(data, false, addr);
+
+ prln("checking to see if A flag got set");
+ fatal(!marina.getFlagA(), "bad A flag: "+marina.getFlagA());
+
+ adjustIndent(-2);
+ prln("End recvData");
+ }
+
+ private void testFlagC(Marina marina) {
+ prln("Begin testFlagC");
+ adjustIndent(2);
+
+ // addr[0] == sigS
+ // addr[13] == sigA
+
+ for(boolean dc : new boolean[] { false, true }) {
+ for(boolean c_flag : new boolean[] { true, false, true }) {
+
+ prln("****** checking case where dc="+dc+", cflag="+c_flag);
+ BitVector data = new BitVector(37, "empty");
+ BitVector addr = new BitVector(14, "empty");
+ for(int i=0; i<data.getNumBits(); i++) data.set(i, false);
+ for(int i=0; i<addr.getNumBits(); i++) addr.set(i, false);
+
+ int whichbit = dc ? 0 : 13;
+ prln("setting addr["+whichbit+"] to "+(c_flag?"1":"0"));
+ addr.set(whichbit, c_flag);
+
+ prln("... and filling north fifo proper stopper");
+ marina.fillNorthProperStopper(data, false, addr);
+
+ prln("clearing flags");
+ marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC, CLEAR_FLAG, CLEAR_FLAG));
+
+ prln("executing recv data with Dc="+dc);
+ marina.instrIn.fill(new Instruction.Move(DOCK,
+ false, /* requeueing */
+ Predicate.IgnoreOLC, /* predicate */
+ true, /* torpedoable */
+ null, /* path */
+ false, /* tokenIn */
+ true, /* dataIn */
+ dc, /* latchData */
+ false, /* latchPath */
+ false, /* dataOut */
+ false /* tokenOut */
+ ));
+
+ prln("copying c-flag to a-flag");
+ marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,
+ Instruction.Set.FlagFunction.ZERO.add(Predicate.FlagC),
+ CLEAR_FLAG
+ ));
+
+ prln("checking to confirm that A flag is " + c_flag);
+ fatal(marina.getFlagA()!=c_flag, "bad A flag: "+marina.getFlagA());
+ }
+
+ }
+ adjustIndent(-2);
+ prln("End testFlagC");
+ }
+
private void sendTorpedo(Marina marina) {
prln("Begin sendTorpedo");
adjustIndent(2);
case 3008: testWaitForTail(marina); break;
case 3009: testRequeueStageDrop(marina); break;
case 3010: testRequeueStage0to2to3to0(marina); break;
+ case 3011: recvData(marina); break;
+ case 3012: testFlagC(marina); break;
default:
fatal(true, "Test number: "+testNum+" doesn't exist.");