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

Slicing a Value with a bool generates invalid RTLIL #601

Closed
jfng opened this issue Mar 17, 2021 · 0 comments
Closed

Slicing a Value with a bool generates invalid RTLIL #601

jfng opened this issue Mar 17, 2021 · 0 comments

Comments

@jfng
Copy link
Member

jfng commented Mar 17, 2021

Repro:

from nmigen import *
from nmigen.back import rtlil

m = Module()
foo = Signal(2)
m.d.comb += foo[True].eq(1)

print(rtlil.convert(m))

Output:

attribute \generator "nMigen"
attribute \top 1
attribute \nmigen.hierarchy "top"
module \top
  attribute \src "/tmp/repro.py:5"
  wire width 2 \foo
  wire width 1 $verilog_initial_trigger
  process $group_0
    assign \foo 2'00
    assign \foo [True] 1'1
    assign $verilog_initial_trigger $verilog_initial_trigger
    sync init
      update $verilog_initial_trigger 1'0
  end
end

which throws the following Yosys error:

ERROR: Parser error in line 10: syntax error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants