mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-26 14:31:02 -04:00
added an cmos or gate
This commit is contained in:
parent
3c97333f44
commit
bad4a92d10
@ -25,7 +25,7 @@
|
||||
<string>Y</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="380"/>
|
||||
<pos x="400" y="380"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>NFET</elementName>
|
||||
@ -212,7 +212,7 @@
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="380"/>
|
||||
<p2 x="380" y="380"/>
|
||||
<p2 x="400" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="380"/>
|
||||
|
282
src/main/dig/cmos/or.dig
Normal file
282
src/main/dig/cmos/or.dig
Normal file
@ -0,0 +1,282 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>VDD</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="220" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>A</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="120" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Y</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="380"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Ground</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="220" y="540"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString>A B Y
|
||||
0 0 0
|
||||
0 1 1
|
||||
1 0 1
|
||||
1 1 1
|
||||
|
||||
# transitions
|
||||
0 0 0
|
||||
0 1 1
|
||||
0 0 0
|
||||
1 0 1
|
||||
0 0 0
|
||||
1 1 1
|
||||
0 0 0
|
||||
0 1 1
|
||||
1 0 1
|
||||
0 1 1
|
||||
1 1 1
|
||||
0 1 1
|
||||
1 0 1
|
||||
1 1 1
|
||||
1 0 1
|
||||
</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="480"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>B</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="120" y="460"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>NFET</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>T6</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="340" y="400"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>PFET</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>T5</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="340" y="320"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>NFET</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>T3</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="240" y="400"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>NFET</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>T4</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="200" y="460"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>PFET</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>T1</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="200" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>PFET</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>T2</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="200" y="320"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="140" y="440"/>
|
||||
<p2 x="180" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="320"/>
|
||||
<p2 x="180" y="440"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="240"/>
|
||||
<p2 x="360" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="320"/>
|
||||
<p2 x="340" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="320"/>
|
||||
<p2 x="200" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="260"/>
|
||||
<p2 x="200" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="500"/>
|
||||
<p2 x="200" y="500"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="440"/>
|
||||
<p2 x="240" y="440"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="440"/>
|
||||
<p2 x="340" y="440"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="520"/>
|
||||
<p2 x="260" y="520"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="520"/>
|
||||
<p2 x="360" y="520"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="460"/>
|
||||
<p2 x="140" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="120" y="300"/>
|
||||
<p2 x="140" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="380"/>
|
||||
<p2 x="400" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="380"/>
|
||||
<p2 x="260" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="380"/>
|
||||
<p2 x="320" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="320"/>
|
||||
<p2 x="320" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="380"/>
|
||||
<p2 x="320" y="440"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="380"/>
|
||||
<p2 x="260" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="440"/>
|
||||
<p2 x="260" y="520"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="240"/>
|
||||
<p2 x="360" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="440"/>
|
||||
<p2 x="360" y="520"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="360"/>
|
||||
<p2 x="360" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="380"/>
|
||||
<p2 x="360" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="300"/>
|
||||
<p2 x="220" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="220"/>
|
||||
<p2 x="220" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="500"/>
|
||||
<p2 x="220" y="520"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="360"/>
|
||||
<p2 x="220" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="240"/>
|
||||
<p2 x="220" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="380"/>
|
||||
<p2 x="220" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="520"/>
|
||||
<p2 x="220" y="540"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="260"/>
|
||||
<p2 x="140" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="440"/>
|
||||
<p2 x="140" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="460"/>
|
||||
<p2 x="140" y="500"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="140" y="300"/>
|
||||
<p2 x="140" y="320"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
@ -28,8 +28,8 @@ public class TestExamples extends TestCase {
|
||||
*/
|
||||
public void testDistExamples() throws Exception {
|
||||
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
|
||||
assertEquals(98, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(50, testCasesInFiles);
|
||||
assertEquals(99, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(51, testCasesInFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user