diff --git a/litex/build/efinix/common.py b/litex/build/efinix/common.py index 5434db4ce..1b662515d 100644 --- a/litex/build/efinix/common.py +++ b/litex/build/efinix/common.py @@ -88,13 +88,7 @@ class EfinixTristateImpl(Module): } platform.toolchain.ifacewriter.blocks.append(block) - - # Exclude IO. - if isinstance(io, Signal): - exclude_io = io - else: - exclude_io = platform.get_pin_name(io[0], without_index=True) - platform.toolchain.excluded_ios.append(exclude_io) + platform.toolchain.excluded_ios.append(platform.get_pin(io)) class EfinixTristate(Module): @staticmethod @@ -144,7 +138,7 @@ class EfinixDDROutputImpl(Module): "drive_strength" : 4 # FIXME: Get it from constraints. } platform.toolchain.ifacewriter.blocks.append(block) - # FIXME: Integrate IO exclusion. + platform.toolchain.excluded_ios.append(platform.get_pin(o)) class EfinixDDROutput: @staticmethod @@ -174,7 +168,7 @@ class EfinixDDRInputImpl(Module): "is_inclk_inverted" : False } platform.toolchain.ifacewriter.blocks.append(block) - # FIXME: Integrate IO exclusion. + platform.toolchain.excluded_ios.append(platform.get_pin(i)) class EfinixDDRInput: @staticmethod diff --git a/litex/build/efinix/platform.py b/litex/build/efinix/platform.py index 2ca80593a..a38095da9 100644 --- a/litex/build/efinix/platform.py +++ b/litex/build/efinix/platform.py @@ -119,6 +119,11 @@ class EfinixPlatform(GenericPlatform): return ret return None + def get_pin(self, sig): + while isinstance(sig, _Slice) and hasattr(sig, "value"): + sig = sig.value + return sig + def get_pin_name(self, sig, without_index=False): if sig is None: return None