fix handling of capture clock
authorAdam Megacz <adam.megacz@sun.com>
Fri, 1 May 2009 01:32:00 +0000 (01:32 +0000)
committerAdam Megacz <adam.megacz@sun.com>
Fri, 1 May 2009 01:32:00 +0000 (01:32 +0000)
testCode/com/sun/vlsi/chips/marina/test/ProperStopper.java

index 74e96bc..9b52aab 100644 (file)
@@ -26,11 +26,12 @@ public class ProperStopper {
     private static final int STOPPED_IN_NDX = 3;
         
     private final String name;
-    private final String captureClockRelPath = "fillStag@1.gaspFill@0.fillScan@1";
+    //private final String captureClockRelPath = "fillStag@1.gaspFill@0.fillScan@1";
+    private final String captureClockRelPath = "fillStag@1";
     // test library direct write mode doesn't understand per register write 
     // enables. We get simulation to work by toggling write clock.
     private final boolean clockHack;
-    private final String captureClockName = "si[4]";
+    private final String captureClockName = "sx[4]";
 
     /*
     private boolean traceFill = true;
@@ -55,6 +56,7 @@ public class ProperStopper {
      * Each instance name in the path must begin with the character 'x'.
      * Return a path with the added X's. */
     private String prefixInstNamesInPathWithX(String path) {
+        if (model==null) throw new RuntimeException();
         if (!(model instanceof NanosimModel)) return path;
         StringBuffer sb = new StringBuffer();
         sb.append('x');
@@ -224,11 +226,11 @@ public class ProperStopper {
         this.dataPath = dataChain+'.'+propInst;
         this.reportChain = reportChain;
         this.reportPath = reportChain+'.'+propInst;
+        this.model = model;
         this.captureClock = 
             prefixInstNamesInPathWithX(propInst+'.'+captureClockRelPath)
             +'.'+captureClockName;
         this.cc = cc;
-        this.model = model;
         this.clockHack = clockHack;
         this.indenter = indenter;
     }