mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-26 14:31:02 -04:00
adds 74112
This commit is contained in:
parent
a272bebd7b
commit
70664f3a7c
537
src/main/dig/lib/74xx/flipflops/74112.dig
Normal file
537
src/main/dig/lib/74xx/flipflops/74112.dig
Normal file
@ -0,0 +1,537 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<attributes>
|
||||
<entry>
|
||||
<string>isDIL</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinCount</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>Dual J-K negative-edge-triggered flip-flop, clear and preset</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Width</string>
|
||||
<int>5</int>
|
||||
</entry>
|
||||
</attributes>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~1CK</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="320"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>1K</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>2</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="360"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>1J</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~1PR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>4</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="240"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~1CLR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>15</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="400"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~2CLR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>14</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="620"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~2CK</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>13</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="540"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Text</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>74112 - Dual J-K negative-edge-triggered flip-flop, clear and preset</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="100" y="20"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>2K</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>12</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="580"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>2J</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>11</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="500"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~2PR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>10</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="300" y="460"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF_AS</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>inverterConfig</string>
|
||||
<inverterConfig>
|
||||
<string>Set</string>
|
||||
<string>C</string>
|
||||
<string>Clr</string>
|
||||
</inverterConfig>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="500"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>74112 - Flip Flop #1</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString>~1CLR ~1PR 1J 1K ~1CK 1Q ~1Q
|
||||
0 1 X X X 0 1
|
||||
1 0 X X X 1 0
|
||||
0 0 X X X 1 1
|
||||
1 1 1 0 C 1 0
|
||||
1 1 0 1 C 0 1
|
||||
|
||||
# Tests for "no change" and "toggle" states
|
||||
1 1 0 1 C 0 1
|
||||
1 1 0 0 C 0 1
|
||||
1 1 1 1 C 1 0
|
||||
1 1 0 0 C 1 0
|
||||
1 1 1 1 C 0 1</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="120"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>1Q</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>5</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="660" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~1Q</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="660" y="360"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>2Q</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>9</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="660" y="500"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>~2Q</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pinNumber</string>
|
||||
<int>7</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="660" y="580"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>74112 - Flip Flop #2</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString>~2CLR ~2PR 2J 2K ~2CK 2Q ~2Q
|
||||
0 1 X X X 0 1
|
||||
1 0 X X X 1 0
|
||||
0 0 X X X 1 1
|
||||
1 1 1 0 C 1 0
|
||||
1 1 0 1 C 0 1
|
||||
|
||||
# Tests for "no change" and "toggle" states
|
||||
1 1 0 1 C 0 1
|
||||
1 1 0 0 C 0 1
|
||||
1 1 1 1 C 1 0
|
||||
1 1 0 0 C 1 0
|
||||
1 1 1 1 C 0 1</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="580" y="120"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Or</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="580" y="560"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>inverterConfig</string>
|
||||
<inverterConfig>
|
||||
<string>In_1</string>
|
||||
<string>In_2</string>
|
||||
</inverterConfig>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="500" y="580"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF_AS</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>inverterConfig</string>
|
||||
<inverterConfig>
|
||||
<string>Set</string>
|
||||
<string>C</string>
|
||||
<string>Clr</string>
|
||||
</inverterConfig>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="280"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Or</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="580" y="340"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>inverterConfig</string>
|
||||
<inverterConfig>
|
||||
<string>In_1</string>
|
||||
<string>In_2</string>
|
||||
</inverterConfig>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="500" y="360"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="300" y="320"/>
|
||||
<p2 x="360" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="580"/>
|
||||
<p2 x="660" y="580"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="580"/>
|
||||
<p2 x="480" y="580"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="580"/>
|
||||
<p2 x="360" y="580"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="580"/>
|
||||
<p2 x="320" y="580"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="360"/>
|
||||
<p2 x="660" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="360"/>
|
||||
<p2 x="480" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="360"/>
|
||||
<p2 x="360" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="360"/>
|
||||
<p2 x="320" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="520"/>
|
||||
<p2 x="380" y="520"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="520"/>
|
||||
<p2 x="520" y="520"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="300"/>
|
||||
<p2 x="380" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="300"/>
|
||||
<p2 x="520" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="460"/>
|
||||
<p2 x="340" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="460"/>
|
||||
<p2 x="460" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="620"/>
|
||||
<p2 x="340" y="620"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="620"/>
|
||||
<p2 x="480" y="620"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="240"/>
|
||||
<p2 x="340" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="240"/>
|
||||
<p2 x="460" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="400"/>
|
||||
<p2 x="340" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="400"/>
|
||||
<p2 x="480" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="560"/>
|
||||
<p2 x="580" y="560"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="560"/>
|
||||
<p2 x="380" y="560"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="340"/>
|
||||
<p2 x="580" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="340"/>
|
||||
<p2 x="380" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="500"/>
|
||||
<p2 x="660" y="500"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="500"/>
|
||||
<p2 x="360" y="500"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="500"/>
|
||||
<p2 x="320" y="500"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="280"/>
|
||||
<p2 x="660" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="280"/>
|
||||
<p2 x="360" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="280"/>
|
||||
<p2 x="320" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="560" y="600"/>
|
||||
<p2 x="580" y="600"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="540"/>
|
||||
<p2 x="360" y="540"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="560" y="380"/>
|
||||
<p2 x="580" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="340"/>
|
||||
<p2 x="320" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="280"/>
|
||||
<p2 x="320" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="560"/>
|
||||
<p2 x="320" y="580"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="500"/>
|
||||
<p2 x="320" y="520"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="580"/>
|
||||
<p2 x="340" y="620"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="460"/>
|
||||
<p2 x="340" y="500"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="360"/>
|
||||
<p2 x="340" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="340" y="240"/>
|
||||
<p2 x="340" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="520"/>
|
||||
<p2 x="520" y="560"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="300"/>
|
||||
<p2 x="520" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="460"/>
|
||||
<p2 x="460" y="580"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="460" y="240"/>
|
||||
<p2 x="460" y="360"/>
|
||||
</wire>
|
||||
</wires>
|
||||
<measurementOrdering/>
|
||||
</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(191, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(92, testCasesInFiles);
|
||||
assertEquals(192, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(94, testCasesInFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user