From d9de063658d3b1a0a16615487df41437f4cbe2e3 Mon Sep 17 00:00:00 2001 From: hneemann Date: Tue, 27 Oct 2020 17:33:17 +0100 Subject: [PATCH] adds 74190 to the IC library, closes #540 --- distribution/ReleaseNotes.txt | 1 + .../dig/lib/DIL Chips/74xx/counter/74190.dig | 1809 +++++++++++++++++ .../digital/integration/TestExamples.java | 4 +- 3 files changed, 1812 insertions(+), 2 deletions(-) create mode 100644 src/main/dig/lib/DIL Chips/74xx/counter/74190.dig diff --git a/distribution/ReleaseNotes.txt b/distribution/ReleaseNotes.txt index 7cba3bb3d..7e6430ef1 100644 --- a/distribution/ReleaseNotes.txt +++ b/distribution/ReleaseNotes.txt @@ -13,6 +13,7 @@ HEAD, planned as v0.26 click on the start button again. - If IEEE shapes are selected in the settings, also the CircuitBuilder uses wide shapes in the created circuits. +- Added IC 74190 to the Library. v0.25, released on 10. Aug. 2020 - Color schemes have been added to support color-blind users. diff --git a/src/main/dig/lib/DIL Chips/74xx/counter/74190.dig b/src/main/dig/lib/DIL Chips/74xx/counter/74190.dig new file mode 100644 index 000000000..0c06bccaa --- /dev/null +++ b/src/main/dig/lib/DIL Chips/74xx/counter/74190.dig @@ -0,0 +1,1809 @@ + + + 1 + + + shapeType + DIL + + + pinCount + 16 + + + Description + Presettable synchronous 4-bit bcd up/down counter + + + lockedMode + true + + + Width + 7 + + + + + Out + + + Label + Q0 + + + pinNumber + 3 + + + + + + Out + + + Label + Q1 + + + pinNumber + 2 + + + + + + Out + + + Label + Q2 + + + pinNumber + 6 + + + + + + Out + + + Label + Q3 + + + pinNumber + 7 + + + + + + And + + + Inputs + 5 + + + + + + And + + + inverterConfig + + In_1 + + + + Inputs + 3 + + + + + + And + + + Inputs + 3 + + + + + + And + + + Inputs + 3 + + + + + + Or + + + + + Or + + + + + Out + + + Label + TC + + + pinNumber + 12 + + + + + + And + + + + + And + + + inverterConfig + + In_1 + + + + + + + And + + + + + And + + + inverterConfig + + In_1 + + + + + + + And + + + Inputs + 4 + + + + + + And + + + Inputs + 3 + + + + + + Or + + + + + And + + + + + And + + + inverterConfig + + In_1 + + + + + + + And + + + Inputs + 4 + + + + + + And + + + Inputs + 4 + + + + + + Or + + + Inputs + 3 + + + + + + And + + + + + And + + + inverterConfig + + In_1 + + + + + + + In + + + Label + D0 + + + pinNumber + 15 + + + + + + In + + + rotation + + + + Label + ~PL + + + pinNumber + 11 + + + + + + In + + + rotation + + + + Label + ~U/D + + + pinNumber + 5 + + + + + + Clock + + + runRealTime + true + + + rotation + + + + Label + CP + + + pinNumber + 14 + + + + + + In + + + rotation + + + + Label + ~CE + + + pinNumber + 4 + + + + + + And + + + rotation + + + + + + + And + + + rotation + + + + inverterConfig + + In_2 + + + + + + + Not + + + rotation + + + + + + + NAnd + + + inverterConfig + + In_1 + + + + Inputs + 3 + + + + + + Out + + + Label + ~RC + + + pinNumber + 13 + + + + + + In + + + Label + D1 + + + pinNumber + 1 + + + + + + In + + + Label + D2 + + + pinNumber + 10 + + + + + + In + + + Label + D3 + + + pinNumber + 9 + + + + + + Not + + + rotation + + + + + + + PowerSupply + + + + + In + + + Label + VCC + + + pinNumber + 16 + + + InDefault + + + + + + + In + + + Label + GND + + + pinNumber + 8 + + + + + + Text + + + Description + 1 + + + snapToGrid + false + + + + + + Text + + + Description + 2 + + + snapToGrid + false + + + + + + Text + + + Description + 3 + + + snapToGrid + false + + + + + + Text + + + Description + 4 + + + snapToGrid + false + + + + + + Text + + + Description + 8 + + + snapToGrid + false + + + + + + Text + + + Description + 9 + + + snapToGrid + false + + + + + + Text + + + Description + 10 + + + snapToGrid + false + + + + + + Text + + + Description + 11 + + + snapToGrid + false + + + + + + Text + + + Description + 14 + + + snapToGrid + false + + + + + + Text + + + Description + 12 + + + snapToGrid + false + + + + + + And + + + Inputs + 3 + + + + + + Text + + + Description + 13 + + + snapToGrid + false + + + + + + NAnd + + + Inputs + 3 + + + + + + Text + + + Description + 5 + + + snapToGrid + false + + + + + + Text + + + Description + 6 + + + snapToGrid + false + + + + + + Text + + + Description + 7 + + + snapToGrid + false + + + + + + JK_FF_AS + + + + + JK_FF_AS + + + + + JK_FF_AS + + + + + JK_FF_AS + + + + + Testcase + + + Label + Count + + + Testdata + + ~U/D ~CE ~PL CP D0 D1 D2 D3 Q0 Q1 Q2 Q3 +# Pre-Load & Hold +X X 0 C 1 1 1 1 1 1 1 1 +X 1 1 C 1 1 1 1 1 1 1 1 +X X 0 C 1 0 1 0 1 0 1 0 +X 1 1 C 1 0 1 0 1 0 1 0 +X X 0 C 0 1 0 1 0 1 0 1 +X 1 1 C 0 1 0 1 0 1 0 1 +X X 0 C 0 0 0 0 0 0 0 0 +X 1 1 C 0 0 0 0 0 0 0 0 + +# Count Up +0 0 1 C 0 0 0 0 1 0 0 0 +0 0 1 C 0 0 0 0 0 1 0 0 +0 0 1 C 0 0 0 0 1 1 0 0 +0 0 1 C 0 0 0 0 0 0 1 0 +0 0 1 C 0 0 0 0 1 0 1 0 +0 0 1 C 0 0 0 0 0 1 1 0 +0 0 1 C 0 0 0 0 1 1 1 0 +0 0 1 C 0 0 0 0 0 0 0 1 +0 0 1 C 0 0 0 0 1 0 0 1 +0 0 1 C 0 0 0 0 0 0 0 0 + +# Count Down +1 0 1 C 0 0 0 0 1 0 0 1 +1 0 1 C 0 0 0 0 0 0 0 1 +1 0 1 C 0 0 0 0 1 1 1 0 +1 0 1 C 0 0 0 0 0 1 1 0 +1 0 1 C 0 0 0 0 1 0 1 0 +1 0 1 C 0 0 0 0 0 0 1 0 +1 0 1 C 0 0 0 0 1 1 0 0 +1 0 1 C 0 0 0 0 0 1 0 0 +1 0 1 C 0 0 0 0 1 0 0 0 +1 0 1 C 0 0 0 0 0 0 0 0 + + + + + + + Testcase + + + Label + Carry + + + Testdata + + ~U/D ~CE ~PL CP D0 D1 D2 D3 Q0 Q1 Q2 Q3 TC ~RC +1 1 0 C 1 1 1 1 1 1 1 1 X X +1 1 1 C 1 1 1 1 1 1 1 1 0 1 +0 1 1 C 1 1 1 1 1 1 1 1 1 1 + +1 1 0 C 0 0 0 0 0 0 0 0 X X +0 1 1 C 0 0 0 0 0 0 0 0 0 1 +1 1 1 C 0 0 0 0 0 0 0 0 1 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 310f12a4a..c3cf761c0 100644 --- a/src/test/java/de/neemann/digital/integration/TestExamples.java +++ b/src/test/java/de/neemann/digital/integration/TestExamples.java @@ -33,8 +33,8 @@ public class TestExamples extends TestCase { */ public void testDistExamples() throws Exception { File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig"); - assertEquals(301, new FileScanner(this::check).scan(examples)); - assertEquals(196, testCasesInFiles); + assertEquals(302, new FileScanner(this::check).scan(examples)); + assertEquals(198, testCasesInFiles); } /**