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/Assert.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/Assert.scala')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Assert.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Assert.scala b/chiselFrontend/src/main/scala/chisel3/core/Assert.scala index 8616154b..7f67f244 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Assert.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Assert.scala @@ -51,7 +51,7 @@ object assert { // scalastyle:ignore object.name } def apply_impl_do(cond: Bool, line: String, message: Option[String], data: Bits*)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions) { - when (!(cond || Builder.forcedReset)) { + when (!(cond || Module.reset.toBool)) { val fmt = message match { case Some(str) => s"Assertion failed: $str\n at $line\n" case None => s"Assertion failed\n at $line\n" @@ -77,7 +77,7 @@ object assert { // scalastyle:ignore object.name object stop { // scalastyle:ignore object.name /** Terminate execution with a failure code. */ def apply(code: Int)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Unit = { - when (!Builder.forcedReset) { + when (!Module.reset.toBool) { pushCommand(Stop(sourceInfo, Node(Builder.forcedClock), code)) } } |
