f39363ec8c026200fdf462fad80d76df8f7c99c4
[fleet.git] / src / com / sun / vlsi / chips / marina / test / Counter.java
1 package com.sun.vlsi.chips.marina.test;
2 import com.sun.async.test.ChainControl;
3
4 /**
5  *  An item-counter which counts items that pass by in one of the
6  *  circular fifos.
7  */
8 public class Counter {
9     private final String dataChain, dataPath;
10     private final ChainControl cc;
11     public Counter(String cntrInst, String dataChain, ChainControl cc) {
12         this.dataChain = dataChain;
13         this.dataPath = dataChain+'.'+cntrInst;
14         this.cc = cc;
15     }
16     /** Read a new value from the Counter */
17     public long getCount() {
18         cc.shift(dataChain, true, false);
19         return 0;
20         // do nothing because I counter schematics don't yet exist
21         //long cnt = cc.getOutBits(dataPath).bitReverse().not().toLong();
22     }
23     /** Set counter value to zero */
24     public void clearCount() {
25                 
26     }
27         
28 }