File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -177,13 +177,17 @@ def gen_rule_file(
177177 "!=" : operator .ne ,
178178 }
179179
180- period_list = metrics ["constraints__clocks__details" ]
181-
182- period = float (sub (r"^.*: " , "" , period_list [0 ]))
183- if len (period_list ) != 1 :
184- print (
185- f"[WARNING] Multiple clocks not supported. Will use first clock: { period_list [0 ]} ."
186- )
180+ period_list = metrics .get ("constraints__clocks__details" )
181+
182+ period = 0.0
183+ if period_list :
184+ period = float (sub (r"^.*: " , "" , period_list [0 ]))
185+ if len (period_list ) != 1 :
186+ print (
187+ f"[WARNING] Multiple clocks not supported. Will use first clock: { period_list [0 ]} ."
188+ )
189+ else :
190+ print ("[WARNING] 'constraints__clocks__details' not found or is empty in metrics. Clock-related rules might be affected." )
187191
188192 format_str = "| {:45} | {:8} | {:8} | {:8} |\n "
189193 change_str = ""
You can’t perform that action at this time.
0 commit comments