From 2a5a42b8e577fb1342f4276771a24bb7f81759ba Mon Sep 17 00:00:00 2001 From: hneemann Date: Tue, 18 Jul 2017 09:00:31 +0200 Subject: [PATCH] fixed an error in 7474 --- src/main/dig/lib/74xx/flipflops/74174.dig | 33 +-- src/main/dig/lib/74xx/flipflops/7474.dig | 272 +++++++++++++++--- .../digital/integration/TestExamples.java | 2 +- 3 files changed, 252 insertions(+), 55 deletions(-) diff --git a/src/main/dig/lib/74xx/flipflops/74174.dig b/src/main/dig/lib/74xx/flipflops/74174.dig index 31401ba98..758a01333 100644 --- a/src/main/dig/lib/74xx/flipflops/74174.dig +++ b/src/main/dig/lib/74xx/flipflops/74174.dig @@ -23,6 +23,12 @@ Bits 6 + + inverterConfig + + Clr + + @@ -62,7 +68,7 @@ 9 - + In @@ -80,12 +86,7 @@ 1 - - - - Not - - + Splitter @@ -292,7 +293,7 @@ - + @@ -308,8 +309,8 @@ - - + + @@ -332,12 +333,8 @@ - - - - - - + + @@ -348,8 +345,8 @@ - - + + \ No newline at end of file diff --git a/src/main/dig/lib/74xx/flipflops/7474.dig b/src/main/dig/lib/74xx/flipflops/7474.dig index ce9a1ec78..fc125e7dc 100644 --- a/src/main/dig/lib/74xx/flipflops/7474.dig +++ b/src/main/dig/lib/74xx/flipflops/7474.dig @@ -28,7 +28,7 @@ 5 - + Out @@ -42,7 +42,7 @@ 6 - + In @@ -60,7 +60,7 @@ 1 - + In @@ -74,7 +74,7 @@ 2 - + In @@ -88,7 +88,7 @@ 3 - + In @@ -106,7 +106,7 @@ 1 - + Out @@ -120,7 +120,7 @@ 9 - + Out @@ -134,7 +134,7 @@ 8 - + In @@ -152,7 +152,7 @@ 1 - + In @@ -166,7 +166,7 @@ 12 - + In @@ -180,7 +180,7 @@ 11 - + In @@ -198,7 +198,7 @@ 1 - + D_FF_AS @@ -211,7 +211,51 @@ - + + + + Testcase + + + Label + #1 + + + Testdata + + 1~SD 1~RD 1CP 1D 1Q 1~Q +0 1 X X 1 0 +1 0 X X 0 1 +0 0 X X 1 1 + +1 1 C 1 1 0 +1 1 0 X 1 0 + +1 1 C 0 0 1 +1 1 0 X 0 1 + + + + + + + + And + + + inverterConfig + + In_1 + In_2 + + + + + + + Or + + D_FF_AS @@ -224,57 +268,213 @@ - + + + + And + + + inverterConfig + + In_1 + In_2 + + + + + + + Or + + + + + Testcase + + + Label + #2 + + + Testdata + + 2~SD 2~RD 2CP 2D 2Q 2~Q +0 1 X X 1 0 +1 0 X X 0 1 +0 0 X X 1 1 + +1 1 C 1 1 0 +1 1 0 X 1 0 + +1 1 C 0 0 1 +1 1 0 X 0 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 09ffab848..95a3ff5b5 100644 --- a/src/test/java/de/neemann/digital/integration/TestExamples.java +++ b/src/test/java/de/neemann/digital/integration/TestExamples.java @@ -29,7 +29,7 @@ public class TestExamples extends TestCase { public void testDistExamples() throws Exception { File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig"); assertEquals(192, new FileScanner(this::check).scan(examples)); - assertEquals(94, testCasesInFiles); + assertEquals(96, testCasesInFiles); } /**