From e7d22038f10e36feb9ebbe305628f7bda7c53140 Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Thu, 23 Jul 2009 16:48:36 -0700 Subject: [PATCH] add MarinaTest.testDFlagWhenTorpedoLyingInWait() and MarinaTest.testSetOlcFollowedByDPredicated() --- .../com/sun/vlsi/chips/marina/test/MarinaTest.java | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/marina/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java b/marina/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java index f26bf5a..a01c0d8 100644 --- a/marina/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/marina/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -1910,6 +1910,45 @@ public class MarinaTest { prln("End testTorpedoOnAnInfinite"); } + private void testDFlagWhenTorpedoLyingInWait(Marina marina) { + marina.fillSouthProperStopper(new Instruction[] { + RECV_DATA, + TORPEDOABLE_RECV_DATA, + marina.kesselsCounter ? null : FLAG_NOP, + SEND_DATA_IF_D_SET, + }); + marina.instrIn.fillTorpedo(); + model.waitNS(64 * CYCLE_TIME_NS); + marina.fillNorthProperStopper(); + model.waitNS(64 * CYCLE_TIME_NS); + expectNorthFifoExactly(1); + } + + private void testSetOlcFollowedByDPredicated(Marina marina) { + for(boolean d_set : new boolean[] { false, true }) { + prln(""); + marina.fillSouthProperStopper(new Instruction[] { + setOlc(0), + marina.kesselsCounter ? null : FLAG_NOP, + d_set ? SEND_DATA_IF_D_SET : SEND_DATA_IF_D_NOT_SET, + }); + expectNorthFifoExactly(d_set ? 1 : 0); + + prln(""); + marina.fillSouthProperStopper(new Instruction[] { + setOlc(32), + marina.kesselsCounter ? null : FLAG_NOP, + d_set ? SEND_DATA_IF_D_SET : SEND_DATA_IF_D_NOT_SET, + }); + expectNorthFifoExactly(d_set ? 0 : 1); + + if (marina.kesselsCounter) { + marina.masterClear(); + marina.enableInstructionSend(true); + } + } + } + private void testOlcDecrementAtHighSpeed(Marina marina) { prln("Begin testOlcDecrementAtHighSpeed"); adjustIndent(2); -- 1.7.10.4