From 4e2267ecd1a414ca53c2471a741cb4d5a99755ca Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Thu, 23 Jul 2009 16:49:17 -0700 Subject: [PATCH] add MarinaTest.loadEveryValueOLC() --- .../com/sun/vlsi/chips/marina/test/MarinaTest.java | 35 ++++++++++++++++++++ 1 file changed, 35 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 25a58fb..798dd4e 100644 --- a/marina/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/marina/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -817,6 +817,41 @@ public class MarinaTest { adjustIndent(-2); prln("End countOlc"); } + private void loadEveryValueOLC(Marina marina) { + adjustIndent(2); + for (int i=0; i<(1<<6); i++) { + + if (marina.kesselsCounter) { + System.out.println("master-clearing..."); + // master clear on each iteration; otherwise we'd need to "run down" the olc + marina.masterClear(); + marina.enableInstructionSend(true); + } + + int inOlc = i; + marina.fillSouthProperStopper(new Instruction[] { + + // to ensure that instruction is bubble-limited + RECV_DATA, + + // the Set-OLC instruction + new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, inOlc), + + // put a Set-ILC instruction right behind it with inverted bits to be sure we're + // not capturing the instruction-latch value too late in the cycle + new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, (inOlc ^ (~(-1<<6)))), + + }); + + model.waitNS(128 * CYCLE_TIME_NS); + marina.fillNorthProperStopper(); + model.waitNS(128 * CYCLE_TIME_NS); + + expectOlc(inOlc); + prln("loadEveryValueOLC: "+inOlc+" checks out"); + } + adjustIndent(-2); + } private void saturateInstructionFifo(Marina marina, Instruction instruction, int quantity, boolean expect_it_to_jam_up) { prln("Inserting "+quantity+" copies of \"" + instruction + "\""); -- 1.7.10.4