From 2b02ffbd94d90cf5dd26366f92cba94005ca0028 Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Fri, 6 Mar 2009 03:21:21 +0000 Subject: [PATCH] update ProperStopper class to work with newest (6-scan-bit) proper stopper --- .../com/sun/vlsi/chips/marina/test/MarinaTest.java | 11 +++++++---- .../sun/vlsi/chips/marina/test/MarinaUtils.java | 20 ++++++++++---------- .../sun/vlsi/chips/marina/test/ProperStopper.java | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java index b7d0e6e..320ef71 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -247,7 +247,7 @@ public class MarinaTest { ctD.testAllChains("marina", Infrastructure.SEVERITY_WARNING); ctR.testAllChains("marina", Infrastructure.SEVERITY_WARNING); ctC.testAllChains("marina", Infrastructure.SEVERITY_WARNING); - + ccs.addChain(Marina.DATA_CHAIN, ccD); ccs.addChain(Marina.REPORT_CHAIN, ccR); ccs.addChain(Marina.CONTROL_CHAIN, ccC); @@ -435,12 +435,15 @@ public class MarinaTest { 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"); + + prln("stopping stopper"); + ps.stop(); + fatal( !ps.getStopped(), "stopper should have been stopped, but was not"); + adjustIndent(-2); } diff --git a/testCode/com/sun/vlsi/chips/marina/test/MarinaUtils.java b/testCode/com/sun/vlsi/chips/marina/test/MarinaUtils.java index d0acdce..6d632c5 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/MarinaUtils.java +++ b/testCode/com/sun/vlsi/chips/marina/test/MarinaUtils.java @@ -22,16 +22,16 @@ public class MarinaUtils { * The old bit order for Infinity was: Fill, Block, Clear, Silent, Go */ public static enum RingIfc { - RUN ("00100"), - IDLE ("10000"), - FILL ("11000"), - BLOCK ("10100"), - STOP ("00000"), - CLEAR ("10001"), - SOURCE ("01100"), - STOPSOURCE ("01000"), - SINK ("00110"), - STOPSINK ("00010"); + RUN ("000100"), + IDLE ("100000"), + FILL ("101000"), + BLOCK ("100100"), + STOP ("000000"), + CLEAR ("100010"), + SOURCE ("001100"), + STOPSOURCE ("001000"), + SINK ("000101"), + STOPSINK ("000001"); private BitVector scanBits; RingIfc(String bits) {scanBits = new BitVector(bits,"RingIfc");} public BitVector bits() {return scanBits;} diff --git a/testCode/com/sun/vlsi/chips/marina/test/ProperStopper.java b/testCode/com/sun/vlsi/chips/marina/test/ProperStopper.java index 80d32df..032000a 100644 --- a/testCode/com/sun/vlsi/chips/marina/test/ProperStopper.java +++ b/testCode/com/sun/vlsi/chips/marina/test/ProperStopper.java @@ -90,7 +90,7 @@ public class ProperStopper { } // The first 5 bits of the control chain control the fill and drain stages private void setFillDrainControl(BitVector fdCtl) { - fatal(fdCtl.getNumBits()!=5, "expect 5 proper stopper control bits"); + fatal(fdCtl.getNumBits()!=6, "expect 6 proper stopper control bits"); BitVector val = cc.getInBits(controlPath); for (int i=0; i