model instanceof SimulationModel
? ((SimulationModel)model).createJtagTester("TCK", "TMS", "TRSTb", "TDI", "TDO")
: new Netscan4("jtag3", 2);
+ JtagLogicLevel mc0=null;
+ JtagLogicLevel mc1=null;
if (tester instanceof Netscan4) {
((Netscan4)tester).reset();
// master clear
// not sure if "GPIO1" means "index 0" or not
- JtagLogicLevel mc0 = new JtagLogicLevel(tester, 0);
- JtagLogicLevel mc1 = new JtagLogicLevel(tester, 1);
+ mc0 = new JtagLogicLevel(tester, 0);
+ mc1 = new JtagLogicLevel(tester, 1);
mc0.setLogicState(true);
mc1.setLogicState(true);
}
+ /*
Logger.setLogInits(true);
tester.setLogSets(true);
tester.setLogOthers(true);
tester.setAllLogging(true);
tester.printInfo = true;
+ */
+ tester.printInfo = false;
ChainControls ccs = new ChainControls();
PowerChannel pc = new ManualPowerChannel("pc", false);
ccs.addChain(Marina.CONTROL_CHAIN, cc);
marina = new Marina(ccs, model, !cmdArgs.jtagShift, indenter);
+ marina.mc0=mc0;
+ marina.mc1=mc1;
if (model instanceof NanosimModel) {
NanosimLogicSettable mc = (NanosimLogicSettable)
if (model instanceof SimulationModel)
((SimulationModel)model).setNodeState(Marina.MASTER_CLEAR, 0);
else
- prln("FIXME: need to deassert master clear");
+ marina.masterClear();
model.waitNS(1000);
if (cmdArgs.testNum!=0 && cmdArgs.testNum!=1) {
false /* tokenOut */
);
+ private static final Instruction SEND_TOKEN_IF_D_SET =
+ new Instruction.Move(dock,
+ Predicate.FlagD, /* predicate */
+ false, /* torpedoable */
+ null_path, /* path */
+ false, /* tokenIn */
+ false, /* dataIn */
+ false, /* latchData */
+ false, /* latchPath */
+ false, /* dataOut */
+ true /* tokenOut */
+ );
+
private static final Instruction TORPEDOABLE_RECV_DATA =
new Instruction.Move(dock,
Predicate.IgnoreFlagD, /* predicate */
private void testDFlagWhenTorpedoLyingInWait(Marina marina) {
marina.fillSouthProperStopper(new Instruction[] {
+ setOlc(1),
RECV_DATA,
TORPEDOABLE_RECV_DATA,
- marina.kesselsCounter ? null : FLAG_NOP,
- SEND_DATA_IF_D_SET,
+ FLAG_NOP,
+ FLAG_NOP,
+ FLAG_NOP,
+ SEND_TOKEN_IF_D_SET,
});
- marina.instrIn.fillTorpedo();
- model.waitNS(64 * CYCLE_TIME_NS);
+
+ expectTokensExactly(0);
+
+ // changing the order of these lines should work, but it does not
marina.fillNorthProperStopper();
- model.waitNS(64 * CYCLE_TIME_NS);
- expectNorthFifoExactly(1);
+ marina.instrIn.fillTorpedo();
+
+ expectTokensExactly(1);
}
private void testSetOlcFollowedByDPredicated(Marina marina) {