misc cleanups
authorAdam Megacz <adam@megacz.com>
Fri, 20 Nov 2009 02:54:41 +0000 (18:54 -0800)
committerAdam Megacz <adam@megacz.com>
Fri, 20 Nov 2009 02:54:41 +0000 (18:54 -0800)
src/com/sun/vlsi/chips/marina/test/MarinaTest.java

index 4640749..01b394d 100644 (file)
@@ -154,38 +154,11 @@ public class MarinaTest {
                 return;
         }
     }
                 return;
         }
     }
-    private void setUpSuppliesAndMeters(Station station) {
-        // set up power supplies and meters
-        if (!sim()) {
-            prln("Testing station: "+station);
-            Infrastructure.gpibControllers = new int[] {0};
-            switch (cmdArgs.station) {
-                case ONE:
-                    corePowerSupply = new Pst3202Channel("ch1", "HPST3202", 1);
-                    padsPowerSupply = new Pst3202Channel("ch2", "HPST3202", 2);
-                    break;
-                case TWO:
-                    corePowerSupply = new Pst3202Channel("ch1", "HPST3202B", 1);
-                    padsPowerSupply = new Pst3202Channel("ch2", "HPST3202B", 2);
-                    break;
-                default:
-                    fatal(true, "Unrecognized station: "+cmdArgs.station);
-            }
-            corePowerSupply.setCurrent((float)1.7);
-            corePowerSupply.setVoltageWait((float)1.0);
-                  
-            padsPowerSupply.setCurrent((float)0.100);
-            padsPowerSupply.setVoltageWait((float)1.8);
-                  
-            coreVoltmeter = new HP34401A(station.coreVoltmeter);
-            voltmeterForCurrent = new HP34401A(station.currentVoltmenter);
-        }
-    }
-        
+
     private MarinaTest(String[] args) throws Exception {
         cmdArgs = new CmdArgs(args);
         reportTask(cmdArgs);
     private MarinaTest(String[] args) throws Exception {
         cmdArgs = new CmdArgs(args);
         reportTask(cmdArgs);
-        if (cmdArgs.mode==Mode.TEST_SILICON) doSilicon(); else doSim();
+        doSim();
     }
         
     static PowerChannel vdd18;
     }
         
     static PowerChannel vdd18;
@@ -338,25 +311,6 @@ public class MarinaTest {
         if (model instanceof SimulationModel)
             ((SimulationModel)model).finish();
     }
         if (model instanceof SimulationModel)
             ((SimulationModel)model).finish();
     }
-    private void doSilicon() throws Exception {
-        model = new SiliconChip();
-        String ip = cmdArgs.station.ipAddr;
-        JtagTester tester = new Netscan4(ip, cmdArgs.station.jtagChannel);
-        tester.printInfo = false;
-        int khz = 1000;
-        ChainControl cc = new ChainControl("???", tester, 1.8f, khz);
-        cc.noTestSeverity = Infrastructure.SEVERITY_NOMESSAGE;
-        ChainControls ccs = new ChainControls();
-        ccs.addChain(Marina.DATA_CHAIN, cc);
-        ccs.addChain(Marina.REPORT_CHAIN, cc);
-        ccs.addChain(Marina.CONTROL_CHAIN, cc);
-        marina = new Marina(ccs, model, false, indenter);
-        PowerChannel pc = new ManualPowerChannel("pc", false);
-        ChainTest ct = new ChainTest(cc, pc);
-        ct.testAllChains("marina", Infrastructure.SEVERITY_WARNING);
-        doOneTest(cmdArgs.testNum);
-        setUpSuppliesAndMeters(cmdArgs.station);
-    }
 
     /** In the absence of looping, the longest path through Infinity is 4 column delays */
     private void waitUntilQuiescent() {
 
     /** In the absence of looping, the longest path through Infinity is 4 column delays */
     private void waitUntilQuiescent() {
@@ -989,9 +943,14 @@ public class MarinaTest {
                             CLEAR_FLAG.add(Predicate.FlagA),
                             CLEAR_FLAG.add(Predicate.FlagB));
 
                             CLEAR_FLAG.add(Predicate.FlagA),
                             CLEAR_FLAG.add(Predicate.FlagB));
 
+    private static final Instruction FLAG_NOP_IF_FLAG_A =
+        new Instruction.Set(dock, Predicate.FlagA,
+                            CLEAR_FLAG.add(Predicate.FlagA),
+                            CLEAR_FLAG.add(Predicate.FlagB));
+
     private static final Instruction NOP =
         new Instruction.Move(dock,
     private static final Instruction NOP =
         new Instruction.Move(dock,
-                             Predicate.IgnoreFlagD,   /* predicate   */
+                             Predicate.IgnoreFlagD, /* predicate   */
                              false,                 /* torpedoable */
                              null,                  /* path        */
                              false,                 /* tokenIn     */
                              false,                 /* torpedoable */
                              null,                  /* path        */
                              false,                 /* tokenIn     */
@@ -1028,6 +987,19 @@ public class MarinaTest {
                              false                  /* tokenOut    */
                              );
 
                              false                  /* tokenOut    */
                              );
 
+    private static final Instruction SEND_DATA_IF_A_SET_AND_D_NOT_SET =
+        new Instruction.Move(dock,
+                             Predicate.FlagA,       /* predicate   */
+                             false,                 /* torpedoable */
+                             null_path,             /* path        */
+                             false,                 /* tokenIn     */
+                             false,                 /* dataIn      */
+                             false,                 /* latchData   */
+                             false,                 /* latchPath   */
+                             true,                  /* dataOut     */
+                             false                  /* tokenOut    */
+                             );
+
     private static final Instruction SEND_DATA_IF_D_SET =
         new Instruction.Move(dock,
                              Predicate.FlagD,       /* predicate   */
     private static final Instruction SEND_DATA_IF_D_SET =
         new Instruction.Move(dock,
                              Predicate.FlagD,       /* predicate   */