From bfdf5aeb1609a89328b9cb1cb41e4fc892478929 Mon Sep 17 00:00:00 2001 From: hneemann Date: Fri, 12 May 2017 19:17:17 +0200 Subject: [PATCH] Added some more 74xx examples. --- src/main/dig/74xx/counter.dig | 816 ++++++++ src/main/dig/74xx/lib/74162.dig | 1317 +++++++++++++ src/main/dig/74xx/lib/7447.dig | 1730 +++++++++++++++++ .../digital/integration/TestExamples.java | 2 +- 4 files changed, 3864 insertions(+), 1 deletion(-) create mode 100644 src/main/dig/74xx/counter.dig create mode 100644 src/main/dig/74xx/lib/74162.dig create mode 100644 src/main/dig/74xx/lib/7447.dig diff --git a/src/main/dig/74xx/counter.dig b/src/main/dig/74xx/counter.dig new file mode 100644 index 000000000..5a9822d91 --- /dev/null +++ b/src/main/dig/74xx/counter.dig @@ -0,0 +1,816 @@ + + + 1 + + + + 7447.dig + + + rotation + + + + + + + Seven-Seg + + + + + Ground + + + + + 7447.dig + + + rotation + + + + + + + Seven-Seg + + + + + Ground + + + + + 7447.dig + + + rotation + + + + + + + Seven-Seg + + + + + Ground + + + + + VDD + + + + + VDD + + + + + VDD + + + + + VDD + + + + + Ground + + + + + 74162.dig + + + rotation + + + + + + + VDD + + + + + Clock + + + runRealTime + true + + + rotation + + + + Frequency + 10 + + + + + + VDD + + + + + 74162.dig + + + rotation + + + + + + + VDD + + + + + VDD + + + + + 74162.dig + + + rotation + + + + + + + VDD + + + + + VDD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/dig/74xx/lib/74162.dig b/src/main/dig/74xx/lib/74162.dig new file mode 100644 index 000000000..6b06d8f25 --- /dev/null +++ b/src/main/dig/74xx/lib/74162.dig @@ -0,0 +1,1317 @@ + + + 1 + + + isDIL + true + + + Description + Presettable synchronous BCD decade +counter; synchronous reset + + + + + D_FF + + + + + Out + + + rotation + + + + Label + Q_0 + + + pinNumber + 14 + + + + + + Or + + + rotation + + + + + + + And + + + rotation + + + + + + + And + + + rotation + + + + + + + D_FF + + + + + Out + + + rotation + + + + Label + Q_1 + + + pinNumber + 13 + + + + + + Or + + + rotation + + + + + + + And + + + rotation + + + + + + + And + + + rotation + + + + + + + D_FF + + + + + Out + + + rotation + + + + Label + Q_2 + + + pinNumber + 12 + + + + + + Or + + + rotation + + + + + + + And + + + rotation + + + + + + + And + + + rotation + + + + + + + D_FF + + + + + Out + + + rotation + + + + Label + Q_3 + + + pinNumber + 11 + + + + + + Or + + + rotation + + + + + + + And + + + rotation + + + + + + + And + + + rotation + + + + + + + NOr + + + + + NOr + + + + + Not + + + + + In + + + Label + ~MR + + + pinNumber + 1 + + + + + + In + + + Label + ~PE + + + pinNumber + 9 + + + + + + Not + + + rotation + + + + + + + In + + + rotation + + + + Label + D_0 + + + pinNumber + 3 + + + + + + Not + + + rotation + + + + + + + In + + + rotation + + + + Label + D_1 + + + pinNumber + 4 + + + + + + Not + + + rotation + + + + + + + In + + + rotation + + + + Label + D_2 + + + pinNumber + 5 + + + + + + Not + + + rotation + + + + + + + In + + + rotation + + + + Label + D_3 + + + pinNumber + 6 + + + + + + In + + + Label + CP + + + pinNumber + 2 + + + + + + And + + + rotation + + + + Inputs + 5 + + + + + + Out + + + rotation + + + + Label + TC + + + pinNumber + 15 + + + + + + In + + + Label + CET + + + pinNumber + 10 + + + + + + NAnd + + + + + In + + + Label + CEP + + + pinNumber + 7 + + + + + + XNOr + + + rotation + + + + + + + Not + + + rotation + + + + + + + XNOr + + + rotation + + + + + + + NOr + + + rotation + + + + Inputs + 3 + + + + + + XNOr + + + rotation + + + + + + + NOr + + + rotation + + + + Inputs + 3 + + + + + + Or + + + rotation + + + + + + + And + + + rotation + + + + + + + NOr + + + rotation + + + + + + + NOr + + + rotation + + + + Inputs + 4 + + + + + + NOr + + + rotation + + + + + + + NOr + + + rotation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/dig/74xx/lib/7447.dig b/src/main/dig/74xx/lib/7447.dig new file mode 100644 index 000000000..501a38afa --- /dev/null +++ b/src/main/dig/74xx/lib/7447.dig @@ -0,0 +1,1730 @@ + + + 1 + + + isDIL + true + + + Description + BCD to 7-segment decoder + + + + + In + + + Label + A + + + pinNumber + 7 + + + + + + In + + + Label + B + + + pinNumber + 1 + + + + + + In + + + Label + C + + + pinNumber + 2 + + + + + + In + + + Label + D + + + pinNumber + 6 + + + + + + Tunnel + + + rotation + + + + NetName + a + + + + + + Tunnel + + + rotation + + + + NetName + b + + + + + + Tunnel + + + rotation + + + + NetName + c + + + + + + Tunnel + + + rotation + + + + NetName + d + + + + + + Tunnel + + + NetName + a + + + + + + Tunnel + + + NetName + b + + + + + + Tunnel + + + NetName + c + + + + + + Tunnel + + + NetName + d + + + + + + NAnd + + + + + Out + + + Label + ~RBO + + + pinNumber + 4 + + + + + + In + + + Label + ~RBI + + + pinNumber + 5 + + + + + + Not + + + + + Or + + + + + Or + + + + + Or + + + + + Or + + + + + NOr + + + Inputs + 4 + + + + + + And + + + + + Out + + + Label + a + + + pinNumber + 13 + + + Inputs + 1 + + + + + + Or + + + Inputs + 5 + + + + + + And + + + Inputs + 3 + + + + + + And + + + Inputs + 3 + + + + + + And + + + Inputs + 3 + + + + + + And + + + Inputs + 3 + + + + + + Out + + + Label + b + + + pinNumber + 12 + + + Inputs + 1 + + + + + + Or + + + Inputs + 5 + + + + + + And + + + + + And + + + Inputs + 3 + + + + + + And + + + + + And + + + + + Out + + + Label + c + + + pinNumber + 11 + + + Inputs + 1 + + + + + + Or + + + Inputs + 4 + + + + + + And + + + + + And + + + + + And + + + + + Out + + + Label + d + + + pinNumber + 10 + + + Inputs + 1 + + + + + + Or + + + Inputs + 5 + + + + + + And + + + + + And + + + + + And + + + Inputs + 3 + + + + + + And + + + + + Out + + + Label + e + + + pinNumber + 9 + + + Inputs + 1 + + + + + + Or + + + Inputs + 3 + + + + + + And + + + + + And + + + + + Out + + + Label + f + + + pinNumber + 15 + + + Inputs + 1 + + + + + + Or + + + Inputs + 5 + + + + + + And + + + + + And + + + + + And + + + + + And + + + + + Out + + + Label + g + + + pinNumber + 14 + + + Inputs + 1 + + + + + + Or + + + Inputs + 5 + + + + + + And + + + + + And + + + + + And + + + + + And + + + + + Not + + + rotation + + + + + + + Not + + + rotation + + + + + + + Not + + + rotation + + + + + + + Not + + + rotation + + + + + + + In + + + rotation + + + + Label + ~LT + + + pinNumber + 3 + + + + + + Not + + + rotation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/java/de/neemann/digital/integration/TestExamples.java b/src/test/java/de/neemann/digital/integration/TestExamples.java index 6413bb23c..e77ba2408 100644 --- a/src/test/java/de/neemann/digital/integration/TestExamples.java +++ b/src/test/java/de/neemann/digital/integration/TestExamples.java @@ -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(125, new FileScanner(this::check).scan(examples)); + assertEquals(128, new FileScanner(this::check).scan(examples)); assertEquals(73, testCasesInFiles); }