diff --git a/litex/build/generic_platform.py b/litex/build/generic_platform.py index dbf277dea..c4c1e3ba9 100644 --- a/litex/build/generic_platform.py +++ b/litex/build/generic_platform.py @@ -261,7 +261,7 @@ class GenericPlatform: if name is None: name = self.__module__.split(".")[-1] self.name = name - self.sources = [] + self.sources = set() self.verilog_include_paths = set() self.finalized = False @@ -323,7 +323,7 @@ class GenericPlatform: if library is None: library = "work" - self.sources.append((os.path.abspath(filename), language, library)) + self.sources.add((os.path.abspath(filename), language, library)) def add_sources(self, path, *filenames, language=None, library=None): for f in filenames: