// 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
}
/** 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);
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;
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);
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);
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
// 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);