From b0eb8726f3eff4bcd5905fe30499bf00fa5dba4b Mon Sep 17 00:00:00 2001 From: hneemann Date: Mon, 12 Aug 2019 17:55:38 +0200 Subject: [PATCH] adds two new 7-seg drivers, closes #305 --- .../dig/lib/DIL Chips/74xx/display/74247.dig | 1775 +++++++++++++++++ .../dig/lib/DIL Chips/74xx/display/74248.dig | 1730 ++++++++++++++++ .../digital/integration/TestExamples.java | 4 +- 3 files changed, 3507 insertions(+), 2 deletions(-) create mode 100644 src/main/dig/lib/DIL Chips/74xx/display/74247.dig create mode 100644 src/main/dig/lib/DIL Chips/74xx/display/74248.dig diff --git a/src/main/dig/lib/DIL Chips/74xx/display/74247.dig b/src/main/dig/lib/DIL Chips/74xx/display/74247.dig new file mode 100644 index 000000000..240cdefe3 --- /dev/null +++ b/src/main/dig/lib/DIL Chips/74xx/display/74247.dig @@ -0,0 +1,1775 @@ + + + 1 + + + shapeType + DIL + + + Description + BCD to 7-segment decoder, active low, tails on 6 and 9 + + + lockedMode + true + + + Width + 5 + + + + + In + + + Description + Bit 0 + + + Label + A + + + pinNumber + 7 + + + + + + In + + + Description + Bit 1 + + + Label + B + + + pinNumber + 1 + + + + + + In + + + Description + Bit 2 + + + Label + C + + + pinNumber + 2 + + + + + + In + + + Description + Bit 3 + + + Label + D + + + pinNumber + 6 + + + + + + Out + + + Description + ripple blanking output (LOW active) + + + Label + ~RBO + + + pinNumber + 4 + + + + + + In + + + Description + ripple blanking input (LOW active) + + + Label + ~RBI + + + pinNumber + 5 + + + + + + Out + + + Label + a + + + pinNumber + 13 + + + Inputs + 1 + + + + + + Out + + + Label + b + + + pinNumber + 12 + + + Inputs + 1 + + + + + + Out + + + Label + c + + + pinNumber + 11 + + + Inputs + 1 + + + + + + Out + + + Label + d + + + pinNumber + 10 + + + Inputs + 1 + + + + + + Out + + + Label + e + + + pinNumber + 9 + + + Inputs + 1 + + + + + + Out + + + Label + f + + + pinNumber + 15 + + + Inputs + 1 + + + + + + Out + + + Label + g + + + pinNumber + 14 + + + Inputs + 1 + + + + + + In + + + Description + lamp test + + + Label + ~LT + + + pinNumber + 3 + + + + + + PowerSupply + + + + + In + + + Label + VCC + + + pinNumber + 16 + + + InDefault + + + + + + + In + + + Label + GND + + + pinNumber + 8 + + + + + + Testcase + + + Testdata + + ~LT ~RBI D C B A ~RBO a b c d e f g + 1 1 0 0 0 0 1 0 0 0 0 0 0 1 + + 1 x 0 0 0 1 1 1 0 0 1 1 1 1 + 1 x 0 0 1 0 1 0 0 1 0 0 1 0 + 1 x 0 0 1 1 1 0 0 0 0 1 1 0 + 1 x 0 1 0 0 1 1 0 0 1 1 0 0 + 1 x 0 1 0 1 1 0 1 0 0 1 0 0 + 1 x 0 1 1 0 1 0 1 0 0 0 0 0 + 1 x 0 1 1 1 1 0 0 0 1 1 1 1 + 1 x 1 0 0 0 1 0 0 0 0 0 0 0 + 1 x 1 0 0 1 1 0 0 0 0 1 0 0 + 1 x 1 0 1 0 1 1 1 1 0 0 1 0 + 1 x 1 0 1 1 1 1 1 0 0 1 1 0 + 1 x 1 1 0 0 1 1 0 1 1 1 0 0 + 1 x 1 1 0 1 1 0 1 1 0 1 0 0 + 1 x 1 1 1 0 1 1 1 1 0 0 0 0 + 1 x 1 1 1 1 1 1 1 1 1 1 1 1 + +#x x x x x x 0 1 1 1 1 1 1 1 + 1 0 0 0 0 0 0 1 1 1 1 1 1 1 + 0 x x x x x 1 0 0 0 0 0 0 0 + + + + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + Not + + + wideShape + true + + + + + + Not + + + rotation + + + + wideShape + true + + + + + + And + + + wideShape + true + + + Inputs + 4 + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + + + + And + + + wideShape + true + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + Inputs + 4 + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + + + + Delay + + + + + And + + + wideShape + true + + + + + + And + + + wideShape + true + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + Inputs + 4 + + + + + + Delay + + + rotation + + + + + + + NOr + + + wideShape + true + + + + + + NOr + + + wideShape + true + + + + + + NOr + + + wideShape + true + + + + + + NOr + + + wideShape + true + + + Inputs + 3 + + + + + + NOr + + + wideShape + true + + + Inputs + 3 + + + + + + NOr + + + wideShape + true + + + Inputs + 3 + + + + + + NOr + + + wideShape + true + + + Inputs + 3 + + + + + + Not + + + wideShape + true + + + + + + Not + + + wideShape + true + + + + + + Not + + + wideShape + true + + + + + + Not + + + wideShape + true + + + + + + Not + + + wideShape + true + + + + + + Not + + + wideShape + true + + + + + + Not + + + wideShape + true + + + + + + And + + + rotation + + + + wideShape + true + + + Inputs + 6 + + + + + + PullUp + + + + + NFET + + + + + Ground + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/dig/lib/DIL Chips/74xx/display/74248.dig b/src/main/dig/lib/DIL Chips/74xx/display/74248.dig new file mode 100644 index 000000000..94d8b231c --- /dev/null +++ b/src/main/dig/lib/DIL Chips/74xx/display/74248.dig @@ -0,0 +1,1730 @@ + + + 1 + + + shapeType + DIL + + + Description + BCD to 7-segment decoder, active high, tails on 6 and 9 + + + lockedMode + true + + + Width + 5 + + + + + In + + + Description + Bit 0 + + + Label + A + + + pinNumber + 7 + + + + + + In + + + Description + Bit 1 + + + Label + B + + + pinNumber + 1 + + + + + + In + + + Description + Bit 2 + + + Label + C + + + pinNumber + 2 + + + + + + In + + + Description + Bit 3 + + + Label + D + + + pinNumber + 6 + + + + + + Out + + + Description + ripple blanking output (LOW active) + + + Label + ~RBO + + + pinNumber + 4 + + + + + + In + + + Description + ripple blanking input (LOW active) + + + Label + ~RBI + + + pinNumber + 5 + + + + + + Out + + + Label + a + + + pinNumber + 13 + + + Inputs + 1 + + + + + + Out + + + Label + b + + + pinNumber + 12 + + + Inputs + 1 + + + + + + Out + + + Label + c + + + pinNumber + 11 + + + Inputs + 1 + + + + + + Out + + + Label + d + + + pinNumber + 10 + + + Inputs + 1 + + + + + + Out + + + Label + e + + + pinNumber + 9 + + + Inputs + 1 + + + + + + Out + + + Label + f + + + pinNumber + 15 + + + Inputs + 1 + + + + + + Out + + + Label + g + + + pinNumber + 14 + + + Inputs + 1 + + + + + + In + + + Description + lamp test + + + Label + ~LT + + + pinNumber + 3 + + + + + + PowerSupply + + + + + In + + + Label + VCC + + + pinNumber + 16 + + + InDefault + + + + + + + In + + + Label + GND + + + pinNumber + 8 + + + + + + Testcase + + + Testdata + + ~LT ~RBI D C B A ~RBO a b c d e f g + 1 1 0 0 0 0 1 1 1 1 1 1 1 0 + + 1 x 0 0 0 1 1 0 1 1 0 0 0 0 + 1 x 0 0 1 0 1 1 1 0 1 1 0 1 + 1 x 0 0 1 1 1 1 1 1 1 0 0 1 + 1 x 0 1 0 0 1 0 1 1 0 0 1 1 + 1 x 0 1 0 1 1 1 0 1 1 0 1 1 + 1 x 0 1 1 0 1 1 0 1 1 1 1 1 + 1 x 0 1 1 1 1 1 1 1 0 0 0 0 + 1 x 1 0 0 0 1 1 1 1 1 1 1 1 + 1 x 1 0 0 1 1 1 1 1 1 0 1 1 + 1 x 1 0 1 0 1 0 0 0 1 1 0 1 + 1 x 1 0 1 1 1 0 0 1 1 0 0 1 + 1 x 1 1 0 0 1 0 1 0 0 0 1 1 + 1 x 1 1 0 1 1 1 0 0 1 0 1 1 + 1 x 1 1 1 0 1 0 0 0 1 1 1 1 + 1 x 1 1 1 1 1 0 0 0 0 0 0 0 + +#x x x x x x 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 x x x x x 1 1 1 1 1 1 1 1 + + + + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + NAnd + + + wideShape + true + + + + + + Not + + + wideShape + true + + + + + + Not + + + rotation + + + + wideShape + true + + + + + + And + + + wideShape + true + + + Inputs + 4 + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + + + + And + + + wideShape + true + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + Inputs + 4 + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + + + + Delay + + + + + And + + + wideShape + true + + + + + + And + + + wideShape + true + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + Inputs + 4 + + + + + + Delay + + + rotation + + + + + + + And + + + wideShape + true + + + inverterConfig + + In_1 + In_2 + + + + + + + And + + + wideShape + true + + + inverterConfig + + In_1 + In_2 + + + + + + + And + + + wideShape + true + + + inverterConfig + + In_1 + In_2 + + + + + + + And + + + wideShape + true + + + inverterConfig + + In_1 + In_2 + In_3 + + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + inverterConfig + + In_1 + In_2 + In_3 + + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + inverterConfig + + In_1 + In_2 + In_3 + + + + Inputs + 3 + + + + + + And + + + wideShape + true + + + inverterConfig + + In_1 + In_2 + In_3 + + + + Inputs + 3 + + + + + + PullUp + + + + + NFET + + + + + Ground + + + + + And + + + rotation + + + + wideShape + true + + + Inputs + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 8c0207ed6..6179d65a2 100644 --- a/src/test/java/de/neemann/digital/integration/TestExamples.java +++ b/src/test/java/de/neemann/digital/integration/TestExamples.java @@ -32,8 +32,8 @@ public class TestExamples extends TestCase { */ public void testDistExamples() throws Exception { File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig"); - assertEquals(269, new FileScanner(this::check).scan(examples)); - assertEquals(186, testCasesInFiles); + assertEquals(271, new FileScanner(this::check).scan(examples)); + assertEquals(188, testCasesInFiles); } /**