tests 3021 and 3025 pass
authorrkao <rkao>
Thu, 11 Dec 2008 21:04:56 +0000 (21:04 +0000)
committerrkao <rkao>
Thu, 11 Dec 2008 21:04:56 +0000 (21:04 +0000)
testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java
testCode/com/sun/vlsi/chips/marina/test/ProperStopper.java

index 758ea23..05e5975 100644 (file)
@@ -1829,6 +1829,8 @@ public class MarinaTest {
 
             prln("calling marina.instrIn.run()");
             marina.instrIn.run();
+            
+               model.waitNS(5);
 
             int expected = decr_amount>=olc ? 0 : 1;
             dataItems = marina.data.drainMany(2);
index cf96557..ac007e5 100644 (file)
@@ -156,13 +156,13 @@ public class ProperStopper {
        setFillDrainControl(MarinaUtils.RingIfc.STOPSINK.bits());
     }
     /** Stop a running stopper in order to add items.  Ensure that we don't
-     * lose the item in the fill stage.  Wait long enough for ring to quiesce.
-     * Exit state: idle */
+     * lose the item in the fill stage.  
+     * Exit state: block */
     public void stopToFill() {
        stop();                                 // go = 0
        idle();                                 // block = 1
        block();                                // go = 1
-       idle();                                 // go = 0
+//     idle();                                 // go = 0
     }
     /** get value of the state wire preceding the fill stage */
     public StateWireState getPrevStateWire() {
@@ -238,7 +238,7 @@ public class ProperStopper {
     /** Insert one item into the fill stage.
      * Fill stage must be empty. 
      * You must stop stopper before calling fill.
-     * exit state: idle */
+     * exit state: block */
     public void fill(BitVector dta) {
        if (traceFill) prln("Begin fill. stopper="+name);
        adjustIndent(2);
@@ -263,7 +263,7 @@ public class ProperStopper {
        fill();                                 // fill = 1
        idle();                                 // fill = 0
        block();                                // go = 1
-       idle();
+//     idle();
        
        model.waitNS(5);
 
@@ -279,7 +279,7 @@ public class ProperStopper {
     }
     /** Insert items from a list, one by one. 
      * You must stop stopper before calling fillMany()
-     * exit state: idle */
+     * exit state: block */
     public void fillMany(List<BitVector> data) {
        prln("Begin fillMany. stopper="+name+" numWords="+data.size());
        adjustIndent(2);
@@ -302,6 +302,13 @@ public class ProperStopper {
        StateWireState myState=getFillStateWire();
        fatal(myState==StateWireState.EMPTY, "drain: fill stage empty");
 
+       return drainNoCheck();
+    }
+    /** Remove one item from fill stage. Return that item.
+     * Assume that an item is available. 
+     * entry state: stop
+     * exit state: stop */
+    private BitVector drainNoCheck() {
        shiftData(true, false);
        BitVector ans = getDatTokAdr();
 
@@ -327,6 +334,8 @@ public class ProperStopper {
        prln("begin drainMany. stopper="+name);
        adjustIndent(2);
        
+       stop();
+       
        List<BitVector> ans = new ArrayList<BitVector>();
        
        int cnt = 0;
@@ -340,7 +349,7 @@ public class ProperStopper {
                
                if (traceDrain) prln("drainMany: reading word number: "+cnt++);
                
-               BitVector d = drain();
+               BitVector d = drainNoCheck();
 
                ans.add(d);
        }