Skip to content

Commit c7c605e

Browse files
authored
Merge pull request #1752 from Pinata-Consulting/genmetrics-simplification
genMetrics: less conditional code, less repetition
2 parents e827c59 + 1ca5249 commit c7c605e

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

flow/util/genMetrics.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -249,18 +249,10 @@ def extract_metrics(cwd, platform, design, flow_variant, output, hier_json):
249249
'Number of cells: +(\S+)',
250250
rptPath + '/synth_stat.txt')
251251

252-
hierarchicalSynth = os.environ.get('SYNTH_HIERARCHICAL')
253-
254-
if hierarchicalSynth == '1':
255-
extractTagFromFile('synth__design__instance__area__stdcell',
256-
metrics_dict,
257-
'Chip area for top module.*: +(\S+)',
258-
rptPath + '/synth_stat.txt')
259-
else:
260-
extractTagFromFile('synth__design__instance__area__stdcell',
261-
metrics_dict,
262-
'Chip area for module.*: +(\S+)',
263-
rptPath + '/synth_stat.txt')
252+
extractTagFromFile('synth__design__instance__area__stdcell',
253+
metrics_dict,
254+
'Chip area for (?:top )?module.*: +(\S+)',
255+
rptPath + '/synth_stat.txt')
264256

265257
# Clocks
266258
# =========================================================================

0 commit comments

Comments
 (0)