From 802cfc4405c28ae212a955a92c7a6ad2d2b6f0c2 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Thu, 17 Aug 2017 11:26:29 -0700 Subject: Make Reset a trait (#672) Bool implements Reset. Compatibility package includes an implicit conversion from Reset to Bool.--- src/test/scala/chiselTests/CompatibilitySpec.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/test/scala/chiselTests/CompatibilitySpec.scala') 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 }) } } + } -- cgit v1.2.3