named_sc, named_pc = platform.resolve_signals(vns)
v_file = build_name + ".v"
tools.write_to_file(v_file, v_src)
- sources = platform.sources + [(v_file, "verilog")]
+ sources = platform.sources | {(v_file, "verilog")}
_build_files(platform.device, sources, platform.verilog_include_paths, named_sc, named_pc, build_name)
if run:
_run_quartus(build_name, quartus_path)
if name is None:
name = self.__module__.split(".")[-1]
self.name = name
- self.sources = []
- self.verilog_include_paths = []
+ self.sources = set()
+ self.verilog_include_paths = set()
self.finalized = False
def request(self, *args, **kwargs):
if language is None:
language = "verilog" # default to Verilog
filename = os.path.abspath(filename)
- self.sources.append((filename, language))
+ self.sources.add((filename, language))
def add_sources(self, path, *filenames, language=None):
for f in filenames:
self.add_source(filename, language)
def add_verilog_include_path(self, path):
- self.verilog_include_paths.append(os.path.abspath(path))
+ self.verilog_include_paths.add(os.path.abspath(path))
def resolve_signals(self, vns):
# resolve signal names in constraints
named_sc, named_pc = platform.resolve_signals(vns)
v_file = build_name + ".v"
tools.write_to_file(v_file, v_src)
- sources = platform.sources + [(v_file, "verilog")]
+ sources = platform.sources | {(v_file, "verilog")}
if mode == "xst":
_build_xst_files(platform.device, sources, platform.verilog_include_paths, build_name, self.xst_opt)
isemode = "xst"
named_sc, named_pc = platform.resolve_signals(vns)
v_file = build_name + ".v"
tools.write_to_file(v_file, v_src)
- sources = platform.sources + [(v_file, "verilog")]
+ sources = platform.sources | {(v_file, "verilog")}
_build_files(platform.device, sources, platform.verilog_include_paths, build_name,
self.bitstream_commands, self.additional_commands)
tools.write_to_file(build_name + ".xdc", _build_xdc(named_sc, named_pc))