Commit b0c2fe81 authored by Tristan Gingold's avatar Tristan Gingold

tools: use class attribute HDL_FILES instead of instance attr _hdl_files.

parent 17f86de3
......@@ -48,7 +48,6 @@ class ToolActiveHDL(MakefileSim):
def __init__(self):
super(ToolActiveHDL, self).__init__()
self._tool_info.update(ToolActiveHDL.TOOL_INFO)
self._hdl_files.update(ToolActiveHDL.HDL_FILES)
self._standard_libs.extend(ToolActiveHDL.STANDARD_LIBS)
self._clean_targets.update(ToolActiveHDL.CLEAN_TARGETS)
......
......@@ -80,7 +80,6 @@ class ToolDiamond(MakefileSyn):
def __init__(self):
super(ToolDiamond, self).__init__()
self._tool_info.update(ToolDiamond.TOOL_INFO)
self._hdl_files.update(ToolDiamond.HDL_FILES)
self._supported_files.update(ToolDiamond.SUPPORTED_FILES)
self._standard_libs.extend(ToolDiamond.STANDARD_LIBS)
self._clean_targets.update(ToolDiamond.CLEAN_TARGETS)
......
......@@ -54,7 +54,6 @@ class ToolGHDL(MakefileSim):
def __init__(self):
super(ToolGHDL, self).__init__()
self._tool_info.update(ToolGHDL.TOOL_INFO)
self._hdl_files.update(ToolGHDL.HDL_FILES)
self._standard_libs.extend(ToolGHDL.STANDARD_LIBS)
self._clean_targets.update(ToolGHDL.CLEAN_TARGETS)
self._simulator_controls.update(ToolGHDL.SIMULATOR_CONTROLS)
......
......@@ -65,7 +65,6 @@ class ToolIcestorm(MakefileSyn):
def __init__(self):
super(ToolIcestorm, self).__init__()
self._tool_info.update(ToolIcestorm.TOOL_INFO)
self._hdl_files.update(ToolIcestorm.HDL_FILES)
self._supported_files.update(ToolIcestorm.SUPPORTED_FILES)
self._standard_libs.extend(ToolIcestorm.STANDARD_LIBS)
self._clean_targets.update(ToolIcestorm.CLEAN_TARGETS)
......
......@@ -126,7 +126,6 @@ $(TCL_CLOSE)'''
def __init__(self):
super(ToolISE, self).__init__()
self._tool_info.update(ToolISE.TOOL_INFO)
self._hdl_files.update(ToolISE.HDL_FILES)
self._supported_files.update(ToolISE.SUPPORTED_FILES)
self._standard_libs.extend(ToolISE.STANDARD_LIBS)
self._clean_targets.update(ToolISE.CLEAN_TARGETS)
......
......@@ -62,7 +62,6 @@ class ToolISim(MakefileSim):
def __init__(self):
super(ToolISim, self).__init__()
self._tool_info.update(ToolISim.TOOL_INFO)
self._hdl_files.update(ToolISim.HDL_FILES)
self._standard_libs.extend(ToolISim.STANDARD_LIBS)
self._clean_targets.update(ToolISim.CLEAN_TARGETS)
......
......@@ -57,7 +57,6 @@ class ToolIVerilog(MakefileSim):
def __init__(self):
super(ToolIVerilog, self).__init__()
self._tool_info.update(ToolIVerilog.TOOL_INFO)
self._hdl_files.update(ToolIVerilog.HDL_FILES)
self._standard_libs.extend(ToolIVerilog.STANDARD_LIBS)
self._clean_targets.update(ToolIVerilog.CLEAN_TARGETS)
self._simulator_controls.update(ToolIVerilog.SIMULATOR_CONTROLS)
......
......@@ -77,7 +77,6 @@ class ToolLibero(MakefileSyn):
def __init__(self):
super(ToolLibero, self).__init__()
self._tool_info.update(ToolLibero.TOOL_INFO)
self._hdl_files.update(ToolLibero.HDL_FILES)
self._supported_files.update(ToolLibero.SUPPORTED_FILES)
self._standard_libs.extend(ToolLibero.STANDARD_LIBS)
self._clean_targets.update(ToolLibero.CLEAN_TARGETS)
......
......@@ -35,6 +35,8 @@ class ToolMakefile(object):
"""Class that provides the Makefile writing methods and status"""
HDL_FILES = {}
def __init__(self):
super(ToolMakefile, self).__init__()
self._file = None
......@@ -42,7 +44,6 @@ class ToolMakefile(object):
self._tool_info = {}
self._clean_targets = {}
self._tcl_controls = {}
self._hdl_files = {}
self._supported_files = {}
self._standard_libs = []
self.fileset = None
......@@ -59,7 +60,7 @@ class ToolMakefile(object):
def get_parseable_files(self):
"""Get the parseable HDL file types supported by the tool"""
return self._hdl_files
return self.HDL_FILES
def get_privative_files(self):
"""Get the privative format file types supported by the tool"""
......
......@@ -104,7 +104,7 @@ TOP_MODULE := {top_module}
fileset = self.fileset.sort()
for file_aux in fileset:
# Consider only HDL files.
if isinstance(file_aux, tuple(self._hdl_files)):
if isinstance(file_aux, tuple(self.HDL_FILES)):
self.write("{}: {}".format(self.get_stamp_file(file_aux), file_aux.rel_path()))
# list dependencies, do not include the target file
for dep_file in sorted(file_aux.depends_on, key=(lambda x: x.file_path)):
......
......@@ -97,7 +97,7 @@ endif""")
ret = []
fileset_dict = {}
sources_list = []
fileset_dict.update(self._hdl_files)
fileset_dict.update(self.HDL_FILES)
fileset_dict.update(self._supported_files)
for filetype in fileset_dict:
file_list = []
......
......@@ -54,7 +54,6 @@ class MakefileVsim(MakefileSim):
# These are files copied into your working directory by a make rule
# The key is the filename, the value is the file source path
self.copy_rules = {}
self._hdl_files.update(MakefileVsim.HDL_FILES)
def _makefile_sim_options(self):
"""Print the vsim options to the Makefile"""
......
......@@ -104,7 +104,6 @@ class ToolQuartus(MakefileSyn):
def __init__(self):
super(ToolQuartus, self).__init__()
self._tool_info.update(ToolQuartus.TOOL_INFO)
self._hdl_files.update(ToolQuartus.HDL_FILES)
self._supported_files.update(ToolQuartus.SUPPORTED_FILES)
self._standard_libs.extend(ToolQuartus.STANDARD_LIBS)
self._clean_targets.update(ToolQuartus.CLEAN_TARGETS)
......
......@@ -85,4 +85,3 @@ class ToolVivado(ToolXilinx):
self._standard_libs.extend(ToolVivado.STANDARD_LIBS)
self._clean_targets.update(ToolVivado.CLEAN_TARGETS)
self._tcl_controls.update(ToolVivado.TCL_CONTROLS)
self._hdl_files.update(ToolVivado.HDL_FILES)
......@@ -58,7 +58,6 @@ class ToolVivadoSim(MakefileSim):
self._standard_libs.extend(ToolVivadoSim.STANDARD_LIBS)
self._clean_targets.update(ToolVivadoSim.CLEAN_TARGETS)
self._simulator_controls.update(ToolVivadoSim.SIMULATOR_CONTROLS)
self._hdl_files.update(ToolVivadoSim.HDL_FILES)
def _makefile_sim_compilation(self):
"""Generate compile simulation Makefile target for Vivado Simulator"""
......
......@@ -75,7 +75,6 @@ $(TCL_CLOSE)'''
def __init__(self):
super(ToolXilinx, self).__init__()
self._hdl_files.update(ToolXilinx.HDL_FILES)
self._supported_files.update(ToolXilinx.SUPPORTED_FILES)
self._clean_targets.update(ToolXilinx.CLEAN_TARGETS)
self._tcl_controls.update(ToolXilinx.TCL_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