summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/util
diff options
context:
space:
mode:
authorBoyang Han2021-05-11 05:55:38 -0700
committerJiuyang Liu2021-06-16 10:32:04 +0800
commit38321a2eecfd7dc463ba640b2e97113043235b88 (patch)
treea25b8fe44e726800d560e15696e325a8bfe6cd13 /src/test/scala/chiselTests/util
parent3a74d433560c8aca8bf9b2734a3ee620a3442117 (diff)
Add minimized form of test cases
Diffstat (limited to 'src/test/scala/chiselTests/util')
-rw-r--r--src/test/scala/chiselTests/util/experimental/minimizer/MinimizerSpec.scala34
1 files changed, 11 insertions, 23 deletions
diff --git a/src/test/scala/chiselTests/util/experimental/minimizer/MinimizerSpec.scala b/src/test/scala/chiselTests/util/experimental/minimizer/MinimizerSpec.scala
index 9651f241..0db6c0e2 100644
--- a/src/test/scala/chiselTests/util/experimental/minimizer/MinimizerSpec.scala
+++ b/src/test/scala/chiselTests/util/experimental/minimizer/MinimizerSpec.scala
@@ -48,8 +48,8 @@ class MinimizerSpec extends AnyFlatSpec with Matchers {
TruthTable(
Map(
BitPat("b000") -> BitPat("b0"),
- // (BitPat("b001") -> BitPat("b?")), // same as default, can be omitted
- // (BitPat("b010") -> BitPat("b?")), // same as default, can be omitted
+ // BitPat("b001") -> BitPat("b?"), // same as default, can be omitted
+ // BitPat("b010") -> BitPat("b?"), // same as default, can be omitted
BitPat("b011") -> BitPat("b0"),
BitPat("b100") -> BitPat("b1"),
BitPat("b101") -> BitPat("b1"),
@@ -60,14 +60,8 @@ class MinimizerSpec extends AnyFlatSpec with Matchers {
),
TruthTable(
Map(
- BitPat("b000") -> BitPat("b0"),
- // (BitPat("b001") -> BitPat("b?")), // same as default, can be omitted
- // (BitPat("b010") -> BitPat("b?")), // same as default, can be omitted
- BitPat("b011") -> BitPat("b0"),
- BitPat("b100") -> BitPat("b1"),
- BitPat("b101") -> BitPat("b1"),
- BitPat("b110") -> BitPat("b0"),
- BitPat("b111") -> BitPat("b1")
+ BitPat("b10?") -> BitPat("b1"),
+ BitPat("b1?1") -> BitPat("b1"),
),
BitPat("b?")
)
@@ -78,25 +72,19 @@ class MinimizerSpec extends AnyFlatSpec with Matchers {
Map(
BitPat("b000") -> BitPat("b0"),
BitPat("b001") -> BitPat("b0"),
- // (BitPat("b010") -> BitPat("b?")), // same as default, can be omitted
+ // BitPat("b010") -> BitPat("b?"), // same as default, can be omitted
(BitPat("b011") -> BitPat("b0")),
- // (BitPat("b100") -> BitPat("b?")), // same as default, can be omitted
- // (BitPat("b101") -> BitPat("b?")), // same as default, can be omitted
- (BitPat("b110") -> BitPat("b1")),
- (BitPat("b111") -> BitPat("b0"))
+ // BitPat("b100") -> BitPat("b?"), // same as default, can be omitted
+ // BitPat("b101") -> BitPat("b?"), // same as default, can be omitted
+ BitPat("b110") -> BitPat("b1"),
+ BitPat("b111") -> BitPat("b0")
),
BitPat("b?")
),
TruthTable(
Map(
- BitPat("b000") -> BitPat("b0"),
- BitPat("b001") -> BitPat("b0"),
- // (BitPat("b010") -> BitPat("b?")), // same as default, can be omitted
- (BitPat("b011") -> BitPat("b0")),
- // (BitPat("b100") -> BitPat("b?")), // same as default, can be omitted
- // (BitPat("b101") -> BitPat("b?")), // same as default, can be omitted
- (BitPat("b110") -> BitPat("b1")),
- (BitPat("b111") -> BitPat("b0"))
+ BitPat("b?10") -> BitPat("b1"),
+ // BitPat("b1?0") -> BitPat("b1"), // both are ok
),
BitPat("b?")
),