From be8e825a0b33d8530d741b03997c07aca50c4b8f Mon Sep 17 00:00:00 2001 From: Franck Jullien Date: Tue, 1 Feb 2022 21:14:35 +0100 Subject: [PATCH] efinix: fix EfinixTristateImpl --- litex/build/efinix/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litex/build/efinix/common.py b/litex/build/efinix/common.py index 2ee986884..611e6f183 100644 --- a/litex/build/efinix/common.py +++ b/litex/build/efinix/common.py @@ -73,9 +73,9 @@ class EfinixTristateImpl(Module): io_o = platform.add_iface_io(io_name + "_OUT") io_oe = platform.add_iface_io(io_name + "_OE") io_i = platform.add_iface_io(io_name + "_IN") - self.comb += io_o.eq(o[bit]) + self.comb += io_o.eq(o >> bit) self.comb += io_oe.eq(oe) - if i[bit] is not None: + if i is not None: self.comb += i[bit].eq(io_i) block = { "type" : "GPIO",