You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[info] Compiling 1 Scala source to /Users/jack.koenig3/ucb-bar/chisel3-raw/target/scala-2.12/classes...
[error] /Users/jack.koenig3/ucb-bar/chisel3-raw/src/main/scala/DontCare.scala:16: value valid is not a member of chisel3.core.Data
[error] bun.valid := false.B
[error] ^
[error] one error found
Now changing the type of init to Data should fix this particular instance but this problem will pop up all over the place, including in libraries. Is there a way to tell the type system to ignore DontCare for type inference? @ducky64@sdtwigg
The text was updated successfully, but these errors were encountered:
What other instances of this problem are there? := is already untyped, and changing init to type Data makes the WireInit equivalent to a Wire declaration followed by an untyped := connect.
I'd imagine it doesn't make any sense to initialize a register with DontCare, since Chisel doesn't complain about uninitialized Regs?
In library code if you accept both a t and an init it will do the same type inference and you'll get the same issue. That being said I don't think there's a fundamental fix other than "don't write bad library code".
Consider the following:
This gives the following error:
The definition of
WireInit.apply
being:Now changing the type of
init
toData
should fix this particular instance but this problem will pop up all over the place, including in libraries. Is there a way to tell the type system to ignoreDontCare
for type inference? @ducky64 @sdtwiggThe text was updated successfully, but these errors were encountered: