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

[FIRRTL] error in dead code mismatch #1904

Open
drom opened this issue Sep 29, 2021 · 1 comment
Open

[FIRRTL] error in dead code mismatch #1904

drom opened this issue Sep 29, 2021 · 1 comment
Labels
FIRRTL Involving the `firrtl` dialect
Milestone

Comments

@drom
Copy link
Contributor

drom commented Sep 29, 2021

The following FIRRTL program

circuit top_mod :
  module mod_0 :
    input clock0: Clock
    input reset: Reset
  module top_mod :
    input clock0: Clock
    input reset: UInt<1>

Compiled with firtool --lower-to-hw --infer-widths --imconstprop --lowering-options=disallowPackedArrays,emittedLineLength=8192 --mlir-timing --verilog -o=$VFILE2 produces this error:

a_top_mod.fir:2:10: error: 'firrtl.module' op contains an abstract reset type after InferResets
  module mod_0 :
         ^
a_top_mod.fir:2:10: note: see current operation: "firrtl.module"() ( {
^bb0(%arg0: !firrtl.clock, %arg1: !firrtl.reset):  // no predecessors
}) {annotations = [], portAnnotations = [[], []], portDirections = 0 : i2, portNames = ["clock0", "reset"], sym_name = "mod_0", type = (!firrtl.clock, !firrtl.reset) -> ()} : () -> ()

Compiled with firrtl-1.5-SNAPSHOT produces this Verilog:

module top_mod(
  input   clock0,
  input   reset
);
endmodule
@drom drom added the FIRRTL Involving the `firrtl` dialect label Sep 29, 2021
@drom
Copy link
Contributor Author

drom commented Sep 29, 2021

Related to chipsalliance/firrtl#2373

@darthscsi darthscsi added this to the SiFive-2 milestone Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FIRRTL Involving the `firrtl` dialect
Projects
None yet
Development

No branches or pull requests

2 participants