mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-27 06:51:37 -04:00
added unique names test
This commit is contained in:
parent
83cae9a09e
commit
3bac85bb23
@ -10,7 +10,7 @@ import junit.framework.TestCase;
|
||||
public class ModelAnalyserTest extends TestCase {
|
||||
|
||||
public void testAnalyzer() throws Exception {
|
||||
Model model = new ToBreakRunner("dig/analyzeTest.dig").getModel();
|
||||
Model model = new ToBreakRunner("dig/analyze/analyzeTest.dig").getModel();
|
||||
TruthTable tt = new ModelAnalyser(model).analyse();
|
||||
|
||||
assertEquals(4, tt.getRows());
|
||||
@ -30,19 +30,19 @@ public class ModelAnalyserTest extends TestCase {
|
||||
}
|
||||
|
||||
public void testAnalyzerDFF() throws Exception {
|
||||
Model model = new ToBreakRunner("dig/analyzeTestDFF.dig").getModel();
|
||||
Model model = new ToBreakRunner("dig/analyze/analyzeTestDFF.dig").getModel();
|
||||
TruthTable tt = new ModelAnalyser(model).analyse();
|
||||
check2BitCounter(tt);
|
||||
}
|
||||
|
||||
public void testAnalyzerJKFF() throws Exception {
|
||||
Model model = new ToBreakRunner("dig/analyzeTestJKFF.dig", false).getModel();
|
||||
Model model = new ToBreakRunner("dig/analyze/analyzeTestJKFF.dig", false).getModel();
|
||||
TruthTable tt = new ModelAnalyser(model).analyse();
|
||||
check2BitCounter(tt);
|
||||
}
|
||||
|
||||
public void testAnalyzerTFF() throws Exception {
|
||||
Model model = new ToBreakRunner("dig/analyzeTestTFF.dig", false).getModel();
|
||||
Model model = new ToBreakRunner("dig/analyze/analyzeTestTFF.dig", false).getModel();
|
||||
TruthTable tt = new ModelAnalyser(model).analyse();
|
||||
check2BitCounter(tt);
|
||||
}
|
||||
@ -70,4 +70,25 @@ public class ModelAnalyserTest extends TestCase {
|
||||
"1\t1\t0\t0\t\n", tt.toString());
|
||||
}
|
||||
|
||||
public void testAnalyzerUniqueNames() throws Exception {
|
||||
Model model = new ToBreakRunner("dig/analyze/uniqueNames.dig", false).getModel();
|
||||
try {
|
||||
new ModelAnalyser(model);
|
||||
fail();
|
||||
} catch (AnalyseException e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void testAnalyzerUniqueNames2() throws Exception {
|
||||
Model model = new ToBreakRunner("dig/analyze/uniqueNames2.dig", false).getModel();
|
||||
try {
|
||||
new ModelAnalyser(model);
|
||||
fail();
|
||||
} catch (AnalyseException e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
147
src/test/resources/dig/analyze/analyzeTest.dig
Normal file
147
src/test/resources/dig/analyze/analyzeTest.dig
Normal file
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>$A$</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="180" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>$B$</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="180" y="240"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>$Y$</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="540" y="180"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Or</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="420" y="160"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="280" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="280" y="200"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="220" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="220" y="240"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="200" y="160"/>
|
||||
<p2 x="260" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="200"/>
|
||||
<p2 x="260" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="160"/>
|
||||
<p2 x="280" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="160"/>
|
||||
<p2 x="420" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="240"/>
|
||||
<p2 x="200" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="240"/>
|
||||
<p2 x="280" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="240"/>
|
||||
<p2 x="220" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="180"/>
|
||||
<p2 x="540" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="120"/>
|
||||
<p2 x="200" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="120"/>
|
||||
<p2 x="280" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="120"/>
|
||||
<p2 x="220" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="200"/>
|
||||
<p2 x="420" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="200"/>
|
||||
<p2 x="280" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="220"/>
|
||||
<p2 x="380" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="140"/>
|
||||
<p2 x="380" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="120"/>
|
||||
<p2 x="200" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="200"/>
|
||||
<p2 x="200" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="200"/>
|
||||
<p2 x="380" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="140"/>
|
||||
<p2 x="380" y="160"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
289
src/test/resources/dig/analyze/analyzeTestDFF.dig
Normal file
289
src/test/resources/dig/analyze/analyzeTestDFF.dig
Normal file
@ -0,0 +1,289 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Tunnel</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Inputs</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>NetName</string>
|
||||
<string>Q_1n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="60"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>D_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_1n</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Inputs</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="240" y="60"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Or</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="120" y="40"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="20" y="0"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="20" y="80"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Tunnel</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Inputs</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>NetName</string>
|
||||
<string>Q_0n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="160"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>D_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_0n</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Inputs</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="240" y="160"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Tunnel</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="1"/>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>NetName</string>
|
||||
<string>Q_0n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-80" y="-100"/>
|
||||
<rotate>1</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="3"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-60" y="-60"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Tunnel</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="1"/>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>NetName</string>
|
||||
<string>Q_1n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-40" y="-100"/>
|
||||
<rotate>1</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="3"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-20" y="-60"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Clock</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>runRealTime</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="3"/>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="220" y="0"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="-80" y="0"/>
|
||||
<p2 x="20" y="0"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="80"/>
|
||||
<p2 x="20" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="100" y="80"/>
|
||||
<p2 x="120" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="80"/>
|
||||
<p2 x="240" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="160"/>
|
||||
<p2 x="320" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="160"/>
|
||||
<p2 x="240" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="80" y="20"/>
|
||||
<p2 x="100" y="20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="80" y="100"/>
|
||||
<p2 x="100" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="180"/>
|
||||
<p2 x="240" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-20" y="40"/>
|
||||
<p2 x="20" y="40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="100" y="40"/>
|
||||
<p2 x="120" y="40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-40" y="120"/>
|
||||
<p2 x="20" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="60"/>
|
||||
<p2 x="320" y="60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="60"/>
|
||||
<p2 x="240" y="60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-80" y="-80"/>
|
||||
<p2 x="-60" y="-80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-40" y="-80"/>
|
||||
<p2 x="-20" y="-80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-20" y="-80"/>
|
||||
<p2 x="-20" y="-60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-20" y="-20"/>
|
||||
<p2 x="-20" y="40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-20" y="40"/>
|
||||
<p2 x="-20" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="100" y="20"/>
|
||||
<p2 x="100" y="40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="100" y="80"/>
|
||||
<p2 x="100" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-40" y="-100"/>
|
||||
<p2 x="-40" y="-80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-40" y="120"/>
|
||||
<p2 x="-40" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-40" y="-80"/>
|
||||
<p2 x="-40" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="-80"/>
|
||||
<p2 x="-60" y="-60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="-20"/>
|
||||
<p2 x="-60" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="160"/>
|
||||
<p2 x="-60" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="80"/>
|
||||
<p2 x="-60" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="0"/>
|
||||
<p2 x="220" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="80"/>
|
||||
<p2 x="220" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-80" y="-100"/>
|
||||
<p2 x="-80" y="-80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-80" y="0"/>
|
||||
<p2 x="-80" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-80" y="-80"/>
|
||||
<p2 x="-80" y="0"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
102
src/test/resources/dig/analyze/analyzeTestJKFF.dig
Normal file
102
src/test/resources/dig/analyze/analyzeTestJKFF.dig
Normal file
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_1n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="-60"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_0n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="80"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Clock</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="80" y="100"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Const</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="120" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="140" y="80"/>
|
||||
<p2 x="160" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="80"/>
|
||||
<p2 x="240" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="-20"/>
|
||||
<p2 x="160" y="-20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="80" y="100"/>
|
||||
<p2 x="120" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="100"/>
|
||||
<p2 x="160" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="20"/>
|
||||
<p2 x="240" y="20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="-40"/>
|
||||
<p2 x="160" y="-40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="120"/>
|
||||
<p2 x="140" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="120"/>
|
||||
<p2 x="160" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="-60"/>
|
||||
<p2 x="160" y="-60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="240" y="20"/>
|
||||
<p2 x="240" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="-40"/>
|
||||
<p2 x="120" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="80"/>
|
||||
<p2 x="140" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="-60"/>
|
||||
<p2 x="140" y="-20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="-20"/>
|
||||
<p2 x="140" y="20"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
84
src/test/resources/dig/analyze/analyzeTestTFF.dig
Normal file
84
src/test/resources/dig/analyze/analyzeTestTFF.dig
Normal file
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_1n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="-60"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Clock</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="80" y="100"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>T_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_0n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="80"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="220" y="80"/>
|
||||
<p2 x="240" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="80"/>
|
||||
<p2 x="160" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="-20"/>
|
||||
<p2 x="160" y="-20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="80" y="100"/>
|
||||
<p2 x="120" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="20"/>
|
||||
<p2 x="240" y="20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="-40"/>
|
||||
<p2 x="160" y="-40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="-60"/>
|
||||
<p2 x="160" y="-60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="240" y="20"/>
|
||||
<p2 x="240" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="-40"/>
|
||||
<p2 x="120" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="80"/>
|
||||
<p2 x="120" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="-60"/>
|
||||
<p2 x="140" y="-20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="-20"/>
|
||||
<p2 x="140" y="20"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
55
src/test/resources/dig/analyze/uniqueNames.dig
Normal file
55
src/test/resources/dig/analyze/uniqueNames.dig
Normal file
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="420" y="180"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>A</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="180"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Y</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>A</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="220"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="380" y="180"/>
|
||||
<p2 x="420" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="200"/>
|
||||
<p2 x="520" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="220"/>
|
||||
<p2 x="420" y="220"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
277
src/test/resources/dig/analyze/uniqueNames2.dig
Normal file
277
src/test/resources/dig/analyze/uniqueNames2.dig
Normal file
@ -0,0 +1,277 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Tunnel</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Inputs</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>NetName</string>
|
||||
<string>Q_1n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="60"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>D_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_0n</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Inputs</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="240" y="60"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Or</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="120" y="40"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="20" y="0"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="20" y="80"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Tunnel</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Inputs</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>NetName</string>
|
||||
<string>Q_0n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>D_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_0n</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Inputs</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="240" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Tunnel</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="1"/>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>NetName</string>
|
||||
<string>Q_0n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-80" y="-100"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="3"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-60" y="-60"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Tunnel</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="1"/>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>NetName</string>
|
||||
<string>Q_1n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-40" y="-100"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="3"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-20" y="-60"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Clock</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>runRealTime</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="3"/>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="220" y="0"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="-80" y="0"/>
|
||||
<p2 x="20" y="0"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="80"/>
|
||||
<p2 x="20" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="100" y="80"/>
|
||||
<p2 x="120" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="80"/>
|
||||
<p2 x="240" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="160"/>
|
||||
<p2 x="320" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="160"/>
|
||||
<p2 x="240" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="80" y="20"/>
|
||||
<p2 x="100" y="20"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="80" y="100"/>
|
||||
<p2 x="100" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="180"/>
|
||||
<p2 x="240" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-20" y="40"/>
|
||||
<p2 x="20" y="40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="100" y="40"/>
|
||||
<p2 x="120" y="40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-40" y="120"/>
|
||||
<p2 x="20" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="60"/>
|
||||
<p2 x="320" y="60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="60"/>
|
||||
<p2 x="240" y="60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-80" y="-80"/>
|
||||
<p2 x="-60" y="-80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-40" y="-80"/>
|
||||
<p2 x="-20" y="-80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-20" y="-80"/>
|
||||
<p2 x="-20" y="-60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-20" y="-20"/>
|
||||
<p2 x="-20" y="40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-20" y="40"/>
|
||||
<p2 x="-20" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="100" y="20"/>
|
||||
<p2 x="100" y="40"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="100" y="80"/>
|
||||
<p2 x="100" y="100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-40" y="-100"/>
|
||||
<p2 x="-40" y="-80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-40" y="120"/>
|
||||
<p2 x="-40" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-40" y="-80"/>
|
||||
<p2 x="-40" y="120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="-80"/>
|
||||
<p2 x="-60" y="-60"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="-20"/>
|
||||
<p2 x="-60" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="160"/>
|
||||
<p2 x="-60" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="80"/>
|
||||
<p2 x="-60" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="0"/>
|
||||
<p2 x="220" y="80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="80"/>
|
||||
<p2 x="220" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-80" y="-100"/>
|
||||
<p2 x="-80" y="-80"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-80" y="0"/>
|
||||
<p2 x="-80" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-80" y="-80"/>
|
||||
<p2 x="-80" y="0"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
Loading…
x
Reference in New Issue
Block a user