Move Action class forward in the inheritance hierarchy

parent 0f4e5736
...@@ -20,10 +20,13 @@ ...@@ -20,10 +20,13 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>. # along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
from .check import ActionCheck from .check import ActionCheck
from .core import ActionCore from .core import ActionCore
from .tree import ActionTree from .tree import ActionTree
from .synthesis import ActionSynthesis from .synthesis import ActionSynthesis
from .simulation import GenerateSimulationMakefile from .simulation import ActionSimulation
from .qsys_hw_tcl_update import QsysHwTclUpdate from .qsys_hw_tcl_update import QsysHwTclUpdate
from .action import Action
...@@ -22,7 +22,15 @@ ...@@ -22,7 +22,15 @@
import sys import sys
import logging import logging
class Action(object): from hdlmake.action import (ActionCheck, ActionCore,
ActionTree, ActionSimulation,
ActionSynthesis,
QsysHwTclUpdate)
class Action(ActionCheck, ActionCore,
ActionTree, ActionSimulation,
ActionSynthesis,
QsysHwTclUpdate):
def _check_all_fetched_or_quit(self): def _check_all_fetched_or_quit(self):
if not self.is_everything_fetched(): if not self.is_everything_fetched():
......
...@@ -24,10 +24,8 @@ import logging ...@@ -24,10 +24,8 @@ import logging
import sys import sys
import re import re
from .action import Action
class ActionCheck(object):
class ActionCheck(Action):
def check_manifest(self): def check_manifest(self):
logging.error("This action is not implemented yet!") logging.error("This action is not implemented yet!")
......
...@@ -25,14 +25,13 @@ import os ...@@ -25,14 +25,13 @@ import os
import os.path import os.path
import time import time
from .action import Action
import hdlmake.fetch as fetch import hdlmake.fetch as fetch
import hdlmake.new_dep_solver as dep_solver 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
class ActionCore(Action): class ActionCore(object):
def fetch(self): def fetch(self):
top_module = self.get_top_module() top_module = self.get_top_module()
......
...@@ -19,14 +19,13 @@ ...@@ -19,14 +19,13 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>. # along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
from .action import Action
import hdlmake.new_dep_solver as dep_solver import hdlmake.new_dep_solver as dep_solver
import os import os
import shutil import shutil
import logging import logging
class QsysHwTclUpdate(Action): class QsysHwTclUpdate(object):
def qsys_hw_tcl_update(self): def qsys_hw_tcl_update(self):
file_set = self.build_file_set(self.get_top_module().manifest_dict["syn_top"]) file_set = self.build_file_set(self.get_top_module().manifest_dict["syn_top"])
file_list = dep_solver.make_dependency_sorted_list(file_set) file_list = dep_solver.make_dependency_sorted_list(file_set)
......
...@@ -30,12 +30,11 @@ import importlib ...@@ -30,12 +30,11 @@ import importlib
from hdlmake.dep_file import DepFile from hdlmake.dep_file import DepFile
#import hdlmake.new_dep_solver as dep_solver #import hdlmake.new_dep_solver as dep_solver
from .action import Action
from hdlmake.tools import ( from hdlmake.tools import (
ToolIVerilog, ToolISim, ToolModelsim, ToolIVerilog, ToolISim, ToolModelsim,
ToolActiveHDL, ToolRiviera, ToolGHDL) ToolActiveHDL, ToolRiviera, ToolGHDL)
class GenerateSimulationMakefile(Action, class ActionSimulation(
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"""
......
...@@ -29,13 +29,11 @@ import importlib ...@@ -29,13 +29,11 @@ import importlib
from hdlmake.srcfile import SourceFileFactory from hdlmake.srcfile import SourceFileFactory
from hdlmake.util import path from hdlmake.util import path
from .action import Action
from hdlmake.tools import ( from hdlmake.tools import (
ToolISE, ToolPlanAhead, ToolVivado, ToolISE, ToolPlanAhead, ToolVivado,
ToolQuartus, ToolDiamond, ToolLibero) ToolQuartus, ToolDiamond, ToolLibero)
class ActionSynthesis(Action, class ActionSynthesis(
ToolISE, ToolPlanAhead, ToolVivado, ToolISE, ToolPlanAhead, ToolVivado,
ToolQuartus, ToolDiamond, ToolLibero): ToolQuartus, ToolDiamond, ToolLibero):
......
...@@ -19,12 +19,11 @@ ...@@ -19,12 +19,11 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>. # along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
from .action import Action
from hdlmake.util import path from hdlmake.util import path
import logging import logging
class ActionTree(Action): class ActionTree(object):
def generate_tree(self): def generate_tree(self):
try: try:
import networkx as nx import networkx as nx
......
...@@ -34,16 +34,10 @@ from . import new_dep_solver as dep_solver ...@@ -34,16 +34,10 @@ 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 (ActionCheck, ActionCore, from .action import Action
ActionTree, GenerateSimulationMakefile,
ActionSynthesis,
QsysHwTclUpdate)
class ModulePool(list, ActionCheck, ActionCore, class ModulePool(list, Action):
ActionTree, GenerateSimulationMakefile,
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