From 65c2088d25afca54cb9ada07db1ade743c6f3b00 Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Mon, 17 Nov 2008 22:39:10 +0000 Subject: [PATCH] update test 3007 --- .../com/sun/vlsi/chips/marina/test/MarinaTest.java | 72 ++++++++++++-------- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java index 4f20136..ce4a953 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -705,6 +705,34 @@ public class MarinaTest { false /* tokenOut */ ); + private static final Instruction SEND_DATA = + new Instruction.Move(DOCK, + false, /* requeueing */ + Predicate.IgnoreOLC, /* predicate */ + false, /* torpedoable */ + null, /* path */ + false, /* tokenIn */ + false, /* dataIn */ + false, /* latchData */ + false, /* latchPath */ + true, /* dataOut */ + false /* tokenOut */ + ); + + private static final Instruction REQUEUEING_SEND_DATA = + new Instruction.Move(DOCK, + true, /* requeueing */ + Predicate.IgnoreOLC, /* predicate */ + false, /* torpedoable */ + null, /* path */ + false, /* tokenIn */ + false, /* dataIn */ + false, /* latchData */ + false, /* latchPath */ + true, /* dataOut */ + false /* tokenOut */ + ); + private void testRequeueStage0(Marina marina) { prln("Begin testRequeueStage0"); adjustIndent(2); @@ -730,6 +758,8 @@ public class MarinaTest { } private void testRequeueStage0to1to3(Marina marina) { + List dataItems; + prln("Begin testRequeueStage0to1to3"); adjustIndent(2); @@ -740,46 +770,32 @@ public class MarinaTest { marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1)); prln("Executing Send Data (requeueable); this will cause 0->1 transition and be discarded"); - marina.instrIn.fill(new Instruction.Move(DOCK, - false, /* requeueing */ - Predicate.IgnoreOLC, /* predicate */ - false, /* torpedoable */ - null, /* path */ - false, /* tokenIn */ - false, /* dataIn */ - false, /* latchData */ - false, /* latchPath */ - true, /* dataOut */ - false /* tokenOut */ - )); + marina.instrIn.fill(REQUEUEING_SEND_DATA); prln("Executing Set ILC=1 (requeueable); this will be requeued once TAIL happens"); marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1)); prln("Executing Send Data (requeueable); this will be recirculated"); - marina.instrIn.fill(new Instruction.Move(DOCK, - false, /* requeueing */ - Predicate.IgnoreOLC, /* predicate */ - false, /* torpedoable */ - null, /* path */ - false, /* tokenIn */ - false, /* dataIn */ - false, /* latchData */ - false, /* latchPath */ - true, /* dataOut */ - false /* tokenOut */ - )); + marina.instrIn.fill(SEND_DATA); prln("Executing Set ILC=1 (requeueable); this will be recirculated"); marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1)); - List dataItems; - + // at this point we have inserted two "move" instructions; we + // want to make sure that only the first one is executed dataItems = marina.data.drainMany(2); fatal(dataItems.size()!=1, "Expected exactly one data item to emerge but got: "+dataItems.size()+" data items"); - // now we should be in state 1 - prln("Executing Tail"); + // by now we should be in state 1; we insert another + // REQUEUEING_SEND_DATA in order to be sure that the epi fifo + // is still accepting input + prln("Executing Send Data (requeueable); this will be recirculated"); + marina.instrIn.fill(REQUEUEING_SEND_DATA); + + prln("Executing Set ILC=1 (requeueable); this will be recirculated"); + marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1)); + + prln("Executing Tail; this will cause the 2->3 transition and be discarded"); marina.instrIn.fill(new Instruction.Tail(DOCK)); // now we should be in state 3 -- 1.7.10.4