== Fleeterpreter ====================================================
int count = 74;
-Bitfifo.BitStorage bits = new Bitfifo.BitStorage(74);
+Bitfifo.BitStorage outBits = new Bitfifo.BitStorage(74);
public void service() {
if (box_in1.dataReadyForShip() &&
box_in2.dataReadyForShip() &&
box_in3.dataReadyForShip() &&
- bits.hasSpace(1) &&
+ outBits.hasSpace(1) &&
box_out1.readyForDataFromShip() &&
box_out2.readyForDataFromShip() &&
box_out3.readyForDataFromShip()) {
o1 = ((v1 & v2) | (v2 & v3) | (v1 & v3))/* << 1*/;
o2 = (v1 ^ v2 ^ v3) >> 1;
o3 = 0;
- bits.add((v1 ^ v2 ^ v3) & 0x1L, 1);
- System.out.println("size is now " + bits.size());
+ outBits.add((v1 ^ v2 ^ v3) & 0x1L, 1);
}
box_out1.addDataFromShip(o1);
box_out2.addDataFromShip(o2);
o1 = ((v1 & v2) | (v2 & v3) | (v1 & v3))/* << 1*/;
o2 = (v1 ^ v2 ^ v3) >> 1;
o3 = 0;
- bits.add((v1 ^ v2 ^ v3) & 0x1L, 1);
- System.out.println("size is now " + bits.size());
+ outBits.add((v1 ^ v2 ^ v3) & 0x1L, 1);
}
count = 74;
}
}
if (box_outBits.readyForDataFromShip() &&
- bits.size() >= 37) {
- box_outBits.addDataFromShip(bits.get(37));
+ outBits.size() >= 37) {
+ box_outBits.addDataFromShip(outBits.get(37));
}
}
== Test ========================================================================
-#expect 25
+#expect 100488372224
+#expect 8
-#ship alu3 : Alu3
+
+#ship alu3 : Alu3
#ship debug : Debug
-25: sendto debug.in;
-debug.in: [*] take, deliver;
+1000000: sendto alu3.in1;
+1200000: sendto alu3.in2;
+0: sendto alu3.in3;
+0: sendto alu3.in1;
+0: sendto alu3.in2;
+alu3.in1: [*] take, deliver;
+alu3.in2: [*] take, deliver;
+alu3.in3: [*] take, deliver;
+alu3.out1: [74] take, sendto alu3.in1;
+alu3.out2: [74] take, sendto alu3.in2;
+alu3.out3: [74] take, sendto alu3.in3;
+alu3.outBits: [2] take, sendto debug.in;
+debug.in: [*] take, deliver;
== Contributors =========================================================