Look for modules and entities when trying to identify the top relation

parent 43e115fc
......@@ -135,12 +135,12 @@ def make_dependency_set(fileset, top_level_entity):
assert isinstance(fileset, SourceFileSet)
fset = fileset.filter(DepFile)
# Find the file that provides the named top level entity
# top_rel = DepRelation(top_level_entity,DepRelation.PROVIDE, DepRelation.ENTITY)
top_rel = DepRelation("%s.%s" % ("work", top_level_entity), DepRelation.PROVIDE, DepRelation.ENTITY)
top_rel_vhdl = DepRelation("%s.%s" % ("work", top_level_entity), DepRelation.PROVIDE, DepRelation.ENTITY)
top_rel_vlog = DepRelation("%s.%s" % ("work", top_level_entity), DepRelation.PROVIDE, DepRelation.MODULE)
top_file = None
for chk_file in fset:
for rel in chk_file.rels:
if rel == top_rel:
if ((rel == top_rel_vhdl) or (rel == top_rel_vlog)):
top_file = chk_file
break;
if top_file:
......
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