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

bit_select and word_select behave differently #351

Closed
x44203 opened this issue Apr 11, 2020 · 1 comment
Closed

bit_select and word_select behave differently #351

x44203 opened this issue Apr 11, 2020 · 1 comment
Labels
Milestone

Comments

@x44203
Copy link

x44203 commented Apr 11, 2020

The commented-out word_select shoud behave the same as the bit_select but the bit_select throws a "IndexError: Cannot stop slice 9 bits into 8-bit value" while the word_select compiles just fine.

class Test(Elaboratable):
    def elaborate(self, platform):
        m = Module()
        datain = Signal(4)
        dataout = Signal(8)
        assert len(dataout) % len(datain) == 0
        counter = Signal()
        #m.d.sync += dataout.word_select(counter, 4).eq(datain)
        m.d.sync += dataout.bit_select(counter * 4, 4).eq(datain)
        return m

FPGA.ECP55GEVNPlatform().build(Test())
@whitequark whitequark added the bug label Apr 11, 2020
@whitequark
Copy link
Member

Interestingly the codegen for word_select appears to be broken too.

@whitequark whitequark added this to the 0.3 milestone Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants