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