From: Florent Kermarrec Date: Fri, 23 Nov 2018 17:34:24 +0000 (+0100) Subject: soc/interconnect/stream/gearbox: inverse bit order X-Git-Tag: 24jan2021_ls180~1462 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7623b5dd965a702b6b0ad27c58ab02eddff26060;p=litex.git soc/interconnect/stream/gearbox: inverse bit order --- diff --git a/litex/soc/interconnect/stream.py b/litex/soc/interconnect/stream.py index 3676a1f6..b10155b1 100644 --- a/litex/soc/interconnect/stream.py +++ b/litex/soc/interconnect/stream.py @@ -404,12 +404,12 @@ class Gearbox(Module): i_cases = {} for i in range(io_lcm//i_dw): - i_cases[i] = shift_register[i_dw*i:i_dw*(i+1)].eq(sink.data) + i_cases[i] = shift_register[i_dw*i:i_dw*(i+1)].eq(sink.data[::-1]) self.sync += If(sink.valid & sink.ready, Case(i_count, i_cases)) o_cases = {} for i in range(io_lcm//o_dw): - o_cases[i] = source.data.eq(shift_register[o_dw*i:o_dw*(i+1)]) + o_cases[i] = source.data.eq(shift_register[o_dw*i:o_dw*(i+1)][::-1]) self.comb += Case(o_count, o_cases) # TODO: clean up code below