Bundles with structurally typed fields in compatibility mode fail in Scala 2.12
See original GitHub issueUpdate (2019): this will continue to be an issue as structural types are going away in Scala 2.13/14+ and Scala 3.
Compiled with Scala 2.12, the following code:
import Chisel._
val myReset = true.B
class ModuleExplicitReset(reset: Bool) extends Module(_reset = reset) {
val io = new Bundle {
val done = Bool(OUTPUT)
}
io.done := false.B
}
produces
Error:(14, 10) value done is not a member of Chisel.Bundle
io.done := false.B
Wrapping the io
definition in IO()
or extending chisel3.core.UserModule
instead of chisel3.core.LegacyModule
eliminates the error. It seems to be a property of the LegacyModule
definition.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (10 by maintainers)
Top Results From Across the Web
riscv-notes/chisel.md at master - GitHub
Bundles with structurally typed fields in compatibility mode fail in Scala 2.12 ... Compiled with Scala 2.12, the following code: import Chisel.
Read more >Changelog | The Scala Programming Language
Packages can now contain besides classes and objects also methods, fields or type aliases. These are added to a package by declaring a...
Read more >9. Objects, Case Classes, and Traits - Learning Scala [Book]
The standard class method is one that reads from or writes to the fields of its instance, providing complementary access points and business...
Read more >RDD Programming Guide - Spark 3.3.1 Documentation
(Spark can be built to work with other versions of Scala, too.) To write applications in Scala, you will need to use a...
Read more >sbt Reference Manual — Combined Pages
Welcome to Scala 2.12.7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_171). ... can be obtained by typing settings or settings -v at the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This will be fixed in 3.5.0 once we delete
val io
.We mention this in the release notes.
On Fri, Sep 22, 2017 at 3:31 PM, Jack Koenig notifications@github.com wrote: