get rid of ChainControls
authorAdam Megacz <adam@megacz.com>
Fri, 20 Nov 2009 04:41:59 +0000 (20:41 -0800)
committerAdam Megacz <adam@megacz.com>
Fri, 20 Nov 2009 04:41:59 +0000 (20:41 -0800)
src/edu/berkeley/fleet/marina/ChainControls.java [deleted file]
src/edu/berkeley/fleet/marina/InstructionStopper.java
src/edu/berkeley/fleet/marina/Marina.java
src/edu/berkeley/fleet/marina/MarinaTest.java
src/edu/berkeley/fleet/marina/MergeExperiment.java
src/edu/berkeley/fleet/marina/ProperStopper.java

diff --git a/src/edu/berkeley/fleet/marina/ChainControls.java b/src/edu/berkeley/fleet/marina/ChainControls.java
deleted file mode 100644 (file)
index 6c5ea2d..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-package edu.berkeley.fleet.marina;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.sun.electric.tool.simulation.test.*;
-
-/** One or more ChainControl. If we have a JTAG controller then one
- * ChainControl. If we don't have a JTAG controller then we need
- * one ChainControl per scan chain.
- * 
- * ChainControls duplicates much of the ChainControl interface. It
- * allows the testing code to remain oblivious of whether or not the
- * JTAG controller exists. 
- */
-public class ChainControls {
-    private Map<String,ChainControl> chainToControl = 
-        new HashMap<String,ChainControl>();
-        
-    /** The path has the form:
-     *  chipName.chainName.instanceName1.instanceName2 ...
-     */
-    public ChainControl getChainControlFromPath(String path) {
-        for (String chainName : chainToControl.keySet()) {
-            if (path.startsWith(chainName)) return chainToControl.get(chainName);
-        }
-        MarinaTest.fatal(true, "Can't find chain for path: "+path);
-        return null;
-    }
-    public void addChain(String chain, ChainControl control) {
-        chainToControl.put(chain, control);
-    }
-        
-    //--------------------------------------------------------------------------------
-    // Replicate interface of ChainControl
-    public BitVector getInBits(String path) {
-        ChainControl cc = getChainControlFromPath(path);
-        return cc.getInBits(path);
-    }
-    public BitVector getOutBits(String path) {
-        ChainControl cc = getChainControlFromPath(path);
-        return cc.getOutBits(path);
-    }
-    public void setInBits(String path, BitVector bits) {
-        ChainControl cc = getChainControlFromPath(path);
-        cc.setInBits(path, bits);
-    }
-    public void shift(String chainName, boolean readEnable, boolean writeEnable) {
-        ChainControl cc = getChainControlFromPath(chainName);
-        cc.shift(chainName, readEnable, writeEnable);
-    }
-    public void resetInBits() {
-        for (String chainName : chainToControl.keySet()) {
-            ChainControl cc = chainToControl.get(chainName);
-            cc.resetInBits();
-        }
-    }
-}
index ca65a44..f88d0c4 100644 (file)
@@ -19,10 +19,13 @@ public class InstructionStopper extends ProperStopper {
 
     public InstructionStopper(String name,
                               String propInst,
-                              ChainControls cc, ChipModel model,
+                              ChainControl controlChain,
+                              ChainControl dataChain,
+                              ChainControl reportChain,
+                              ChipModel model,
                               boolean clockHack,
                               Indenter indenter, String counterPath) {
-        super(name, propInst, cc, model, clockHack, indenter, counterPath);
+        super(name, propInst, controlChain, dataChain, reportChain, model, clockHack, indenter, counterPath);
     }
 
     /** put one Instruction into InstructionStopper */
index 9ef38ac..28e293c 100644 (file)
@@ -75,8 +75,8 @@ public class Marina {
         private int value;
         private Ilc() {
             shiftReport(true, false);
-            BitVector odd  = cc.getOutBits(REPORT_CHAIN+"."+ILC_PATH_ODD).bitReverse().not();
-            BitVector even = cc.getOutBits(REPORT_CHAIN+"."+ILC_PATH_EVEN).bitReverse().not();
+            BitVector odd  = reportChain.getOutBits(REPORT_CHAIN+"."+ILC_PATH_ODD).bitReverse().not();
+            BitVector even = reportChain.getOutBits(REPORT_CHAIN+"."+ILC_PATH_EVEN).bitReverse().not();
             BitVector ret  = new BitVector(8, "olc");
             for(int i=0; i<4; i++) {
                 ret.set(i*2+1, odd.get(i));
@@ -105,7 +105,11 @@ public class Marina {
 
     // The name of the scan chain
     // The instance path, from the top cell of the netlist, of the instance of infinityWithCover 
-    public final ChainControls cc;           // specifies the scan chain
+    public final ChainControl controlChain;
+    public final ChainControl dataChain;
+    public final ChainControl dukeChain;
+    public final ChainControl reportChain;
+
     private final ChipModel model;
     public final ProperStopper data;
     public final InstructionStopper instrIn;
@@ -115,35 +119,48 @@ public class Marina {
     
     /** Shift the report scan chain */
     public void shiftReport(boolean readEnable, boolean writeEnable) {
-        cc.shift(REPORT_CHAIN, readEnable, writeEnable);
+        reportChain.shift(REPORT_CHAIN, readEnable, writeEnable);
     }
     
     /** Shift the report scan chain */
     private void shiftControl(boolean readEnable, boolean writeEnable) {
-        cc.shift(CONTROL_CHAIN, readEnable, writeEnable);
+        controlChain.shift(CONTROL_CHAIN, readEnable, writeEnable);
     }
         
     /** Shift the data scan chain */
     private void shiftData(boolean readEnable, boolean writeEnable) {
-        cc.shift(DATA_CHAIN, readEnable, writeEnable);
+        dataChain.shift(DATA_CHAIN, readEnable, writeEnable);
     }
 
     /** Shift the data scan chain */
     public void shiftDuke(boolean readEnable, boolean writeEnable) {
-        cc.shift(DUKE_CHAIN, readEnable, writeEnable);
+        dukeChain.shift(DUKE_CHAIN, readEnable, writeEnable);
     }
 
-    public Marina(ChainControls cc, ChipModel model, boolean clockHack, Indenter indenter) {
-        this.cc = cc;
+    public Marina(ChainControl controlChain,
+                  ChainControl dataChain,
+                  ChainControl dukeChain,
+                  ChainControl reportChain,
+                  ChipModel model, boolean clockHack, Indenter indenter) {
+        this.controlChain = controlChain;
+        this.dataChain = dataChain;
+        this.dukeChain = dukeChain;
+        this.reportChain = reportChain;
         this.model = model;
         this.indenter = indenter;
         data = new ProperStopper("north fifo",
                                  prefix+"northFif@1.fillDrai@1.properSt@1",
-                                 cc, model, clockHack, indenter,
+                                 controlChain,
+                                 dataChain,
+                                 reportChain,
+                                 model, clockHack, indenter,
                                  prefix+"northFif@1.fillDrai@1.instruct@0.cntScnTh@1.cntScnOn@1");
         instrIn = new InstructionStopper("south fifo",
                                          prefix+"southFif@1.tapPropS@1.properSt@1", 
-                                         cc, model, clockHack, indenter,
+                                         controlChain,
+                                         dataChain,
+                                         reportChain,
+                                         model, clockHack, indenter,
                                          prefix+"southFif@1.tapPropS@1.instruct@0.cntScnTh@1.cntScnOn@1");
     }
 
@@ -153,7 +170,7 @@ public class Marina {
     public void stopAndResetCounters() {
         instrIn.setCounterEnable(false);
         data.setCounterEnable(false);
-        cc.shift(DATA_CHAIN, true, false);        
+        dataChain.shift(DATA_CHAIN, true, false);        
         northCount = data.getCounterValue();
         southCount = instrIn.getCounterValue();
         data.setCounterValue(0);
@@ -307,7 +324,10 @@ public class Marina {
         // If you forget, then the inBits member initializes 
         // with random data. Then when you do your first write,
         // some bits are written randomly.
-        cc.resetInBits();
+        dataChain.resetInBits();
+        dukeChain.resetInBits();
+        reportChain.resetInBits();
+        controlChain.resetInBits();
 
         // For reset, I want to clear all the stoppers simultaneously
         data.clear();
@@ -330,7 +350,7 @@ public class Marina {
         if (omegaCounter) {
             BitVector bits = null;
             for(int i=0; i<4; i++) {
-                BitVector x = cc.getOutBits(REPORT_CHAIN+"."+OLC_PATH_KESSEL+i);
+                BitVector x = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_KESSEL+i);
                 //System.out.println("bits are: " + x);
                 bits = bits==null ? x : bits.cat(x);
             }
@@ -365,7 +385,7 @@ public class Marina {
         } else if (kesselsCounter) {
             BitVector bits = null;
             for(int i=0; i<4; i++) {
-                BitVector x = cc.getOutBits(REPORT_CHAIN+"."+OLC_PATH_KESSEL+i);
+                BitVector x = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_KESSEL+i);
                 //System.out.println("bits are: " + x);
                 bits = bits==null ? x : bits.cat(x);
             }
@@ -402,8 +422,8 @@ public class Marina {
                                );
             return (first+second);
         } else {
-            BitVector odd = cc.getOutBits(REPORT_CHAIN+"."+OLC_PATH_ODD).bitReverse();
-            BitVector even = cc.getOutBits(REPORT_CHAIN+"."+OLC_PATH_EVEN).bitReverse();
+            BitVector odd = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_ODD).bitReverse();
+            BitVector even = reportChain.getOutBits(REPORT_CHAIN+"."+OLC_PATH_EVEN).bitReverse();
             odd = odd.not();
             even = even.not();
             BitVector bv = new BitVector(6, "olc");
@@ -422,12 +442,12 @@ public class Marina {
     /** Get the A flag */
     public boolean getFlagA() {
         shiftReport(true, false);
-        return cc.getOutBits(REPORT_CHAIN+"."+FLAGS_PATH).get(A_FLAG_NDX);
+        return reportChain.getOutBits(REPORT_CHAIN+"."+FLAGS_PATH).get(A_FLAG_NDX);
     }
     /** Get the B flag */
     public boolean getFlagB() {
         shiftReport(true, false);
-        return cc.getOutBits(REPORT_CHAIN+"."+FLAGS_PATH).get(B_FLAG_NDX);
+        return reportChain.getOutBits(REPORT_CHAIN+"."+FLAGS_PATH).get(B_FLAG_NDX);
     }
     /** return value of instruction counter. Instruction counter counts 
      * the instructions flowing through 1/2 of alternating FIFO.
@@ -435,7 +455,7 @@ public class Marina {
      * regardless of readEnable or writeEnable! */
     public long getInstructionCounter() {
         shiftData(true, false);
-        BitVector count = cc.getOutBits(DATA_CHAIN+"."+INSTRUCTION_COUNTER_PATH);
+        BitVector count = dataChain.getOutBits(DATA_CHAIN+"."+INSTRUCTION_COUNTER_PATH);
         int sz = count.getNumBits(); 
         MarinaTest.fatal(sz!=COUNTER_LENGTH, "wrong number of counter bits: "+sz+
                          " expected: "+COUNTER_LENGTH);
@@ -447,7 +467,7 @@ public class Marina {
      * regardless of readEnable or writeEnable! */
     public long getDataCounter() {
         shiftData(true, false);
-        BitVector count = cc.getOutBits(DATA_CHAIN+"."+DATA_COUNTER_PATH);
+        BitVector count = dataChain.getOutBits(DATA_CHAIN+"."+DATA_COUNTER_PATH);
         int sz = count.getNumBits(); 
         MarinaTest.fatal(sz!=COUNTER_LENGTH, "wrong number of counter bits: "+sz+
                          " expected: "+COUNTER_LENGTH);
@@ -469,16 +489,16 @@ public class Marina {
     /** Enable the transmission of instructions from the instruction
      * ring test structure to the EPI FIFO. */
     public void enableInstructionSend(boolean b) {
-        BitVector bv = cc.getInBits(CONTROL_CHAIN+"."+INSTR_RING_CONTROL_PATH);
+        BitVector bv = controlChain.getInBits(CONTROL_CHAIN+"."+INSTR_RING_CONTROL_PATH);
         bv.set(INSTRUCTION_SEND_NDX, b);
-        cc.setInBits(CONTROL_CHAIN+"."+INSTR_RING_CONTROL_PATH, bv); 
+        controlChain.setInBits(CONTROL_CHAIN+"."+INSTR_RING_CONTROL_PATH, bv); 
         shiftControl(false, true);
     } 
     /** Enable the recirculation of instructions within the South FIFO */
     public void enableInstructionRecirculate(boolean b) {
-        BitVector bv = cc.getInBits(CONTROL_CHAIN+"."+INSTR_RING_CONTROL_PATH);
+        BitVector bv = controlChain.getInBits(CONTROL_CHAIN+"."+INSTR_RING_CONTROL_PATH);
         bv.set(INSTRUCTION_RECIRCULATE_NDX, b);
-        cc.setInBits(CONTROL_CHAIN+"."+INSTR_RING_CONTROL_PATH, bv); 
+        controlChain.setInBits(CONTROL_CHAIN+"."+INSTR_RING_CONTROL_PATH, bv); 
         shiftControl(false, true);
     }
     /** get the number of tokens in the token FIFO.
@@ -488,12 +508,12 @@ public class Marina {
     public int getNumTokens() {
         shiftReport(true, false);
         // get the token successor and token FIFO wires
-        BitVector bv = cc.getOutBits(REPORT_CHAIN+"."+TOK_FIFO_PATH);
+        BitVector bv = reportChain.getOutBits(REPORT_CHAIN+"."+TOK_FIFO_PATH);
         int sz = bv.getNumBits();
         MarinaTest.fatal(sz!=3, "wrong token FIFO size: "+sz+" expected: 3");
         
         // get the token predecessor wire
-        BitVector pred = cc.getOutBits(REPORT_CHAIN+"."+TOK_PRED_PATH);
+        BitVector pred = reportChain.getOutBits(REPORT_CHAIN+"."+TOK_PRED_PATH);
         sz = pred.getNumBits();
         MarinaTest.fatal(sz!=1, "wrong token predecessor size: "+sz+" expected: 1");
 
index 23e48ef..1d279aa 100644 (file)
@@ -246,7 +246,6 @@ public class MarinaTest {
         */
         tester.printInfo = false;
 
-        ChainControls ccs = new ChainControls();
         PowerChannel pc = new ManualPowerChannel("pc", false);
         /*
           JtagTester testerD, testerR, testerC;
@@ -282,12 +281,8 @@ public class MarinaTest {
         cc = new ChainControl(SCAN_CHAIN_XML, tester, 1.8f, khz);
         cc.noTestSeverity = Infrastructure.SEVERITY_NOMESSAGE;
         ct = new ChainTest(cc, pc);
-        ccs.addChain(Marina.DATA_CHAIN, cc);
-        ccs.addChain(Marina.REPORT_CHAIN, cc);
-        ccs.addChain(Marina.CONTROL_CHAIN, cc);
-        ccs.addChain(Marina.DUKE_CHAIN, cc);
 
-        marina = new Marina(ccs, model, !cmdArgs.jtagShift, indenter);
+        marina = new Marina(cc, cc, cc, cc, model, !cmdArgs.jtagShift, indenter);
         marina.mc0=mc0;
         marina.mc1=mc1;
 
@@ -2465,7 +2460,7 @@ public class MarinaTest {
             case 3040: loadEveryValueOLC(marina); break;
             case 6666: {
                 SubchainNode chainNode =
-                    (SubchainNode)marina.cc.getChainControlFromPath(Marina.DUKE_CHAIN)
+                    (SubchainNode)marina.dukeChain
                     .findNode("marina.duke.marinaGu@0.dukeAll@1.dukePart@0.ring37sW@1.scanner@0.scanFx1@1.scanCell@3");
                 int bitIndex = chainNode.getBitIndex();
                 ChainNode root = chainNode.getParentChain();
index c41de62..64809d1 100644 (file)
@@ -9,11 +9,11 @@ public class MergeExperiment {
     ProperStopper bottomRing;
     ProperStopper topRing;
 
-    public MergeExperiment(ChainControls cc, ChipModel model, boolean clockHack, Indenter indenter) {
+    public MergeExperiment(ChipModel model, boolean clockHack, Indenter indenter) {
         bottomRing =
             new ProperStopper("bottom ring",
                               "marinaGu@0.outDockW@.compareW@1.marinaCo@0.bottomFI@0.tapPropS@1.properSt@1",
-                              cc,
+
                               model,
                               clockHack,
                               indenter,
@@ -22,7 +22,7 @@ public class MergeExperiment {
         topRing =
             new ProperStopper("top ring",
                               "marinaGu@0.outDockW@.compareW@1.marinaCo@0.topFIFO0@.tapPropS@1.properSt@1",
-                              cc,
+
                               model,
                               clockHack,
                               indenter,
index 7c78fd5..b97d491 100644 (file)
@@ -34,15 +34,11 @@ public class ProperStopper {
     private boolean traceFill = false;
     private boolean traceDrain = false;
         
-    private final String
-        controlChain = Marina.CONTROL_CHAIN,
-        controlPath, 
-        dataChain = Marina.DATA_CHAIN,
-        dataPath, 
-        reportChain = Marina.REPORT_CHAIN,
-        reportPath;
+    private final String controlPath, dataPath, reportPath;
+    private final ChainControl controlChain;
+    private final ChainControl dataChain;
+    private final ChainControl reportChain;
     private final String captureClock;
-    private final ChainControls cc;
     private final ChipModel model;
     private final Indenter indenter;
 
@@ -69,13 +65,10 @@ public class ProperStopper {
     }
   
     private void shiftControl(boolean readEnable, boolean writeEnable) {
-        //System.out.println("start shiftcontrol");
-        cc.shift(controlChain, readEnable, writeEnable);
-        //System.out.println("  end shiftcontrol");
+        controlChain.shift(Marina.CONTROL_CHAIN, readEnable, writeEnable);
     }
     private void shiftData(boolean readEnable, boolean writeEnable) {
-        //System.out.println("start shiftdata");
-        cc.shift(dataChain, readEnable, writeEnable);
+        dataChain.shift(Marina.DATA_CHAIN, readEnable, writeEnable);
         if (writeEnable) {
             if (clockHack && model instanceof NanosimModel) {
                 NanosimModel nanoModel = (NanosimModel) model;
@@ -89,12 +82,9 @@ public class ProperStopper {
                 nanoModel.setNodeState(captureClock, 0);
             }
         }
-        //System.out.println("  end shiftdata");
     }
     private void shiftReport(boolean readEnable, boolean writeEnable) {
-        //System.out.println("start shiftreport");
-        cc.shift(reportChain, readEnable, writeEnable);
-        //System.out.println("  end shiftreport");
+        reportChain.shift(Marina.REPORT_CHAIN, readEnable, writeEnable);
     }
 
     private StateWireState boolToState(boolean b) {
@@ -109,7 +99,7 @@ public class ProperStopper {
     }
 
     public void setCounterValue(int val) {
-        SubchainNode chainNode = (SubchainNode) cc.getChainControlFromPath(dataChain).findNode(pathToCounter);
+        SubchainNode chainNode = (SubchainNode) dataChain.findNode(pathToCounter);
         int bitIndex = chainNode.getBitIndex();
         ChainNode root = chainNode.getParentChain();
         for(int i=0; i<31; i++)
@@ -119,7 +109,7 @@ public class ProperStopper {
 
     // DOES NOT SHIFT THE CHAIN!!!!
     public int getCounterValue() {
-        SubchainNode chainNode = (SubchainNode) cc.getChainControlFromPath(dataChain).findNode(pathToCounter);
+        SubchainNode chainNode = (SubchainNode) dataChain.findNode(pathToCounter);
         int bitIndex = chainNode.getBitIndex();
         ChainNode root = chainNode.getParentChain();
         return (int)root.getOutBits().get(bitIndex, 30).bitReverse().toLong();
@@ -130,17 +120,17 @@ public class ProperStopper {
         BitVector fdCtl = ccc.bits(extra);
         fdcstate = ccc;
         fatal(fdCtl.getNumBits()!=6, "expect 6 proper stopper control bits");
-        BitVector val = cc.getInBits(controlPath);
+        BitVector val = controlChain.getInBits(controlPath);
         for (int i=0; i<fdCtl.getNumBits(); i++) {
             val.set(i, fdCtl.get(i));
         }
-        cc.setInBits(controlPath, val);
+        controlChain.setInBits(controlPath, val);
         shiftControl(false, true);
     }
     // The last bit of the control chain controls the general purpose
     // output
     public void setGeneralPurposeOutput(Boolean b) {
-        BitVector val = cc.getInBits(controlPath);
+        BitVector val = controlChain.getInBits(controlPath);
         val.set(GENERAL_PURPOSE_STROBE_NDX,b);
         shiftControl(false, true);
     }
@@ -203,10 +193,10 @@ public class ProperStopper {
     /** get value of the state wire preceding the fill stage */
     public StateWireState getPrevStateWire() {
         shiftReport(true, false);
-        BitVector b = cc.getOutBits(reportPath);
+        BitVector b = reportChain.getOutBits(reportPath);
         int n = b.getNumBits(); 
         fatal(n!=4, "Bad number of Stopper report bits: "+n);
-        return boolToState(cc.getOutBits(reportPath).get(PREV_STATE_IN_NDX));
+        return boolToState(reportChain.getOutBits(reportPath).get(PREV_STATE_IN_NDX));
     }
 
     /** get the value of drain stage fill wire.
@@ -214,19 +204,19 @@ public class ProperStopper {
      * scan chain works. */
     public boolean getFillStrobe() {
         shiftReport(true, false);
-        return cc.getOutBits(reportPath).get(FILL_STROBE_IN_NDX);
+        return reportChain.getOutBits(reportPath).get(FILL_STROBE_IN_NDX);
     }
 
     /** get value of state wire between the fill and drain stages */
     public StateWireState getFillStateWire() {
         shiftReport(true, false);
-        return boolToState(cc.getOutBits(reportPath).get(FILL_STATE_IN_NDX));
+        return boolToState(reportChain.getOutBits(reportPath).get(FILL_STATE_IN_NDX));
     }
 
     /** get value of drain stage stopped wire */
     public boolean getStopped() {
         shiftReport(true, false);
-        return cc.getOutBits(reportPath).get(STOPPED_IN_NDX);
+        return reportChain.getOutBits(reportPath).get(STOPPED_IN_NDX);
     }
 
     public String getReportString() {
@@ -243,22 +233,27 @@ public class ProperStopper {
     /** construct a ProperStopper */
     public ProperStopper(String name,
                          String propInst,
-                         ChainControls cc, ChipModel model,
+                         ChainControl controlChain,
+                         ChainControl dataChain,
+                         ChainControl reportChain,
+                         ChipModel model,
                          boolean clockHack,
                          Indenter indenter,
                          String pathToCounter) {
         this.name = name;
-        this.controlPath = controlChain+'.'+propInst;
-        this.dataPath = dataChain+'.'+propInst;
-        this.reportPath = reportChain+'.'+propInst;
+        this.controlPath = Marina.CONTROL_CHAIN+'.'+propInst;
+        this.dataPath = Marina.DATA_CHAIN+'.'+propInst;
+        this.reportPath = Marina.REPORT_CHAIN+'.'+propInst;
         this.model = model;
         this.captureClock = 
             prefixInstNamesInPathWithX(propInst+'.'+captureClockRelPath)
             +'.'+captureClockName;
-        this.cc = cc;
         this.clockHack = clockHack;
         this.indenter = indenter;
-        this.pathToCounter = dataChain+'.'+pathToCounter;
+        this.pathToCounter = Marina.DATA_CHAIN+'.'+pathToCounter;
+        this.controlChain = controlChain;
+        this.dataChain = dataChain;
+        this.reportChain = reportChain;
     }
 
     /** Reset ProperStopper after the JTAG TRST has been pulsed */
@@ -268,7 +263,7 @@ public class ProperStopper {
         we.setFromLong(0);
         packet.setFromLong(0);
         BitVector wdta = we.cat(packet);
-        cc.setInBits(dataPath, wdta);
+        dataChain.setInBits(dataPath, wdta);
     }
     
     /** Insert one item into the fill stage.
@@ -289,7 +284,7 @@ public class ProperStopper {
 
         BitVector wrEn = new BitVector(2, "write enable");
         wrEn.setFromLong(3);
-        cc.setInBits(dataPath, wrEn.cat(dta));
+        dataChain.setInBits(dataPath, wrEn.cat(dta));
         shiftData(false, true);
         
         fill();                                 // fill = 1
@@ -304,7 +299,7 @@ public class ProperStopper {
         
         // if data chain is shifted in the future, don't write!
         wrEn.setFromLong(0);
-        cc.setInBits(dataPath, wrEn.cat(dta));
+        dataChain.setInBits(dataPath, wrEn.cat(dta));
         
         adjustIndent(-2);
         if (traceFill) prln("End fill");
@@ -359,7 +354,7 @@ public class ProperStopper {
         shiftData(true, false);
 
         // strip the two write enable bits
-        BitVector ans = cc.getOutBits(dataPath).get(2, 52);
+        BitVector ans = dataChain.getOutBits(dataPath).get(2, 52);
 
         idle();                                 // block = 1
         clear();                                // clear = 1