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" chisel3.package$ChiselException: Imported Definition information not found - possibly forgot to add ImportDefinition annotation?
at ... ()
at AddTwo.$anonfun$i0$1(chisel-template.scala:20)
at chisel3.internal.plugin.package$.autoNameRecursively(package.scala:33)
at AddTwo.<init>(chisel-template.scala:20)
at Foo.$anonfun$addTwoDef$1(chisel-template.scala:31)
at chisel3.Module$.do_apply(Module.scala:62)
at chisel3.experimental.hierarchy.core.Definition$.$anonfun$do_apply$1(Definition.scala:108)
at chisel3.internal.Builder$.$anonfun$build$1(Builder.scala:970)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
at chisel3.internal.Builder$.build(Builder.scala:964)
at chisel3.experimental.hierarchy.core.Definition$.do_apply(Definition.scala:108)
at Foo.<init>(chisel-template.scala:31)
at Main$.$anonfun$new$7(chisel-template.scala:45)
at ... ()
at ... (Stack trace trimmed to user code only. Rerun with --full-stacktrace to see the full stack trace)
Program exited with return code 1.
Line 20 of chisel-template.scala refers to the val i0 = Instance(addOneDef) statement, so the first time an Instance is created inside of the AddTwoDefinition.
What is the expected behavior?
The D/I API should work with nested Instances.
Please tell us about your environment:
- version: 6.0 RC-1
- OS: macOS 14.2.1
Other Information
Changing from Instance(addOneDef) to Instantiate(new AddOne(4)) makes the error go away, but both the Definition and Instantiate APIs have their uses, so I figure supporting nested Instances still makes sense.
The text was updated successfully, but these errors were encountered:
I need to investigate this a bit more to find the exact time things broke, but this code runs successfully on Chisel v3.5.3, and fails on v3.5.4 and later.
Type of issue: Bug Report
Please provide the steps to reproduce the problem:
Here's a scala-cli template which will recreate the error:
What is the current behavior?
Executing this yields the following exception:
Line 20 of
chisel-template.scala
refers to theval i0 = Instance(addOneDef)
statement, so the first time anInstance
is created inside of theAddTwo
Definition
.What is the expected behavior?
The D/I API should work with nested
Instance
s.Please tell us about your environment:
- version:
6.0 RC-1
- OS: macOS 14.2.1
Other Information
Changing from
Instance(addOneDef)
toInstantiate(new AddOne(4))
makes the error go away, but both theDefinition
andInstantiate
APIs have their uses, so I figure supporting nestedInstance
s still makes sense.The text was updated successfully, but these errors were encountered: