Commit 269cfcb
committed
synth: blackbox SYNTH_BLACKBOXES modules before hierarchy check
Adds a checkpoint-based code path for SYNTH_BLACKBOXES to synth.tcl,
distinct from the existing source-based path in synth_preamble.tcl
in two intentional ways: it runs before `hierarchy -check -top`
(the design is already elaborated when read from RTLIL, so blackbox
operates on resolved modules), and it wraps `blackbox` in `catch`
(unknown names are silently skipped because the same SYNTH_BLACKBOXES
list is shared across partitions).
The synth_preamble.tcl path keeps its existing strict behaviour:
`hierarchy -check -top` first to elaborate the deferred verilog
top, and `blackbox` errors loudly so a typo in a single-design
SYNTH_BLACKBOXES list surfaces immediately.
Why this is needed: parallel partition synthesis with slang.
When `--keep-hierarchy` is used (required for partition flows that
preserve internal hierarchy), the slang frontend mangles module
names by their elaboration path so different parameterizations get
distinct names — `Foo` instantiated at `top.unit.foo` becomes
`Foo$top.unit.foo` in the elaborated RTLIL. The parent design
references those mangled names.
A "per-partition canonicalize from RTL" approach therefore can't
just elaborate `Foo` as a fresh top — that would emit a module
named `Foo`, but the parent design instantiates `Foo$top.unit.foo`,
and the link fails. The driver has to canonicalize the full design
once (so all parameterized instances get their elaborated names),
and each partition then loads that shared checkpoint and blackboxes
the modules outside its scope.
That's the orchestrator pattern: every partition reads the same
canonical RTLIL checkpoint and blackboxes the modules that belong
to other partitions, so it only synthesises its own subhierarchy.
SYNTH_BLACKBOXES is already documented in variables.yaml.
No behaviour change when the env var is unset.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>1 parent 523bbbb commit 269cfcb
1 file changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
41 | 67 | | |
42 | 68 | | |
43 | 69 | | |
| |||
0 commit comments