From a20472d8382e9e230ef403086041c8259d349186 Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Tue, 9 Dec 2008 22:03:37 +0000 Subject: [PATCH] add testOlcDecrementAtHighSpeed() --- .../com/sun/vlsi/chips/marina/test/MarinaTest.java | 57 ++++++++++++++++++-- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java index 9f33b93..07aa38e 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -1707,10 +1707,60 @@ public class MarinaTest { adjustIndent(2); List dataItems; + + // Each element of the following pair of arrays is one "test". + // The OLC will be loaded with olcs[i] and then decremented + // decr_amounts[i] times; after that has happened the zeroness + // of the OLC will be checked by executing a MOVE with + // [olc!=0] as the predicate. + + int[] olcs = new int[] { 3 /*, 3, 3, 10, 41*/ }; + int[] decr_amounts = new int[] { 2 /*, 3, 4, 9, 10*/ }; + + for(int which=0; which=olc ? 0 : 1; + dataItems = marina.data.drainMany(2); + fatal(dataItems.size()!=expected, "Expected "+expected+" item to emerge but got: "+dataItems.size()+" data items"); + } adjustIndent(-2); prln("End testOlcDecrementAtHighSpeed"); @@ -1887,6 +1937,7 @@ public class MarinaTest { case 3021: recvPath(marina); break; case 3022: testILC(marina); break; case 3023: testTorpedoOnAnInfiniteNop(marina); break; + case 3025: testOlcDecrementAtHighSpeed(marina); break; default: fatal(true, "Test number: "+testNum+" doesn't exist."); -- 1.7.10.4