Commit fe2c8a33 authored by Tristan Gingold's avatar Tristan Gingold

tools: use TOOL_INFO class attribute directly.

parent b0c2fe81
......@@ -47,7 +47,6 @@ class ToolActiveHDL(MakefileSim):
def __init__(self):
super(ToolActiveHDL, self).__init__()
self._tool_info.update(ToolActiveHDL.TOOL_INFO)
self._standard_libs.extend(ToolActiveHDL.STANDARD_LIBS)
self._clean_targets.update(ToolActiveHDL.CLEAN_TARGETS)
......
......@@ -79,7 +79,6 @@ class ToolDiamond(MakefileSyn):
def __init__(self):
super(ToolDiamond, self).__init__()
self._tool_info.update(ToolDiamond.TOOL_INFO)
self._supported_files.update(ToolDiamond.SUPPORTED_FILES)
self._standard_libs.extend(ToolDiamond.STANDARD_LIBS)
self._clean_targets.update(ToolDiamond.CLEAN_TARGETS)
......
......@@ -53,7 +53,6 @@ class ToolGHDL(MakefileSim):
def __init__(self):
super(ToolGHDL, self).__init__()
self._tool_info.update(ToolGHDL.TOOL_INFO)
self._standard_libs.extend(ToolGHDL.STANDARD_LIBS)
self._clean_targets.update(ToolGHDL.CLEAN_TARGETS)
self._simulator_controls.update(ToolGHDL.SIMULATOR_CONTROLS)
......
......@@ -64,7 +64,6 @@ class ToolIcestorm(MakefileSyn):
def __init__(self):
super(ToolIcestorm, self).__init__()
self._tool_info.update(ToolIcestorm.TOOL_INFO)
self._supported_files.update(ToolIcestorm.SUPPORTED_FILES)
self._standard_libs.extend(ToolIcestorm.STANDARD_LIBS)
self._clean_targets.update(ToolIcestorm.CLEAN_TARGETS)
......
......@@ -125,7 +125,6 @@ $(TCL_CLOSE)'''
def __init__(self):
super(ToolISE, self).__init__()
self._tool_info.update(ToolISE.TOOL_INFO)
self._supported_files.update(ToolISE.SUPPORTED_FILES)
self._standard_libs.extend(ToolISE.STANDARD_LIBS)
self._clean_targets.update(ToolISE.CLEAN_TARGETS)
......
......@@ -61,7 +61,6 @@ class ToolISim(MakefileSim):
def __init__(self):
super(ToolISim, self).__init__()
self._tool_info.update(ToolISim.TOOL_INFO)
self._standard_libs.extend(ToolISim.STANDARD_LIBS)
self._clean_targets.update(ToolISim.CLEAN_TARGETS)
......
......@@ -56,7 +56,6 @@ class ToolIVerilog(MakefileSim):
def __init__(self):
super(ToolIVerilog, self).__init__()
self._tool_info.update(ToolIVerilog.TOOL_INFO)
self._standard_libs.extend(ToolIVerilog.STANDARD_LIBS)
self._clean_targets.update(ToolIVerilog.CLEAN_TARGETS)
self._simulator_controls.update(ToolIVerilog.SIMULATOR_CONTROLS)
......
......@@ -76,7 +76,6 @@ class ToolLibero(MakefileSyn):
def __init__(self):
super(ToolLibero, self).__init__()
self._tool_info.update(ToolLibero.TOOL_INFO)
self._supported_files.update(ToolLibero.SUPPORTED_FILES)
self._standard_libs.extend(ToolLibero.STANDARD_LIBS)
self._clean_targets.update(ToolLibero.CLEAN_TARGETS)
......
......@@ -36,12 +36,12 @@ class ToolMakefile(object):
"""Class that provides the Makefile writing methods and status"""
HDL_FILES = {}
TOOL_INFO = {}
def __init__(self):
super(ToolMakefile, self).__init__()
self._file = None
self._initialized = False
self._tool_info = {}
self._clean_targets = {}
self._tcl_controls = {}
self._supported_files = {}
......@@ -76,9 +76,9 @@ class ToolMakefile(object):
def _get_name_bin(self):
"""Get the name and binary values"""
if shell.check_windows_tools():
bin_name = self._tool_info['windows_bin']
bin_name = self.TOOL_INFO['windows_bin']
else:
bin_name = self._tool_info['linux_bin']
bin_name = self.TOOL_INFO['linux_bin']
return bin_name
def _get_path(self):
......@@ -102,7 +102,7 @@ class ToolMakefile(object):
def makefile_check_tool(self, path_key):
"""Check if the binary is available in the O.S. environment"""
name = self._tool_info['name']
name = self.TOOL_INFO['name']
logging.debug("Checking if " + name + " tool is available on PATH")
if path_key in self.manifest_dict:
if self._is_in_path(path_key):
......
......@@ -44,14 +44,14 @@ class MakefileSyn(ToolMakefile):
self._makefile_syn_clean()
self._makefile_syn_phony()
self.makefile_close()
logging.info(self._tool_info['name'] + " synthesis makefile generated.")
logging.info(self.TOOL_INFO['name'] + " synthesis makefile generated.")
def _makefile_syn_top(self):
"""Create the top part of the synthesis Makefile"""
if shell.check_windows_tools():
tcl_interpreter = self._tool_info["windows_bin"]
tcl_interpreter = self.TOOL_INFO["windows_bin"]
else:
tcl_interpreter = self._tool_info["linux_bin"]
tcl_interpreter = self.TOOL_INFO["linux_bin"]
top_parameter = """\
TOP_MODULE := {top_module}
PROJECT := {project_name}
......@@ -71,7 +71,7 @@ SYN_GRADE := {syn_grade}
tcl_interpreter=tcl_interpreter,
project_name=os.path.splitext(
self.manifest_dict["syn_project"])[0],
project_ext=self._tool_info["project_ext"],
project_ext=self.TOOL_INFO["project_ext"],
syn_family=self.manifest_dict.get("syn_family", ''),
syn_device=self.manifest_dict["syn_device"],
syn_package=self.manifest_dict["syn_package"],
......
......@@ -49,7 +49,6 @@ class ToolModelsim(MakefileVsim):
self.copy_rules["modelsim.ini"] = os.path.join(
"$(MODELSIM_INI_PATH)", "modelsim.ini")
self.additional_deps.append("modelsim.ini")
self._tool_info.update(ToolModelsim.TOOL_INFO)
self._clean_targets.update(ToolModelsim.CLEAN_TARGETS)
self._standard_libs.extend(ToolModelsim.STANDARD_LIBS)
......
......@@ -60,7 +60,6 @@ class ToolPlanAhead(ToolXilinx):
def __init__(self):
super(ToolPlanAhead, self).__init__()
self._tool_info.update(ToolPlanAhead.TOOL_INFO)
self._supported_files.update(ToolPlanAhead.SUPPORTED_FILES)
self._standard_libs.extend(ToolPlanAhead.STANDARD_LIBS)
self._clean_targets.update(ToolPlanAhead.CLEAN_TARGETS)
......
......@@ -103,7 +103,6 @@ class ToolQuartus(MakefileSyn):
def __init__(self):
super(ToolQuartus, self).__init__()
self._tool_info.update(ToolQuartus.TOOL_INFO)
self._supported_files.update(ToolQuartus.SUPPORTED_FILES)
self._standard_libs.extend(ToolQuartus.STANDARD_LIBS)
self._clean_targets.update(ToolQuartus.CLEAN_TARGETS)
......
......@@ -79,7 +79,6 @@ class ToolRiviera(MakefileVsim):
def __init__(self):
super(ToolRiviera, self).__init__()
self._tool_info.update(ToolRiviera.TOOL_INFO)
self._standard_libs.extend(ToolRiviera.STANDARD_LIBS)
self._clean_targets.update(ToolRiviera.CLEAN_TARGETS)
......
......@@ -80,7 +80,6 @@ class ToolVivado(ToolXilinx):
def __init__(self):
super(ToolVivado, self).__init__()
self._tool_info.update(ToolVivado.TOOL_INFO)
self._supported_files.update(ToolVivado.SUPPORTED_FILES)
self._standard_libs.extend(ToolVivado.STANDARD_LIBS)
self._clean_targets.update(ToolVivado.CLEAN_TARGETS)
......
......@@ -54,7 +54,6 @@ class ToolVivadoSim(MakefileSim):
def __init__(self):
super(ToolVivadoSim, self).__init__()
self._tool_info.update(ToolVivadoSim.TOOL_INFO)
self._standard_libs.extend(ToolVivadoSim.STANDARD_LIBS)
self._clean_targets.update(ToolVivadoSim.CLEAN_TARGETS)
self._simulator_controls.update(ToolVivadoSim.SIMULATOR_CONTROLS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment