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
Exception in thread "main" java.lang.IllegalArgumentException: requirement failed
at ... ()
at Foo.$anonfun$new$1(chisel-example.scala:14)
at chisel3.Data.$anonfun$$colon$eq$1(Data.scala:754)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at chisel3.experimental.prefix$.apply(prefix.scala:33)
at chisel3.Data.$colon$eq(Data.scala:754)
at Foo.<init>(chisel-example.scala:14)
at Main$.$anonfun$new$2(chisel-example.scala:20)
at chisel3.Module$.evaluate(Module.scala:88)
at chisel3.Module$.do_apply(Module.scala:35)
at chisel3.stage.phases.Elaborate.$anonfun$transform$2(Elaborate.scala:52)
at chisel3.internal.Builder$.$anonfun$buildImpl$1(Builder.scala:1018)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
at chisel3.internal.Builder$.buildImpl(Builder.scala:1012)
at chisel3.internal.Builder$.$anonfun$build$1(Builder.scala:1003)
at logger.Logger$.$anonfun$makeScope$4(Logger.scala:148)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
at logger.Logger$.makeScope(Logger.scala:146)
at logger.Logger$.makeScope(Logger.scala:133)
at ... ()
at ... (Stack trace trimmed to user code only. Rerun with --full-stacktrace to see the full stack trace)
What is the expected behavior?
I would expect this to work, the verilog should be:
assign out = {7'h0, in};
Bool inheriting from UInt and then not properly fulfilling the inheritance contract is bad enough, but not even being able to work around it by casting the Bool to a UInt is even worse. Calling .asUInt on a Bool should definitely return UInt(1.W).
Please tell us about your environment:
Other Information
What is the use case for changing the behavior?
The text was updated successfully, but these errors were encountered:
Type of issue: Bug Report
Please provide the steps to reproduce the problem:
Consider the following example:
What is the current behavior?
The same error as in #4162, i.e.
What is the expected behavior?
I would expect this to work, the verilog should be:
Bool
inheriting fromUInt
and then not properly fulfilling the inheritance contract is bad enough, but not even being able to work around it by casting theBool
to aUInt
is even worse. Calling.asUInt
on aBool
should definitely returnUInt(1.W)
.Please tell us about your environment:
Other Information
What is the use case for changing the behavior?
The text was updated successfully, but these errors were encountered: