package edu.berkeley.fleet.marina;
-/* -*- tab-width: 4 -*- */
-import java.util.ArrayList;
-import java.util.List;
-
+import java.util.*;
import com.sun.electric.tool.simulation.test.*;
import edu.berkeley.fleet.marina.CmdArgs;
import edu.berkeley.fleet.marina.CmdArgs.Mode;
-
import edu.berkeley.fleet.api.Dock;
import edu.berkeley.fleet.api.Instruction;
import edu.berkeley.fleet.api.Predicate;
import edu.berkeley.fleet.api.Instruction.Set.SetDest;
import edu.berkeley.fleet.api.Instruction.Set.SetSource;
-import edu.berkeley.fleet.marina.MarinaFleet;
-import edu.berkeley.fleet.marina.MarinaPath;
-
import java.io.*;
/**
* Tests for Marina
*/
public class MarinaTest {
- public static final MarinaFleet marinaFleet = new MarinaFleet();
- public static final Dock dock = marinaFleet.getOnlyInputDock();
+
+ private static Marina marina;
+ private MarinaTest(Marina marina) throws Exception {
+ this.marina = marina;
+ go("marina.spi");
+ }
+
+ private void go(String netListName) throws Exception {
+ if (model instanceof NanosimModel) {
+ NanosimLogicSettable mc = (NanosimLogicSettable)
+ ((SimulationModel)model).createLogicSettable(Marina.MASTER_CLEAR);
+ mc.setInitState(true);
+ }
+
+ prln("starting model");
+ if (model instanceof VerilogModel)
+ ((SimulationModel)model).start("verilog", "marina.v", VerilogModel.DUMPVARS, !cmdArgs.jtagShift);
+ else if (model instanceof HsimModel)
+ ((SimulationModel)model).start("hsim64", netListName, 0, !cmdArgs.jtagShift);
+ else if (model instanceof NanosimModel)
+ ((SimulationModel)model).start("nanosim -c cfg", netListName, 0, !cmdArgs.jtagShift);
+ else
+ {}
+ prln("model started");
+
+ model.waitNS(1000);
+ prln("deasserting master clear");
+ if (model instanceof SimulationModel)
+ ((SimulationModel)model).setNodeState(Marina.MASTER_CLEAR, 0);
+ else
+ marina.masterClear();
+ model.waitNS(1000);
+
+ if (cmdArgs.testNum!=0 && cmdArgs.testNum!=1) {
+ cc.resetInBits();
+ cc.shift(Marina.CONTROL_CHAIN, false, true);
+ }
+
+ doOneTest(cmdArgs.testNum);
+
+ if (model instanceof SimulationModel)
+ ((SimulationModel)model).finish();
+ }
public static float vdd = 1.0f;
//-------------------------- constants -----------------------------------
private static final String SCAN_CHAIN_XML = "marina.xml";
- private static final String NET_LIST = "marina.spi";
public static final int INSTR_SZ = 36;
- public static final Instruction.Set.FlagFunction CLEAR_FLAG
+ public final Instruction.Set.FlagFunction CLEAR_FLAG
= Instruction.Set.FlagFunction.ZERO;
- public static final Instruction.Set.FlagFunction SET_FLAG
+ public final Instruction.Set.FlagFunction SET_FLAG
= Instruction.Set.FlagFunction.ZERO.add(Predicate.FlagA)
.add(Predicate.NotFlagA);
- public static final Instruction.Set.FlagFunction A_FLAG
+ public final Instruction.Set.FlagFunction A_FLAG
= Instruction.Set.FlagFunction.ZERO.add(Predicate.FlagA);
- public static final Instruction.Set.FlagFunction B_FLAG
+ public final Instruction.Set.FlagFunction B_FLAG
= Instruction.Set.FlagFunction.ZERO.add(Predicate.FlagB);
// COLUMN_LATENCY is a delay that is larger than the latency through an Infinity column
private static long startTime;
public static Indenter indenter = new Indenter();
- private Marina marina;
- private ChipModel model;
+ private static ChipModel model;
//private ChainControl cc;
//private JtagTester tester;
- private CmdArgs cmdArgs;
+ private static CmdArgs cmdArgs;
private PowerChannel corePowerSupply, padsPowerSupply;
private VoltageReadable coreVoltmeter, voltmeterForCurrent;
- private ChainTest ctD, ctR, ctC, ct;
- private ChainControl ccD, ccR, ccC, cc;
+ private static ChainTest ctD, ctR, ctC, ct;
+ private static ChainControl ccD, ccR, ccC, cc;
//-------------------------- private methods -----------------------------
/** @return true if simulation. Return false if we're testing silicon. */
}
}
- private MarinaTest(String[] args) throws Exception {
- cmdArgs = new CmdArgs(args);
- reportTask(cmdArgs);
- doSim();
- }
static PowerChannel vdd18;
static PowerChannel vdd10;
static PowerChannel vdds;
- private void setVdd10(float v) {
+ private static void setVdd10(float v) {
if (vdd10==null) return;
vdd10.setVoltageWait(v);
}
- private void doSim() throws Exception {
- String netListName;
- switch (cmdArgs.mode) {
- case WHOLE_CHIP_SCHEMATIC_PARASITICS:
- netListName = NET_LIST;
- break;
- case WHOLE_CHIP_LAYOUT_PARASITICS:
- netListName = "marina_pads_guts.spi";
- break;
- default:
- fatal(true, "unrecognized CmdArgs.Mode");
- return;
- }
-
-
- Infrastructure.gpibControllers = new int[]{1};
- vdd18 = new Pst3202Channel("ch1", "tiPST3202", 1);
- vdd18 = new Pst3202Channel("ch3", "tiPST3202", 3);
- vdd10 = new PowerChannelResistorVoltageReadable(new Pst3202Channel("ch2", "tiPST3202", 2),
- 1000,
- new HP34401A("HP34970"),
- true);
-
- if (vdd10!=null) setVdd10(vdd);
- if (vdd18!=null) vdd18.setVoltageNoWait(1.8f);
-
- model = cmdArgs.useVerilog
- ? new VerilogModel()
- : cmdArgs.useHsim
- ? new HsimModel()
- : cmdArgs.silicon
- ? new SiliconChip()
- : new NanosimModel();
-
- if (model instanceof SimulationModel)
- ((SimulationModel)model).setOptimizedDirectReadsWrites(true);
-
- CYCLE_TIME_NS = cmdArgs.useVerilog ? (100*20) : 0.250;
- int khz =
- model instanceof VerilogModel
- ? 100000
- : cmdArgs.jtagShift
- ? 20000
- : model instanceof ChipModel
- ? 1000
- : 1000000;
-
- System.err.println("constructing jtag controller");
- JtagTester tester =
- model instanceof SimulationModel
- ? ((SimulationModel)model).createJtagTester("TCK", "TMS", "TRSTb", "TDI", "TDO")
- : new Netscan("jtag2");
- //: new Netscan("10.0.0.200");
- //: new Signalyzer();
- //: new Netscan("jtag2");
- JtagLogicLevel mc0=null;
- JtagLogicLevel mc1=null;
- if (tester instanceof NetscanGeneric) {
- ((NetscanGeneric)tester).reset();
- // master clear
- // not sure if "GPIO1" means "index 0" or not
- mc0 = new JtagLogicLevel(tester, 0);
- mc1 = new JtagLogicLevel(tester, 1);
- mc1 = mc0;
- mc0.setLogicState(true);
- mc1.setLogicState(true);
- }
- /*
- Logger.setLogInits(true);
- tester.setLogSets(true);
- tester.setLogOthers(true);
- tester.setAllLogging(true);
- tester.printInfo = true;
- */
- tester.printInfo = false;
-
- PowerChannel pc = new ManualPowerChannel("pc", false);
- /*
- JtagTester testerD, testerR, testerC;
- testerD = ((SimulationModel)model).createJtagSubchainTester("sid[1:9]", null);
- testerR = ((SimulationModel)model).createJtagSubchainTester("sir[1:9]", null);
- testerC = ((SimulationModel)model).createJtagSubchainTester("sic[1:9]", null);
- testerD.printInfo = testerR.printInfo = testerC.printInfo = false;
-
- ccD = new ChainControl(SCAN_CHAIN_XML, testerD, 1.8f, khz);
- ccR = new ChainControl(SCAN_CHAIN_XML, testerR, 1.8f, khz);
- ccC = new ChainControl(SCAN_CHAIN_XML, testerC, 1.8f, khz);
- ccD.noTestSeverity = ccR.noTestSeverity = ccC.noTestSeverity = Infrastructure.SEVERITY_NOMESSAGE;
-
-
- ctD = new ChainTest(ccD, pc);
- ctR = new ChainTest(ccR, pc);
- ctC = new ChainTest(ccC, pc);
- */
- /*
- ccs.addChain(Marina.DATA_CHAIN, ccD);
- ccs.addChain(Marina.REPORT_CHAIN, ccR);
- ccs.addChain(Marina.CONTROL_CHAIN, ccC);
- */
- /*
- PowerChannel ch2 = new Pst3202Channel("ch2", "tiPST3202", 2);
- PowerChannel ch3 = new Pst3202Channel("ch3", "tiPST3202", 3);
- Infrastructure.gpibControllers = new int[]{1};
- ch2.setVoltageNoWait(1f);
- ch3.setVoltageNoWait(1.8f);
- */
-
-
- cc = new ChainControl(SCAN_CHAIN_XML, tester, 1.8f, khz);
- cc.noTestSeverity = Infrastructure.SEVERITY_NOMESSAGE;
- ct = new ChainTest(cc, pc);
-
- marina = new Marina(cc, cc, cc, cc, model, !cmdArgs.jtagShift, indenter);
- marina.mc0=mc0;
- marina.mc1=mc1;
-
- if (model instanceof NanosimModel) {
- NanosimLogicSettable mc = (NanosimLogicSettable)
- ((SimulationModel)model).createLogicSettable(Marina.MASTER_CLEAR);
- mc.setInitState(true);
- }
-
- prln("starting model");
- if (model instanceof VerilogModel)
- ((SimulationModel)model).start("verilog", "marina.v", VerilogModel.DUMPVARS, !cmdArgs.jtagShift);
- else if (model instanceof HsimModel)
- ((SimulationModel)model).start("hsim64", netListName, 0, !cmdArgs.jtagShift);
- else if (model instanceof NanosimModel)
- ((SimulationModel)model).start("nanosim -c cfg", netListName, 0, !cmdArgs.jtagShift);
- else
- {}
- prln("model started");
-
- model.waitNS(1000);
- prln("deasserting master clear");
- if (model instanceof SimulationModel)
- ((SimulationModel)model).setNodeState(Marina.MASTER_CLEAR, 0);
- else
- marina.masterClear();
- model.waitNS(1000);
-
- if (cmdArgs.testNum!=0 && cmdArgs.testNum!=1) {
- cc.resetInBits();
- cc.shift(Marina.CONTROL_CHAIN, false, true);
- }
-
- doOneTest(cmdArgs.testNum);
-
- if (model instanceof SimulationModel)
- ((SimulationModel)model).finish();
- }
/** In the absence of looping, the longest path through Infinity is 4 column delays */
private void waitUntilQuiescent() {
prln("Begin testProperStoppers");
adjustIndent(2);
- for(ProperStopper ps : new ProperStopper[] { marina.data, marina.instrIn }) {
+ for(ProperStopper ps : new ProperStopper[] { marina.northRing, marina.southRing }) {
- prln("testing " + (ps == marina.data ? "data" : "instruction") + " stopper");
+ prln("testing " + (ps == marina.northRing ? "data" : "instruction") + " stopper");
adjustIndent(2);
prln("un-stopping stopper");
}
for(BitVector d : din)
- marina.instrIn.fill(new MarinaPacket(d, false, MarinaPacket.null_path));
+ marina.southRing.fill(new MarinaPacket(d, false, MarinaPacket.null_path));
adjustIndent(-2);
prln("End sendInstructions");
int nbToks = marina.getNumTokens();
fatal(nbToks!=0, "Expected no tokens on initialization but got: "+nbToks+" tokens");
- marina.instrIn.fill(setIlc(1));
- marina.instrIn.fill(SEND_TOKEN);
+ marina.southRing.fill(setIlc(1));
+ marina.southRing.fill(SEND_TOKEN);
nbToks = marina.getNumTokens();
fatal(nbToks!=1, "Expected one token to emerge but got: "+nbToks+" tokens");
edu.berkeley.fleet.api.BitVector bv = new edu.berkeley.fleet.api.BitVector(13);
for(int i=0; i<bv.length(); i+=2) bv.set(i, false);
- MarinaPath path = new MarinaPath((MarinaFleet)dock.getShip().getFleet(), bv);
+ MarinaPath path = new MarinaPath(marina, bv);
- marina.instrIn.fill(setIlc(1));
- marina.instrIn.fill(SEND_DATA);
+ marina.southRing.fill(setIlc(1));
+ marina.southRing.fill(SEND_DATA);
- List<BitVector> dataItems = marina.data.drainMany();
+ List<BitVector> dataItems = marina.northRing.drainMany();
fatal(dataItems.size()!=1, "Expected one data item to emerge but got: "+dataItems.size()+" data items");
MarinaPacket mp = new MarinaPacket(dataItems.get(0));
adjustIndent(2);
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.Infinity),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.Infinity),
SEND_DATA,
});
// more than MAX_ILC
int howmany = 70;
- List<BitVector> dataItems = marina.data.drainMany(howmany);
+ List<BitVector> dataItems = marina.northRing.drainMany(howmany);
fatal(dataItems.size()!=howmany,
"Expected an unending supply of data items to emerge but only got got: "+dataItems.size());
}
private Instruction setOlc(int olc) {
- return new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, olc);
+ return new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, olc);
}
private Instruction setOlcIfZero(int olc) {
- return new Instruction.Set(dock,Predicate.Default,SetDest.OuterLoopCounter, olc);
+ return new Instruction.Set(marina.getOnlyDock(),Predicate.Default,SetDest.OuterLoopCounter, olc);
}
private Instruction setIlc(int ilc) {
- return new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, ilc);
+ return new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, ilc);
}
private void testFlagD(Marina marina) {
Predicate only_if_olc_zero = Predicate.FlagD;
Predicate only_if_olc_nonzero = Predicate.Default;
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
for(int olc : new int[] { 1, 0 }) {
for(boolean predicate_olc_nonzero : new boolean[] { true, false }) {
marina.southRing.fill(new Instruction[] {
setOlc(olc),
- new Instruction.Move(dock,
+ new Instruction.Move(marina.getOnlyDock(),
predicate_olc_nonzero // predicate
? only_if_olc_nonzero
: only_if_olc_zero
expectNorthFifoExactly((predicate_olc_nonzero == (olc!=0)) ? 1 : 0);
for(int i=0; i<olc; i++)
- marina.instrIn.fill(DEC);
+ marina.southRing.fill(DEC);
adjustIndent(-2);
}
List<BitVector> dItems;
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 1));
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 1));
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 1));
for(boolean flag_a : new boolean[] { false, true }) {
for(boolean flag_b : new boolean[] { false, true }) {
prln("Setting flags, a="+flag_a+" b="+flag_b);
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,
flag_a
? Instruction.Set.FlagFunction.ONE
: Instruction.Set.FlagFunction.ZERO,
prln("Attempting send data with a="+flag_a+", b="+flag_b+", predicate="+predicate);
adjustIndent(2);
- marina.instrIn.fill(new Instruction.Move(dock,
+ marina.southRing.fill(new Instruction.Move(marina.getOnlyDock(),
predicate, // predicate
false, // torpedoable
null, // path
false // tokenOut
));
adjustIndent(-2);
- dItems = marina.data.drainMany();
+ dItems = marina.northRing.drainMany();
int expected = predicate.evaluate(flag_a, flag_b, false, false) ? 1 : 0;
fatal(dItems.size()!=expected, "Expected "+expected+" data items to emerge but got: "+
dItems.size()+" items(s)");
//for (int i=-1; i<6; i++) {
marina.southRing.fill(new Instruction[] {
- new Instruction.Head(dock),
+ new Instruction.Head(marina.getOnlyDock()),
- // new Instruction.Set(dock,Predicate.IgnoreFlagD, SetDest.OuterLoopCounter, 1),
+ // new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD, SetDest.OuterLoopCounter, 1),
FLAG_NOP,
FLAG_NOP,
FLAG_NOP,
FLAG_NOP,
- //new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, SetSource.Decrement),
+ //new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, SetSource.Decrement),
- new Instruction.Tail(dock),
+ new Instruction.Tail(marina.getOnlyDock()),
});
marina.southRing.fill(new Instruction[] {
null,
int inOlc = i==-1 ? 0 : (1<<i);
inOlc = i;
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, inOlc));
- marina.instrIn.fill(SEND_DATA_IF_D_SET);
- marina.instrIn.fill(SEND_DATA_IF_D_NOT_SET);
- marina.instrIn.fill(SEND_DATA);
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, inOlc));
+ marina.southRing.fill(SEND_DATA_IF_D_SET);
+ marina.southRing.fill(SEND_DATA_IF_D_NOT_SET);
+ marina.southRing.fill(SEND_DATA);
model.waitNS(128 * CYCLE_TIME_NS);
// Mask off the "zero" bit position
int inIlc = 1 << i;
prln("inIlc="+inIlc);
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, inIlc));
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, inIlc));
int outIlc = marina.getILC();
fatal(outIlc!=inIlc, "bad ILC count: "+outIlc+" expected: "+inIlc);
fatal(marina.getILCInfinity(), "bad Infinity bit: true");
}
prln("Now test the infinity bit");
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, SetSource.Infinity));
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, SetSource.Infinity));
fatal(!marina.getILCInfinity(), "bad Infinity bit: false");
adjustIndent(-2);
prln("End walkOneILC");
prln("Begin countIlc");
adjustIndent(2);
- marina.instrIn.fill(new
- Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, maxIlc));
+ marina.southRing.fill(new
+ Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, maxIlc));
int ilc = marina.getILC();
fatal(ilc!=maxIlc, "bad ILC count: "+ilc+" expected: "+maxIlc);
prln("execute a move instruction that does nothing except decrement the ILC to zero");
- marina.instrIn.fill(
- new Instruction.Move(dock,
+ marina.southRing.fill(
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, // predicate
false, // torpedoable
null, // path
prln("Begin countOlc");
adjustIndent(2);
- marina.instrIn.fill(setOlc(maxOlc));
+ marina.southRing.fill(setOlc(maxOlc));
for (int i=maxOlc; i>=0; i--) {
model.waitNS(128 * CYCLE_TIME_NS);
prln("OLC should be: "+i);
expectOlc(i);
- marina.instrIn.fill(new
- Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, SetSource.Decrement));
+ marina.southRing.fill(new
+ Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, SetSource.Decrement));
}
adjustIndent(-2);
RECV_DATA,
// the Set-OLC instruction
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, inOlc),
+ new Instruction.Set(marina.getOnlyDock(),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)))),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, (inOlc ^ (~(-1<<6)))),
});
int i=0;
for(i=0; i<quantity; i++) {
prln("Inserting instruction " + (i+1) +"/"+ quantity);
- marina.instrIn.fill(instruction);
- boolean jammed = (marina.instrIn.getFillStateWire()==MarinaUtils.StateWireState.FULL);
+ marina.southRing.fill(instruction);
+ boolean jammed = (marina.southRing.getFillStateWire()==MarinaUtils.StateWireState.FULL);
if (jammed && expect_it_to_jam_up) {
prln("Stopper remained full after inserting instruction; this was expected; we are happy.");
adjustIndent(-2);
prln("Successfully inserted " + i + " instructions");
}
- private static MarinaPath null_path = new MarinaPath((MarinaFleet)dock.getShip().getFleet(),
- MarinaUtils.sunToBerk(MarinaPacket.null_path));
+ private MarinaPath null_path = new MarinaPath(marina, MarinaUtils.sunToBerk(MarinaPacket.null_path));
- private static final Instruction DEC =
- new Instruction.Set(dock,Predicate.Default,SetDest.OuterLoopCounter, SetSource.Decrement);
+ private final Instruction DEC =
+ new Instruction.Set(marina.getOnlyDock(),Predicate.Default,SetDest.OuterLoopCounter, SetSource.Decrement);
- private static final Instruction FLAG_NOP =
- new Instruction.Set(dock, Predicate.IgnoreFlagD,
+ private final Instruction FLAG_NOP =
+ new Instruction.Set(marina.getOnlyDock(), Predicate.IgnoreFlagD,
CLEAR_FLAG.add(Predicate.FlagA),
CLEAR_FLAG.add(Predicate.FlagB));
- private static final Instruction FLAG_NOP_IF_FLAG_A =
- new Instruction.Set(dock, Predicate.FlagA,
+ private final Instruction FLAG_NOP_IF_FLAG_A =
+ new Instruction.Set(marina.getOnlyDock(), Predicate.FlagA,
CLEAR_FLAG.add(Predicate.FlagA),
CLEAR_FLAG.add(Predicate.FlagB));
- private static final Instruction NOP =
- new Instruction.Move(dock,
+ private final Instruction NOP =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
false /* tokenOut */
);
- private static final Instruction SEND_DATA =
- new Instruction.Move(dock,
+ private final Instruction SEND_DATA =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null_path, /* path */
false /* tokenOut */
);
- private static final Instruction SEND_DATA_IF_D_NOT_SET =
- new Instruction.Move(dock,
+ private final Instruction SEND_DATA_IF_D_NOT_SET =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.Default, /* predicate */
false, /* torpedoable */
null_path, /* path */
false /* tokenOut */
);
- private static final Instruction SEND_DATA_IF_A_SET_AND_D_NOT_SET =
- new Instruction.Move(dock,
+ private final Instruction SEND_DATA_IF_A_SET_AND_D_NOT_SET =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.FlagA, /* predicate */
false, /* torpedoable */
null_path, /* path */
false /* tokenOut */
);
- private static final Instruction SEND_DATA_IF_D_SET =
- new Instruction.Move(dock,
+ private final Instruction SEND_DATA_IF_D_SET =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.FlagD, /* predicate */
false, /* torpedoable */
null_path, /* path */
false /* tokenOut */
);
- private static final Instruction SEND_TOKEN_IF_D_SET =
- new Instruction.Move(dock,
+ private final Instruction SEND_TOKEN_IF_D_SET =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.FlagD, /* predicate */
false, /* torpedoable */
null_path, /* path */
true /* tokenOut */
);
- private static final Instruction SEND_TOKEN_IF_D_NOT_SET =
- new Instruction.Move(dock,
+ private final Instruction SEND_TOKEN_IF_D_NOT_SET =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.Default, /* predicate */
false, /* torpedoable */
null_path, /* path */
true /* tokenOut */
);
- private static final Instruction TORPEDOABLE_RECV_DATA =
- new Instruction.Move(dock,
+ private final Instruction TORPEDOABLE_RECV_DATA =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, /* predicate */
true, /* torpedoable */
null, /* path */
false /* tokenOut */
);
- private static final Instruction RECV_DATA =
- new Instruction.Move(dock,
+ private final Instruction RECV_DATA =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
false /* tokenOut */
);
- private static final Instruction SEND_TOKEN =
- new Instruction.Move(dock,
+ private final Instruction SEND_TOKEN =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null_path, /* path */
true /* tokenOut */
);
- private static final Instruction RECV_TOKEN =
- new Instruction.Move(dock,
+ private final Instruction RECV_TOKEN =
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
private void expectNorthFifoNoMoreThan(int num) {
model.waitNS(128 * CYCLE_TIME_NS);
- List<BitVector> dataItems = marina.data.drainMany(num+1);
+ List<BitVector> dataItems = marina.northRing.drainMany(num+1);
fatal(dataItems.size()>num,
"Expected no more than "+num+
" data items to emerge but got at least: "+dataItems.size());
}
private void expectNorthFifoExactly(int num) {
model.waitNS(128 * CYCLE_TIME_NS);
- List<BitVector> dataItems = marina.data.drainMany(num+1);
+ List<BitVector> dataItems = marina.northRing.drainMany(num+1);
fatal(dataItems.size()!=num,
"Expected exactly "+num+
" data items to emerge but got at least: "+dataItems.size());
}
private void expectNorthFifoAtLeast(int num) {
model.waitNS(128 * CYCLE_TIME_NS);
- List<BitVector> dataItems = marina.data.drainMany(num);
+ List<BitVector> dataItems = marina.northRing.drainMany(num);
fatal(dataItems.size()<num,
"Expected at least "+num+
" data items to emerge but got only: "+dataItems.size());
}
private void expectTokensNoMoreThan(int num) {
int x = marina.getNumTokens();
- List<BitVector> dataItems = marina.data.drainMany(num+1);
+ List<BitVector> dataItems = marina.northRing.drainMany(num+1);
fatal(x>num,
"Expected no more than "+num+
" tokens to emerge but got at least: "+x);
}
private void testFlagDRecomputationTime(Marina marina) {
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
marina.southRing.fill(new Instruction[] {
RECV_DATA,
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,0),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,0),
SEND_DATA_IF_D_NOT_SET
});
marina.northRing.fill();
marina.southRing.fill(new Instruction[] {
RECV_DATA,
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,1),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.Decrement),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,1),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.Decrement),
SEND_DATA_IF_D_NOT_SET
});
marina.northRing.fill();
marina.southRing.fill(new Instruction[] {
RECV_DATA,
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,2),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.Decrement),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,2),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.Decrement),
SEND_DATA_IF_D_NOT_SET
});
marina.northRing.fill();
expectNorthFifoExactly(1);
- marina.instrIn.fill(DEC);
+ marina.southRing.fill(DEC);
marina.southRing.fill(new Instruction[] {
RECV_DATA,
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,0),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,1),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,0),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,1),
SEND_DATA_IF_D_NOT_SET
});
marina.northRing.fill();
}
private void testTailWaitsForHead(Marina marina) {
- marina.instrIn.fill(setIlc(1));
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 63));
+ marina.southRing.fill(setIlc(1));
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 63));
marina.southRing.enableInstructionSend(false);
marina.southRing.enableInstructionRecirculate(true);
- marina.instrIn.fill(TORPEDOABLE_RECV_DATA);
- marina.instrIn.fill(new Instruction.Head(dock));
- marina.instrIn.fill(SEND_DATA);
- marina.instrIn.fill(TORPEDOABLE_RECV_DATA);
- marina.instrIn.fill(SEND_TOKEN);
- marina.instrIn.fill(TORPEDOABLE_RECV_DATA);
- marina.instrIn.fill(new Instruction.Tail(dock));
- marina.instrIn.fillTorpedo();
+ marina.southRing.fill(TORPEDOABLE_RECV_DATA);
+ marina.southRing.fill(new Instruction.Head(marina.getOnlyDock()));
+ marina.southRing.fill(SEND_DATA);
+ marina.southRing.fill(TORPEDOABLE_RECV_DATA);
+ marina.southRing.fill(SEND_TOKEN);
+ marina.southRing.fill(TORPEDOABLE_RECV_DATA);
+ marina.southRing.fill(new Instruction.Tail(marina.getOnlyDock()));
+ marina.southRing.fillTorpedo();
marina.southRing.enableInstructionRecirculate(false);
marina.southRing.enableInstructionSend(true);
- marina.instrIn.run();
+ marina.southRing.run();
expectNorthFifoNoMoreThan(0);
prln("inserting into north proper stopper");
}
/*
- marina.instrIn.fill(setIlc(1));
- marina.instrIn.fill(setOlc(1));
+ marina.southRing.fill(setIlc(1));
+ marina.southRing.fill(setOlc(1));
// this makes the head wait for the torpedo
- marina.instrIn.fill(TORPEDOABLE_RECV_DATA);
+ marina.southRing.fill(TORPEDOABLE_RECV_DATA);
// the head should wait for the tail
- marina.instrIn.fill(new Instruction.Head(dock));
- marina.instrIn.fill(NOP);
- marina.instrIn.fill(SEND_DATA);
- marina.instrIn.fill(RECV_DATA);
+ marina.southRing.fill(new Instruction.Head(marina.getOnlyDock()));
+ marina.southRing.fill(NOP);
+ marina.southRing.fill(SEND_DATA);
+ marina.southRing.fill(RECV_DATA);
expectNorthFifoNoMoreThan(0);
- marina.instrIn.fillTorpedo();
+ marina.southRing.fillTorpedo();
expectNorthFifoNoMoreThan(0);
- marina.instrIn.fill(new Instruction.Tail(dock));
+ marina.southRing.fill(new Instruction.Tail(marina.getOnlyDock()));
expectNorthFifoExactly(1);
*/
private void testTailWithoutHead(Marina marina) {
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 63),
- new Instruction.Tail(dock),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 63),
+ new Instruction.Tail(marina.getOnlyDock()),
SEND_DATA,
});
- List<BitVector> dataItems = marina.data.drainMany(1);
+ List<BitVector> dataItems = marina.northRing.drainMany(1);
fatal(dataItems.size()!=0, "Expected exactly no data items to emerge but got at least: "+dataItems.size());
}
prln("Begin testHeadWaitsForTail");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 63),
- new Instruction.Head(dock),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 63),
+ new Instruction.Head(marina.getOnlyDock()),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
SEND_DATA,
});
expectNorthFifoExactly(0);
- marina.instrIn.fill(new Instruction.Tail(dock));
+ marina.southRing.fill(new Instruction.Tail(marina.getOnlyDock()));
expectNorthFifoAtLeast(1);
adjustIndent(-2);
}
private void testNonTorpedoableMoveDoesNotResetDFlag(Marina marina) {
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,63),
- new Instruction.Move(dock,
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,63),
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, // predicate
true, // torpedoable
null, // path
false, // dataOut
false // tokenOut
),
- new Instruction.Move(dock,
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.FlagD, // predicate
false, // torpedoable
null, // path
false // tokenOut
),
});
- marina.instrIn.fillTorpedo();
+ marina.southRing.fillTorpedo();
expectNorthFifoExactly(1);
marina.southRing.fill(new Instruction[] {
- new Instruction.Move(dock,
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.Default, // predicate
false, // torpedoable
null, // path
private void testAbort(Marina marina) {
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.DataLatch,1),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,2),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.DataLatch,1),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,2),
SEND_DATA_IF_D_NOT_SET,
- new Instruction.Head(dock),
+ new Instruction.Head(marina.getOnlyDock()),
SEND_DATA_IF_D_NOT_SET,
- new Instruction.Set(dock,Predicate.Default,SetDest.DataLatch,2),
- new Instruction.Abort(dock, Predicate.FlagD),
- new Instruction.Set(dock,Predicate.Default,SetDest.OuterLoopCounter,SetSource.Decrement),
- new Instruction.Tail(dock),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.Default,SetDest.DataLatch,2),
+ new Instruction.Abort(marina.getOnlyDock(), Predicate.FlagD),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.Default,SetDest.OuterLoopCounter,SetSource.Decrement),
+ new Instruction.Tail(marina.getOnlyDock()),
}, true);
for(int i=0; i<4; i++) {
BitVector bv;
model.waitNS(128 * CYCLE_TIME_NS);
- bv = new MarinaPacket(marina.data.drain()).data.bitReverse();
+ bv = new MarinaPacket(marina.northRing.drain()).data.bitReverse();
fatal(bv==null, "no data item found");
prln("got " + bv.toLong());
fatal(bv.toLong()!=1, "expected 1, got " + bv.toLong());
model.waitNS(128 * CYCLE_TIME_NS);
- bv = new MarinaPacket(marina.data.drain()).data.bitReverse();
+ bv = new MarinaPacket(marina.northRing.drain()).data.bitReverse();
fatal(bv==null, "no data item found");
prln("got " + bv.toLong());
fatal(bv.toLong()!=1, "expected 1, got " + bv.toLong());
model.waitNS(128 * CYCLE_TIME_NS);
- bv = new MarinaPacket(marina.data.drain()).data.bitReverse();
+ bv = new MarinaPacket(marina.northRing.drain()).data.bitReverse();
fatal(bv==null, "no data item found");
prln("got " + bv.toLong());
fatal(bv.toLong()!=2, "expected 2, got " + bv.toLong());
}
private void testAbortOutsideOfLoop(Marina marina) {
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
marina.southRing.fill(new Instruction[] {
// ensure that an abort doesn't cause problems if no loop is in progress
- new Instruction.Abort(dock, Predicate.IgnoreFlagD),
+ new Instruction.Abort(marina.getOnlyDock(), Predicate.IgnoreFlagD),
SEND_DATA,
});
expectNorthFifoExactly(1);
one = one.add(Predicate.FlagC);
one = one.add(Predicate.NotFlagC);
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1));
for(boolean fast : new boolean[] { true, false }) {
// clear the flags to a known state, then check both 0->1 and 1->0 transitions
for(boolean b : new boolean[] { false, true, false }) {
prln("state: a="+marina.getFlagA()+", b="+marina.getFlagB());
prln((b?"Setting":"Clearing")+" flags");
- Instruction inst = new Instruction.Set(dock,Predicate.IgnoreFlagD,
+ Instruction inst = new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,
b ? one : zero,
b ? one : zero
);
model.waitNS(64 * CYCLE_TIME_NS);
marina.northRing.fill();
} else {
- marina.instrIn.fill(inst);
+ marina.southRing.fill(inst);
}
fatal(marina.getFlagA()!=b,
prln("Begin testFlagTruthTable");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
Instruction.Set.FlagFunction zero = Instruction.Set.FlagFunction.ZERO;
Instruction.Set.FlagFunction one = zero.add(Predicate.FlagA).add(Predicate.NotFlagA);
prln("before instruction: a="+a_state+", b="+b_state+", c="+c_state);
// set A,B flags to a_state and b_state
- marina.instrIn.fill(new
- Instruction.Set(dock,Predicate.IgnoreFlagD,
+ marina.southRing.fill(new
+ Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,
a_state ? one : zero,
b_state ? one : zero
));
for(int i=0; i<addr.getNumBits(); i++) addr.set(i, false);
addr.set(Marina.INDEX_OF_ADDRESS_BIT_COPIED_TO_C_FLAG_WHEN_DC_EQUALS_ONE, c_state);
marina.northRing.fill(new MarinaPacket(data, false, addr));
- marina.instrIn.fill(RECV_DATA);
+ marina.southRing.fill(RECV_DATA);
Instruction.Set.FlagFunction func = zero;
if (a_input!=null) func = func.add(a_input);
if (c_input!=null) func = func.add(c_input);
Instruction inst = new
- Instruction.Set(dock,Predicate.IgnoreFlagD,
+ Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,
!which ? func : zero.add(Predicate.FlagA),
which ? func : zero.add(Predicate.FlagB)
);
- marina.instrIn.fill(inst);
+ marina.southRing.fill(inst);
boolean expected_a = !which ? func.evaluate(a_state, b_state, c_state, false) : a_state;
boolean expected_b = which ? func.evaluate(a_state, b_state, c_state, false) : b_state;
prln("Begin recvData");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG),
- new Instruction.Move(dock,
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG),
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, // predicate
false, // torpedoable
null, // path
false, // dataOut
false // tokenOut
),
- new Instruction.Set(dock,Predicate.IgnoreFlagD, SET_FLAG, SET_FLAG),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD, SET_FLAG, SET_FLAG),
});
model.waitNS(64 * CYCLE_TIME_NS);
prln("Begin testRecvAndSendWalkingOne");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
List<BitVector> dataItems;
for(int bit=0; bit<37; bit++) {
marina.northRing.fill(new MarinaPacket(data, false, addr));
prln("stopping the north proper stopper");
- marina.data.stop();
+ marina.northRing.stop();
- dataItems = marina.data.drainMany(1);
+ dataItems = marina.northRing.drainMany(1);
fatal(dataItems.size()!=0,
"found a data item waiting in the north proper stopper, but should not have");
- marina.instrIn.fill(new Instruction.Move(dock,
+ marina.southRing.fill(new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, // predicate
false, // torpedoable
null_path, // path
false // tokenOut
));
- dataItems = marina.data.drainMany(2);
+ dataItems = marina.northRing.drainMany(2);
fatal(dataItems.size()!=1,
"found "+dataItems.size()+" data items in north fifo; expected one");
MarinaPacket mp = new MarinaPacket(dataItems.get(0));
prln("Begin setOlcFromDataLatch");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
// walk a bit from 0 to 5
for(int bit=0; bit<6; bit++) {
marina.southRing.fill(new Instruction[] {
RECV_DATA,
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.DataLatch),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.DataLatch,-1),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,SetSource.DataLatch),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.DataLatch,-1),
});
model.waitNS(CYCLE_TIME_NS * 64);
prln("Begin setIlcFromDataLatch");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
// walk a bit from 0 to 5
for(int bit=5; bit>=0; bit--) {
marina.northRing.fill(new MarinaPacket(data, false, addr));
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
RECV_DATA,
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.DataLatch),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.DataLatch),
});
model.waitNS(CYCLE_TIME_NS * 64);
prln("Begin testSendAndRecvToken");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
marina.southRing.fill(new Instruction[] {
SEND_TOKEN,
RECV_TOKEN,
prln("Begin testSignExtendedLiteral");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
for(long val : new long[] { (-1L << 14), -1, 0, 1 }) {
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,
Instruction.Set.SetDest.DataLatch,
val),
SEND_DATA,
});
model.waitNS(CYCLE_TIME_NS * 64);
- List<BitVector> dataItems = marina.data.drainMany(3);
+ List<BitVector> dataItems = marina.northRing.drainMany(3);
fatal(dataItems.size()!=1, "expected exactly one data item, got " + dataItems.size());
MarinaPacket mp = new MarinaPacket(dataItems.get(0));
prln("Begin testShiftedLiteral");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,
+ marina.southRing.fill(setIlc(1));
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,
Instruction.Set.SetDest.DataLatch,
0));
dreg.set(i, immediate.get(i));
marina.southRing.fill(new Instruction[] {
- new Instruction.Shift(dock,Predicate.IgnoreFlagD,immediate),
+ new Instruction.Shift(marina.getOnlyDock(),Predicate.IgnoreFlagD,immediate),
SEND_DATA,
});
model.waitNS(CYCLE_TIME_NS * 64);
- List<BitVector> dataItems = marina.data.drainMany(3);
+ List<BitVector> dataItems = marina.northRing.drainMany(3);
fatal(dataItems.size()!=1, "expected exactly one data item, got " + dataItems.size());
BitVector bv = new MarinaPacket(dataItems.get(0)).data;
// Dc=1 => sigS is copied into C-flag
// Dc=0 => sigA is copied into C-flag
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
for(boolean dc : new boolean[] { false, true }) {
for(boolean c_flag : new boolean[] { true, false, true }) {
prln("executing recv data with Dc="+dc);
prln("copying c-flag to a-flag");
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG),
- new Instruction.Move(dock,
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG),
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, /* predicate */
true, /* torpedoable */
null, /* path */
false /* tokenOut */
),
FLAG_NOP,
- new Instruction.Set(dock,Predicate.IgnoreFlagD,
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,
Instruction.Set.FlagFunction.ZERO.add(Predicate.FlagC),
CLEAR_FLAG
),
adjustIndent(2);
edu.berkeley.fleet.api.BitVector bv = new edu.berkeley.fleet.api.BitVector(13);
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
// alternating ones and zeroes
for(int i=0; i<bv.length(); i+=2)
for(int i=0; i<4; i++)
bv.set(i, true);
- MarinaPath path = new MarinaPath((MarinaFleet)dock.getShip().getFleet(), bv);
+ MarinaPath path = new MarinaPath(marina, bv);
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
- new Instruction.Move(dock,
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
path, /* path */
List<BitVector> dataItems;
MarinaPacket mp;
- dataItems = marina.data.drainMany();
+ dataItems = marina.northRing.drainMany();
fatal(dataItems.size()!=1, "Expected one data item to emerge but got: "+dataItems.size()+" data items");
mp = new MarinaPacket(dataItems.get(0));
fatalIfBitVectorsDoNotMatch(MarinaUtils.berkToSun(bv), mp.path.get(0,13));
prln("send data with no change to path");
- marina.instrIn.fill(new Instruction.Move(dock,
+ marina.southRing.fill(new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
false /* tokenOut */
));
- dataItems = marina.data.drainMany();
+ dataItems = marina.northRing.drainMany();
fatal(dataItems.size()!=1, "Expected one data item to emerge but got: "+dataItems.size()+" data items");
mp = new MarinaPacket(dataItems.get(0));
prln("Begin recvPath");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
for(int bit=0; bit<11; bit++) {
BitVector packet_data = new BitVector(37, "inbound data item");
for(int i=0; i<37; i++) packet_data.set(i, false);
marina.northRing.fill(new MarinaPacket(packet_data, false, packet_path));
prln("recv path, send data (using recv'd path)");
- marina.instrIn.fill(new Instruction.Move(dock,
+ marina.southRing.fill(new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, /* predicate */
false, /* torpedoable */
null, /* path */
false /* tokenOut */
));
- List<BitVector> dataItems = marina.data.drainMany();
+ List<BitVector> dataItems = marina.northRing.drainMany();
fatal(dataItems.size()!=1, "Expected one data item to emerge but got: "+dataItems.size()+" data items");
MarinaPacket mp = new MarinaPacket(dataItems.get(0));
for(int bit=0; bit<6; bit++) {
int ilc = bit<0 ? 0 : (1<<bit);
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,ilc),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,ilc),
SEND_DATA,
});
- List<BitVector> dataItems = marina.data.drainMany();
+ List<BitVector> dataItems = marina.northRing.drainMany();
fatal(dataItems.size()!=ilc, "Expected "+ilc+" data item(s) to emerge but got: "+dataItems.size()+" data items");
}
private void testILCZero(Marina marina) {
adjustIndent(2);
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,0),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,0),
SEND_DATA,
SEND_TOKEN,
});
private void sendTorpedo(Marina marina) {
prln("Begin sendTorpedo");
adjustIndent(2);
- marina.instrIn.fill(setIlc(1));
- marina.instrIn.fill(setOlc(63));
+ marina.southRing.fill(setIlc(1));
+ marina.southRing.fill(setOlc(63));
model.waitNS(128 * CYCLE_TIME_NS);
expectOlc(63);
- marina.instrIn.fill(new
- Instruction.Set(dock,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
+ marina.southRing.fill(new
+ Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
fatal(marina.getFlagA(), "bad A flag: true");
fatal(marina.getFlagB(), "bad B flag: true");
model.waitNS(128 * CYCLE_TIME_NS);
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, SetSource.Infinity),
- new Instruction.Move(dock,
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, SetSource.Infinity),
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, // predicate
true, // torpedoable
null, // path
false, // dataOut
false // tokenOut
),
- new Instruction.Set(dock,Predicate.Default,
+ new Instruction.Set(marina.getOnlyDock(),Predicate.Default,
SET_FLAG,
Instruction.Set.FlagFunction.ZERO.add(Predicate.FlagB)
),
- new Instruction.Set(dock, Predicate.FlagD,
+ new Instruction.Set(marina.getOnlyDock(), Predicate.FlagD,
Instruction.Set.FlagFunction.ZERO.add(Predicate.FlagA),
SET_FLAG
),
model.waitNS(128 * CYCLE_TIME_NS);
prln("send torpedo. This should clear the OLC");
- marina.instrIn.fillTorpedo();
+ marina.southRing.fillTorpedo();
model.waitNS(128 * CYCLE_TIME_NS);
model.waitNS(128 * CYCLE_TIME_NS);
model.waitNS(128 * CYCLE_TIME_NS);
prln("Reload OLC after torpedo, clears D-flag");
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 63));
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 63));
// FIXME: find another way to test this
model.waitNS(128 * CYCLE_TIME_NS);
expectOlc(63);
prln("Set A=1, B=1 This instruction should execute because OLC!=0");
- marina.instrIn.fill(new
- Instruction.Set(dock,Predicate.Default, SET_FLAG, SET_FLAG));
+ marina.southRing.fill(new
+ Instruction.Set(marina.getOnlyDock(),Predicate.Default, SET_FLAG, SET_FLAG));
prln("A and B should be true");
fatal(!marina.getFlagA(), "bad A flag: false");
List<BitVector> dataItems;
- marina.instrIn.fill(setIlc(1));
+ marina.southRing.fill(setIlc(1));
for(boolean torpedoable : new boolean[] { true, false }) {
marina.southRing.fill(new Instruction[] {
- new Instruction.Move(dock,
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, // predicate
false, // torpedoable
null, // path
false, // dataOut
true // tokenOut
),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.Infinity),
- new Instruction.Move(dock,
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,SetSource.Infinity),
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.IgnoreFlagD, // predicate
torpedoable, // torpedoable
null, // path
true // tokenOut
),
// FIXME: this probably should be removed, unless Ivan doesn't want to change the behavior
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
SEND_DATA,
});
// expect nothing to come out, because the NOP is executing
- dataItems = marina.data.drainMany(2);
+ dataItems = marina.northRing.drainMany(2);
fatal(dataItems.size()!=0, "Expected no data item(s) to emerge but got at least: "+dataItems.size()+" data items");
- marina.instrIn.fillTorpedo();
+ marina.southRing.fillTorpedo();
int expected = torpedoable?1:0;
- dataItems = marina.data.drainMany(2);
+ dataItems = marina.northRing.drainMany(2);
fatal(dataItems.size()!=expected, "Expected "+expected+" item to emerge but got: "+dataItems.size()+" data items");
fatal(!marina.getILCDone(), "Expected ilc=done, but got "+marina.getILC());
// changing the order of these lines should work, but it does not
marina.northRing.fill();
- marina.instrIn.fillTorpedo();
+ marina.southRing.fillTorpedo();
expectTokensExactly(1);
}
prln("inserting set olc="+olc);
prln("inserting set ilc=1");
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,olc),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter,1),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter,olc),
});
// commenting the following four lines causes this test to pass
Instruction[] instructions = new Instruction[decr_amount+1];
for(int i=0; i<decr_amount; i++)
instructions[i] =
- new Instruction.Set(dock,
+ new Instruction.Set(marina.getOnlyDock(),
Predicate.Default,
SetDest.OuterLoopCounter,
SetSource.Decrement);
instructions[instructions.length-1] =
- new Instruction.Move(dock,
+ new Instruction.Move(marina.getOnlyDock(),
Predicate.Default, // predicate
false, // torpedoable
null, // path
model.waitNS(64 * CYCLE_TIME_NS);
int expected = decr_amount>=olc ? 0 : 1;
- dataItems = marina.data.drainMany(2);
+ dataItems = marina.northRing.drainMany(2);
fatal(dataItems.size()!=expected, "Expected "+expected+" item to emerge but got: "+dataItems.size()+" data items");
expectOlc(Math.max(0,olc-decr_amount));
prln("Then immediately set ILC="+notZero);
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 0),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, notZero),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 0),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, notZero),
});
model.waitNS(64 * CYCLE_TIME_NS);
fatal(marina.getILCInfinity(), "bad ILC Infinity bit: true");
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, notZero),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 0),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, notZero),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.InnerLoopCounter, 0),
});
model.waitNS(64 * CYCLE_TIME_NS);
prln("Using the set OLC instruction, toggle a single bit between zero and one. \n" +
"Check correct setting of the OLC zero bit");
- marina.instrIn.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD, CLEAR_FLAG, CLEAR_FLAG));
for (int i=0; i<6; i++) {
int notZero = 32 >> i;
prln("Set OLC=0");
prln("Then immediately set OLC="+notZero);
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 0),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, notZero),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 0),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, notZero),
});
model.waitNS(64 * CYCLE_TIME_NS);
prln("Set OLC="+notZero);
prln("Then immediately set OLC=0");
marina.southRing.fill(new Instruction[] {
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, notZero),
- new Instruction.Set(dock,Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 0),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, notZero),
+ new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,SetDest.OuterLoopCounter, 0),
});
model.waitNS(64 * CYCLE_TIME_NS);
BitVector data = new BitVector(MarinaPacket.WORD_WIDTH, "path");
path.set(0, MarinaPacket.PATH_WIDTH, false);
data.setFromLong(i+9);
- marina.instrIn.fill(new MarinaPacket(data, false, path));
+ marina.southRing.fill(new MarinaPacket(data, false, path));
}
adjustIndent(-2);
prln("Drain south ring and check contents");
adjustIndent(2);
- List<BitVector> out = marina.instrIn.drainMany();
+ List<BitVector> out = marina.southRing.drainMany();
boolean bad = false;
for (int i=0; i<AMOUNT; i++) {
prln("extracting item " + (i+1) + " / " + AMOUNT);
adjustIndent(2);
for(int i=0; i<marina.TOKEN_FIFO_CAPACITY + 3; i++)
- marina.instrIn.fill(SEND_TOKEN);
- marina.instrIn.fill(SEND_DATA);
+ marina.southRing.fill(SEND_TOKEN);
+ marina.southRing.fill(SEND_DATA);
expectNorthFifoExactly(0);
adjustIndent(-2);
for(int j=0; j<12; j++)
root.getInBits().set(bitIndex+j, false);
root.getInBits().set(bitIndex+i, true);
- marina.shiftDuke(false, true);
+ marina.dukeChain.shift(Marina.DUKE_CHAIN, false, true);
System.in.read();
}
break;
for(int xx=1; xx<65; xx++) {
marina.masterClear();
- marina.data.sink();
+ marina.northRing.sink();
marina.stopAndResetCounters();
marina.southRing.enableInstructionSend(true);
- marina.southRing.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,
Instruction.Set.FlagFunction.ZERO
.add(Predicate.FlagA).add(Predicate.NotFlagA),
Instruction.Set.FlagFunction.ZERO));
//int xx = 63; // 1.802ms
//int xx = 1; // 0.207ms => 24.3ns for 62 counts => 390ps cycle time => 2.5Ghz
marina.southRing.fill(new Instruction[] {
- new Instruction.Head(dock),
+ new Instruction.Head(marina.getOnlyDock()),
setOlc(xx),
FLAG_NOP,
FLAG_NOP,
FLAG_NOP,
FLAG_NOP,
SEND_DATA,
- new Instruction.Tail(dock),
+ new Instruction.Tail(marina.getOnlyDock()),
}, false, false);
marina.southRing.fill(new Instruction[] {
/*
- new Instruction.Set(dock,Predicate.FlagD,
+ new Instruction.Set(marina.getOnlyDock(),Predicate.FlagD,
Instruction.Set.FlagFunction.ZERO.add(Predicate.NotFlagA),
Instruction.Set.FlagFunction.ZERO),
setOlcIfZero(32),
//marina.startCounters(false, false);
- marina.instrIn.run();
+ marina.southRing.run();
vdd10.setVoltageWait(vdd);
marina.startCounters(false, true);
try { Thread.sleep(wait); } catch (Exception e) { }
- //marina.instrIn.stop();
+ //marina.southRing.stop();
marina.stopAndResetCounters();
int countNorth = marina.getNorthCount();
for(int iter = 0; iter < MAX_ITER; iter++) {
marina.masterClear();
- marina.data.sink();
+ marina.northRing.sink();
marina.stopAndResetCounters();
marina.southRing.enableInstructionSend(true);
marina.southRing.fill(setOlc(1));
- marina.southRing.fill(new Instruction.Head(dock));
+ marina.southRing.fill(new Instruction.Head(marina.getOnlyDock()));
for(int i=0; i<toks; i++)
marina.southRing.fill(/*SEND_DATA*/NOP);
marina.southRing.fill(new Instruction[] {
- new Instruction.Tail(dock),
+ new Instruction.Tail(marina.getOnlyDock()),
}, false, true);
- marina.instrIn.run();
+ marina.southRing.run();
// have to set the voltage while drawing current
vdd10.setVoltageWait(vdd);
marina.startCounters();
try { Thread.sleep(wait); } catch (Exception e) { }
marina.stopAndResetCounters();
- //marina.instrIn.stop();
+ //marina.southRing.stop();
int countNorth = marina.getNorthCount();
int countSouth = marina.getSouthCount();
for(int iter = 0; iter < MAX_ITER; iter++) {
marina.masterClear();
- marina.data.sink();
+ marina.northRing.sink();
marina.stopAndResetCounters();
marina.southRing.enableInstructionSend(true);
marina.southRing.fill(setOlc(1));
- marina.southRing.fill(new Instruction.Set(dock,Predicate.IgnoreFlagD,
+ marina.southRing.fill(new Instruction.Set(marina.getOnlyDock(),Predicate.IgnoreFlagD,
Instruction.Set.FlagFunction.ZERO,
Instruction.Set.FlagFunction.ZERO));
- marina.southRing.fill(new Instruction.Head(dock));
+ marina.southRing.fill(new Instruction.Head(marina.getOnlyDock()));
//marina.southRing.fill(setIlc(31));
marina.southRing.fill(SEND_DATA);
for(int i=0; i<toks+1; i++) {
marina.southRing.fill(FLAG_NOP);
}
marina.southRing.fill(new Instruction[] {
- new Instruction.Tail(dock),
+ new Instruction.Tail(marina.getOnlyDock()),
}, false, true);
marina.startCounters();
- marina.instrIn.run();
+ marina.southRing.run();
try { Thread.sleep(wait); } catch (Exception e) { }
marina.stopAndResetCounters();
fatal(true, "Test number: "+testNum+" doesn't exist.");
break;
}
- // If we get here then test passed
prln("Test Result: Passed");
printTestTime();
- //Infrastructure.exit(0);
}
-
- //============================ for public use =============================
-
- /** Exit codes:
- * 0: test detected success
- * 2: test detected failure
- * 1: test crashed
- */
public static void main(String[] args) throws Exception {
startTime = System.currentTimeMillis();
- new MarinaTest(args);
+ cmdArgs = new CmdArgs(args);
+ reportTask(cmdArgs);
+ Infrastructure.gpibControllers = new int[]{1};
+ vdds = new Pst3202Channel("ch1", "tiPST3202", 1);
+ vdd18 = new Pst3202Channel("ch3", "tiPST3202", 3);
+ vdd10 = new PowerChannelResistorVoltageReadable(new Pst3202Channel("ch2", "tiPST3202", 2),
+ 1000,
+ new HP34401A("HP34970"),
+ true);
+ if (vdd10!=null) setVdd10(vdd);
+ if (vdd18!=null) vdd18.setVoltageNoWait(1.8f);
+
+ model = cmdArgs.useVerilog
+ ? new VerilogModel()
+ : cmdArgs.useHsim
+ ? new HsimModel()
+ : cmdArgs.silicon
+ ? new SiliconChip()
+ : new NanosimModel();
+
+ if (model instanceof SimulationModel)
+ ((SimulationModel)model).setOptimizedDirectReadsWrites(true);
+
+ CYCLE_TIME_NS = cmdArgs.useVerilog ? (100*20) : 0.250;
+ int khz =
+ model instanceof VerilogModel
+ ? 100000
+ : cmdArgs.jtagShift
+ ? 20000
+ : model instanceof ChipModel
+ ? 1000
+ : 1000000;
+
+ System.err.println("constructing jtag controller");
+ JtagTester tester =
+ model instanceof SimulationModel
+ ? ((SimulationModel)model).createJtagTester("TCK", "TMS", "TRSTb", "TDI", "TDO")
+ : new Netscan("jtag2");
+ //: new Netscan("10.0.0.200");
+ //: new Signalyzer();
+ //: new Netscan("jtag2");
+ JtagLogicLevel mc0=null;
+ JtagLogicLevel mc1=null;
+ if (tester instanceof NetscanGeneric) {
+ ((NetscanGeneric)tester).reset();
+ // master clear
+ // not sure if "GPIO1" means "index 0" or not
+ mc0 = new JtagLogicLevel(tester, 0);
+ mc1 = new JtagLogicLevel(tester, 1);
+ mc1 = mc0;
+ mc0.setLogicState(true);
+ mc1.setLogicState(true);
+ }
+ tester.printInfo = false;
+ PowerChannel pc = new ManualPowerChannel("pc", false);
+ cc = new ChainControl(SCAN_CHAIN_XML, tester, 1.8f, khz);
+ cc.noTestSeverity = Infrastructure.SEVERITY_NOMESSAGE;
+ ct = new ChainTest(cc, pc);
+ marina = new Marina(cc, cc, cc, cc, model, !cmdArgs.jtagShift, indenter);
+ marina.mc0=mc0;
+ marina.mc1=mc1;
+ new MarinaTest(marina);
}
}