add test 3009
authorAdam Megacz <adam.megacz@sun.com>
Tue, 18 Nov 2008 22:48:34 +0000 (22:48 +0000)
committerAdam Megacz <adam.megacz@sun.com>
Tue, 18 Nov 2008 22:48:34 +0000 (22:48 +0000)
testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java

index 52f0222..e53672d 100644 (file)
@@ -851,8 +851,8 @@ public class MarinaTest {
         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);
@@ -878,6 +878,40 @@ public class MarinaTest {
         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");
@@ -1017,6 +1051,7 @@ public class MarinaTest {
                 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.");