+ case 8888: {
+
+ //int wait = 1000;
+ int wait = 200;
+ //int toks = 1;
+
+ PrintWriter pw = new PrintWriter(new OutputStreamWriter(new FileOutputStream("out.dat")));
+ for(double myvdd = 1.0; myvdd<2.0; myvdd += 0.05) {
+ vdd = (float)myvdd;
+ vdd18.setVoltageWait((float)Math.max(1.8,vdd));
+ vdd10.setVoltageWait(vdd);
+ Thread.sleep(1000);
+
+ for(int toks = 0; toks < 13; toks++) {
+ int MAX_ITER = 10;
+ double total = 0;
+ for(int iter = 0; iter < MAX_ITER; iter++) {
+
+ marina.masterClear();
+ marina.data.sink();
+ marina.stopAndResetCounters();
+
+ marina.enableInstructionSend(true);
+ marina.fillSouthProperStopper(setOlc(1));
+ marina.fillSouthProperStopper(new Instruction.Head(dock));
+ for(int i=0; i<toks; i++)
+ marina.fillSouthProperStopper(/*SEND_DATA*/NOP);
+ marina.fillSouthProperStopper(new Instruction[] {
+ new Instruction.Tail(dock),
+ }, false, true);
+ marina.startCounters();
+
+ marina.instrIn.run();
+ try { Thread.sleep(wait); } catch (Exception e) { }
+ //marina.instrIn.stop();
+
+ marina.stopAndResetCounters();
+ int countNorth = marina.getNorthCount();
+ int count = marina.getSouthCount();
+ System.out.println();
+ System.out.println();
+ if (count > (2<<29))
+ System.out.println("warning: count was greater than 2^29...");
+ double gst = ((((double)count*2)) / (1000000. * wait /* * toks*/));
+ System.out.println("south counter is: " + count + ", which is " + gst + "Ginst/sec with toks="+toks + " @vdd="+vdd);
+ total += gst;
+
+ System.out.println();
+ System.out.println();
+ /*
+ System.out.println("counters are " + count + " and " + countNorth + "; ratio is "+
+ (((double)countNorth)/((double)(count*2))) + " " +
+ (((double)countNorth)/((double)(count*2+1))) + " " +
+ "");
+ */
+ }
+ pw.println(vdd + " " + toks + " " + (((double)total) / MAX_ITER));
+ pw.flush();
+ }
+ }
+ break;
+ }