update software to match new inner loop counter scan chain bits
authorrkao <rkao>
Wed, 19 Nov 2008 15:45:12 +0000 (15:45 +0000)
committerrkao <rkao>
Wed, 19 Nov 2008 15:45:12 +0000 (15:45 +0000)
testCode/com/sun/vlsi/chips/marina/test/Marina.java
testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java

index 156ed68..a0163cb 100644 (file)
@@ -38,6 +38,34 @@ public class Marina {
     // C flag non existent in new design
        private static final int C_FLAG_NDX = MarinaTest.NEW ? 0 : 0; 
        
+       // ILC appears in scan chain as "count[1:6], zLo, i, dLo"
+       public class Ilc {
+               // value is bit reversed and complemented
+               private int value;
+               private Ilc() {
+               shiftReport(true, false);
+               value = (int) cc.getOutBits(REPORT_CHAIN+"."+ILC_PATH).bitReverse().not().toLong();
+               }
+           /** Get the inner loop counter done bit. */
+           public boolean getDone() {
+                       return (value & 0x100) != 0;
+           }
+           /** Get the inner loop counter infinity bit */
+               public boolean getInfinity() {
+                       return (value & 0x80) != 1;
+               }
+           /** Get the inner loop counter zero bit. If the zero bit is true
+            * then the hardware considers the inner loop counter to be zero
+            * regardless of the state of the count bits */
+               public boolean getZero() {
+                       return (value & 0x40) != 0;
+               }
+               /** Get the 6 bits of count of the inner loop counter */
+               public int getCount() {
+                       return value & 0x3f;
+               }
+       }
+       
        private final Indenter indenter;
 
        // The name of the scan chain
@@ -121,28 +149,9 @@ public class Marina {
     }
     /** Get the 7 bit inner loop counter. The MSB is the zero bit.
      * The low order 6 bits are the count */
-    public int getILC() {
-       shiftReport(true, false);
-       return (int) cc.getOutBits(REPORT_CHAIN+"."+ILC_PATH).bitReverse().not().toLong();
-    }
-    /** Get the inner loop counter done bit. */
-    public boolean getIlcDone() {
-               return (getILC() & 0x100) != 0;
+    public Ilc getILC() {
+       return new Ilc();
     }
-    /** Get the inner loop counter "I" bit */
-       public boolean getIlcI() {
-               return (getILC() & 0x80) != 1;
-       }
-    /** Get the inner loop counter zero bit. If the zero bit is true
-     * then the hardware considers the inner loop counter to be zero
-     * regardless of the state of the count bits */
-       public boolean getIlcZero() {
-               return (getILC() & 0x40) != 0;
-       }
-       /** Get the 6 bits of count of the inner loop counter */
-       public int getIlcCount() {
-               return getILC() & 0x3f;
-       }
        /** Get the A flag */
     public boolean getFlagA() {
        shiftReport(true, false);
index 2f17ff7..99f95e8 100644 (file)
@@ -18,6 +18,7 @@ import com.sun.async.test.Pst3202Channel;
 import com.sun.async.test.SiliconChip;
 import com.sun.async.test.SimulationModel;
 import com.sun.async.test.VoltageReadable;
+import com.sun.vlsi.chips.marina.test.Marina.Ilc;
 import com.sun.vlsi.chips.marina.test.MarinaUtils.CmdArgs;
 import com.sun.vlsi.chips.marina.test.MarinaUtils.Station;
 import com.sun.vlsi.chips.marina.test.MarinaUtils.CmdArgs.Mode;
@@ -570,8 +571,11 @@ public class MarinaTest {
         int olc = marina.getOLC();
         prln("OLC=="+olc);
         
-       prln("ILC.zero=="+marina.getIlcZero()+
-                " ILC.count=="+marina.getIlcCount());
+        Ilc ilc = marina.getILC();
+       prln("ILC.done=="+ilc.getDone()+
+                " ILC.infinity=="+ilc.getInfinity()+
+                " ILC.zero=="+ilc.getZero()+
+                " ILC.count=="+ilc.getCount());
        
        boolean a = marina.getFlagA();
        prln("flagA=="+a);
@@ -610,11 +614,12 @@ public class MarinaTest {
                        marina.instrIn.fill(new 
                        Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, inIlc));
 
-               int outIlc = marina.getIlcCount();
+                       Ilc ilc = marina.getILC();
+               int outIlc = ilc.getCount();
                fatal(outIlc!=inIlc, "bad ILC count: "+outIlc+" expected: "+outIlc);
                
                boolean inZero = inIlc==0;
-               boolean outZero = marina.getIlcZero();
+               boolean outZero = ilc.getZero();
                fatal(outZero!=inZero, "bad ILC zero: "+outZero);
        }
        adjustIndent(-2);
@@ -628,7 +633,7 @@ public class MarinaTest {
                marina.instrIn.fill(new 
                        Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, maxIlc));
 
-               int ilc = marina.getIlcCount();
+               int ilc = marina.getILC().getCount();
                fatal(ilc!=maxIlc, "bad ILC count: "+ilc+" expected: "+maxIlc);
                
                // execute a move instruction that does nothing except decrement the ILC to zero
@@ -649,7 +654,7 @@ public class MarinaTest {
                // wait for ILC to count from 63 to 0
         model.waitNS(64 * CYCLE_TIME_NS);
 
-               ilc = marina.getIlcCount();
+               ilc = marina.getILC().getCount();
                fatal(ilc!=0, "bad ILC count: "+ilc+" expected: "+0);
        
        adjustIndent(-2);