From 0e398073c7f279dc063fc032fbbe89483d1fc119 Mon Sep 17 00:00:00 2001 From: rkao Date: Wed, 19 Nov 2008 19:04:06 +0000 Subject: [PATCH] Change tests to verify hardware bugs 2,3,4 fixed. --- .../com/sun/vlsi/chips/marina/test/Marina.java | 2 +- .../com/sun/vlsi/chips/marina/test/MarinaTest.java | 31 ++++++++++---------- testCode/hardwareBugs.txt | 6 ++-- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/testCode/com/sun/vlsi/chips/marina/test/Marina.java b/testCode/com/sun/vlsi/chips/marina/test/Marina.java index a0163cb..c13e63c 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/Marina.java +++ b/testCode/com/sun/vlsi/chips/marina/test/Marina.java @@ -52,7 +52,7 @@ public class Marina { } /** Get the inner loop counter infinity bit */ public boolean getInfinity() { - return (value & 0x80) != 1; + return (value & 0x80) == 0; } /** Get the inner loop counter zero bit. If the zero bit is true * then the hardware considers the inner loop counter to be zero diff --git a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java index 99f95e8..820eea8 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -393,10 +393,6 @@ public class MarinaTest { prln("Begin sendToken"); adjustIndent(2); - prln("ILC=1"); - marina.instrIn.fill( - new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1)); - getCtrsFlags(marina); prln("send token"); @@ -594,7 +590,7 @@ public class MarinaTest { adjustIndent(2); for (int i=0; i<7; i++) { int inOlc = 0x20 >> i; - prln("inOlc="+inOlc); + prln("Set inOlc="+inOlc); marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter, inOlc)); int outOlc = marina.getOLC(); @@ -621,7 +617,13 @@ public class MarinaTest { boolean inZero = inIlc==0; boolean outZero = ilc.getZero(); fatal(outZero!=inZero, "bad ILC zero: "+outZero); + fatal(ilc.getInfinity(), "bad Infinity bit: true"); } + prln("Now test the infinity bit"); + marina.instrIn.fill(new + Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, SetSource.Infinity)); + Ilc ilc = marina.getILC(); + fatal(!ilc.getInfinity(), "bad Infinity bit: false"); adjustIndent(-2); prln("End walkOneILC"); } @@ -961,21 +963,21 @@ public class MarinaTest { prln("Begin sendTorpedo"); adjustIndent(2); - prln("OLC = 63"); + prln("Set OLC = 1"); marina.instrIn.fill(new - Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter, 63)); + Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.OuterLoopCounter, 1)); int olc = marina.getOLC(); - fatal(olc!=63, "bad OLC: "+olc+" expected: 63"); + fatal(olc!=1, "bad OLC: "+olc+" expected: 1"); - prln("A=0, B=0"); + prln("Set A=0, B=0"); marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC, CLEAR_FLAG, CLEAR_FLAG)); fatal(marina.getFlagA(), "bad A flag: true"); fatal(marina.getFlagB(), "bad B flag: true"); - prln("ILC = Infinity"); + prln("Set ILC = Infinity"); marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, SetSource.Infinity)); @@ -994,10 +996,6 @@ public class MarinaTest { false /* tokenOut */ )); - prln("NOP This instruction can't predicate on OLC because of a hardware bug"); - marina.instrIn.fill(new - Instruction.Set(DOCK,false,Predicate.Default, A_FLAG, B_FLAG)); - prln("A=1, B=1 This instruction should get torpedoed along with the Move"); marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.Default, SET_FLAG, SET_FLAG)); @@ -1007,6 +1005,9 @@ public class MarinaTest { getCtrsFlags(marina); + // Note: It's tempting to test that OLC==0 here. However, hardware doesn't + // actually set counter bits to zero; it just sets the OLCZERO bit + prln("A and B should remain false"); fatal(marina.getFlagA(), "bad A flag: true"); fatal(marina.getFlagB(), "bad B flag: true"); @@ -1018,7 +1019,7 @@ public class MarinaTest { olc = marina.getOLC(); fatal(olc!=63, "bad OLC: "+olc+" expected: 63"); - prln("A=1, B=1 This instruction should execute because OLC!=0"); + prln("Set A=1, B=1 This instruction should execute because OLC!=0"); marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.Default, SET_FLAG, SET_FLAG)); diff --git a/testCode/hardwareBugs.txt b/testCode/hardwareBugs.txt index f89de0b..cc007e3 100644 --- a/testCode/hardwareBugs.txt +++ b/testCode/hardwareBugs.txt @@ -8,18 +8,18 @@ Fixed: slow. When the set instruction loads a nonzero value into the OLC or the ILC Marina behaves as if the value is zero. Noted: 11 Nov 2008 -Fixed: +Fixed: 19 Nov 2008 3) After the ILC decrements to zero, subsequent move instructions fail to execute at all. According to adm33 subsequent move instructions are supposed to execute exactly once. Noted: 11 Nov 2008 -Fixed: +Fixed: 19 Nov 2008 4) When a move instruction is torpedoed, the following instruction doesn't detect that the OLC is now zero. Noted: 11 Nov 2008 -Fixed: +Fixed: 19 Nov 2008 5) The C flag is not yet implemented. Noted: 11 Nov 2008 -- 1.7.10.4