The pool total config only needs to be calculated once

parent 25ce764b
......@@ -71,6 +71,7 @@ class Action(list):
url=os.getcwd(),
source=fetch_mod.LOCAL,
fetchto=".")
self.config = self._get_config_dict()
def new_module(self, parent, url, source, fetchto):
"""Add new module to the pool.
......@@ -159,7 +160,7 @@ class Action(list):
"""Get the Top module from the pool"""
return self.top_module
def get_config_dict(self):
def _get_config_dict(self):
"""Get the combined hierarchical Manifest dictionary from the pool"""
config_dict = {}
for mod in self:
......
......@@ -33,15 +33,14 @@ class ToolSim(ToolMakefile):
def simulation_makefile(self, pool):
"""Execute the simulation action"""
pool.check_all_fetched_or_quit()
manifest_project_dict = pool.get_config_dict()
_check_simulation_manifest(manifest_project_dict)
_check_simulation_manifest(pool.config)
fset = pool.build_file_set(
manifest_project_dict.get("sim_top"),
pool.config.get("sim_top"),
standard_libs=self._standard_libs)
# Filter the not parseable files!
dep_files = fset.filter(DepFile)
# dep_solver.solve(dep_files)
self.makefile_setup(manifest_project_dict, dep_files,
self.makefile_setup(pool.config, dep_files,
filename=pool.options.filename)
self.makefile_check_tool('sim_path')
self.makefile_sim_top()
......
......@@ -42,10 +42,9 @@ class ToolSyn(ToolMakefile):
def synthesis_makefile(self, pool):
"""Generate a Makefile for the specific synthesis tool"""
pool.check_all_fetched_or_quit()
manifest_project_dict = pool.get_config_dict()
_check_synthesis_manifest(manifest_project_dict)
_check_synthesis_manifest(pool.config)
fileset = pool.build_file_set(
manifest_project_dict["syn_top"],
pool.config["syn_top"],
standard_libs=self._standard_libs)
sup_files = pool.build_complete_file_set()
privative_files = []
......@@ -57,7 +56,7 @@ class ToolSyn(ToolMakefile):
logging.info("Detected %d supported files that are not parseable",
len(privative_files))
fileset.add(privative_files)
self.makefile_setup(manifest_project_dict, fileset,
self.makefile_setup(pool.config, fileset,
filename=pool.options.filename)
self.makefile_check_tool('syn_path')
self.makefile_includes()
......
......@@ -58,8 +58,7 @@ def _load_sim_tool(modules_pool):
def write_makefile(modules_pool):
"""Function that detects the appropriated tool and write the Makefile"""
manifest_project_dict = modules_pool.get_config_dict()
action = manifest_project_dict.get('action')
action = modules_pool.config.get('action')
if action == "simulation":
sim_writer = _load_sim_tool(modules_pool)
sim_writer.simulation_makefile(modules_pool)
......@@ -69,4 +68,3 @@ def write_makefile(modules_pool):
else:
logging.error("Unknown requested action: %s", action)
quit()
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