From 78d3d064a54a25ed237a8031a807f467146c2112 Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Fri, 6 Mar 2009 03:00:42 +0000 Subject: [PATCH] add test 1, testProperStoppers(), as well as commented-out code to spawn the ChainG gui --- .../com/sun/vlsi/chips/marina/test/MarinaTest.java | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java index 87b70bd..b7d0e6e 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -5,6 +5,7 @@ import java.util.List; import com.sun.async.test.BitVector; import com.sun.async.test.ChainControl; +import com.sun.async.test.ChainG; import com.sun.async.test.ChainTest; import com.sun.async.test.ChipModel; import com.sun.async.test.HP34401A; @@ -252,6 +253,11 @@ public class MarinaTest { ccs.addChain(Marina.CONTROL_CHAIN, ccC); marina = new Marina(ccs, model, !cmdArgs.jtagShift, indenter); + + //System.out.println("launching"); + //ChainG.createAndShowGUI(marina.cc.getChainControlFromPath(Marina.REPORT_CHAIN)); + //System.out.println(" launched."); + doOneTest(cmdArgs.testNum); ((SimulationModel)model).finish(); @@ -421,6 +427,26 @@ public class MarinaTest { //========================================================================= // Put top level tests here + + private void testProperStoppers(Marina marina) { + prln("Begin testProperStoppers"); + adjustIndent(2); + + for(ProperStopper ps : new ProperStopper[] { marina.data, marina.instrIn }) { + prln("testing " + (ps == marina.data ? "data" : "instruction") + " stopper"); + adjustIndent(2); + prln("getting status"); + fatal( !ps.getStopped(), "stopper should have been stopped, but was not"); + prln("un-stopping stopper"); + ps.run(); + prln("getting status"); + fatal( ps.getStopped(), "stopper should not have been stopped, but was"); + adjustIndent(-2); + } + + adjustIndent(-2); + } + private void sendInstructions(Marina marina) { prln("Begin sendInstructions"); adjustIndent(2); @@ -1981,6 +2007,7 @@ public class MarinaTest { marina.enableInstructionSend(true); switch (testNum) { + case 1: testProperStoppers(marina); break; case 2: sendInstructions(marina); break; case 3: sendToken(marina); break; case 4: getCtrsFlags(marina); break; -- 1.7.10.4