diff --git a/litex/build/generic_toolchain.py b/litex/build/generic_toolchain.py index 488b92178..fd1c0af37 100644 --- a/litex/build/generic_toolchain.py +++ b/litex/build/generic_toolchain.py @@ -8,7 +8,7 @@ import os import math -from migen.fhdl.structure import _Fragment +from migen.fhdl.structure import Signal, _Fragment from litex.gen import LiteXContext @@ -178,7 +178,9 @@ class GenericToolchain: def add_false_path_constraint(self, platform, from_, to, keep=True): if keep: - from_.attr.add("keep") - to.attr.add("keep") + if isinstance(from_, Signal): + from_.attr.add("keep") + if isinstance(to, Signal): + to.attr.add("keep") if (to, from_) not in self.false_paths: self.false_paths.add((from_, to))