Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One-file-per-module is incompatible with ChiselStage.emit* #1629

Closed
seldridge opened this issue Oct 21, 2020 · 0 comments · Fixed by #1630
Closed

One-file-per-module is incompatible with ChiselStage.emit* #1629

seldridge opened this issue Oct 21, 2020 · 0 comments · Fixed by #1630
Labels
Milestone

Comments

@seldridge
Copy link
Member

The following fails and it shouldn't:

import chisel3._
import chisel3.stage.ChiselStage

class Foo extends Module {
  val io = IO(new Bundle {
    val in = Input(Bool())
    val out = Output(Bool())
  })

  io.out := ~io.in
}

println((new ChiselStage).emitVerilog(new Foo, Array("-e", "verilog")))

This does a None.get because the -e results in one-file-per-module and the match is narrowly looking for an EmittedCircuitAnnotation.

Change the behavior here so that this works with -e by appending the individual emitted modules together.

Type of issue: bug report

Impact: no functional change

Development Phase: proposal

Other information

https://gitter.im/freechipsproject/chisel3?at=5f90959ca7e77a0ff1602e6e

If the current behavior is a bug, please provide the steps to reproduce the problem:

Compile the example above.

What is the current behavior?

None.get exception.

What is the expected behavior?

No match error.

Please tell us about your environment:

3.4.0

What is the use case for changing the behavior?

This is an extremely confusing error for an end user...

@seldridge seldridge added the bug label Oct 21, 2020
@seldridge seldridge added this to the 3.4.x milestone Oct 21, 2020
@mergify mergify bot closed this as completed in #1630 Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant