From: Jean THOMAS Date: Mon, 27 Jul 2020 14:41:58 +0000 (+0200) Subject: Use If instead of a Switch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=851d8eeeca38cc2e841d746490ca62c9da3f7060;p=gram.git Use If instead of a Switch --- diff --git a/gram/phy/ecp5ddrphy.py b/gram/phy/ecp5ddrphy.py index 6d579c6..f477a73 100644 --- a/gram/phy/ecp5ddrphy.py +++ b/gram/phy/ecp5ddrphy.py @@ -371,11 +371,10 @@ class ECP5DDRPHY(Peripheral, Elaboratable): ) m.d.sync += dq_o_data_d.eq(dq_o_data) - with m.Switch(bl8_chunk): - with m.Case(0): - m.d.sync += dq_o_data_muxed.eq(dq_o_data[:4]) - with m.Case(1): - m.d.sync += dq_o_data_muxed.eq(dq_o_data_d[4:]) + with m.If(bl8_chunk): + m.d.sync += dq_o_data_muxed.eq(dq_o_data_d[4:]) + with m.Else(): + m.d.sync += dq_o_data_muxed.eq(dq_o_data[:4]) m.submodules += [ Instance("ODDRX2DQA",