Search in sources :

Example 21 with ToBreakRunner

use of de.neemann.digital.integration.ToBreakRunner in project Digital by hneemann.

the class ModelAnalyserTest method testAnalyzerUniqueNames.

public void testAnalyzerUniqueNames() throws Exception {
    Model model = new ToBreakRunner("dig/analyze/uniqueNames.dig", false).getModel();
    try {
        new ModelAnalyser(model);
        fail();
    } catch (AnalyseException e) {
    }
}
Also used : Model(de.neemann.digital.core.Model) ToBreakRunner(de.neemann.digital.integration.ToBreakRunner)

Example 22 with ToBreakRunner

use of de.neemann.digital.integration.ToBreakRunner in project Digital by hneemann.

the class ModelAnalyserTest method testAnalyzerTFFEnable.

public void testAnalyzerTFFEnable() throws Exception {
    Model model = new ToBreakRunner("dig/analyze/analyzeTestTFFEnable.dig", false).getModel();
    TruthTable tt = new ModelAnalyser(model).analyse();
    check2BitCounter(tt);
}
Also used : Model(de.neemann.digital.core.Model) ToBreakRunner(de.neemann.digital.integration.ToBreakRunner)

Example 23 with ToBreakRunner

use of de.neemann.digital.integration.ToBreakRunner in project Digital by hneemann.

the class ModelAnalyserTest method testAnalyzerBacktrack.

public void testAnalyzerBacktrack() throws Exception {
    Model model = new ToBreakRunner("dig/analyze/analyzeBacktrack.dig", false).getModel();
    TruthTable tt = new ModelAnalyser(model).analyse();
    final BoolTable Y1 = tt.getResult("1Y");
    checkRemaining(Y1, "1A", "1B");
    checkTable(getInner(Y1), zero, one, one, zero);
    final BoolTable Y2 = tt.getResult("2Y");
    checkRemaining(Y2, "2A", "2B");
    checkTable(getInner(Y2), one, zero, zero, one);
    final BoolTable Y3 = tt.getResult("3Y");
    checkRemaining(Y3, "3A", "3B");
    checkTable(getInner(Y3), zero, one, one, one);
    final BoolTable Y4 = tt.getResult("4Y");
    checkRemaining(Y4, "4A", "4B", "4C");
    checkTable(getInner(Y4), zero, zero, zero, zero, zero, zero, zero, one);
}
Also used : BoolTable(de.neemann.digital.analyse.quinemc.BoolTable) Model(de.neemann.digital.core.Model) ToBreakRunner(de.neemann.digital.integration.ToBreakRunner)

Example 24 with ToBreakRunner

use of de.neemann.digital.integration.ToBreakRunner in project Digital by hneemann.

the class ModelAnalyserTest method testAnalyzerJKFF.

public void testAnalyzerJKFF() throws Exception {
    Model model = new ToBreakRunner("dig/analyze/analyzeTestJKFF.dig", false).getModel();
    TruthTable tt = new ModelAnalyser(model).analyse();
    check2BitCounter(tt);
}
Also used : Model(de.neemann.digital.core.Model) ToBreakRunner(de.neemann.digital.integration.ToBreakRunner)

Example 25 with ToBreakRunner

use of de.neemann.digital.integration.ToBreakRunner in project Digital by hneemann.

the class ModelAnalyserTest method testAnalyzerMultiBit2.

public void testAnalyzerMultiBit2() throws Exception {
    Model model = new ToBreakRunner("dig/analyze/multiBitInOut.dig", false).getModel();
    TruthTable tt = new ModelAnalyser(model).analyse();
    checkIdent(tt);
    TreeMap<String, String> p = tt.getModelAnalyzerInfo().getPins();
    assertEquals("i1", p.get("A0"));
    assertEquals("i2", p.get("A1"));
    assertEquals("o1", p.get("B0"));
    assertEquals("o2", p.get("B1"));
}
Also used : Model(de.neemann.digital.core.Model) ToBreakRunner(de.neemann.digital.integration.ToBreakRunner)

Aggregations

ToBreakRunner (de.neemann.digital.integration.ToBreakRunner)29 Model (de.neemann.digital.core.Model)16 CodePrinterStr (de.neemann.digital.hdl.printer.CodePrinterStr)6 VisualElement (de.neemann.digital.draw.elements.VisualElement)3 BoolTable (de.neemann.digital.analyse.quinemc.BoolTable)2 Signal (de.neemann.digital.core.Signal)2 Circuit (de.neemann.digital.draw.elements.Circuit)2 HDLCircuit (de.neemann.digital.hdl.model2.HDLCircuit)2 HDLModel (de.neemann.digital.hdl.model2.HDLModel)2 CodePrinter (de.neemann.digital.hdl.printer.CodePrinter)2 File (java.io.File)2 ModelAnalyser (de.neemann.digital.analyse.ModelAnalyser)1 TruthTable (de.neemann.digital.analyse.TruthTable)1 Element (de.neemann.digital.core.element.Element)1 ElementAttributes (de.neemann.digital.core.element.ElementAttributes)1 ElementLibrary (de.neemann.digital.draw.library.ElementLibrary)1 BuilderExpressionCreator (de.neemann.digital.gui.components.table.BuilderExpressionCreator)1 ExpressionCreator (de.neemann.digital.gui.components.table.ExpressionCreator)1 ExpressionListenerStore (de.neemann.digital.gui.components.table.ExpressionListenerStore)1 TestCaseDescription (de.neemann.digital.testing.TestCaseDescription)1