mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-25 22:18:48 -04:00
added some 74xx circuits
This commit is contained in:
parent
acdb37945d
commit
90b749f826
@ -37,6 +37,7 @@
|
||||
<outputDirectory>/examples/74xx/</outputDirectory>
|
||||
<includes>
|
||||
<include>**/*.dig</include>
|
||||
<include>**/*.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
|
426
src/main/dig/74xx/lib/74138.dig
Normal file
426
src/main/dig/74xx/lib/74138.dig
Normal file
@ -0,0 +1,426 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<attributes>
|
||||
<entry>
|
||||
<string>isDIL</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>3-line to 8-line decoder/demultiplexer</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>lockedMode</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
</attributes>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Demultiplexer</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Selector Bits</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>1,1,1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>3</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>A</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="380"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>B</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>2</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="360"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Inputs</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="280" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>G</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="180" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~GB</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>5</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="180" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~GA</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>4</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="180"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="240"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y0</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>15</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>14</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="700" y="180"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y2</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>13</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y3</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>12</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="700" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y4</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>11</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="240"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y5</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>10</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="700" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y6</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>9</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y7</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>7</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="700" y="300"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="340" y="240"/>
|
||||
<p2 x="380" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="240" y="240"/>
|
||||
<p2 x="280" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="240"/>
|
||||
<p2 x="440" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="240"/>
|
||||
<p2 x="520" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="160"/>
|
||||
<p2 x="440" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="160"/>
|
||||
<p2 x="520" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="340"/>
|
||||
<p2 x="400" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="340"/>
|
||||
<p2 x="320" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="260"/>
|
||||
<p2 x="180" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="260"/>
|
||||
<p2 x="240" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="260"/>
|
||||
<p2 x="280" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="260"/>
|
||||
<p2 x="440" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="260"/>
|
||||
<p2 x="700" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="180"/>
|
||||
<p2 x="440" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="180"/>
|
||||
<p2 x="700" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="360"/>
|
||||
<p2 x="320" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="200"/>
|
||||
<p2 x="440" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="200"/>
|
||||
<p2 x="520" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="280"/>
|
||||
<p2 x="440" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="280"/>
|
||||
<p2 x="520" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="380"/>
|
||||
<p2 x="320" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="220"/>
|
||||
<p2 x="280" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="220"/>
|
||||
<p2 x="440" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="220"/>
|
||||
<p2 x="700" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="300"/>
|
||||
<p2 x="260" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="300"/>
|
||||
<p2 x="180" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="300"/>
|
||||
<p2 x="440" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="300"/>
|
||||
<p2 x="700" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="320"/>
|
||||
<p2 x="400" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="240" y="240"/>
|
||||
<p2 x="240" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="260"/>
|
||||
<p2 x="260" y="300"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
424
src/main/dig/74xx/lib/74139.dig
Normal file
424
src/main/dig/74xx/lib/74139.dig
Normal file
@ -0,0 +1,424 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<attributes>
|
||||
<entry>
|
||||
<string>isDIL</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>3-line to 8-line decoder/demultiplexer</string>
|
||||
</entry>
|
||||
</attributes>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Demultiplexer</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Selector Bits</string>
|
||||
<int>2</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>1,1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>2</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>1A</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>2</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>1B</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~1G</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="320" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="180"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~1Y0</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>4</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~1Y1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>5</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="700" y="180"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~1Y2</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~1Y3</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>7</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="700" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Demultiplexer</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Selector Bits</string>
|
||||
<int>2</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>1,1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>2</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="460"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>2A</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>14</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="460"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>2B</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>13</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="480"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~2G</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>15</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="380"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="320" y="380"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="360"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="380"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="440" y="400"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~2Y0</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>12</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~2Y1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>11</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="700" y="360"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~2Y2</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>10</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="380"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~2Y3</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>9</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="700" y="400"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="420" y="160"/>
|
||||
<p2 x="440" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="160"/>
|
||||
<p2 x="520" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="480"/>
|
||||
<p2 x="320" y="480"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="400"/>
|
||||
<p2 x="440" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="400"/>
|
||||
<p2 x="700" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="180"/>
|
||||
<p2 x="440" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="180"/>
|
||||
<p2 x="700" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="340"/>
|
||||
<p2 x="440" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="340"/>
|
||||
<p2 x="520" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="280"/>
|
||||
<p2 x="320" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="280"/>
|
||||
<p2 x="400" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="200"/>
|
||||
<p2 x="380" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="200"/>
|
||||
<p2 x="320" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="200"/>
|
||||
<p2 x="440" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="200"/>
|
||||
<p2 x="520" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="360"/>
|
||||
<p2 x="440" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="360"/>
|
||||
<p2 x="700" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="300"/>
|
||||
<p2 x="320" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="220"/>
|
||||
<p2 x="440" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="220"/>
|
||||
<p2 x="700" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="460"/>
|
||||
<p2 x="320" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="460"/>
|
||||
<p2 x="400" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="360" y="380"/>
|
||||
<p2 x="380" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="380"/>
|
||||
<p2 x="320" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="380"/>
|
||||
<p2 x="440" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="380"/>
|
||||
<p2 x="520" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="240"/>
|
||||
<p2 x="400" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="420"/>
|
||||
<p2 x="400" y="460"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
350
src/main/dig/74xx/lib/74238.dig
Normal file
350
src/main/dig/74xx/lib/74238.dig
Normal file
@ -0,0 +1,350 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<attributes>
|
||||
<entry>
|
||||
<string>isDIL</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>3-line to 8-line decoder/demultiplexer</string>
|
||||
</entry>
|
||||
</attributes>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Demultiplexer</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Selector Bits</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>1,1,1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>3</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>A</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="380"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>B</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>2</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="360"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Inputs</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="280" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>G</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="180" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~GB</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>5</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Not</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="180" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~GA</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>4</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="300"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y0</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>15</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="440" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>14</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="620" y="180"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y2</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>13</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="440" y="200"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y3</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>12</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="620" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y4</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>11</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="440" y="240"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y5</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>10</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="620" y="260"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y6</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>9</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="440" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~Y7</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>7</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="620" y="300"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="340" y="240"/>
|
||||
<p2 x="380" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="240" y="240"/>
|
||||
<p2 x="280" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="240"/>
|
||||
<p2 x="440" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="160"/>
|
||||
<p2 x="440" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="340"/>
|
||||
<p2 x="400" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="340"/>
|
||||
<p2 x="320" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="260"/>
|
||||
<p2 x="180" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="260"/>
|
||||
<p2 x="240" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="260"/>
|
||||
<p2 x="280" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="260"/>
|
||||
<p2 x="620" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="180"/>
|
||||
<p2 x="620" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="360"/>
|
||||
<p2 x="320" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="200"/>
|
||||
<p2 x="440" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="280"/>
|
||||
<p2 x="440" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="380"/>
|
||||
<p2 x="320" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="220"/>
|
||||
<p2 x="280" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="220"/>
|
||||
<p2 x="620" y="220"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="300"/>
|
||||
<p2 x="260" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="300"/>
|
||||
<p2 x="180" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="300"/>
|
||||
<p2 x="620" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="320"/>
|
||||
<p2 x="400" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="240" y="240"/>
|
||||
<p2 x="240" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="260" y="260"/>
|
||||
<p2 x="260" y="300"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
7
src/main/dig/74xx/lib/ReadMe.txt
Normal file
7
src/main/dig/74xx/lib/ReadMe.txt
Normal file
@ -0,0 +1,7 @@
|
||||
If you add components, I would be glad if you would send
|
||||
me the new components, so I can add them to the library.
|
||||
So the library becomes more and more complete over time.
|
||||
|
||||
Simply open a GitHub issue and attach the new components or
|
||||
send a pull request (https://github.com/hneemann/Digital).
|
||||
|
@ -0,0 +1,67 @@
|
||||
package de.neemann.digital.gui.components.progress;
|
||||
|
||||
/**
|
||||
* ProgressConsole prints the progess to stdout.
|
||||
* Created by hneemann on 14.03.17.
|
||||
*/
|
||||
public class ProgressConsole implements ProgressListener {
|
||||
|
||||
private final String name;
|
||||
private int max;
|
||||
private int pos;
|
||||
private int lastOut;
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*/
|
||||
public ProgressConsole() {
|
||||
name = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param max the max progress value
|
||||
* @param name the name of this listener. Is printed in front of each line
|
||||
*/
|
||||
public ProgressConsole(int max, String name) {
|
||||
this.max = max;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param max the max progress value
|
||||
*/
|
||||
public ProgressConsole(int max) {
|
||||
this.max = max;
|
||||
name = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStart(int max) {
|
||||
this.max = max;
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inc() {
|
||||
pos++;
|
||||
|
||||
int out = (pos * 100) / max;
|
||||
if (out != lastOut) {
|
||||
lastOut = out;
|
||||
if (name == null)
|
||||
System.out.println("\r" + lastOut + "%");
|
||||
else
|
||||
System.out.println("\r" + name + " " + lastOut + "%");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package de.neemann.digital.gui.components.progress;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* A simple progress listener.
|
||||
* Created by hneemann on 04.03.17.
|
||||
*/
|
||||
public class ProgressDialog extends JDialog implements ProgressListener {
|
||||
private final JProgressBar bar;
|
||||
private int val;
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param parent the parent dialog
|
||||
*/
|
||||
public ProgressDialog(Dialog parent) {
|
||||
super(parent, true);
|
||||
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||
|
||||
bar = new JProgressBar();
|
||||
getContentPane().add(bar);
|
||||
pack();
|
||||
setLocationRelativeTo(parent);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setStart(int max) {
|
||||
bar.setMaximum(max);
|
||||
setVisible(true);
|
||||
val = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inc() {
|
||||
val++;
|
||||
bar.setValue(val);
|
||||
System.out.println(val);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
dispose();
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package de.neemann.digital.gui.components.progress;
|
||||
|
||||
/**
|
||||
* A Simple progress listener
|
||||
* Created by hneemann on 04.03.17.
|
||||
*/
|
||||
public interface ProgressListener {
|
||||
/**
|
||||
* Called at start
|
||||
*
|
||||
* @param max the number of steps
|
||||
*/
|
||||
void setStart(int max);
|
||||
|
||||
/**
|
||||
* A single step.
|
||||
* Is called max times.
|
||||
*/
|
||||
void inc();
|
||||
|
||||
/**
|
||||
* process has finished
|
||||
*/
|
||||
void finish();
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package de.neemann.digital.gui.components.progress;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* ProgressThread delegates the method calls to its parents using
|
||||
* {@link SwingUtilities#invokeLater(Runnable)}.
|
||||
* Created by hneemann on 04.03.17.
|
||||
*/
|
||||
public class ProgressThread implements ProgressListener {
|
||||
private final ProgressListener parent;
|
||||
|
||||
/**
|
||||
* Create a new instance
|
||||
*
|
||||
* @param parent the {@link ProgressListener} to delegate the method calls to.
|
||||
*/
|
||||
public ProgressThread(ProgressListener parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStart(int max) {
|
||||
SwingUtilities.invokeLater(() -> parent.setStart(max));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inc() {
|
||||
SwingUtilities.invokeLater(parent::inc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
SwingUtilities.invokeLater(parent::finish);
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Classes ti implement a progress listener.
|
||||
* Created by hneemann on 11.03.17.
|
||||
*/
|
||||
package de.neemann.digital.gui.components.progress;
|
@ -28,7 +28,7 @@ public class TestExamples extends TestCase {
|
||||
*/
|
||||
public void testDistExamples() throws Exception {
|
||||
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
|
||||
assertEquals(137, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(140, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(74, testCasesInFiles);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user