X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fcom%2Fsun%2Fvlsi%2Fchips%2Fmarina%2Ftest%2FMarina.java;h=134e4a003fb2d1111999031a5930b784dd836211;hb=4e8e5d2d9695b381ef7f7967c02fe8d4bcca8316;hp=759662dc920fb77be9531c020a3e21750d57d9c6;hpb=daa7ab3d282553b18a61333a3d122813212939e2;p=fleet.git diff --git a/src/com/sun/vlsi/chips/marina/test/Marina.java b/src/com/sun/vlsi/chips/marina/test/Marina.java index 759662d..134e4a0 100644 --- a/src/com/sun/vlsi/chips/marina/test/Marina.java +++ b/src/com/sun/vlsi/chips/marina/test/Marina.java @@ -1,12 +1,6 @@ package com.sun.vlsi.chips.marina.test; /* -*- tab-width: 4 -*- */ -import com.sun.async.test.BitVector; -import com.sun.async.test.ChainControl; -import com.sun.async.test.ChipModel; -import com.sun.async.test.JtagTester; -import com.sun.async.test.NanosimModel; -import com.sun.async.test.VerilogModel; -import com.sun.async.test.*; +import com.sun.electric.tool.simulation.test.*; import edu.berkeley.fleet.api.Instruction; import edu.berkeley.fleet.marina.MarinaPath; @@ -43,7 +37,7 @@ public class Marina { prefix+"outputDo@0.outM1Pre@0.outDockP@0.outDockC@0.olcWcont@0.scanEx3h@1"; // bits 2,4,6 private static final String OLC_PATH_ODD = prefix+"outputDo@0.outM1Pre@0.outDockP@0.outDockC@0.olcWcont@0.scanEx3h@2"; // bits 1,3,5 - private static final String OLC_PATH_KESSEL = + public static final String OLC_PATH_KESSEL = prefix+"outputDo@0.outM1Pre@0.outDockP@0.outDockC@0.counte@0.adamScan@1.scanEx6h@"; private static final String ILC_PATH_ODD = prefix+"outputDo@0.outM1Pre@0.outDockP@0.outDockC@0.ilcMoveO@0.scanEx4h@0"; // bits 1,3,5,7 @@ -110,7 +104,7 @@ public class Marina { // The name of the scan chain // The instance path, from the top cell of the netlist, of the instance of infinityWithCover - private final ChainControls cc; // specifies the scan chain + public final ChainControls cc; // specifies the scan chain private final ChipModel model; public final ProperStopper data; public final InstructionStopper instrIn; @@ -119,7 +113,7 @@ public class Marina { private void pr(String msg) {indenter.pr(msg);} /** Shift the report scan chain */ - private void shiftReport(boolean readEnable, boolean writeEnable) { + public void shiftReport(boolean readEnable, boolean writeEnable) { cc.shift(REPORT_CHAIN, readEnable, writeEnable); } @@ -133,23 +127,45 @@ public class Marina { cc.shift(DATA_CHAIN, readEnable, writeEnable); } + /** Shift the data scan chain */ + public void shiftDuke(boolean readEnable, boolean writeEnable) { + cc.shift(DUKE_CHAIN, readEnable, writeEnable); + } + public Marina(ChainControls cc, ChipModel model, boolean clockHack, Indenter indenter) { this.cc = cc; this.model = model; this.indenter = indenter; data = new ProperStopper("north fifo", prefix+"northFif@1.fillDrai@1.properSt@1", - CONTROL_CHAIN, - DATA_CHAIN, - REPORT_CHAIN, - cc, model, clockHack, indenter); + cc, model, clockHack, indenter, + prefix+"northFif@1.fillDrai@1.instruct@0.cntScnTh@1.cntScnOn@1"); instrIn = new InstructionStopper("south fifo", prefix+"southFif@1.tapPropS@1.properSt@1", - CONTROL_CHAIN, - DATA_CHAIN, - REPORT_CHAIN, - cc, model, clockHack, indenter); + cc, model, clockHack, indenter, + prefix+"southFif@1.tapPropS@1.instruct@0.cntScnTh@1.cntScnOn@1"); } + + int northCount = 0; + int southCount = 0; + + public void stopAndResetCounters() { + instrIn.setCounterEnable(false); + data.setCounterEnable(false); + cc.shift(DATA_CHAIN, true, false); + northCount = data.getCounterValue(); + southCount = instrIn.getCounterValue(); + data.setCounterValue(0); + instrIn.setCounterValue(0); + } + public void startCounters() { + instrIn.setCounterEnable(true); + data.setCounterEnable(true); + } + public int getNorthCount() { return northCount; } + public int getSouthCount() { return southCount; } + + public void masterClear() { final double WIDTH = 10; // ns // Put a high going pulse on the internal chip master clear signal @@ -269,12 +285,14 @@ public class Marina { nModel.setNodeVoltage(MASTER_CLEAR,0.0); nModel.waitNS(1); } else { + mc0.setLogicState(true); mc1.setLogicState(true); model.waitNS(1000); mc0.setLogicState(false); mc1.setLogicState(false); model.waitNS(1000); + } resetAfterMasterClear(); } @@ -352,8 +370,34 @@ public class Marina { //System.out.println("kesselsCounter = " + bits); int first = 0; int second = 0; - for(int i=0; i<6; i++) first |= bits.get(4+i*3) ? (1<