Move Action in the class inheritance hierarchy

parent 5b14ef69
...@@ -24,15 +24,7 @@ ...@@ -24,15 +24,7 @@
import sys import sys
import logging import logging
from hdlmake.action import (ActionCheck, ActionCore, class Action(object):
ActionTree, ActionSimulation,
ActionSynthesis,
QsysHwTclUpdate)
class Action(ActionCheck, ActionCore,
ActionTree, ActionSimulation,
ActionSynthesis,
QsysHwTclUpdate):
"""This is the base class providing the common Action methods""" """This is the base class providing the common Action methods"""
def _check_all_fetched_or_quit(self): def _check_all_fetched_or_quit(self):
......
...@@ -26,8 +26,9 @@ import logging ...@@ -26,8 +26,9 @@ import logging
import sys import sys
import re import re
from .action import Action
class ActionCheck(object): class ActionCheck(Action):
"""Class providing the method to check general properties""" """Class providing the method to check general properties"""
def check_manifest(self): def check_manifest(self):
......
...@@ -31,8 +31,9 @@ import hdlmake.new_dep_solver as dep_solver ...@@ -31,8 +31,9 @@ import hdlmake.new_dep_solver as dep_solver
from hdlmake.util import path as path_mod from hdlmake.util import path as path_mod
from hdlmake.srcfile import VerilogFile, VHDLFile, NGCFile from hdlmake.srcfile import VerilogFile, VHDLFile, NGCFile
from hdlmake.vlog_parser import VerilogPreprocessor from hdlmake.vlog_parser import VerilogPreprocessor
from .action import Action
class ActionCore(object): class ActionCore(Action):
"""Class that contains the methods for core actions""" """Class that contains the methods for core actions"""
def fetch(self): def fetch(self):
......
...@@ -24,8 +24,9 @@ import os ...@@ -24,8 +24,9 @@ import os
import shutil import shutil
import logging import logging
from .action import Action
class QsysHwTclUpdate(object): class QsysHwTclUpdate(Action):
def qsys_hw_tcl_update(self): def qsys_hw_tcl_update(self):
file_set = self.build_file_set( file_set = self.build_file_set(
self.get_top_module().manifest_dict["syn_top"]) self.get_top_module().manifest_dict["syn_top"])
......
...@@ -33,7 +33,9 @@ from hdlmake.tools import ( ...@@ -33,7 +33,9 @@ from hdlmake.tools import (
ToolIVerilog, ToolISim, ToolModelsim, ToolIVerilog, ToolISim, ToolModelsim,
ToolActiveHDL, ToolRiviera, ToolGHDL) ToolActiveHDL, ToolRiviera, ToolGHDL)
class ActionSimulation( from .action import Action
class ActionSimulation(Action,
ToolIVerilog, ToolISim, ToolModelsim, ToolIVerilog, ToolISim, ToolModelsim,
ToolActiveHDL, ToolRiviera, ToolGHDL): ToolActiveHDL, ToolRiviera, ToolGHDL):
"""This class contains the simulation specific methods""" """This class contains the simulation specific methods"""
......
...@@ -34,7 +34,9 @@ from hdlmake.tools import ( ...@@ -34,7 +34,9 @@ from hdlmake.tools import (
ToolISE, ToolPlanAhead, ToolVivado, ToolISE, ToolPlanAhead, ToolVivado,
ToolQuartus, ToolDiamond, ToolLibero) ToolQuartus, ToolDiamond, ToolLibero)
class ActionSynthesis( from .action import Action
class ActionSynthesis(Action,
ToolISE, ToolPlanAhead, ToolVivado, ToolISE, ToolPlanAhead, ToolVivado,
ToolQuartus, ToolDiamond, ToolLibero): ToolQuartus, ToolDiamond, ToolLibero):
"""Class providing the public synthesis methods for the user""" """Class providing the public synthesis methods for the user"""
......
...@@ -25,7 +25,9 @@ from hdlmake.util import path ...@@ -25,7 +25,9 @@ from hdlmake.util import path
import logging import logging
class ActionTree(object): from .action import Action
class ActionTree(Action):
"""Class providing methods to create a graph from pool and to analyze it""" """Class providing methods to create a graph from pool and to analyze it"""
def _generate_tree_web(self, hierarchy, top_id): def _generate_tree_web(self, hierarchy, top_id):
......
...@@ -34,10 +34,17 @@ from . import new_dep_solver as dep_solver ...@@ -34,10 +34,17 @@ from . import new_dep_solver as dep_solver
from .util import path as path_mod from .util import path as path_mod
from . import fetch from . import fetch
from .env import Env from .env import Env
from .action import Action
from .action import (ActionCheck, ActionCore,
ActionTree, ActionSimulation,
ActionSynthesis,
QsysHwTclUpdate)
class ModulePool(list, Action):
class ModulePool(list, ActionCheck, ActionCore,
ActionTree, ActionSimulation,
ActionSynthesis,
QsysHwTclUpdate):
""" """
The ModulePool class acts as the container for the HDLMake modules that The ModulePool class acts as the container for the HDLMake modules that
are progressively being added to the design hierarchy. are progressively being added to the design hierarchy.
......
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