*/
public class InstructionStopper extends ProperStopper {
- public InstructionStopper(String propInst,
+ public InstructionStopper(String name,
+ String propInst,
String controlChain, String dataChain,
String reportChain,
ChainControls cc, ChipModel model,
boolean clockHack,
Indenter indenter) {
- super(propInst, controlChain, dataChain, reportChain, cc, model, clockHack, indenter);
+ super(name, propInst, controlChain, dataChain, reportChain, cc, model, clockHack, indenter);
}
/** put one Instruction into InstructionStopper */
this.cc = cc;
this.model = model;
this.indenter = indenter;
- data = new ProperStopper("northFif@1.fillDrai@1.properSt@1",
+ data = new ProperStopper("north fifo",
+ "northFif@1.fillDrai@1.properSt@1",
CONTROL_CHAIN,
DATA_CHAIN,
REPORT_CHAIN,
cc, model, clockHack, indenter);
- instrIn = new InstructionStopper("southFif@1.tapPropS@1.properSt@1",
+ instrIn = new InstructionStopper("south fifo",
+ "southFif@1.tapPropS@1.properSt@1",
CONTROL_CHAIN,
DATA_CHAIN,
REPORT_CHAIN,
vm.setNodeState("outputDo@0.outM1Pre@0.litDandP@0.latch2in@0.hi2inLat@0.latchKee@0.out_B_", 0); // C
// possible C-flag inputs
- vm.setNodeState("southFif@1.tapPropS@1.tapStage@2.addr1in6@0.ain["+(INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ONE+1)+"]", 0);
- vm.setNodeState("southFif@1.tapPropS@1.tapStage@2.addr1in6@0.ain["+(INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ZERO+1)+"]", 0);
+ vm.setNodeState("northFif@1.upDown8w@2.weakStag@22.ain["+(INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ONE+1)+"]", 0);
+ vm.setNodeState("northFif@1.upDown8w@2.weakStag@22.ain["+(INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ZERO+1)+"]", 0);
// force the OLC to zero
for(int i=1; i<=6; i++)
// pulse ilc[load] and olc[load]
vm.setNodeState("outputDo@0.outM1Pre@0.outDockP@0.outDockC@0.ilcMoveO@0.ilc@0.ilc_load_", 1);
vm.setNodeState("outputDo@0.outM1Pre@0.outDockP@0.outDockC@0.olcWcont@0.olc@0.olc_load_", 1);
- vm.setNodeState("southFif@1.tapPropS@1.tapStage@2.addr1in6@0.fire", 1);
+ vm.setNodeState("northFif@1.upDown8w@2.weakStag@22.addr1in2@0.fire", 1);
model.waitNS(1000);
vm.setNodeState("outputDo@0.outM1Pre@0.outDockP@0.outDockC@0.ilcMoveO@0.ilc@0.ilc_load_", 0);
vm.setNodeState("outputDo@0.outM1Pre@0.outDockP@0.outDockC@0.olcWcont@0.olc@0.olc_load_", 0);
- vm.setNodeState("southFif@1.tapPropS@1.tapStage@2.addr1in6@0.fire", 0);
+ vm.setNodeState("northFif@1.upDown8w@2.weakStag@22.addr1in2@0.fire", 0);
model.waitNS(1000);
vm.setNodeState("sid[9]", 1);
// which will then leak into the flags and from there the
// predicate.
vm.releaseNode("outputDo@0.outM1Pre@0.litDandP@0.latch2in@0.hi2inLat@0.latchKee@0.out_B_");
- vm.releaseNode("southFif@1.tapPropS@1.tapStage@2.addr1in6@0.ain["+(INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ONE+1)+"]");
- vm.releaseNode("southFif@1.tapPropS@1.tapStage@2.addr1in6@0.ain["+(INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ZERO+1)+"]");
- vm.releaseNode("southFif@1.tapPropS@1.tapStage@2.addr1in6@0.fire");
+ vm.releaseNode("northFif@1.upDown8w@2.weakStag@22.ain["+(INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ONE+1)+"]");
+ vm.releaseNode("northFif@1.upDown8w@2.weakStag@22.ain["+(INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ZERO+1)+"]");
+ vm.releaseNode("northFif@1.upDown8w@2.weakStag@22.addr1in2@0.fire");
vm.releaseNode("outputDo@0.outM1Pre@0.outDockP@0.outDockC@0.ilcMoveO@0.ilc@0.ilc_load_");
for(int i=1; i<=8; i++) {
}
if (cmdArgs.testChains) {
+ prln("Testing control chain...");
ctC.testOneChain(Marina.CONTROL_CHAIN, Infrastructure.SEVERITY_WARNING);
}
ccC.resetInBits();
ccC.shift(Marina.CONTROL_CHAIN, false, true);
if (cmdArgs.testChains) {
+ prln("Testing data chain...");
ctD.testOneChain(Marina.DATA_CHAIN, Infrastructure.SEVERITY_WARNING);
//ccD.resetInBits();
//ccD.shift(Marina.DATA_CHAIN, false, true);
-
+
+ prln("Testing report chain...");
ctR.testOneChain(Marina.REPORT_CHAIN, Infrastructure.SEVERITY_WARNING);
//ccR.resetInBits();
//ccR.shift(Marina.REPORT_CHAIN, false, true);
marina = new Marina(ccs, model, !cmdArgs.jtagShift, indenter);
- //System.out.println("launching");
- //ChainG.createAndShowGUI(marina.cc.getChainControlFromPath(Marina.REPORT_CHAIN));
- //System.out.println(" launched.");
-
doOneTest(cmdArgs.testNum);
((SimulationModel)model).finish();
prln("Attempting send data with a="+flag_a+", b="+flag_b+", predicate="+predicate);
adjustIndent(2);
marina.instrIn.fill(new Instruction.Move(dock,
- predicate, /* predicate */
- false, /* torpedoable */
- null, /* path */
- false, /* tokenIn */
- false, /* dataIn */
- false, /* latchData */
- false, /* latchPath */
- true, /* dataOut */
- false /* tokenOut */
+ predicate, // predicate
+ false, // torpedoable
+ null, // path
+ false, // tokenIn
+ false, // dataIn
+ false, // latchData
+ false, // latchPath
+ true, // dataOut
+ false // tokenOut
));
adjustIndent(-2);
dItems = marina.data.drainMany();
marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, inIlc));
Ilc ilc = marina.getILC();
int outIlc = ilc.getCount();
- fatal(outIlc!=inIlc, "bad ILC count: "+outIlc+" expected: "+outIlc);
+ fatal(outIlc!=inIlc, "bad ILC count: "+outIlc+" expected: "+inIlc);
fatal(ilc.getInfinity(), "bad Infinity bit: true");
}
prln("Now test the infinity bit");
adjustIndent(-2);
prln("End flipOlcBit");
}
- private void testSouthRecirculate(Marina marina) {
- prln("Begin testSouthRecirculate");
+ private void testSouthRecirculate(Marina marina, int AMOUNT) {
+ prln("Begin testSouthRecirculate("+AMOUNT+")");
adjustIndent(2);
- int AMOUNT = Marina.SOUTH_RING_CAPACITY-1;
-
marina.enableInstructionSend(false);
marina.enableInstructionRecirculate(true);
for (int i=0; i<5; i++) {}
adjustIndent(-2);
- prln("End testSouthRecirculate");
+ prln("End testSouthRecirculate("+AMOUNT+")");
}
private void doOneTest(int testNum) {
prln("");
case 0: {
// these tests run fairly quickly
+
doOneTest(1);
doOneTest(2);
doOneTest(4);
doOneTest(5);
+ doOneTest(6);
+
doOneTest(1001);
doOneTest(1003);
doOneTest(3000);
doOneTest(3004);
doOneTest(3009);
doOneTest(3010);
+
doOneTest(3011);
doOneTest(3012);
doOneTest(3013);
+
doOneTest(3014);
doOneTest(3015);
doOneTest(3019);
doOneTest(3020);
+ doOneTest(3022);
doOneTest(3023);
// these tests take a while and usually pass
case 4: getCtrsFlags(marina); break; // 20-Apr (+verilog)
case 5: walkOneOLC(marina); break; // 21-Apr (+verilog)
+ case 6: testSouthRecirculate(marina, 1); break; // passes, 24-Mar (+verilog)
// Russell's tests begin with 1000
case 1000: walkOneILC(marina); break; // 20-Apr (+verilog)
case 1004: flipIlcBit(marina); break; // 20-Apr (+verilog)
case 1005: flipOlcBit(marina); break; // 21-Apr (+verilog)
- case 1006: testSouthRecirculate(marina); break; // passes, 24-Mar (+verilog)
-
+ case 1006: testSouthRecirculate(marina, Marina.SOUTH_RING_CAPACITY-1); break; // passes, 24-Mar (+verilog)
+
// Adam's tests begin with 3000
case 3000: sendToken(marina); break; // passes, 24-Mar (+verilog)
case 3001: testFlagAB(marina); break; // passes, 08-Apr (+verilog)
case 3020: setIlcFromDataLatch(marina); break; // 23-Apr (+verilog)
case 3021: recvPath(marina); break; // 22-Apr (+verilog)
case 3022: testILC(marina); break; // 23-Apr (+verilog)
- case 3023: testTorpedoOnAnInfinite(marina); break;
+ case 3023: testTorpedoOnAnInfinite(marina); break; // 23-Apr (+verilog)
case 3024: testRecvAndSendWalkingOne(marina); break; // 21-Apr (+verilog)
case 3025: testOlcDecrementAtHighSpeed(marina); break; // 23-Apr (+verilog)
}
/** construct a ProperStopper */
- public ProperStopper(String propInst,
+ public ProperStopper(String name,
+ String propInst,
String controlChain, String dataChain,
String reportChain,
ChainControls cc, ChipModel model,
boolean clockHack,
Indenter indenter) {
- this.name = propInst;
+ this.name = name;
this.controlChain = controlChain;
this.controlPath = controlChain+'.'+propInst;
this.dataChain = dataChain;
if (myState==StateWireState.EMPTY || cnt>=maxNbItems) break;
- if (traceDrain) prln("drainMany: reading word number: "+cnt++);
-
+ cnt++;
+ if (maxNbItems>1)
+ indenter.pr(" drainMany: reading word number: "+cnt+
+ "/"+(maxNbItems==Integer.MAX_VALUE
+ ?"unlimited":(""+maxNbItems))+
+ "... ");
+
BitVector d = drainNoCheck();
+ if (maxNbItems>1)
+ prln(" done.");
ans.add(d);
}
- adjustIndent(-2);
prln("end drainMany, got "+ans.size()+" items");
+ adjustIndent(-2);
return ans;
}
Predicate.FlagB, Predicate.NotFlagB,
Predicate.FlagC, Predicate.NotFlagC })
if (predicates.contains(p)) {
- if (!empty) ret.append("| ");
+ if (!empty) ret.append("|");
ret.append(p);
empty = false;
}