build/xilinx/ise: Variable rename

isemode => _isemode
mode => _mode
This commit is contained in:
Christian Klarhorst 2022-07-05 16:29:08 +02:00
parent 855b88c039
commit 922ad10eaf
1 changed files with 6 additions and 6 deletions

View File

@ -43,15 +43,15 @@ class XilinxISEToolchain(GenericToolchain):
self.ngdbuild_opt = "" self.ngdbuild_opt = ""
self.bitgen_opt = "-g Binary:Yes -w" self.bitgen_opt = "-g Binary:Yes -w"
self.ise_commands = "" self.ise_commands = ""
self.mode = "xst" self._mode = "xst"
self._isemode = "xst" self._isemode = "xst"
def build(self, platform, fragment, def build(self, platform, fragment,
mode = "xst", mode = "xst",
**kwargs): **kwargs):
self.mode = mode self._mode = mode
self._isemode = mode if mode in ["xst", "cpld"] else "edif" self._isemode = mode if mode in ["xst", "cpld"] else "edif"
if self.mode == "yosys": if mode == "yosys":
self.ngdbuild_opt += "-p " + platform.device self.ngdbuild_opt += "-p " + platform.device
return GenericToolchain.build(self, platform, fragment, **kwargs) return GenericToolchain.build(self, platform, fragment, **kwargs)
@ -96,7 +96,7 @@ class XilinxISEToolchain(GenericToolchain):
# Project (.xst) ------------------------------------------------------------------------------- # Project (.xst) -------------------------------------------------------------------------------
def build_project(self): def build_project(self):
if self.mode not in ["xst", "cpld"]: if self._mode not in ["xst", "cpld"]:
return ("", "") return ("", "")
prj_contents = "" prj_contents = ""
for filename, language, library, *copy in self.platform.sources: for filename, language, library, *copy in self.platform.sources:
@ -203,10 +203,10 @@ bitgen {bitgen_opt} {build_name}.ncd {build_name}.bit{fail_stmt}
def run_script(self, script): def run_script(self, script):
if self.mode == "yosys": if self._mode == "yosys":
self._run_yosys() self._run_yosys()
if self.mode == "edif": if self._mode == "edif":
# Generate edif # Generate edif
e_output = self.platform.get_edif(self._fragment) e_output = self.platform.get_edif(self._fragment)
self._vns = e_output.ns self._vns = e_output.ns