working on testSouthRecirculate
authorrkao <rkao>
Sun, 23 Nov 2008 22:41:07 +0000 (22:41 +0000)
committerrkao <rkao>
Sun, 23 Nov 2008 22:41:07 +0000 (22:41 +0000)
testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java

index eeb93d4..86bce12 100644 (file)
@@ -1560,15 +1560,23 @@ public class MarinaTest {
        prln("End flipOlcBit");
     }
     private void testSouthRecirculate (Marina marina) {
+       prln("Begin testSouthRecirculate");
+       adjustIndent(2);
+
        marina.enableInstructionSend(false);
        marina.enableInstructionRecirculate(true);
        
-       // test capacity
+       prln("Completely fill south ring");
        for (int i=0; i<Marina.SOUTH_RING_CAPACITY; i++) {
                BitVector instr = new BitVector(36, "Instr"+i);
                instr.setFromLong(i);
                marina.instrIn.fill(instr);
+               // Every time we shift data ring we clear instruction counter
+               // Make sure the counter has incremented once. 
+               long iCnt = marina.getInstructionCounter();
+               fatal(iCnt!=1, "bad instruction counter: "+iCnt+" expected: 1");
        }
+       prln("Drain south ring and check contents");
        List<BitVector> out = marina.instrIn.drainMany();
        for (int i=0; i<Marina.SOUTH_RING_CAPACITY; i++) {
                int expect = (i+Marina.SOUTH_RING_CAPACITY-1) % Marina.SOUTH_RING_CAPACITY;
@@ -1578,6 +1586,8 @@ public class MarinaTest {
        
        for (int i=0; i<5; i++) {}
        
+       adjustIndent(-2);
+       prln("End testSouthRecirculate");
     }
        private void doOneTest(int testNum) {
         prln("MarinaTest: performing test: "+testNum);