From 7acba3c3a1c1266c227ce76a4c69249e513a4445 Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Tue, 18 Nov 2008 22:48:34 +0000 Subject: [PATCH] add test 3009 --- .../com/sun/vlsi/chips/marina/test/MarinaTest.java | 39 +++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java index 52f0222..e53672d 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -851,8 +851,8 @@ public class MarinaTest { prln("Begin testWaitForTail"); adjustIndent(2); - prln("inserting instruction: Set OLC=5"); - marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter,1)); + prln("inserting instruction: Set OLC=63"); + marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter,63)); prln("inserting instruction: [Rq] Nop; this will cause 0->1 transition and possibly be discarded"); marina.instrIn.fill(REQUEUEING_NOP); @@ -878,6 +878,40 @@ public class MarinaTest { prln("End testWaitForTail"); } + private void testRequeueStageDrop(Marina marina) { + List dataItems; + + prln("Begin testRequeueStageDrop"); + adjustIndent(2); + + prln("inserting instruction: Set OLC=63"); + marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter,63)); + + prln("inserting instruction: Set ILC=1"); + marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter,1)); + + // if you uncomment this, then the NOP will be dropped and the test will pass + /* + prln("inserting instruction: [Rq] Nop; this will cause 0->1 transition and possibly be discarded"); + marina.instrIn.fill(REQUEUEING_NOP); + */ + + prln("inserting instruction: [Rq] Send Data; this will cause 0->1 transition and be discarded"); + marina.instrIn.fill(REQUEUEING_SEND_DATA); + + prln("inserting instruction: [Rq] Set ILC=1"); + marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter,1)); + + prln("inserting instruction: Tail"); + marina.instrIn.fill(new Instruction.Tail(DOCK)); + + dataItems = marina.data.drainMany(3); + fatal(dataItems.size()<3, "Expected exactly unlimited data items to emerge but got only: "+dataItems.size()); + + adjustIndent(-2); + prln("End testRequeueStageDrop"); + } + private void testFlagAB(Marina marina) { prln("Begin testFlagAB"); @@ -1017,6 +1051,7 @@ public class MarinaTest { case 3006: sendData(marina); break; case 3007: testRequeueStage0to1to3to0(marina); break; case 3008: testWaitForTail(marina); break; + case 3009: testRequeueStageDrop(marina); break; default: fatal(true, "Test number: "+testNum+" doesn't exist."); -- 1.7.10.4