Purge broken functionalities: force_tool is not working

and provides a Makefile target dependent on the hdlmake tool
parent 68ab75cb
......@@ -31,8 +31,7 @@ class FetchModules(Action):
def run(self):
top_module = self.modules_pool.get_top_module()
logging.info("Fetching needed modules.")
os.system(top_module.fetch_pre_cmd)
os.system(top_module.manifest_dict["fetch_pre_cmd"])
self.modules_pool.fetch_all()
logging.debug(str(self.modules_pool))
os.system(top_module.fetch_post_cmd)
os.system(top_module.manifest_dict["fetch_post_cmd"])
logging.info("All modules fetched.")
......@@ -80,10 +80,6 @@ class ManifestParser(ConfigParser):
self.add_delimiter()
self.add_option('top_module', default=None, help="Top level entity for synthesis and simulation", type='')
self.add_delimiter()
self.add_option('force_tool', default=None, help="Force certain version of a tool, e.g. 'ise < 13.2' or 'iverilog == 0.9.6",
type='')
self.add_delimiter()
self.add_option('quartus_preflow', default=None, help = "Quartus pre-flow script file", type = '')
self.add_option('quartus_postmodule', default=None, help = "Quartus post-module script file", type = '')
......
......@@ -15,8 +15,6 @@ class ModuleContent(ModuleCore):
self.local = []
self.git = []
self.svn = []
self.fetch_pre_cmd = None
self.fetch_post_cmd = None
self.incl_makefiles = []
super(ModuleContent, self).__init__()
......@@ -55,9 +53,6 @@ class ModuleContent(ModuleCore):
else:
fetchto = self.fetchto()
self.fetch_pre_cmd = self.manifest_dict["fetch_pre_cmd"]
self.fetch_post_cmd = self.manifest_dict["fetch_post_cmd"]
# Process required modules
if "local" in self.manifest_dict["modules"]:
local_paths = path_mod.flatten_list(
......
......@@ -113,7 +113,6 @@ class ModuleCore(ModuleConfig):
# Universal Manifest Properties
self.library = "work"
self.action = None
self.force_tool = None
self.pool = None
self.top_module = None
self.manifest_dict = None
......@@ -129,22 +128,10 @@ class ModuleCore(ModuleConfig):
def process_manifest(self):
"""Method that process the core manifest section"""
self._process_manifest_force_tool()
self._process_manifest_universal()
super(ModuleCore, self).process_manifest()
def _process_manifest_force_tool(self):
"""Method processing the force_tool manifest directive"""
if self.manifest_dict["force_tool"]:
force_tool = self.manifest_dict["force_tool"]
self.force_tool = force_tool.split(' ')
if len(self.force_tool) != 3:
logging.warning("Incorrect force_tool format %s. Ignoring",
self.force_tool)
self.force_tool = None
def _process_manifest_universal(self):
"""Method processing the universal manifest directives"""
#if "top_module" in self.manifest_dict:
......
......@@ -57,7 +57,7 @@ $$(PROJECT)1.sty \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd check_tool synthesis syn_post_cmd
local: syn_pre_cmd synthesis syn_post_cmd
synthesis:
\t\techo "prj_project open \"$$(PROJECT).ldf\"" > run.tcl
......@@ -67,9 +67,6 @@ synthesis:
\t\t${diamondc_path} run.tcl
\t\tcp $$(PROJECT)/$$(PROJECT)_$$(PROJECT).jed $$(PROJECT).jed
check_tool:
\t\t${check_tool}
syn_post_cmd:
\t\t${syn_post_cmd}
......@@ -85,7 +82,7 @@ clean:
mrproper:
\t\trm -f *.jed
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local check_tool
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
""")
if top_mod.manifest_dict["syn_pre_cmd"]:
......@@ -99,16 +96,6 @@ mrproper:
syn_post_cmd = ''
if top_mod.force_tool:
ft = top_mod.force_tool
check_tool = """python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
""".format(tool=ft[0],
condition=ft[1],
reference=ft[2])
else:
check_tool = ''
if sys.platform == 'cygwin':
bin_name = 'pnmainc'
else:
......@@ -116,7 +103,6 @@ mrproper:
makefile_text = makefile_tmplt.substitute(syn_top=top_mod.manifest_dict["syn_top"],
project_name=top_mod.manifest_dict["syn_project"],
diamond_path=tool_path,
check_tool=check_tool,
syn_pre_cmd=syn_pre_cmd,
syn_post_cmd=syn_post_cmd,
diamondc_path=os.path.join(tool_path, bin_name))
......
......@@ -320,9 +320,6 @@ par: __syn_pre_par_cmd __gen_tcl_par __run_tcl_par __syn_post_par_cmd
bitstream: __syn_pre_bitstream_cmd __gen_tcl_bitstream __run_tcl_bitstream __syn_post_bitstream_cmd
check_tool:
\t\t${check_tool}
#target for cleaning all intermediate stuff
clean:
\t\trm -f $$(ISE_CRAP)
......@@ -332,24 +329,13 @@ clean:
mrproper:
\t\trm -f *.bit *.bin *.mcs
.PHONY: mrproper clean local check_tool
.PHONY: mrproper clean local
""")
if top_mod.force_tool:
ft = top_mod.force_tool
check_tool = """python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
""".format(tool=ft[0],
condition=ft[1],
reference=ft[2])
else:
check_tool = ''
makefile_text = makefile_tmplt.substitute(syn_top=top_mod.manifest_dict["syn_top"],
project_name=top_mod.manifest_dict["syn_project"],
ise_path=tool_path,
check_tool=check_tool,
syn_pre_cmd=top_mod.manifest_dict["syn_pre_cmd"],
syn_post_cmd=top_mod.manifest_dict["syn_post_cmd"],
syn_pre_synthesize_cmd=top_mod.manifest_dict["syn_pre_synthesize_cmd"],
......
......@@ -59,7 +59,7 @@ LIBERO_CRAP := \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd check_tool synthesis syn_post_cmd
local: syn_pre_cmd synthesis syn_post_cmd
synthesis:
\t\techo "open_project -file {$$(PROJECT)/$$(PROJECT).prjx}" > run.tcl
......@@ -69,9 +69,6 @@ synthesis:
\t\t${libero_sh_path} SCRIPT:run.tcl
\t\tcp $$(PROJECT)/designer/impl1/${syn_top}.pdb ${syn_top}.pdb
check_tool:
\t\t${check_tool}
syn_post_cmd:
\t\t${syn_post_cmd}
......@@ -87,7 +84,7 @@ clean:
mrproper:
\t\trm -f *.pdb *.stp
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local check_tool
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
""")
......@@ -102,20 +99,9 @@ mrproper:
syn_post_cmd = ''
if top_mod.force_tool:
ft = top_mod.force_tool
check_tool = """python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
""".format(tool=ft[0],
condition=ft[1],
reference=ft[2])
else:
check_tool = ''
makefile_text = makefile_tmplt.substitute(syn_top=top_mod.manifest_dict["syn_top"],
project_name=top_mod.manifest_dict["syn_project"],
libero_path=tool_path,
check_tool=check_tool,
syn_pre_cmd=syn_pre_cmd,
syn_post_cmd=syn_post_cmd,
libero_sh_path=os.path.join(tool_path, "libero"))
......
......@@ -62,7 +62,7 @@ planAhead.* \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd check_tool synthesis syn_post_cmd
local: syn_pre_cmd synthesis syn_post_cmd
synthesis:
\t\techo "open_project $$(PROJECT).ppr" > run.tcl
......@@ -78,9 +78,6 @@ synthesis:
\t\t${planahead_sh_path} -mode tcl -source run.tcl
\t\tcp $$(PROJECT).runs/impl_1/${syn_top}.bit ${syn_top}.bit
check_tool:
\t\t${check_tool}
syn_post_cmd:
\t\t${syn_post_cmd}
......@@ -96,7 +93,7 @@ clean:
mrproper:
\t\trm -f *.bit
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local check_tool
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
""")
......@@ -110,20 +107,10 @@ mrproper:
else:
syn_post_cmd = ''
if top_mod.force_tool:
ft = top_mod.force_tool
check_tool = """python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
""".format(tool=ft[0],
condition=ft[1],
reference=ft[2])
else:
check_tool = ''
makefile_text = makefile_tmplt.substitute(syn_top=top_mod.manifest_dict["syn_top"],
project_name=top_mod.manifest_dict["syn_project"],
planahead_path=tool_path,
check_tool=check_tool,
syn_pre_cmd=syn_pre_cmd,
syn_post_cmd=syn_post_cmd,
planahead_sh_path=os.path.join(tool_path, "planAhead"))
......
......@@ -73,7 +73,7 @@ $$(PROJECT).sta.summary \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd check_tool synthesis syn_post_cmd
local: syn_pre_cmd synthesis syn_post_cmd
synthesis:
\t\techo "load_package flow" > run.tcl
......@@ -81,9 +81,6 @@ synthesis:
\t\techo "execute_flow -compile" >> run.tcl
\t\t${quartus_sh_path} -t run.tcl
check_tool:
\t\t${check_tool}
syn_post_cmd:
\t\t${syn_post_cmd}
......@@ -99,7 +96,7 @@ clean:
mrproper:
\t\trm -f *.sof *.pof *.jam *.jbc *.ekp *.jic
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local check_tool
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
""")
......@@ -113,20 +110,10 @@ mrproper:
else:
syn_post_cmd = ''
if top_mod.force_tool:
ft = top_mod.force_tool
check_tool = """python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
""".format(tool=ft[0],
condition=ft[1],
reference=ft[2])
else:
check_tool = ''
makefile_text = makefile_tmplt.substitute(syn_top=top_mod.manifest_dict["syn_top"],
project_name=top_mod.manifest_dict["syn_project"],
quartus_path=tool_path,
check_tool=check_tool,
syn_pre_cmd=syn_pre_cmd,
syn_post_cmd=syn_post_cmd,
quartus_sh_path=os.path.join(tool_path, "quartus_sh"))
......
......@@ -59,7 +59,7 @@ VIVADO_CRAP := \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd check_tool synthesis syn_post_cmd
local: syn_pre_cmd synthesis syn_post_cmd
synthesis:
\t\techo "open_project $$(PROJECT).xpr" > run.tcl
......@@ -75,9 +75,6 @@ synthesis:
\t\t${vivado_sh_path} -mode tcl -source run.tcl
\t\tcp $$(PROJECT).runs/impl_1/${syn_top}.bit ${syn_top}.bit
check_tool:
\t\t${check_tool}
syn_post_cmd:
\t\t${syn_post_cmd}
......@@ -93,7 +90,7 @@ clean:
mrproper:
\t\trm -f *.bit
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local check_tool
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
""")
......@@ -107,20 +104,10 @@ mrproper:
else:
syn_post_cmd = ''
if top_mod.force_tool:
ft = top_mod.force_tool
check_tool = """python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
""".format(tool=ft[0],
condition=ft[1],
reference=ft[2])
else:
check_tool = ''
makefile_text = makefile_tmplt.substitute(syn_top=top_mod.manifest_dict["syn_top"],
project_name=top_mod.manifest_dict["syn_project"],
planahead_path=tool_path,
check_tool=check_tool,
syn_pre_cmd=syn_pre_cmd,
syn_post_cmd=syn_post_cmd,
vivado_sh_path=os.path.join(tool_path, "vivado"))
......
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