question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bundles with structurally typed fields in compatibility mode fail in Scala 2.12

See original GitHub issue

Update (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.LegacyModuleeliminates the error. It seems to be a property of the LegacyModule definition.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
azidarcommented, Oct 27, 2020

This will be fixed in 3.5.0 once we delete val io.

1reaction
ucbjrlcommented, Sep 22, 2017

We mention this in the release notes.

On Fri, Sep 22, 2017 at 3:31 PM, Jack Koenig notifications@github.com wrote:

I think given that it’s solved by IO(…) this issue is closed from our perspective.

To reiterate for posterity: Users of the compatibility wrapper should add the scalac option -Xsource:2.11

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/freechipsproject/chisel3/issues/606#issuecomment-331575321, or mute the thread https://github.com/notifications/unsubscribe-auth/AGh1wPcDTx0aFb3nZGU0ym57ZHkM3CH5ks5slDUvgaJpZM4NPrEx .

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found