Commit e8a3f7b0 authored by Phil Clarke's avatar Phil Clarke

update comments and logging for the function get_library_for_top_module() in makefulesyn.py

parent 2b033865
......@@ -227,29 +227,30 @@ SYN_POST_{0}_CMD := {2}
return num_libs;
# TODO
def get_library_for_top_module(self):
if self.get_num_hdl_libs() == 1:
return self.default_library
# this may now be excessive, based on the "catch-all" return statement at the bottom.
return self.default_library
else:
# find and return the library name for the top HDL module...
fileset_dict = {}
fileset_dict.update(self.HDL_FILES)
top_file = self.manifest_dict["syn_top"]
for hdlfiletype in fileset_dict:
for specific_file in self.fileset:
if isinstance(specific_file, hdlfiletype):
logging.info(self.TOOL_INFO['name']
+ "libfinder_top_module, Checking: "
+ str(specific_file.purename)
)
if specific_file.purename == top_file:
logging.info(self.TOOL_INFO['name']
+ "libfinder_top_module, FOUND library_name: "
+ specific_file.library
+ " for module: "
+ top_file
)
return str(specific_file.library)
#return self.default_library
return "booo"
#find and return the library name for the top HDL module...
fileset_dict = {}
fileset_dict.update(self.HDL_FILES)
top_file = self.manifest_dict["syn_top"]
for hdlfiletype in fileset_dict:
for specific_file in self.fileset:
if isinstance(specific_file, hdlfiletype):
if specific_file.purename == top_file:
#logging.info(self.TOOL_INFO['name']
# + "libfinder_top_module, FOUND library_name: "
# + specific_file.library + " for module: "
# + top_file )
return str(specific_file.library)
#In case we dont find a library then post an info message before returning the default value
logging.info( self.TOOL_INFO['name']
+ "function get_library_for_top_module, "
+ "failed to find a library for the top module: "
+ top_file + " Will use the default_library: "
+ self.default_library
)
return self.default_library
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