From 851d8eeeca38cc2e841d746490ca62c9da3f7060 Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Mon, 27 Jul 2020 16:41:58 +0200 Subject: [PATCH] Use If instead of a Switch --- gram/phy/ecp5ddrphy.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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", -- 2.30.2