Skip to content

Commit

Permalink
Merge pull request #1752 from Pinata-Consulting/genmetrics-simplifica…
Browse files Browse the repository at this point in the history
…tion

genMetrics: less conditional code, less repetition
  • Loading branch information
vvbandeira authored Jan 15, 2024
2 parents e827c59 + 1ca5249 commit c7c605e
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions flow/util/genMetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,18 +249,10 @@ def extract_metrics(cwd, platform, design, flow_variant, output, hier_json):
'Number of cells: +(\S+)',
rptPath + '/synth_stat.txt')

hierarchicalSynth = os.environ.get('SYNTH_HIERARCHICAL')

if hierarchicalSynth == '1':
extractTagFromFile('synth__design__instance__area__stdcell',
metrics_dict,
'Chip area for top module.*: +(\S+)',
rptPath + '/synth_stat.txt')
else:
extractTagFromFile('synth__design__instance__area__stdcell',
metrics_dict,
'Chip area for module.*: +(\S+)',
rptPath + '/synth_stat.txt')
extractTagFromFile('synth__design__instance__area__stdcell',
metrics_dict,
'Chip area for (?:top )?module.*: +(\S+)',
rptPath + '/synth_stat.txt')

# Clocks
# =========================================================================
Expand Down

0 comments on commit c7c605e

Please sign in to comment.