adjustIndent(-2);
prln("End countOlc");
}
+ private void loadEveryValueOLC(Marina marina) {
+ adjustIndent(2);
+ for (int i=0; i<(1<<6); i++) {
+
+ if (marina.kesselsCounter) {
+ System.out.println("master-clearing...");
+ // master clear on each iteration; otherwise we'd need to "run down" the olc
+ marina.masterClear();
+ marina.enableInstructionSend(true);
+ }
+
+ int inOlc = i;
+ marina.fillSouthProperStopper(new Instruction[] {
+
+ // to ensure that instruction is bubble-limited
+ RECV_DATA,
+
+ // the Set-OLC instruction
+ new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, inOlc),
+
+ // put a Set-ILC instruction right behind it with inverted bits to be sure we're
+ // not capturing the instruction-latch value too late in the cycle
+ new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, (inOlc ^ (~(-1<<6)))),
+
+ });
+
+ model.waitNS(128 * CYCLE_TIME_NS);
+ marina.fillNorthProperStopper();
+ model.waitNS(128 * CYCLE_TIME_NS);
+
+ expectOlc(inOlc);
+ prln("loadEveryValueOLC: "+inOlc+" checks out");
+ }
+ adjustIndent(-2);
+ }
private void saturateInstructionFifo(Marina marina, Instruction instruction, int quantity, boolean expect_it_to_jam_up) {
prln("Inserting "+quantity+" copies of \"" + instruction + "\"");