diff options
| author | Jack Koenig | 2017-12-19 17:33:07 -0800 |
|---|---|---|
| committer | GitHub | 2017-12-19 17:33:07 -0800 |
| commit | d95cb262aefc06458652b227980a3cdc5471d3ba (patch) | |
| tree | 01c543cb66ae221f648e57909a1c29ea6e9456b8 /src/main/scala/chisel3/package.scala | |
| parent | d67914ffd4b983903f777c5c033ce84fbdb561f1 (diff) | |
Add WireInit.apply that accepts DontCare (#731)
Prevents DontCare from affecting type inference
Fixes #728
Diffstat (limited to 'src/main/scala/chisel3/package.scala')
| -rw-r--r-- | src/main/scala/chisel3/package.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/scala/chisel3/package.scala b/src/main/scala/chisel3/package.scala index f31b4015..a502ef2d 100644 --- a/src/main/scala/chisel3/package.scala +++ b/src/main/scala/chisel3/package.scala @@ -32,6 +32,10 @@ package object chisel3 { // scalastyle:ignore package.object.name @deprecated("Wire(t, init) is deprecated, use WireInit(t, init) instead", "chisel3") def apply[T <: Data](t: T, init: T)(implicit compileOptions: CompileOptions): T = chisel3.core.WireInit(t, init) + + @deprecated("Wire(t, init) is deprecated, use WireInit(t, init) instead", "chisel3") + def apply[T <: Data](t: T, init: DontCare.type)(implicit compileOptions: CompileOptions): T = + chisel3.core.WireInit(t, init) } val WireInit = chisel3.core.WireInit |
