update ProperStopper class to work with newest (6-scan-bit) proper stopper
authorAdam Megacz <adam.megacz@sun.com>
Fri, 6 Mar 2009 03:21:21 +0000 (03:21 +0000)
committerAdam Megacz <adam.megacz@sun.com>
Fri, 6 Mar 2009 03:21:21 +0000 (03:21 +0000)
testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java
testCode/com/sun/vlsi/chips/marina/test/MarinaUtils.java
testCode/com/sun/vlsi/chips/marina/test/ProperStopper.java

index b7d0e6e..320ef71 100644 (file)
@@ -247,7 +247,7 @@ public class MarinaTest {
         ctD.testAllChains("marina", Infrastructure.SEVERITY_WARNING);
         ctR.testAllChains("marina", Infrastructure.SEVERITY_WARNING);
         ctC.testAllChains("marina", Infrastructure.SEVERITY_WARNING);
-        
+
         ccs.addChain(Marina.DATA_CHAIN, ccD);
         ccs.addChain(Marina.REPORT_CHAIN, ccR);
         ccs.addChain(Marina.CONTROL_CHAIN, ccC);
@@ -435,12 +435,15 @@ public class MarinaTest {
         for(ProperStopper ps : new ProperStopper[] { marina.data, marina.instrIn }) {
             prln("testing " + (ps == marina.data ? "data" : "instruction") + " stopper");
             adjustIndent(2);
-            prln("getting status");
-            fatal( !ps.getStopped(), "stopper should have been stopped, but was not");
+
             prln("un-stopping stopper");
             ps.run();
-            prln("getting status");
             fatal( ps.getStopped(), "stopper should not have been stopped, but was");
+
+            prln("stopping stopper");
+            ps.stop();
+            fatal( !ps.getStopped(), "stopper should have been stopped, but was not");
+
             adjustIndent(-2);
         }
 
index d0acdce..6d632c5 100644 (file)
@@ -22,16 +22,16 @@ public class MarinaUtils {
         *  The old bit order for Infinity was: Fill, Block, Clear, Silent, Go
          */
     public static enum RingIfc {
-        RUN        ("00100"),
-        IDLE       ("10000"),
-        FILL       ("11000"),
-        BLOCK      ("10100"),
-        STOP       ("00000"),
-        CLEAR      ("10001"),
-        SOURCE     ("01100"),
-        STOPSOURCE ("01000"),
-        SINK       ("00110"),
-        STOPSINK   ("00010");
+        RUN        ("000100"),
+        IDLE       ("100000"),
+        FILL       ("101000"),
+        BLOCK      ("100100"),
+        STOP       ("000000"),
+        CLEAR      ("100010"),
+        SOURCE     ("001100"),
+        STOPSOURCE ("001000"),
+        SINK       ("000101"),
+        STOPSINK   ("000001");
         private BitVector scanBits;
         RingIfc(String bits) {scanBits = new BitVector(bits,"RingIfc");}
         public BitVector bits() {return scanBits;}
index 80d32df..032000a 100644 (file)
@@ -90,7 +90,7 @@ public class ProperStopper {
     }
     // The first 5 bits of the control chain control the fill and drain stages
     private void setFillDrainControl(BitVector fdCtl) {
-       fatal(fdCtl.getNumBits()!=5, "expect 5 proper stopper control bits");
+       fatal(fdCtl.getNumBits()!=6, "expect 6 proper stopper control bits");
        BitVector val = cc.getInBits(controlPath);
        for (int i=0; i<fdCtl.getNumBits(); i++) {
                val.set(i, fdCtl.get(i));