class AlteraQuartusToolchain:
def build(self, platform, fragment, build_dir="build", build_name="top",
toolchain_path="/opt/Altera", run=True):
+ cwd = os.getcwd()
tools.mkdir_noerror(build_dir)
os.chdir(build_dir)
if run:
_run_quartus(build_name, toolchain_path)
- os.chdir("..")
+ os.chdir(cwd)
return v_output.ns
def build(self, platform, fragment, build_dir="build", build_name="top",
toolchain_path="/opt/Diamond", run=True):
tools.mkdir_noerror(build_dir)
+ cwd = os.getcwd()
os.chdir(build_dir)
if not isinstance(fragment, _Fragment):
if run:
_run_diamond(build_name, toolchain_path)
- os.chdir("..")
+ os.chdir(cwd)
return v_output.ns
def build(self, platform, fragment, build_dir="build", build_name="top",
toolchain_path="/opt/Xilinx/Vivado", source=True, run=True):
tools.mkdir_noerror(build_dir)
+ cwd = os.getcwd()
os.chdir(build_dir)
if not isinstance(fragment, _Fragment):
if run:
_run_vivado(build_name, toolchain_path, source)
- os.chdir("..")
+ os.chdir(cwd)
return v_output.ns