back.rtlil: only expand legalized values in Array/Part context on RHS.
authorwhitequark <whitequark@whitequark.org>
Sun, 21 Apr 2019 06:41:35 +0000 (06:41 +0000)
committerwhitequark <whitequark@whitequark.org>
Sun, 21 Apr 2019 06:43:31 +0000 (06:43 +0000)
commit083016d747f25b67a6e06fab9d29fa46b4fe4d1b
treea733f95712de96eb4cdf3932058b8c208d091231
parentce1eff5464e57cb92b073aa1cc86aaa75bb4f423
back.rtlil: only expand legalized values in Array/Part context on RHS.

Otherwise the following code fails to compile:

    index = Signal(1)
    array = Array(range(2))
    with m.If(0 == array[index]):
        m.d.sync += index.eq(0)

Fixes #51.
nmigen/back/rtlil.py