Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions flow/scripts/synth.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ if { [env_var_exists_and_non_empty SYNTH_CHECKPOINT] } {
read_checkpoint $::env(RESULTS_DIR)/1_1_yosys_canonicalize.rtlil
}

# When this synthesis run is one partition of a parallel split (driven by
# an external orchestrator), `SYNTH_BLACKBOXES` lists modules outside this
# partition. Blackboxing them before the hierarchy check lets each
# partition load the same canonical RTLIL checkpoint while only synthesising
# its own subhierarchy. Names not present in the loaded design are skipped
# silently so the same list can be passed to every partition.
if { [env_var_exists_and_non_empty SYNTH_BLACKBOXES] } {
foreach m $::env(SYNTH_BLACKBOXES) {
catch { blackbox $m }
}
}
Comment on lines +47 to +51

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The implementation of SYNTH_BLACKBOXES logic here is inconsistent with the implementation in flow/scripts/synth_preamble.tcl (lines 129-134).

  1. This block uses catch {blackbox $m} to silently skip missing modules, whereas synth_preamble.tcl calls blackbox $m directly, which would cause a Tcl error if a listed module is not found in the design.
  2. This block runs before hierarchy -check, while the one in synth_preamble.tcl runs after it.

To ensure consistent behavior between the source-based flow and the checkpoint-based flow, these implementations should be aligned. The "before" order and the use of catch are generally more robust for the intended use case of parallel partition synthesis where the list of modules might be shared across partitions.


hierarchy -check -top $::env(DESIGN_NAME)

if { $::env(SYNTH_GUT) } {
Expand Down