From f214c6b2b070a08f233fe6b4b8d5a21d60bc5972 Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Sat, 22 Nov 2008 18:25:08 +0000 Subject: [PATCH] add tests 3011 (passes) and 3012 (fails) --- .../com/sun/vlsi/chips/marina/test/Marina.java | 13 ++- .../com/sun/vlsi/chips/marina/test/MarinaTest.java | 106 +++++++++++++++++++- 2 files changed, 113 insertions(+), 6 deletions(-) diff --git a/testCode/com/sun/vlsi/chips/marina/test/Marina.java b/testCode/com/sun/vlsi/chips/marina/test/Marina.java index 706d487..a4d8b9f 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/Marina.java +++ b/testCode/com/sun/vlsi/chips/marina/test/Marina.java @@ -162,8 +162,17 @@ public class Marina { shiftReport(true, false); return cc.getOutBits(REPORT_CHAIN+"."+FLAGS_PATH).get(B_FLAG_NDX); } - /** Enable the transmission of instructions from the South FIFO - * to the EPI FIFO. */ + /** Fill the "North" Fifo ring */ + public void fillNorthProperStopper(BitVector data, boolean tokenhood, BitVector address) { + int len = 37+1+14; + BitVector bv = new BitVector(len, "empty"); + for(int i=0; i<37; i++) bv.set(i, data.get(i)); + bv.set(37, !tokenhood); + for(int i=38; i<38+14; i++) bv.set(i, address.get(i-38)); + this.data.fill(bv); + } + /** Enable the transmission of instructions from the instruction + * ring test structure to the EPI FIFO. */ public void enableInstructionSend(boolean b) { BitVector bv = cc.getInBits(CONTROL_CHAIN+"."+INSTR_RING_CONTROL_PATH); bv.set(INSTRUCTION_SEND_NDX, b); diff --git a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java index 326ca71..b316f5e 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -996,6 +996,10 @@ public class MarinaTest { prln("Begin testRequeueStageDrop"); adjustIndent(2); + // We have decided that this issue will not be fixed in + // Marina. Therefore, the test is commented out. + + /* prln("inserting instruction: Set OLC=63"); setOLC(marina, 63); @@ -1003,10 +1007,8 @@ public class MarinaTest { 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] 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); @@ -1019,6 +1021,7 @@ public class MarinaTest { 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"); @@ -1060,6 +1063,99 @@ public class MarinaTest { adjustIndent(-2); prln("End testFlagAB"); } + + + private void recvData(Marina marina) { + prln("Begin recvData"); + adjustIndent(2); + + marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC, CLEAR_FLAG, CLEAR_FLAG)); + marina.instrIn.fill(new Instruction.Move(DOCK, + false, /* requeueing */ + Predicate.IgnoreOLC, /* predicate */ + true, /* torpedoable */ + null, /* path */ + false, /* tokenIn */ + true, /* dataIn */ + false, /* latchData */ + false, /* latchPath */ + false, /* dataOut */ + false /* tokenOut */ + )); + marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC, SET_FLAG, SET_FLAG)); + + prln("checking to confirm that A flag is cleared"); + fatal(marina.getFlagA(), "bad A flag: "+marina.getFlagA()); + + prln("inserting data item in north fifo ring"); + BitVector data = new BitVector(37, "empty"); + BitVector addr = new BitVector(14, "empty"); + for(int i=0; i