include shiftReport in isFillStageFull()
authorrkao <rkao>
Thu, 13 Nov 2008 16:29:23 +0000 (16:29 +0000)
committerrkao <rkao>
Thu, 13 Nov 2008 16:29:23 +0000 (16:29 +0000)
testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java
testCode/com/sun/vlsi/chips/marina/test/ProperStopper.java

index f43b7d6..6a3a8b1 100644 (file)
@@ -619,7 +619,7 @@ public class MarinaTest {
        adjustIndent(2);
         int i=0;
         for(i=0; i<(UPPER_BOUND_ON_INSTRUCTION_FIFO_SIZE+1); i++) {
-            boolean jammed = (inDock.instrIn.isFillStageFull()==MarinaUtils.StateWireState.FULL);
+            boolean jammed = (inDock.instrIn.getFillStateWire()==MarinaUtils.StateWireState.FULL);
             if (jammed && expect_it_to_jam_up) {
                 prln("Stopper remained full after inserting instruction; this was expected; we are happy.");
                 adjustIndent(-2);
index 9bb764f..6649abf 100644 (file)
@@ -142,6 +142,7 @@ public class ProperStopper {
     }
     /** get value of the state wire preceding the fill stage */
     public StateWireState getPrevStateWire() {
+       shiftReport(true, false);
        BitVector b = cc.getOutBits(reportPath);
        int n = b.getNumBits(); 
        fatal(n!=4, "Bad number of Stopper report bits: "+n);
@@ -151,10 +152,12 @@ public class ProperStopper {
      * The fill wire will be interesting if we doubt that the
      * scan chain works. */
     public boolean getFillWire() {
+       shiftReport(true, false);
        return cc.getOutBits(reportPath).get(1);
     }
     /** get value of state wire between the fill and drain stages */
-    public StateWireState isFillStageFull() {
+    public StateWireState getFillStateWire() {
+       shiftReport(true, false);
        return boolToState(cc.getOutBits(reportPath).get(2));
     }
     /** get value of drain stage stopped wire */
@@ -165,8 +168,8 @@ public class ProperStopper {
        StringBuffer sb = new StringBuffer();
        sb.append("Stopper's prev state: ");
        sb.append(getPrevStateWire()+"\n");
-       sb.append("Stopper's fill stage is full: ");
-       sb.append(isFillStageFull()+"\n");
+       sb.append("Stopper's fill stage: ");
+       sb.append(getFillStateWire()+"\n");
        sb.append("Stopper's stopped: ");
        sb.append(getStopped()+"\n");
        return sb.toString();
@@ -218,8 +221,7 @@ public class ProperStopper {
        fatal(n!=(37+1+14), "fill: wrong num bits: "+n);
        
        // make sure fill stage is empty
-       shiftReport(true, false);
-       StateWireState myState = isFillStageFull();
+       StateWireState myState = getFillStateWire();
        fatal(myState!=StateWireState.EMPTY, 
                  "fill: fill stage already full");
        
@@ -271,8 +273,7 @@ public class ProperStopper {
        stop();                                 // all zero, block = 0, go = 0
        
        // make sure an item is available
-       shiftReport(true, false);
-       StateWireState myState=isFillStageFull();
+       StateWireState myState=getFillStateWire();
        fatal(myState==StateWireState.EMPTY, "drain: fill stage empty");
 
        shiftData(true, false);
@@ -304,8 +305,7 @@ public class ProperStopper {
        
        int cnt = 0;
        while (true) {
-               shiftReport(true, false);
-               StateWireState myState=isFillStageFull();
+               StateWireState myState=getFillStateWire();
 
                // debugging
                if (traceDrain) prln(getReportString());