summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/scala/chisel3/compatibility.scala4
-rw-r--r--src/main/scala/chisel3/package.scala15
-rw-r--r--src/main/scala/chisel3/util/Arbiter.scala4
-rw-r--r--src/main/scala/chisel3/util/Decoupled.scala4
-rw-r--r--src/main/scala/chisel3/util/Enum.scala2
5 files changed, 15 insertions, 14 deletions
diff --git a/src/main/scala/chisel3/compatibility.scala b/src/main/scala/chisel3/compatibility.scala
index 969a31eb..474058be 100644
--- a/src/main/scala/chisel3/compatibility.scala
+++ b/src/main/scala/chisel3/compatibility.scala
@@ -60,10 +60,10 @@ package object Chisel { // scalastyle:ignore package.object.name
import chisel3.core.CompileOptions
def apply[T <: Data](dummy: Int = 0, init: T)(implicit compileOptions: CompileOptions): T =
- chisel3.core.WireInit(init)
+ chisel3.core.WireDefault(init)
def apply[T <: Data](t: T, init: T)(implicit compileOptions: CompileOptions): T =
- chisel3.core.WireInit(t, init)
+ chisel3.core.WireDefault(t, init)
}
object Clock {
def apply(): Clock = new Clock
diff --git a/src/main/scala/chisel3/package.scala b/src/main/scala/chisel3/package.scala
index ddabf62c..3fa461ad 100644
--- a/src/main/scala/chisel3/package.scala
+++ b/src/main/scala/chisel3/package.scala
@@ -27,21 +27,22 @@ package object chisel3 { // scalastyle:ignore package.object.name
import chisel3.core.CompileOptions
@chiselRuntimeDeprecated
- @deprecated("Wire(init=init) is deprecated, use WireInit(init) instead", "chisel3")
+ @deprecated("Wire(init=init) is deprecated, use WireDefault(init) instead", "chisel3")
def apply[T <: Data](dummy: Int = 0, init: T)(implicit compileOptions: CompileOptions): T =
- chisel3.core.WireInit(init)
+ chisel3.core.WireDefault(init)
@chiselRuntimeDeprecated
- @deprecated("Wire(t, init) is deprecated, use WireInit(t, init) instead", "chisel3")
+ @deprecated("Wire(t, init) is deprecated, use WireDefault(t, init) instead", "chisel3")
def apply[T <: Data](t: T, init: T)(implicit compileOptions: CompileOptions): T =
- chisel3.core.WireInit(t, init)
+ chisel3.core.WireDefault(t, init)
@chiselRuntimeDeprecated
- @deprecated("Wire(t, init) is deprecated, use WireInit(t, init) instead", "chisel3")
+ @deprecated("Wire(t, init) is deprecated, use WireDefault(t, init) instead", "chisel3")
def apply[T <: Data](t: T, init: DontCare.type)(implicit compileOptions: CompileOptions): T =
- chisel3.core.WireInit(t, init)
+ chisel3.core.WireDefault(t, init)
}
- val WireInit = chisel3.core.WireInit
+ val WireInit = chisel3.core.WireDefault
+ val WireDefault = chisel3.core.WireDefault
val Clock = chisel3.core.Clock
type Clock = chisel3.core.Clock
diff --git a/src/main/scala/chisel3/util/Arbiter.scala b/src/main/scala/chisel3/util/Arbiter.scala
index 0da4bbc5..0a214581 100644
--- a/src/main/scala/chisel3/util/Arbiter.scala
+++ b/src/main/scala/chisel3/util/Arbiter.scala
@@ -72,7 +72,7 @@ class LockingRRArbiter[T <: Data](gen: T, n: Int, count: Int, needsLock: Option[
(0 until n).map(i => ctrl(i) && grantMask(i) || ctrl(i + n))
}
- override protected lazy val choice = WireInit((n-1).asUInt)
+ override protected lazy val choice = WireDefault((n-1).asUInt)
for (i <- n-2 to 0 by -1)
when (io.in(i).valid) { choice := i.asUInt }
for (i <- n-1 to 1 by -1)
@@ -83,7 +83,7 @@ class LockingArbiter[T <: Data](gen: T, n: Int, count: Int, needsLock: Option[T
extends LockingArbiterLike[T](gen, n, count, needsLock) {
protected def grant: Seq[Bool] = ArbiterCtrl(io.in.map(_.valid))
- override protected lazy val choice = WireInit((n-1).asUInt)
+ override protected lazy val choice = WireDefault((n-1).asUInt)
for (i <- n-2 to 0 by -1)
when (io.in(i).valid) { choice := i.asUInt }
}
diff --git a/src/main/scala/chisel3/util/Decoupled.scala b/src/main/scala/chisel3/util/Decoupled.scala
index c3c0d224..105b4528 100644
--- a/src/main/scala/chisel3/util/Decoupled.scala
+++ b/src/main/scala/chisel3/util/Decoupled.scala
@@ -220,8 +220,8 @@ class Queue[T <: Data](gen: T,
private val ptr_match = enq_ptr.value === deq_ptr.value
private val empty = ptr_match && !maybe_full
private val full = ptr_match && maybe_full
- private val do_enq = WireInit(io.enq.fire())
- private val do_deq = WireInit(io.deq.fire())
+ private val do_enq = WireDefault(io.enq.fire())
+ private val do_deq = WireDefault(io.deq.fire())
when (do_enq) {
ram(enq_ptr.value) := io.enq.bits
diff --git a/src/main/scala/chisel3/util/Enum.scala b/src/main/scala/chisel3/util/Enum.scala
index 92de56ea..eaec3c04 100644
--- a/src/main/scala/chisel3/util/Enum.scala
+++ b/src/main/scala/chisel3/util/Enum.scala
@@ -15,7 +15,7 @@ import chisel3.internal.chiselRuntimeDeprecated
*
* @example {{{
* val state_on :: state_off :: Nil = Enum(2)
- * val current_state = WireInit(state_off)
+ * val current_state = WireDefault(state_off)
* switch (current_state) {
* is (state_on) {
* ...