Skip to content

Commit 804e222

Browse files
authored
Merge pull request #3260 from antmicro/mgan/default-flatten-flag
Add `-flatten` to synth pass explicitly
2 parents e3deec5 + af85e68 commit 804e222

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

docs/user/FlowVariables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ configuration file.
218218
| <a name="SKIP_PIN_SWAP"></a>SKIP_PIN_SWAP| Do not use pin swapping as a transform to fix timing violations (default: use pin swapping).| | |
219219
| <a name="SKIP_REPORT_METRICS"></a>SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| | |
220220
| <a name="SLEW_MARGIN"></a>SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| | |
221-
| <a name="SYNTH_ARGS"></a>SYNTH_ARGS| Optional synthesis variables for yosys.| -flatten| |
221+
| <a name="SYNTH_ARGS"></a>SYNTH_ARGS| Optional synthesis variables for yosys.| | |
222222
| <a name="SYNTH_BLACKBOXES"></a>SYNTH_BLACKBOXES| List of cells treated as a black box by Yosys. With Bazel, this can be used to run synthesis in parallel for the large modules of the design.| | |
223223
| <a name="SYNTH_GUT"></a>SYNTH_GUT| Load design and remove all internal logic before doing synthesis. This is useful when creating a mock .lef abstract that has a smaller area than the amount of logic would allow. bazel-orfs uses this to mock SRAMs, for instance.| | |
224224
| <a name="SYNTH_HDL_FRONTEND"></a>SYNTH_HDL_FRONTEND| Select an alternative language frontend to ingest the design. Available option is "slang". If the variable is empty, design is read with the Yosys read_verilog command.| | |

flow/scripts/synth.tcl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ if {[env_var_exists_and_non_empty SYNTH_OPERATIONS_ARGS]} {
3030

3131
if {![env_var_equals SYNTH_HIERARCHICAL 1]} {
3232
# Perform standard coarse-level synthesis script, flatten right away
33-
# (-flatten part of $synth_args per default)
34-
synth -run :fine {*}$synth_full_args
33+
synth -flatten -run :fine {*}$synth_full_args
3534
} else {
3635
# Perform standard coarse-level synthesis script,
3736
# defer flattening until we have decided what hierarchy to keep
@@ -48,7 +47,7 @@ if {![env_var_equals SYNTH_HIERARCHICAL 1]} {
4847
}
4948

5049
# Re-run coarse-level script, this time do pass -flatten
51-
synth -run coarse:fine {*}$synth_full_args
50+
synth -flatten -run coarse:fine {*}$synth_full_args
5251
}
5352

5453
json -o $::env(RESULTS_DIR)/mem.json

flow/scripts/variables.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ SYNTH_KEEP_MODULES:
683683
SYNTH_ARGS:
684684
description: |
685685
Optional synthesis variables for yosys.
686-
default: -flatten
686+
default: ""
687687
SYNTH_HIER_SEPARATOR:
688688
description: |
689689
Separator used for the synthesis flatten stage.

0 commit comments

Comments
 (0)