From 880b4654b1774ff8bdbc331bdff19bbbc6200a61 Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Thu, 19 Nov 2009 18:54:41 -0800 Subject: [PATCH] misc cleanups --- src/com/sun/vlsi/chips/marina/test/MarinaTest.java | 70 ++++++-------------- 1 file changed, 21 insertions(+), 49 deletions(-) diff --git a/src/com/sun/vlsi/chips/marina/test/MarinaTest.java b/src/com/sun/vlsi/chips/marina/test/MarinaTest.java index 4640749..01b394d 100644 --- a/src/com/sun/vlsi/chips/marina/test/MarinaTest.java +++ b/src/com/sun/vlsi/chips/marina/test/MarinaTest.java @@ -154,38 +154,11 @@ public class MarinaTest { return; } } - private void setUpSuppliesAndMeters(Station station) { - // set up power supplies and meters - if (!sim()) { - prln("Testing station: "+station); - Infrastructure.gpibControllers = new int[] {0}; - switch (cmdArgs.station) { - case ONE: - corePowerSupply = new Pst3202Channel("ch1", "HPST3202", 1); - padsPowerSupply = new Pst3202Channel("ch2", "HPST3202", 2); - break; - case TWO: - corePowerSupply = new Pst3202Channel("ch1", "HPST3202B", 1); - padsPowerSupply = new Pst3202Channel("ch2", "HPST3202B", 2); - break; - default: - fatal(true, "Unrecognized station: "+cmdArgs.station); - } - corePowerSupply.setCurrent((float)1.7); - corePowerSupply.setVoltageWait((float)1.0); - - padsPowerSupply.setCurrent((float)0.100); - padsPowerSupply.setVoltageWait((float)1.8); - - coreVoltmeter = new HP34401A(station.coreVoltmeter); - voltmeterForCurrent = new HP34401A(station.currentVoltmenter); - } - } - + private MarinaTest(String[] args) throws Exception { cmdArgs = new CmdArgs(args); reportTask(cmdArgs); - if (cmdArgs.mode==Mode.TEST_SILICON) doSilicon(); else doSim(); + doSim(); } static PowerChannel vdd18; @@ -338,25 +311,6 @@ public class MarinaTest { if (model instanceof SimulationModel) ((SimulationModel)model).finish(); } - private void doSilicon() throws Exception { - model = new SiliconChip(); - String ip = cmdArgs.station.ipAddr; - JtagTester tester = new Netscan4(ip, cmdArgs.station.jtagChannel); - tester.printInfo = false; - int khz = 1000; - ChainControl cc = new ChainControl("???", tester, 1.8f, khz); - cc.noTestSeverity = Infrastructure.SEVERITY_NOMESSAGE; - ChainControls ccs = new ChainControls(); - ccs.addChain(Marina.DATA_CHAIN, cc); - ccs.addChain(Marina.REPORT_CHAIN, cc); - ccs.addChain(Marina.CONTROL_CHAIN, cc); - marina = new Marina(ccs, model, false, indenter); - PowerChannel pc = new ManualPowerChannel("pc", false); - ChainTest ct = new ChainTest(cc, pc); - ct.testAllChains("marina", Infrastructure.SEVERITY_WARNING); - doOneTest(cmdArgs.testNum); - setUpSuppliesAndMeters(cmdArgs.station); - } /** In the absence of looping, the longest path through Infinity is 4 column delays */ private void waitUntilQuiescent() { @@ -989,9 +943,14 @@ public class MarinaTest { 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, + CLEAR_FLAG.add(Predicate.FlagA), + CLEAR_FLAG.add(Predicate.FlagB)); + private static final Instruction NOP = new Instruction.Move(dock, - Predicate.IgnoreFlagD, /* predicate */ + Predicate.IgnoreFlagD, /* predicate */ false, /* torpedoable */ null, /* path */ false, /* tokenIn */ @@ -1028,6 +987,19 @@ public class MarinaTest { false /* tokenOut */ ); + private static final Instruction SEND_DATA_IF_A_SET_AND_D_NOT_SET = + new Instruction.Move(dock, + Predicate.FlagA, /* predicate */ + false, /* torpedoable */ + null_path, /* path */ + false, /* tokenIn */ + false, /* dataIn */ + false, /* latchData */ + false, /* latchPath */ + true, /* dataOut */ + false /* tokenOut */ + ); + private static final Instruction SEND_DATA_IF_D_SET = new Instruction.Move(dock, Predicate.FlagD, /* predicate */ -- 1.7.10.4