"southFif@0.tapPropS@0.tapStage@1";
private static final String TOK_FIFO_PATH = "tokenFIF@0";
private static final String TOK_PRED_PATH = "dataPath@0.ringSkip@0.moveLit@1.scanKhx5@0.scanCell@5";
- private static final String INSTRUCTION_COUNTER_PATH = "southFif@0.tapPropS@0";
- private static final String DATA_COUNTER_PATH = "northFif@0.fillDrai@0";
+ private static final String INSTRUCTION_COUNTER_PATH = "southFif@0.tapPropS@0.instruct@0";
+ private static final String DATA_COUNTER_PATH = "northFif@0.fillDrai@0.instruct@0";
private static final int COUNTER_LENGTH = 34;
private static final int INSTRUCTION_SEND_NDX = MarinaTest.NEW ? 1 : 1;
private static final int INSTRUCTION_RECIRCULATE_NDX = 0;
shiftReport(true, false);
return cc.getOutBits(REPORT_CHAIN+"."+FLAGS_PATH).get(B_FLAG_NDX);
}
- /** return value of instruction counter. Instruction counter is in south ring
- * after the proper stopper. Caution: instruction counter is written by all scans,
+ /** return value of instruction counter. Instruction counter counts
+ * the instructions flowing through 1/2 of alternating FIFO.
+ * Caution: instruction counter is written by all scans,
* regardless of readEnable or writeEnable! */
public long getInstructionCounter() {
shiftData(true, false);
- BitVector count = cc.getOutBits(REPORT_CHAIN+"."+INSTRUCTION_COUNTER_PATH);
+ BitVector count = cc.getOutBits(DATA_CHAIN+"."+INSTRUCTION_COUNTER_PATH);
int sz = count.getNumBits();
MarinaTest.fatal(sz!=COUNTER_LENGTH, "wrong number of counter bits: "+sz+
" expected: "+COUNTER_LENGTH);
return count.bitReverse().toLong();
}
- /** return value of data counter. Data counter is in north ring
- * after the proper stopper. Caution: data counter is written by all scans,
+ /** return value of data counter. Data counter counts items flowing
+ * through drain stage of data proper stopper.
+ * Caution: data counter is written by all scans,
* regardless of readEnable or writeEnable! */
public long getDataCounter() {
shiftData(true, false);
- BitVector count = cc.getOutBits(REPORT_CHAIN+"."+DATA_COUNTER_PATH);
+ BitVector count = cc.getOutBits(DATA_CHAIN+"."+DATA_COUNTER_PATH);
int sz = count.getNumBits();
MarinaTest.fatal(sz!=COUNTER_LENGTH, "wrong number of counter bits: "+sz+
" expected: "+COUNTER_LENGTH);
BitVector instr = new BitVector(36, "Instr"+i);
instr.setFromLong(i);
marina.instrIn.fill(instr);
- // Every time we shift data ring we clear instruction counter
- // Make sure the counter has incremented once.
- long iCnt = marina.getInstructionCounter();
- fatal(iCnt!=1, "bad instruction counter: "+iCnt+" expected: 1");
}
prln("Drain south ring and check contents");
List<BitVector> out = marina.instrIn.drainMany();