Skip to content

Commit c4a8cea

Browse files
committed
flow: apply tclfmt to synth_syn.tcl
Reformat with tclfmt 0.7.0 — normalize line endings, replace tab indentation with two spaces, and add spaces inside the `if { ... }` brace expression. Pure formatting; no behavior change. Fixes the Tclint CI job on PR #4253. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 8e388b9 commit c4a8cea

1 file changed

Lines changed: 74 additions & 74 deletions

File tree

flow/scripts/synth_syn.tcl

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
1-
utl::set_metrics_stage "synthesis__{}"
2-
source $::env(SCRIPTS_DIR)/load.tcl
3-
erase_non_stage_variables synth
4-
5-
source_env_var_if_exists PLATFORM_TCL
6-
source $::env(SCRIPTS_DIR)/read_liberty.tcl
7-
8-
read_lef $::env(TECH_LEF)
9-
read_lef $::env(SC_LEF)
10-
if { [env_var_exists_and_non_empty ADDITIONAL_LEFS] } {
11-
foreach lef $::env(ADDITIONAL_LEFS) {
12-
read_lef $lef
13-
}
14-
}
15-
set_dont_use $::env(DONT_USE_CELLS)
16-
17-
# Setup verilog include directories
18-
set vIdirsArgs ""
19-
if { [env_var_exists_and_non_empty VERILOG_INCLUDE_DIRS] } {
20-
foreach dir $::env(VERILOG_INCLUDE_DIRS) {
21-
lappend vIdirsArgs "-I$dir"
22-
}
23-
set vIdirsArgs [join $vIdirsArgs]
24-
}
25-
26-
set elaborate_args [list \
27-
-D SYNTHESIS --compat=vcs --ignore-assertions --no-implicit-memories --top $::env(DESIGN_NAME) \
28-
{*}$vIdirsArgs {*}[env_var_or_empty VERILOG_DEFINES]]
29-
30-
lappend elaborate_args {*}$::env(VERILOG_FILES)
31-
32-
# Apply top-level parameters
33-
dict for {key value} [env_var_or_empty VERILOG_TOP_PARAMS] {
34-
lappend elaborate_args -G "$key=$value"
35-
}
36-
37-
# Apply module blackboxing based on module names as they appear
38-
# in the input, that is before any module name mangling done
39-
# by elaboration and synthesis
40-
if { [env_var_exists_and_non_empty SYNTH_BLACKBOXES] } {
41-
foreach m $::env(SYNTH_BLACKBOXES) {
42-
lappend elaborate_args --blackboxed-module "$m"
43-
}
44-
}
45-
46-
lappend elaborate_args {*}$::env(SYNTH_SLANG_ARGS)
47-
48-
# If the sources are solely .v files, enable Verilog compatibility
49-
set has_non_v_files false
50-
foreach fn $::env(VERILOG_FILES) {
51-
if { [file extension [string trim $fn]] != ".v" } {
52-
set has_non_v_files true
53-
}
54-
}
55-
if { !$has_non_v_files } {
56-
lappend elaborate_args --std=1364-2005
57-
}
58-
59-
sv_elaborate {*}$elaborate_args
60-
syn::stats
61-
62-
if {$::env(DESIGN_NAME) == "cva6"} {
63-
syn::remove_ports rvfi_probes_o
64-
}
65-
synthesize
66-
67-
read_sdc $::env(SDC_FILE)
68-
69-
orfs_write_db $::env(RESULTS_DIR)/1_synth.odb
70-
# Canonicalize 1_synth.sdc. The original SDC_FILE provided by
71-
# the user could have dependencies, such as sourcing util.tcl,
72-
# which are read in here and a canonicalized version is written
73-
# out by OpenSTA that has no dependencies.
74-
orfs_write_sdc $::env(RESULTS_DIR)/1_synth.sdc
1+
utl::set_metrics_stage "synthesis__{}"
2+
source $::env(SCRIPTS_DIR)/load.tcl
3+
erase_non_stage_variables synth
4+
5+
source_env_var_if_exists PLATFORM_TCL
6+
source $::env(SCRIPTS_DIR)/read_liberty.tcl
7+
8+
read_lef $::env(TECH_LEF)
9+
read_lef $::env(SC_LEF)
10+
if { [env_var_exists_and_non_empty ADDITIONAL_LEFS] } {
11+
foreach lef $::env(ADDITIONAL_LEFS) {
12+
read_lef $lef
13+
}
14+
}
15+
set_dont_use $::env(DONT_USE_CELLS)
16+
17+
# Setup verilog include directories
18+
set vIdirsArgs ""
19+
if { [env_var_exists_and_non_empty VERILOG_INCLUDE_DIRS] } {
20+
foreach dir $::env(VERILOG_INCLUDE_DIRS) {
21+
lappend vIdirsArgs "-I$dir"
22+
}
23+
set vIdirsArgs [join $vIdirsArgs]
24+
}
25+
26+
set elaborate_args [list \
27+
-D SYNTHESIS --compat=vcs --ignore-assertions --no-implicit-memories --top $::env(DESIGN_NAME) \
28+
{*}$vIdirsArgs {*}[env_var_or_empty VERILOG_DEFINES]]
29+
30+
lappend elaborate_args {*}$::env(VERILOG_FILES)
31+
32+
# Apply top-level parameters
33+
dict for {key value} [env_var_or_empty VERILOG_TOP_PARAMS] {
34+
lappend elaborate_args -G "$key=$value"
35+
}
36+
37+
# Apply module blackboxing based on module names as they appear
38+
# in the input, that is before any module name mangling done
39+
# by elaboration and synthesis
40+
if { [env_var_exists_and_non_empty SYNTH_BLACKBOXES] } {
41+
foreach m $::env(SYNTH_BLACKBOXES) {
42+
lappend elaborate_args --blackboxed-module "$m"
43+
}
44+
}
45+
46+
lappend elaborate_args {*}$::env(SYNTH_SLANG_ARGS)
47+
48+
# If the sources are solely .v files, enable Verilog compatibility
49+
set has_non_v_files false
50+
foreach fn $::env(VERILOG_FILES) {
51+
if { [file extension [string trim $fn]] != ".v" } {
52+
set has_non_v_files true
53+
}
54+
}
55+
if { !$has_non_v_files } {
56+
lappend elaborate_args --std=1364-2005
57+
}
58+
59+
sv_elaborate {*}$elaborate_args
60+
syn::stats
61+
62+
if { $::env(DESIGN_NAME) == "cva6" } {
63+
syn::remove_ports rvfi_probes_o
64+
}
65+
synthesize
66+
67+
read_sdc $::env(SDC_FILE)
68+
69+
orfs_write_db $::env(RESULTS_DIR)/1_synth.odb
70+
# Canonicalize 1_synth.sdc. The original SDC_FILE provided by
71+
# the user could have dependencies, such as sourcing util.tcl,
72+
# which are read in here and a canonicalized version is written
73+
# out by OpenSTA that has no dependencies.
74+
orfs_write_sdc $::env(RESULTS_DIR)/1_synth.sdc

0 commit comments

Comments
 (0)