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")}
- _build_files(platform.device, sources, platform.verilog_include_paths, build_name)
+ platform.add_source(v_file)
+ _build_files(platform.device, platform.sources, platform.verilog_include_paths, build_name)
tools.write_to_file(build_name + ".lpf", _build_lpf(named_sc, named_pc))
named_sc, named_pc = platform.resolve_signals(v_output.ns)
v_file = build_name + ".v"
v_output.write(v_file)
+ platform.add_source(v_file)
if use_nextpnr:
chosen_yosys_template = self.nextpnr_yosys_template
else:
chosen_yosys_template = self.yosys_template
ys_contents = "\n".join(_.format(build_name=build_name,
- read_files=self.gen_read_files(platform, v_file),
+ read_files=self.gen_read_files(platform),
synth_opts=synth_opts)
for _ in chosen_yosys_template)
def get_size_string(self, series_size_str):
return series_size_str[2:]
- def gen_read_files(self, platform, main):
- sources = platform.sources | {(main, "verilog", "work")}
+ def gen_read_files(self, platform):
incflags = ""
read_files = list()
for path in platform.verilog_include_paths:
incflags += " -I" + path
- for filename, language, library in sources:
+ for filename, language, library in platform.sources:
read_files.append("read_{}{} {}".format(language,
incflags,
filename))
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")}
+ platform.add_source(v_file)
if mode in ("xst", "cpld"):
- _build_xst_files(platform.device, sources, platform.verilog_include_paths, build_name, self.xst_opt)
+ _build_xst_files(platform.device, platform.sources, platform.verilog_include_paths, build_name, self.xst_opt)
isemode = mode
else:
- _run_yosys(platform.device, sources, platform.verilog_include_paths, build_name)
+ _run_yosys(platform.device, platform.sources, platform.verilog_include_paths, build_name)
isemode = "edif"
ngdbuild_opt += "-p " + platform.device
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")}
+ platform.add_source(v_file)
+ sources = platform.sources
edifs = platform.edifs
ips = platform.ips
self._build_batch(platform, sources, edifs, ips, build_name, synth_mode, enable_xpm)