From: Florent Kermarrec Date: Thu, 17 Oct 2019 07:52:31 +0000 (+0200) Subject: build/generic_platform: replace set with list for sources/verilog_include_paths X-Git-Tag: 24jan2021_ls180~904 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43f5d1ef13abc3b07de63c3563a592abf8a66bd2;p=litex.git build/generic_platform: replace set with list for sources/verilog_include_paths Python does not have native OrderedSet and we need to be able to preserve the order of the sources for some backends (Verilator for instance), so use list instead of set. --- diff --git a/litex/build/generic_platform.py b/litex/build/generic_platform.py index 3cd830f9..0e6a38bc 100644 --- a/litex/build/generic_platform.py +++ b/litex/build/generic_platform.py @@ -1,5 +1,5 @@ # This file is Copyright (c) 2013-2014 Sebastien Bourdeauducq -# This file is Copyright (c) 2014-2018 Florent Kermarrec +# This file is Copyright (c) 2014-2019 Florent Kermarrec # This file is Copyright (c) 2015 Yann Sionneau # License: BSD @@ -266,8 +266,8 @@ class GenericPlatform: if name is None: name = self.__module__.split(".")[-1] self.name = name - self.sources = set() - self.verilog_include_paths = set() + self.sources = [] + self.verilog_include_paths = [] self.finalized = False def request(self, *args, **kwargs): @@ -325,7 +325,7 @@ class GenericPlatform: if library is None: library = "work" - self.sources.add((os.path.abspath(filename), language, library)) + self.sources.append((os.path.abspath(filename), language, library)) def add_sources(self, path, *filenames, language=None, library=None): for f in filenames: @@ -349,7 +349,7 @@ class GenericPlatform: self.add_source(filename, _language, library) def add_verilog_include_path(self, path): - self.verilog_include_paths.add(os.path.abspath(path)) + self.verilog_include_paths.append(os.path.abspath(path)) def resolve_signals(self, vns): # resolve signal names in constraints