@@ -71,7 +71,7 @@ def benchmark(ctx, open_road_info):
71
71
]
72
72
awk_cmds = [
73
73
"area=$(cat {log} | awk '/Design area/ {{ print $3 }}');" ,
74
- "util =$(cat {log} | awk -F '[ %]' '/Design area/ {{ print $5 }}');" ,
74
+ "util_fraction =$(cat {log} | awk -F '[ %]' '/Design area/ {{ printf( \" %.3f \" , $5 / 100.0); }}');" ,
75
75
"combos=$(cat {log} | awk '/combinational cell/ {{ print $4 }}');" ,
76
76
"combos_area=$(cat {log} | awk '/combinational cell/ {{ print $5 }}');" ,
77
77
"seq=$(cat {log} | awk '/Sequential cell/ {{ print $3 }}');" ,
@@ -82,10 +82,10 @@ def benchmark(ctx, open_road_info):
82
82
"tbuffs_area=$(cat {log} | awk '/Timing Repair Buffer/ {{ print $4 }}');" ,
83
83
"inverters=$(cat {log} | awk '/Inverter/ {{ print $2 }}');" ,
84
84
"inverters_area=$(cat {log} | awk '/Inverter/ {{ print $2 }}');" ,
85
- "wns =$(cat {log} | awk '/wns/ {{ print $2 }}');" ,
86
- "tns =$(cat {log} | awk '/tns/ {{ print $2 }}');" ,
87
- "period=$(cat {log} | awk '/clk / {{ period=$2; exit }} END {{ print period }}');" ,
88
- "cpl=$(cat {log} | awk '/period_min/ {{ cpl=$4; exit }} END {{ print cpl }}');" ,
85
+ "wns_ps =$(cat {log} | awk '/wns/ {{ printf( \" %.0f \" , $2 * 1000); }}');" ,
86
+ "tns_ps =$(cat {log} | awk '/tns/ {{ printf( \" %.0f \" , $2 * 1000); }}');" ,
87
+ "period=$(cat {log} | awk '/clk / {{ period=$2; exit }} END {{ printf( \" %.0f \" , period * 1000); }}');" ,
88
+ "cpl=$(cat {log} | awk '/period_min/ {{ cpl=$4; exit }} END {{ printf( \" %.0f \" , cpl * 1000); }}');" ,
89
89
"fmax=$(cat {log} | awk '/fmax/ {{ fmax=$7; exit }} END {{ print fmax }}');" ,
90
90
"tot_pow=$(cat {log} | awk '/^Total / {{ total_power=$5 }} END {{ print total_power }}');" ,
91
91
"int_pow=$(cat {log} | awk '/^Total / {{ intern_power=$2 }} END {{ print intern_power }}');" ,
@@ -97,8 +97,7 @@ def benchmark(ctx, open_road_info):
97
97
struct (
98
98
area = struct (
99
99
cell_area_um2 = "${area:=0}" ,
100
- # Use bc -l to set scale, otherwise XX/100 will evaluate to zero.
101
- cell_utilization_fraction = "$(printf %.3f $(bc -l<<<$util/100.0))" ,
100
+ cell_utilization_fraction = "${util_fraction:=0}" ,
102
101
area_sequentials_um2 = "${seq_area:=0}" ,
103
102
area_combinationals_um2 = "${combos_area:=0}" ,
104
103
area_buffers_um2 = "${buffs_area:=0}" ,
@@ -112,11 +111,11 @@ def benchmark(ctx, open_road_info):
112
111
num_inverters = "${inverters:=0}" ,
113
112
),
114
113
performance = struct (
115
- clock_period_ps = "$(printf %.0f $(bc<<<$ period*1000)) " ,
116
- critical_path_ps = "$(printf %.0f $(bc<<<$ cpl*1000)) " ,
114
+ clock_period_ps = "${ period:=0} " ,
115
+ critical_path_ps = "${ cpl:=0} " ,
117
116
fmax_ghz = "${fmax:=0}" ,
118
- setup_wns_ps = "$(printf %.0f $(bc<<<$wns*1000)) " ,
119
- setup_tns_ps = "$(printf %.0f $(bc<<<$tns*1000)) " ,
117
+ setup_wns_ps = "${wns_ps:=0} " ,
118
+ setup_tns_ps = "${tns_ps:=0} " ,
120
119
),
121
120
power = struct (
122
121
total = struct (
0 commit comments