Ideally, we want to use an ordered set (to be able to keep compilation order), to avoid using an external package, we use a list.
named_sc, named_pc = platform.resolve_signals(v_output.ns)
v_file = build_name + ".v"
v_output.write(v_file)
- sources = platform.sources | {(v_file, "verilog", "work")}
+ sources = platform.sources + [(v_file, "verilog", "work")]
_build_files(platform.device,
sources,
platform.verilog_include_paths,
if name is None:
name = self.__module__.split(".")[-1]
self.name = name
- self.sources = set()
+ self.sources = []
self.verilog_include_paths = set()
self.finalized = False
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:
named_sc, named_pc = platform.resolve_signals(v_output.ns)
v_file = build_name + ".v"
v_output.write(v_file)
- sources = platform.sources | {(v_file, "verilog", "work")}
+ sources = platform.sources + [(v_file, "verilog", "work")]
_build_files(platform.device, sources, platform.verilog_include_paths, build_name)
tools.write_to_file(build_name + ".lpf", _build_lpf(named_sc, named_pc))
return series_size_str[2:]
def gen_read_files(self, platform, main):
- sources = platform.sources | {(main, "verilog", "work")}
+ sources = platform.sources + [(main, "verilog", "work")]
incflags = ""
read_files = list()
for path in platform.verilog_include_paths:
named_sc, named_pc = platform.resolve_signals(vns)
v_file = build_name + ".v"
v_output.write(v_file)
- sources = platform.sources | {(v_file, "verilog", "work")}
+ sources = platform.sources + [(v_file, "verilog", "work")]
if mode in ("xst", "cpld"):
_build_xst_files(platform.device, sources, platform.verilog_include_paths, build_name, self.xst_opt)
isemode = mode
named_sc, named_pc = platform.resolve_signals(v_output.ns)
v_file = build_name + ".v"
v_output.write(v_file)
- sources = platform.sources | {(v_file, "verilog", "work")}
+ sources = platform.sources + [(v_file, "verilog", "work")]
edifs = platform.edifs
ips = platform.ips
self._build_batch(platform, sources, edifs, ips, build_name)