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
{{ message }}
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
Problem is verilator executive attempts to generate cpp file with elaborated dut, do to so it needs widths of all top level inputs but dut has not been run through infer widths and therefore blows up.
Following demonstrates problem
importchisel3._importchiseltest._importchiseltest.experimental.TestOptionBuilder.ChiselScalatestOptionBuilderimportchiseltest.internal.{TreadleBackendAnnotation, VerilatorBackendAnnotation}
importorg.scalatest.flatspec.AnyFlatSpecclassInferredWidthMod(valadd:Boolean) extendsMultiIOModule {
vala=IO(Input(SInt(8.W)))
valb=IO(Input(SInt(8.W)))
valc=IO(Output(SInt()))
c := (if (add) {
a +% b
} else {
a -% b
})
}
classVerilatorInferenceTestextendsAnyFlatSpecwithChiselScalatestTester {
behavior.of("Inferred output width should be supported by")
it should "verilator" in {
test(newInferredWidthMod(add =false)).withAnnotations(Seq(VerilatorBackendAnnotation)) { dut => }
}
it should "treadle" in {
test(newInferredWidthMod(add =false)).withAnnotations(Seq(TreadleBackendAnnotation)) { dut => }
}
}
The text was updated successfully, but these errors were encountered:
Problem is verilator executive attempts to generate cpp file with elaborated dut, do to so it needs widths of all top level inputs but dut has not been run through infer widths and therefore blows up.
Following demonstrates problem
The text was updated successfully, but these errors were encountered: