summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/CompatibilitySpec.scala
diff options
context:
space:
mode:
authorJack Koenig2017-08-17 11:26:29 -0700
committerGitHub2017-08-17 11:26:29 -0700
commit802cfc4405c28ae212a955a92c7a6ad2d2b6f0c2 (patch)
tree23f8d8be14506cb2cfcacfd89eb4ef35cccfe925 /src/test/scala/chiselTests/CompatibilitySpec.scala
parent90e775b1228765ce7f345716fa215f72b97816a9 (diff)
Make Reset a trait (#672)
Bool implements Reset. Compatibility package includes an implicit conversion from Reset to Bool.
Diffstat (limited to 'src/test/scala/chiselTests/CompatibilitySpec.scala')
-rw-r--r--src/test/scala/chiselTests/CompatibilitySpec.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/CompatibilitySpec.scala b/src/test/scala/chiselTests/CompatibilitySpec.scala
index 52a93aed..7feee96f 100644
--- a/src/test/scala/chiselTests/CompatibilitySpec.scala
+++ b/src/test/scala/chiselTests/CompatibilitySpec.scala
@@ -270,6 +270,17 @@ class CompatibiltySpec extends ChiselFlatSpec with GeneratorDrivenPropertyChecks
})
}
+ "Reset" should "still walk, talk, and quack like a Bool" in {
+ import Chisel._
+ elaborate(new Module {
+ val io = new Bundle {
+ val in = Bool(INPUT)
+ val out = Bool(OUTPUT)
+ }
+ io.out := io.in && reset
+ })
+ }
+
"Data.dir" should "give the correct direction for io" in {
import Chisel._
elaborate(new Module {
@@ -292,4 +303,5 @@ class CompatibiltySpec extends ChiselFlatSpec with GeneratorDrivenPropertyChecks
})
}
}
+
}