v3.0-SNAPSHOT_2017-09-14
Pre-release
Pre-release
·
5739 commits
to main
since this release
This is the first Chisel3 BIG4 SNAPSHOT release to support Scala 2.12.
Unfortunately, behavior we've come to rely on when generating anonymous classes structurally has been deemed a bug in Scala 2.12 ("Inferred types for fields").
This is Chisel3 issue (#606).
The following code:
import Chisel._
class MyModule extends Module {
val io = new Bundle {
val in = UInt(INPUT, width = 8)
val out = UInt(OUTPUT, width = 8)
}
io.out := io.in
}
Results in:
Error:(12, 6) value out is not a member of Chisel.Bundle
io.out := io.in
Error:(12, 16) value in is not a member of Chisel.Bundle
io.out := io.in
NOTE: This seems to be constrained to compatibility mode.
The normal chisel3 wrappers IO()
, Wire()
cause the inferred value to be the structural type of their argument (the behavior we desire).
As stated in Chisel3 issue (#606), the work around is to add:
scalacOptions ++= Seq("-Xsource:2.11")
to your build.sbt file if you're using Chisel3 in compatibility mode with Scala 2.12.