1 package com.sun.vlsi.chips.marina.test;
2 import com.sun.electric.tool.simulation.test.*;
6 * An item-counter which counts items that pass by in one of the
10 private final String dataChain, dataPath;
11 private final ChainControl cc;
12 public Counter(String cntrInst, String dataChain, ChainControl cc) {
13 this.dataChain = dataChain;
14 this.dataPath = dataChain+'.'+cntrInst;
17 /** Read a new value from the Counter */
18 public long getCount() {
19 cc.shift(dataChain, true, false);
21 // do nothing because I counter schematics don't yet exist
22 //long cnt = cc.getOutBits(dataPath).bitReverse().not().toLong();
24 /** Set counter value to zero */
25 public void clearCount() {