diff options
| author | Jack Koenig | 2017-08-17 11:26:29 -0700 |
|---|---|---|
| committer | GitHub | 2017-08-17 11:26:29 -0700 |
| commit | 802cfc4405c28ae212a955a92c7a6ad2d2b6f0c2 (patch) | |
| tree | 23f8d8be14506cb2cfcacfd89eb4ef35cccfe925 /chiselFrontend/src/main/scala/chisel3/core/MultiClock.scala | |
| parent | 90e775b1228765ce7f345716fa215f72b97816a9 (diff) | |
Make Reset a trait (#672)
Bool implements Reset. Compatibility package includes an implicit
conversion from Reset to Bool.
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/MultiClock.scala')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/MultiClock.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/MultiClock.scala b/chiselFrontend/src/main/scala/chisel3/core/MultiClock.scala index 62163318..6af4da41 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/MultiClock.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/MultiClock.scala @@ -9,7 +9,7 @@ import chisel3.internal.Builder.pushCommand import chisel3.internal.firrtl._ import chisel3.internal.sourceinfo.{SourceInfo} -private[chisel3] final case class ClockAndReset(clock: Clock, reset: Bool) +private[chisel3] final case class ClockAndReset(clock: Clock, reset: Reset) object withClockAndReset { // scalastyle:ignore object.name /** Creates a new Clock and Reset scope @@ -19,7 +19,7 @@ object withClockAndReset { // scalastyle:ignore object.name * @param block the block of code to run with new implicit Clock and Reset * @return the result of the block */ - def apply[T](clock: Clock, reset: Bool)(block: => T): T = { + def apply[T](clock: Clock, reset: Reset)(block: => T): T = { // Save parentScope val parentScope = Builder.currentClockAndReset Builder.currentClockAndReset = Some(ClockAndReset(clock, reset)) @@ -48,7 +48,7 @@ object withReset { // scalastyle:ignore object.name * @param block the block of code to run with new implicit Reset * @return the result of the block */ - def apply[T](reset: Bool)(block: => T): T = + def apply[T](reset: Reset)(block: => T): T = withClockAndReset(Module.clock, reset)(block) } |
