Improve how new_dep_solver handles a missing top_module definition

parent b3a15d2d
......@@ -135,6 +135,8 @@ def make_dependency_set(fileset, top_level_entity, extra_modules=None):
def _check_entity(test_file, entity_name):
""" Check if the input file provides the entity pointed by the name"""
if entity_name == None:
return False
entity_rel_vhdl = DepRelation(
entity_name,
DepRelation.PROVIDE, DepRelation.ENTITY)
......@@ -156,7 +158,13 @@ def make_dependency_set(fileset, top_level_entity, extra_modules=None):
if _check_entity(chk_file, entity_aux):
extra_files.append(chk_file)
if top_file is None:
logging.critical('Could not find a top level file that provides the '
if top_level_entity is None:
logging.critical(
'Could not find a top level file because the top '
'module is undefined. Continuing with the full file set.')
else:
logging.critical(
'Could not find a top level file that provides the '
'top_module="%s". Continuing with the full file set.',
top_level_entity)
return fileset
......
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