From: rkao Date: Wed, 19 Nov 2008 15:45:12 +0000 (+0000) Subject: update software to match new inner loop counter scan chain bits X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9eed55ee2334ba9e8460d61417d030d8fca9ebb5;p=fleet.git update software to match new inner loop counter scan chain bits --- diff --git a/testCode/com/sun/vlsi/chips/marina/test/Marina.java b/testCode/com/sun/vlsi/chips/marina/test/Marina.java index 156ed68..a0163cb 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/Marina.java +++ b/testCode/com/sun/vlsi/chips/marina/test/Marina.java @@ -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); diff --git a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java index 2f17ff7..99f95e8 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -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);