fp = null;
fp = fleet.run(new Instruction[0]);
- Gadgets.writeMem(fp, mem1, 0, bv(vals));
+ MemoryUtils.writeMem(fp, mem1, 0, bv(vals));
int vals_length = vals.length;
// Disable readback/writeback inside the loop
}
BitVector[] bvs = new BitVector[vals_length];
- Gadgets.readMem(fp, mem1, 0, bvs);
+ MemoryUtils.readMem(fp, mem1, 0, bvs);
System.out.println("results:");
for(int i=0; i<vals_length; i++)
System.out.println(bvs[i].toLong());
lf.deliver();
lf.literal(5);
lf.deliver();
- Gadgets.dispatch(fp, ctx);
+ ctx.dispatch(fp);
fp.flush();
System.out.println("checking debug.in");
lf.sendToken(debugIn.getDataDestination(), new BitVector(1).set(1));
lf.setPredicate(null);
- Gadgets.dispatch(fp, ctx);
+ ctx.dispatch(fp);
fp.flush();
long kk;
if (vals != null) {
BitVector[] mem = new BitVector[vals_length];
for(int i=0; i<mem.length; i++) mem[i] = new BitVector(fleet.getWordWidth()).set(vals[i]);
- Gadgets.writeMem(fp, memoryShip1, 0, mem);
+ MemoryUtils.writeMem(fp, memoryShip1, 0, mem);
}
//////////////////////////////////////////////////////////////////////////////
lf.recvToken();
lf.deliver();
- Gadgets.dispatch(fp, ctx2);
+ ctx2.dispatch(fp);
fp.flush();
int count = 0;
lf.collectWord();
lf.sendToken(counter.getDock("in2").getInstructionDestination()); // HACK: we don't check to make sure this hits
lf.sendToken(debugIn.getDataDestination());
- Gadgets.dispatch(fp, ctx3); // HACK: we don't check to make sure that this is "firmly in place"
+ ctx3.dispatch(fp); // HACK: we don't check to make sure that this is "firmly in place"
for(Dock dock : torpedoes) fp.sendToken(dock.getInstructionDestination());
- Gadgets.dispatch(fp, ctx2);
+ ctx2.dispatch(fp);
fp.flush();
System.out.println("flushed");
if (vals != null) {
ret = new long[vals_length];
BitVector[] mem = new BitVector[vals_length];
- Gadgets.readMem(fp, memoryShip2, 0, mem);
+ MemoryUtils.readMem(fp, memoryShip2, 0, mem);
for(int i=0; i<ret.length; i++) ret[i] = mem[i].toLong();
}
return ret;