diff options
| author | mergify[bot] | 2022-01-28 00:20:24 +0000 |
|---|---|---|
| committer | GitHub | 2022-01-28 00:20:24 +0000 |
| commit | 91ad2312cab72442fcfec9c28576b5464669f8fd (patch) | |
| tree | 467b2d81ac658b3bb1c1260c34486eb56d49b006 /integration-tests/src/test/scala/chiselTests | |
| parent | db0fe3fb23c3f50be0aeb859b19cb96967e15186 (diff) | |
Fix Decoder bug for constant 0 and DC (#2363) (#2371)
* Fix the QMC bug for constant and dontcare output.
* Fix the Espresso bug for constant and dontcare output.
(cherry picked from commit 46b53320e9ec09fc26d63259f1821f4234640839)
Co-authored-by: Jiuyang Liu <liu@jiuyang.me>
Diffstat (limited to 'integration-tests/src/test/scala/chiselTests')
| -rw-r--r-- | integration-tests/src/test/scala/chiselTests/util/experimental/minimizer/MinimizerSpec.scala | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/integration-tests/src/test/scala/chiselTests/util/experimental/minimizer/MinimizerSpec.scala b/integration-tests/src/test/scala/chiselTests/util/experimental/minimizer/MinimizerSpec.scala index 07afd074..2d3e073c 100644 --- a/integration-tests/src/test/scala/chiselTests/util/experimental/minimizer/MinimizerSpec.scala +++ b/integration-tests/src/test/scala/chiselTests/util/experimental/minimizer/MinimizerSpec.scala @@ -272,4 +272,39 @@ trait MinimizerSpec extends AnyFlatSpec with ChiselScalatestTester with Formal { BitPat(s"b${Seq(N, X, X, X, X, X, X, X, X, A2_X, A1_X, IMM_X, DW_X, FN_X, N, M_X, X, X, X, X, X, X, X, CSR_X, X, X, X, X).reduce(_ + _)}") )) } + + "output is 0" should "pass" in { + minimizerTest(TruthTable.fromString( + """00->0 + |01->? + |10->0 + |11->0 + | ? + |""".stripMargin + + )) + } + "output is 1" should "pass" in { + minimizerTest(TruthTable.fromString( + """00->1 + |01->? + |10->1 + |11->1 + | ? + |""".stripMargin + + )) + } + // I know this seems to be crazy, but if user is crazy as well... + "output is dont care" should "pass" in { + minimizerTest(TruthTable.fromString( + """00->? + |01->? + |10->? + |11->? + | ? + |""".stripMargin + + )) + } } |
