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:
Consider the following example built from the Scala CLI template chisel-example.scala:
//>usingscala"2.13.12"//>usingdep"org.chipsalliance::chisel:6.4.0"//>usingplugin"org.chipsalliance:::chisel-plugin:6.4.0"//>usingoptions"-unchecked", "-deprecation", "-language:reflectiveCalls", "-feature", "-Xcheckinit", "-Xfatal-warnings", "-Ywarn-dead-code", "-Ywarn-unused", "-Ymacro-annotations"importchisel3._importchisel3.probe._// _root_ disambiguates from package chisel3.util.circt if user imports chisel3.util._import_root_.circt.stage.ChiselStageclassFooextendsModule {
valout=IO(Output(Probe(UInt(8.W))))
valw=Wire(UInt(8.W))
define(out, w)
}
objectMainextendsApp {
println(
ChiselStage.emitSystemVerilog(
gen =newFoo,
firtoolOpts =Array("-disable-all-randomization", "-strip-debug-info")
)
)
}
What is the current behavior?
This prints the following error:
[error] Users/koenig/work/t/define/chisel-example.scala 15:9: Expected source to be a probe expression.
[error] There were 1 error(s) during hardware elaboration.
Exception in thread "main" chisel3.internal.Errors: Fatal errors during hardware elaboration. Look above for error list. Rerun with --throw-on-first-error if you wish to see a stack trace.
What is the expected behavior?
If you emit CHIRRTL from a working build, you'll see that when using Scala-CLI, the source locators are absolute but missing the root /, e.g.:
Type of issue: Bug Report
Please provide the steps to reproduce the problem:
Consider the following example built from the Scala CLI template
chisel-example.scala
:What is the current behavior?
This prints the following error:
What is the expected behavior?
If you emit CHIRRTL from a working build, you'll see that when using Scala-CLI, the source locators are absolute but missing the root
/
, e.g.:It seems that Scala-CLI compiles in the root directory but then runs in
.
. The leading/
is stripped here:chisel/core/src/main/scala/chisel3/internal/SourceInfoFileResolver.scala
Line 22 in 6c708b1
I'm not sure why we're stripping it, but I think we can stop doing that and this will work.
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: