class AlteraQuartusToolchain:
def build(self, platform, fragment, build_dir="build", build_name="top",
- toolchain_path="/opt/Altera", run=True, **kwargs):
+ toolchain_path=None, run=True, **kwargs):
+ if toolchain_path is None:
+ toolchain_path="/opt/Altera"
cwd = os.getcwd()
os.makedirs(build_dir, exist_ok=True)
os.chdir(build_dir)
special_overrides = common.lattice_ecpx_special_overrides
def build(self, platform, fragment, build_dir="build", build_name="top",
- toolchain_path="/opt/Diamond", run=True, **kwargs):
+ toolchain_path=None, run=True, **kwargs):
+ if toolchain_path is None:
+ toolchain_path = "/opt/Diamond"
os.makedirs(build_dir, exist_ok=True)
cwd = os.getcwd()
os.chdir(build_dir)
)
def build(self, platform, fragment, build_dir="build", build_name="top",
- toolchain_path="/opt/Xilinx/Vivado", source=True, run=True):
+ toolchain_path=None, source=True, run=True):
+ if toolchain_path is None:
+ if sys.platform == "win32":
+ toolchain_path = "C:\\Xilinx\\Vivado"
+ elif sys.platform == "cygwin":
+ toolchain_path = "/cygdrive/c/Xilinx/Vivado"
+ else:
+ toolchain_path = "/opt/Xilinx/Vivado"
os.makedirs(build_dir, exist_ok=True)
cwd = os.getcwd()
os.chdir(build_dir)