build: standardize toolchain path setting
authorSebastien Bourdeauducq <sb@m-labs.hk>
Wed, 4 Nov 2015 06:55:12 +0000 (14:55 +0800)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Wed, 4 Nov 2015 06:55:12 +0000 (14:55 +0800)
migen/build/altera/quartus.py
migen/build/lattice/diamond.py
migen/build/xilinx/ise.py
migen/build/xilinx/vivado.py

index 4b5b835504d5f67af0febbbd46024ce5742ed096..99f6e9789cc0c085f3717a24dcae52e99fb63d9c 100644 (file)
@@ -113,7 +113,7 @@ quartus_sta {build_name} -c {build_name}
 
 class AlteraQuartusToolchain:
     def build(self, platform, fragment, build_dir="build", build_name="top",
-              quartus_path="/opt/Altera", run=True):
+              toolchain_path="/opt/Altera", run=True):
         tools.mkdir_noerror(build_dir)
         os.chdir(build_dir)
 
@@ -133,7 +133,7 @@ class AlteraQuartusToolchain:
                      named_pc,
                      build_name)
         if run:
-            _run_quartus(build_name, quartus_path)
+            _run_quartus(build_name, toolchain_path)
 
         os.chdir("..")
 
index 3fae1f2e08a84c969e76f0cc11196493e3942b08..1334040bb306003e06a2e350bee36a3adb543566 100644 (file)
@@ -76,7 +76,7 @@ def _run_diamond(build_name, source, ver=None):
 
 class LatticeDiamondToolchain:
     def build(self, platform, fragment, build_dir="build", build_name="top",
-            diamond_path="/opt/Diamond", run=True):
+              toolchain_path="/opt/Diamond", run=True):
         tools.mkdir_noerror(build_dir)
         os.chdir(build_dir)
 
@@ -94,7 +94,7 @@ class LatticeDiamondToolchain:
         tools.write_to_file(build_name + ".lpf", _build_lpf(named_sc, named_pc))
 
         if run:
-            _run_diamond(build_name, diamond_path)
+            _run_diamond(build_name, toolchain_path)
 
         os.chdir("..")
 
index eb64b37da809b9a3e1ee22de1527ed6a0d2bb35a..72e82a90aa50f123f57ef32b0982e9e3ea428209 100644 (file)
@@ -135,16 +135,16 @@ class XilinxISEToolchain:
         self.ise_commands = ""
 
     def build(self, platform, fragment, build_dir="build", build_name="top",
-            ise_path=None, source=None, run=True, mode="xst"):
+            toolchain_path=None, source=None, run=True, mode="xst"):
         if not isinstance(fragment, _Fragment):
             fragment = fragment.get_fragment()
-        if ise_path is None:
+        if toolchain_path is None:
             if sys.platform == "win32":
-                ise_path = "C:\\Xilinx"
+                toolchain_path = "C:\\Xilinx"
             elif sys.platform == "cygwin":
-                ise_path = "/cygdrive/c/Xilinx"
+                toolchain_path = "/cygdrive/c/Xilinx"
             else:
-                ise_path = "/opt/Xilinx"
+                toolchain_path = "/opt/Xilinx"
         if source is None:
             source = sys.platform != "win32"
 
@@ -185,7 +185,7 @@ class XilinxISEToolchain:
 
             tools.write_to_file(build_name + ".ucf", _build_ucf(named_sc, named_pc))
             if run:
-                _run_ise(build_name, ise_path, source, isemode,
+                _run_ise(build_name, toolchain_path, source, isemode,
                          ngdbuild_opt, self.bitgen_opt, self.ise_commands,
                          self.map_opt, self.par_opt)
         finally:
index 76e41d8672fead1a55543a22d65e25bc94e4f140..c1a54a41d88f033d4812060e63da99308aa48dd6 100644 (file)
@@ -112,7 +112,7 @@ class XilinxVivadoToolchain:
         tools.write_to_file(build_name + ".tcl", "\n".join(tcl))
 
     def build(self, platform, fragment, build_dir="build", build_name="top",
-            vivado_path="/opt/Xilinx/Vivado", source=True, run=True):
+            toolchain_path="/opt/Xilinx/Vivado", source=True, run=True):
         tools.mkdir_noerror(build_dir)
         os.chdir(build_dir)
 
@@ -127,7 +127,7 @@ class XilinxVivadoToolchain:
         self._build_batch(platform, sources, build_name)
         tools.write_to_file(build_name + ".xdc", _build_xdc(named_sc, named_pc))
         if run:
-            _run_vivado(build_name, vivado_path, source)
+            _run_vivado(build_name, toolchain_path, source)
 
         os.chdir("..")