Skip to content

Commit 05114a9

Browse files
author
Bruce Ashfield
committed
isospec: process all destinations in design cells
It is possible that valid destinations for devices are more than one level deep in the design cells. Instead of only processing immediate children, we process all subnodes of the design instead. Note: this could be restricted to specific types of cells in the future (i.e. "ps") or triggered on cells that indicate they have subnodes. But for now, this approach ensures that we don't miss collecting any possible devices. Signed-off-by: Bruce Ashfield <bruce.ashfield@amd.com>
1 parent 2b936c7 commit 05114a9

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

lopper/assists/isospec.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -625,10 +625,8 @@ def device_collect( self ):
625625
return device_dict
626626

627627
cell_list = [ design ]
628-
cell_list.extend( design_cells.children() )
629-
#cell_list = [ design_cells.children() ]
628+
cell_list.extend( design_cells.subnodes() )
630629
for cell in cell_list:
631-
#for cell in design_cells.children():
632630
try:
633631
dests = cell["destinations"]
634632
_debug( f"processing cell: {cell.name}" )
@@ -676,7 +674,6 @@ def device_collect( self ):
676674
"dest": dest
677675
}
678676
_debug( f" ** destination '{dest}' device has no nodeid, adding to 'other'" )
679-
# os._exit(1)
680677

681678
dests = cell["SMIDs"]
682679
_debug( f" SMIDs {dests.abs_path} [{len(dests)}]" )
@@ -696,7 +693,6 @@ def device_collect( self ):
696693
except:
697694
continue
698695

699-
700696
return device_dict, smid_dict, other_dict
701697

702698
def access_type( self, access_entry ):
@@ -1036,11 +1032,9 @@ def isodomain_convert( self, spec_node, domains_tree ):
10361032
pass
10371033
else:
10381034
_info( f"non-device SMID any detected ... {access}" )
1039-
# os._exit(1)
10401035

10411036
except Exception as e:
1042-
_info( f"Exception during base protectiong checking: {e}" )
1043-
os._exit(1)
1037+
_info( f"Exception during base protection checking: {e}" )
10441038

10451039
# The node indexed dictionary will be device names and a
10461040
# True/False if it is referenced.
@@ -1144,13 +1138,12 @@ def isodomain_convert( self, spec_node, domains_tree ):
11441138
except:
11451139
pass
11461140
elif access_type == "cpu_list":
1147-
_info( f"processing cpu list" )
11481141
try:
11491142
dests = self.dests( access )
1150-
# _info( f" cpus dests: {dests}" )
1143+
_info( f" cpus dests: {dests}" )
11511144
cpus = self.cpus( dests )
11521145
# _info( f" cpus: {cpus}" )
1153-
1146+
_info( f"processing cpu list: {cpus}" )
11541147
for c in cpus:
11551148
# add the cpus to the node
11561149
domains_tree.cpu_add( yaml_node, c )

0 commit comments

Comments
 (0)