class AlteraQuartusToolchain:
def build(self, platform, fragment, build_dir="build", build_name="top",
- toolchain_path="/opt/Altera", run=True):
+ toolchain_path="/opt/Altera", run=True, **kwargs):
cwd = os.getcwd()
tools.mkdir_noerror(build_dir)
os.chdir(build_dir)
fragment = fragment.get_fragment()
platform.finalize(fragment)
- v_output = platform.get_verilog(fragment)
+ v_output = platform.get_verilog(fragment, name=build_name, **kwargs)
named_sc, named_pc = platform.resolve_signals(v_output.ns)
v_file = build_name + ".v"
v_output.write(v_file)
class LatticeDiamondToolchain:
def build(self, platform, fragment, build_dir="build", build_name="top",
- toolchain_path="/opt/Diamond", run=True):
+ toolchain_path="/opt/Diamond", run=True, **kwargs):
tools.mkdir_noerror(build_dir)
cwd = os.getcwd()
os.chdir(build_dir)
fragment = fragment.get_fragment()
platform.finalize(fragment)
- v_output = platform.get_verilog(fragment)
+ v_output = platform.get_verilog(fragment, name=build_name, **kwargs)
named_sc, named_pc = platform.resolve_signals(v_output.ns)
v_file = build_name + ".v"
v_output.write(v_file)
self.ise_commands = ""
def build(self, platform, fragment, build_dir="build", build_name="top",
- toolchain_path=None, source=None, run=True, mode="xst"):
+ toolchain_path=None, source=None, run=True, mode="xst", **kwargs):
if not isinstance(fragment, _Fragment):
fragment = fragment.get_fragment()
if toolchain_path is None:
os.chdir(build_dir)
try:
if mode == "xst" or mode == "yosys":
- v_output = platform.get_verilog(fragment)
+ v_output = platform.get_verilog(fragment, name=build_name, **kwargs)
vns = v_output.ns
named_sc, named_pc = platform.resolve_signals(vns)
v_file = build_name + ".v"
tools.write_to_file(build_name + ".tcl", "\n".join(tcl))
def build(self, platform, fragment, build_dir="build", build_name="top",
- toolchain_path="/opt/Xilinx/Vivado", source=True, run=True):
+ toolchain_path="/opt/Xilinx/Vivado", source=True, run=True, **kwargs):
tools.mkdir_noerror(build_dir)
cwd = os.getcwd()
os.chdir(build_dir)
if not isinstance(fragment, _Fragment):
fragment = fragment.get_fragment()
platform.finalize(fragment)
- v_output = platform.get_verilog(fragment)
+ v_output = platform.get_verilog(fragment, name=build_name, **kwargs)
named_sc, named_pc = platform.resolve_signals(v_output.ns)
v_file = build_name + ".v"
v_output.write(v_file)