Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Autotuner] Working params for asap7 #1921

Merged
merged 15 commits into from
May 29, 2024
12 changes: 2 additions & 10 deletions flow/designs/asap7/aes-block/autotuner.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"CORE_UTILIZATION": {
"type": "int",
"minmax": [
30,
100
0,
20
],
"step": 1
},
Expand Down Expand Up @@ -64,14 +64,6 @@
],
"step": 0
},
"_PINS_DISTANCE": {
"type": "int",
"minmax": [
1,
4
],
"step": 1
},
"CTS_CLUSTER_SIZE": {
"type": "int",
"minmax": [
Expand Down
20 changes: 2 additions & 18 deletions flow/designs/asap7/aes/autotuner.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "int",
"minmax": [
30,
100
40
],
"step": 1
},
Expand Down Expand Up @@ -56,23 +56,7 @@
],
"step": 0
},
"PLACE_DENSITY_LB_ADDON": {
"type": "float",
"minmax": [
0.0,
0.99
],
"step": 0
},
"_PINS_DISTANCE": {
"type": "int",
"minmax": [
1,
4
],
"step": 1
},
"CTS_CLUSTER_SIZE": {
"CTS_CLUSTER_SIZE": {
"type": "int",
"minmax": [
10,
Expand Down
20 changes: 2 additions & 18 deletions flow/designs/asap7/ibex/autotuner.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"_SDC_CLK_PERIOD": {
"type": "float",
"minmax": [
100,
1700,
2000
],
"step": 0
Expand All @@ -12,7 +12,7 @@
"type": "int",
"minmax": [
25,
100
50
],
"step": 1
},
Expand Down Expand Up @@ -48,14 +48,6 @@
],
"step": 1
},
"_FR_LAYER_ADJUST": {
"type": "float",
"minmax": [
0.1,
0.7
],
"step": 0
},
"PLACE_DENSITY_LB_ADDON": {
"type": "float",
"minmax": [
Expand All @@ -64,14 +56,6 @@
],
"step": 0
},
"_PINS_DISTANCE": {
"type": "int",
"minmax": [
1,
1
],
"step": 0
},
"CTS_CLUSTER_SIZE": {
"type": "int",
"minmax": [
Expand Down
32 changes: 4 additions & 28 deletions flow/designs/asap7/jpeg/autotuner.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_SDC_FILE_PATH": "constraint.sdc",
"_SDC_FILE_PATH": "jpeg_encoder15_7nm.sdc",
"_SDC_CLK_PERIOD": {
"type": "float",
"minmax": [
Expand All @@ -11,19 +11,11 @@
"CORE_UTILIZATION": {
"type": "int",
"minmax": [
30,
100
0,
30
],
"step": 1
},
"CORE_ASPECT_RATIO": {
"type": "float",
"minmax": [
0.5,
2.0
],
"step": 0
},
"CORE_MARGIN": {
"type": "int",
"minmax": [
Expand All @@ -48,30 +40,14 @@
],
"step": 1
},
"_FR_LAYER_ADJUST": {
"type": "float",
"minmax": [
0.1,
0.7
],
"step": 0
},
"PLACE_DENSITY_LB_ADDON": {
"type": "float",
"minmax": [
0.0,
0.99
0.6
],
"step": 0
},
"_PINS_DISTANCE": {
"type": "int",
"minmax": [
1,
4
],
"step": 1
},
"CTS_CLUSTER_SIZE": {
"type": "int",
"minmax": [
Expand Down
24 changes: 4 additions & 20 deletions flow/designs/asap7/mock-alu/autotuner.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"_SDC_CLK_PERIOD": {
"type": "float",
"minmax": [
0.1,
0.4
50,
300
],
"step": 0
"step": 1
},
"CORE_UTILIZATION": {
"type": "int",
"minmax": [
5,
100
50
],
"step": 1
},
Expand Down Expand Up @@ -48,14 +48,6 @@
],
"step": 1
},
"_FR_LAYER_ADJUST": {
"type": "float",
"minmax": [
0.1,
0.7
],
"step": 0
},
"PLACE_DENSITY_LB_ADDON": {
"type": "float",
"minmax": [
Expand All @@ -64,14 +56,6 @@
],
"step": 0
},
"_PINS_DISTANCE": {
"type": "int",
"minmax": [
1,
4
],
"step": 1
},
"CTS_CLUSTER_SIZE": {
"type": "int",
"minmax": [
Expand Down
24 changes: 0 additions & 24 deletions flow/designs/asap7/mock-array/autotuner.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
],
"step": 0
},
"CORE_UTILIZATION": {
"type": "int",
"minmax": [
5,
100
],
"step": 1
},
"CORE_ASPECT_RATIO": {
"type": "float",
"minmax": [
Expand Down Expand Up @@ -48,14 +40,6 @@
],
"step": 1
},
"_FR_LAYER_ADJUST": {
"type": "float",
"minmax": [
0.1,
0.7
],
"step": 0
},
"PLACE_DENSITY_LB_ADDON": {
"type": "float",
"minmax": [
Expand All @@ -64,14 +48,6 @@
],
"step": 0
},
"_PINS_DISTANCE": {
"type": "int",
"minmax": [
1,
4
],
"step": 1
},
"CTS_CLUSTER_SIZE": {
"type": "int",
"minmax": [
Expand Down
4 changes: 2 additions & 2 deletions flow/scripts/cts.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ append_env_var additional_args SKIP_PIN_SWAP -skip_pin_swap 0
append_env_var additional_args SKIP_GATE_CLONING -skip_gate_cloning 0

if {[info exists ::env(SKIP_CTS_REPAIR_TIMING)] == 0 || $::env(SKIP_CTS_REPAIR_TIMING) == 0} {
if { [info exists ::env(EQUIVALENCE_CHECK)] } {
if {[info exists ::env(EQUIVALENCE_CHECK)] && $::env(EQUIVALENCE_CHECK) == 1} {
write_eqy_verilog 4_before_rsz.v
}

puts "repair_timing [join $additional_args " "]"
repair_timing {*}$additional_args

if { [info exists ::env(EQUIVALENCE_CHECK)] } {
vvbandeira marked this conversation as resolved.
Show resolved Hide resolved
if {[info exists ::env(EQUIVALENCE_CHECK)] && $::env(EQUIVALENCE_CHECK) == 1} {
run_equivalence_test
}

Expand Down
9 changes: 7 additions & 2 deletions tools/AutoTuner/src/autotuner/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,12 @@ def read_tune_ax(name, this):
dict_["value_type"] = "float"
return dict_

with open(file_name) as file:
data = json.load(file)
# Check file exists and whether it is a valid JSON file.
assert os.path.isfile(file_name), f'File {file_name} not found.'
try:
with open(file_name) as file: data = json.load(file)
except json.JSONDecodeError:
raise ValueError(f"Invalid JSON file: {file_name}")
sdc_file = ''
fr_file = ''
if args.mode == 'tune' and args.algorithm == 'ax':
Expand Down Expand Up @@ -487,6 +491,7 @@ def openroad(base_dir, parameters, flow_variant, path=''):
make_command += f'make -C {base_dir}/flow DESIGN_CONFIG=designs/'
make_command += f'{args.platform}/{args.design}/config.mk'
make_command += f' FLOW_VARIANT={flow_variant} {parameters}'
make_command += f' EQUIVALENCE_CHECK=0'
make_command += f' NPROC={args.openroad_threads} SHELL=bash'
run_command(make_command,
timeout=args.timeout,
Expand Down