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
Please provide the steps to reproduce the problem:
This code comes from the example in the documentation and simply use Module instead of RawModule.
importchisel3._importchisel3.experimental.hierarchy.{Definition, instantiable, public}
@instantiable
classAddOne(valwidth:Int) extendsModule {
@public valwidth= width
@public valin=IO(Input(UInt(width.W)))
@public valout=IO(Output(UInt(width.W)))
out := in +1.U
}
classTopextendsModule {
valdefinition=Definition(newAddOne(10))
println(s"Width is: ${definition.width}")
}
What is the current behavior?
The Chisel code runs with correctly fetched the width, but firtool gets a error:
Width is: 10
Exception in thread "main" circt.stage.phases.Exceptions$FirtoolNonZeroExitCode: firtool returned a non-zero exit code. Note that this version of Chisel (6.4.0) was published against firtool version 1.62.0.
------------------------------------------------------------------------------
ExitCode:
1
STDOUT:
STDERR:
Top.scala:6:2: error: a port "reset" with abstract reset type was unable to be inferred by InferResets (is this a top-level port?)
@instantiable
^
Top.scala:6:2: note: the module with this uninferred reset port was defined here
------------------------------------------------------------------------------
What is the expected behavior?
Firtool doesn't encounter any errors since the Definition is not instantiated, and the reset inferring happens on Instance.
Please tell us about your environment:
Chisel version: 6.4.0
CIRCT version: both 1.62.0 and 1.76.0 have the same problem
OS: Linux 6.9.0 x86_64
Other Information
What is the use case for changing the behavior?
The text was updated successfully, but these errors were encountered:
It seems to be due to unused modules being retained in firrtl. Remove the definitions which are not instantiated should resovle it. However, we can hardly tell if a Definition is instantiated at Chisel runtime and remove it before InferResets pass in firtool may be a better solution.
Type of issue: Bug Report
Please provide the steps to reproduce the problem:
This code comes from the example in the documentation and simply use
Module
instead ofRawModule
.What is the current behavior?
The Chisel code runs with correctly fetched the width, but firtool gets a error:
What is the expected behavior?
Firtool doesn't encounter any errors since the
Definition
is not instantiated, and the reset inferring happens onInstance
.Please tell us about your environment:
6.4.0
1.62.0
and1.76.0
have the same problemLinux 6.9.0 x86_64
Other Information
What is the use case for changing the behavior?
The text was updated successfully, but these errors were encountered: