[clkmgr] updates to support clkmgr idle connections
Signed-off-by: Timothy Chen <timothytim@google.com>
diff --git a/util/topgen.py b/util/topgen.py
index 52ead8d..7fb01e7 100755
--- a/util/topgen.py
+++ b/util/topgen.py
@@ -489,10 +489,10 @@
# clock classification
grps = top['clocks']['groups']
- src_aon_attr = OrderedDict()
ft_clks = OrderedDict()
rg_clks = OrderedDict()
sw_clks = OrderedDict()
+ src_aon_attr = OrderedDict()
hint_clks = OrderedDict()
# construct a dictionary of the aon attribute for easier lookup
@@ -532,12 +532,20 @@
])
# sw hint clocks
- hint_clks = OrderedDict([
+ hints = OrderedDict([
(clk, src)
for grp in grps for (clk, src) in grp['clocks'].items()
if grp['sw_cg'] == 'hint' and not src_aon_attr[src]
])
+ # hint clocks dict
+ for clk, src in hints.items():
+ # the clock if constructed as clk_{src_name}_{module_name}.
+ # so to get the module name we split from the right and pick the last entry
+ hint_clks[clk] = OrderedDict()
+ hint_clks[clk]['name'] = (clk.rsplit('_', 1)[-1])
+ hint_clks[clk]['src'] = src
+
for idx, tpl in enumerate(tpls):
out = ""
with tpl.open(mode='r', encoding='UTF-8') as fin: