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] InferWidths failures #5408

Closed
dtzSiFive opened this issue Jun 15, 2023 · 0 comments · Fixed by #5409
Closed

[FIRRTL] InferWidths failures #5408

dtzSiFive opened this issue Jun 15, 2023 · 0 comments · Fixed by #5409
Labels
FIRRTL Involving the `firrtl` dialect infer width

Comments

@dtzSiFive
Copy link
Contributor

h/t @uenoku

Looks like #5403 causes problems on designs that should work.

Sample inputs:

circuit Widths:
  module Widths:
    input y : UInt<2>
    output out1 : UInt

    wire w : UInt
    w <= UInt(0)
    w <= y

    out1 <= w

->

widths-2.fir:6:5: error: uninferred width: wire "w" cannot satisfy all width requirements
    wire w : UInt
    ^
widths-2.fir:8:7: note: width is constrained to be at least 2 here:
    w <= y
      ^
widths-2.fir:8:7: note: width is constrained to be at most 1 here:

circuit Widths:
  module Widths:
    input x : UInt<1>
    input y : UInt<2>
    output out1 : UInt

    wire w : UInt
    w <= x
    w <= y

    out1 <= w

->

widths-3.fir:7:5: error: uninferred width: wire "w" cannot satisfy all width requirements
    wire w : UInt
    ^
widths-3.fir:9:7: note: width is constrained to be at least 2 here:
    w <= y
      ^
widths-3.fir:9:7: note: width is constrained to be at most 1 here:
@dtzSiFive dtzSiFive added FIRRTL Involving the `firrtl` dialect infer width labels Jun 15, 2023
dtzSiFive added a commit to dtzSiFive/circt that referenced this issue Jun 15, 2023
dtzSiFive added a commit that referenced this issue Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FIRRTL Involving the `firrtl` dialect infer width
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant