Skip to content

Commit 880a34f

Browse files
committed
Merge remote-tracking branch 'origin/master' into HEAD
2 parents f7ec0aa + cd230dc commit 880a34f

File tree

16 files changed

+508
-169
lines changed

16 files changed

+508
-169
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,6 @@ mainREADME.md
9595
build
9696
.scala-build/
9797
.bsp/
98+
99+
# autotuner artifacts
100+
metadata-base-at.json

docs/user/FlowVariables.md

Lines changed: 111 additions & 111 deletions
Large diffs are not rendered by default.

flow/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ YOSYS_FLAGS += -v 3
262262

263263
#-------------------------------------------------------------------------------
264264
# setup all commands used within this flow
265-
export TIME_BIN ?= /usr/bin/time
265+
export TIME_BIN ?= env time
266266
TIME_CMD = $(TIME_BIN) -f 'Elapsed time: %E[h:]min:sec. CPU time: user %U sys %S (%P). Peak memory: %MKB.'
267267
TIME_TEST = $(shell $(TIME_CMD) echo foo 2>/dev/null)
268268
ifeq (,$(strip $(TIME_TEST)))
@@ -498,8 +498,7 @@ do-yosys:
498498
.PHONY: do-yosys-canonicalize
499499
do-yosys-canonicalize: yosys-dependencies
500500
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
501-
# NOTE! YOSYS_FLAGS is omitted here because "-v 3" silences helpful error messages
502-
($(TIME_CMD) $(YOSYS_EXE) -c $(SCRIPTS_DIR)/synth_canonicalize.tcl) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys_canonicalize.log)
501+
($(TIME_CMD) $(YOSYS_EXE) $(YOSYS_FLAGS) -c $(SCRIPTS_DIR)/synth_canonicalize.tcl) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys_canonicalize.log)
503502

504503
$(RESULTS_DIR)/1_synth.rtlil: $(YOSYS_DEPENDENCIES)
505504
$(UNSET_AND_MAKE) do-yosys-canonicalize

flow/designs/asap7/gcd/autotuner.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"type": "float",
4545
"minmax": [
4646
0.0,
47-
0.99
47+
0.1
4848
],
4949
"step": 0
5050
},
@@ -64,5 +64,5 @@
6464
],
6565
"step": 1
6666
},
67-
"_FR_FILE_PATH": ""
67+
"_FR_FILE_PATH": "fastroute.tcl"
6868
}

flow/designs/sky130hd/gcd/autotuner.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@
6565
],
6666
"step": 0
6767
},
68-
"_PINS_DISTANCE": {
69-
"type": "int",
70-
"minmax": [
71-
1,
72-
1
73-
],
74-
"step": 1
75-
},
7668
"CTS_CLUSTER_SIZE": {
7769
"type": "int",
7870
"minmax": [
@@ -99,4 +91,3 @@
9991
"step": 0
10092
}
10193
}
102-

flow/scripts/defaults.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
data = yaml.safe_load(file)
1111

1212
for key, value in data.items():
13-
if value.get("value", None) is None:
13+
if value.get("default", None) is None:
1414
continue
15-
print(f'{key}?={value["value"]}')
15+
print(f'{key}?={value["default"]}')

flow/scripts/generate-variables-docs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,16 @@
2525
markdown_table = ""
2626

2727
markdown_table += "## Variables in alphabetic order\n\n"
28-
table_header = "| Variable | Description |\n| --- | --- |\n"
28+
table_header = "| Variable | Description | Default |\n| --- | --- | --- |\n"
2929
table_rows = ""
3030
for key in sorted(data):
3131
value = data[key]
3232
description = value.get("description", "").replace("\n", " ").strip()
33-
table_rows += f'| <a name="{key}"></a>{key} | {description} |\n'
33+
table_rows += (
34+
f'| <a name="{key}"></a>{key}'
35+
+ f"| {description}"
36+
+ f'| {value.get("default", "")} |\n'
37+
)
3438

3539
markdown_table += table_header + table_rows
3640

flow/scripts/variables.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ GENERATE_ARTIFACTS_ON_FAILURE:
2424
Considering that global and detailed route can run for a long time and
2525
use a lot of memory, this allows inspecting results on a laptop for
2626
a build that ran on a server.
27-
value: 0
27+
default: 0
2828

2929
TNS_END_PERCENT:
3030
description: >
@@ -33,13 +33,13 @@ TNS_END_PERCENT:
3333
3434
Specifies how many percent of violating paths to fix [0-100].
3535
Worst path will always be fixed.
36-
value: 100
36+
default: 100
3737
stages:
3838
- cts
3939
- floorplan
4040
- grt
4141
ROUTING_LAYER_ADJUSTMENT:
42-
value: 0.5
42+
default: 0.5
4343
description: Default routing layer adjustment
4444
stages:
4545
- place
@@ -49,21 +49,21 @@ ROUTING_LAYER_ADJUSTMENT:
4949
RECOVER_POWER:
5050
description: >
5151
Specifies how many percent of paths with positive slacks can be slowed for power savings [0-100].
52-
value: 0
52+
default: 0
5353
SKIP_INCREMENTAL_REPAIR:
54-
value: 0
54+
default: 0
5555
DETAILED_METRICS:
5656
description: >
5757
If set, then calls report_metrics prior to repair operations in the CTS
5858
and global route stages
59-
value: 0
59+
default: 0
6060
stages:
6161
- cts
6262
- grt
6363
EQUIVALENCE_CHECK:
6464
description: >
6565
Enable running equivalence checks to verify logical correctness of repair_timing.
66-
value: 0
66+
default: 0
6767
stages:
6868
- cts
6969
CORE_UTILIZATION:

flow/test/test_helper.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ if [ $RUN_AUTOTUNER -eq 1 ]; then
110110

111111
echo "Running Autotuner smoke sweep test"
112112
python3 -m unittest tools.AutoTuner.test.smoke_test_sweep.${PLATFORM}SweepSmokeTest.test_sweep
113+
114+
echo "Running Autotuner ref file test (only once)"
115+
if [ "$PLATFORM" == "asap7" ] && [ "$DESIGN" == "gcd" ]; then
116+
python3 -m unittest tools.AutoTuner.test.ref_file_check.RefFileCheck.test_files
117+
fi
118+
119+
echo "Running Autotuner smoke algorithm & evaluation test"
120+
python3 -m unittest tools.AutoTuner.test.smoke_test_algo_eval.${PLATFORM}AlgoEvalSmokeTest.test_algo_eval
113121
fi
114122

115123
exit $ret

flow/util/utils.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ update_rules:
3434
update_rules_force:
3535
$(UTILS_DIR)/genRuleFile.py $(DESIGN_DIR) --variant $(FLOW_VARIANT) --update
3636

37+
.PHONY: update_metadata_autotuner
38+
update_metadata_autotuner:
39+
@$(UTILS_DIR)/genMetrics.py -d $(DESIGN_NICKNAME) \
40+
-p $(PLATFORM) \
41+
-v $(FLOW_VARIANT) \
42+
-o $(DESIGN_DIR)/metadata-$(FLOW_VARIANT)-at.json -x
43+
3744
#-------------------------------------------------------------------------------
3845

3946
.PHONY: write_net_rc

0 commit comments

Comments
 (0)