Skip to content

Commit c068f48

Browse files
committed
synth: extend SYNTH_KEEP_MODULES selection pattern for slang
1 parent 10d4ff7 commit c068f48

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎flow/scripts/synth.tcl‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ if { [env_var_exists_and_non_empty SYNTH_KEEP_MODULES] } {
7676
foreach module $::env(SYNTH_KEEP_MODULES) {
7777
# Two patterns so both frontends work:
7878
# - `$module` matches the bare name produced by verilog.
79-
# - `$module\$*` matches the `$`-suffixed canonical names the
80-
# slang frontend generates for parameterized instances
79+
# - `$module\$*` and `$module*` match `$`-suffixed canonical names
80+
# the slang frontend generates for parameterized instances
8181
# (e.g. `\foo$1`); yosys's match_ids retries the pattern with
8282
# the id's leading `\` stripped, so no `\`-prefix is needed
8383
# here -- see tools/yosys/passes/cmds/select.cc match_ids().
@@ -87,7 +87,7 @@ if { [env_var_exists_and_non_empty SYNTH_KEEP_MODULES] } {
8787
# other pattern still applies -- no regression for non-slang.
8888
# `-module <name>` would error if the module doesn't exist, which
8989
# is why we use bare patterns instead.
90-
select "$module" "$module\\\$*"
90+
select "$module" "$module\\\$*" "$module*"
9191
setattr -mod -set keep_hierarchy 1
9292
select -clear
9393
}

0 commit comments

Comments
 (0)