amaranth icon indicating copy to clipboard operation
amaranth copied to clipboard

Spaces in names generates invalid `RTLIL`

Open rroohhh opened this issue 4 months ago • 1 comments

The following input code

from amaranth import *
from amaranth.back import rtlil
m = Module()
a = Signal(name="a a")
rtlil.convert(m, ports=[a])

Generates the output

module \top
  wire width 1 input 0  \a a
end

which is invalid, according to https://yosyshq.readthedocs.io/projects/yosys/en/v0.48/yosys_internals/formats/rtlil_rep.html#rtlil-identifiers. Furthermore yosys cannot read this output, generating the following error:

Input filename: /tmp/.il
ERROR: Parser error in line 2: syntax error

rroohhh avatar Jul 30 '25 20:07 rroohhh

Would be fixed by #1235.

whitequark avatar Jul 31 '25 02:07 whitequark