feat: build bbdd per partition block instead of per primary output
Generalises the DD recursion so it stops at an arbitrary leaf set rather
than at primary inputs. A leaf_map assigns each leaf of a block the
contiguous bbdd variable ids 2..k+1, which is required because the chain
variable ordering addresses variables through POS(in, cvo) = in % cvo->size():
that modulo is only a bijection for a contiguous range, and a block's node
indices are arbitrary. block_to_bbdd converts one block; cover_to_bbdd keeps
its old signature and is the whole-network special case.
For an unpartitioned run leaf_map[n] == n for every primary input, because
the PIs occupy the contiguous node indices 2..|PI|+1, so the emitted netlist
is unchanged. Verified by A/B against the previous header: the generated
.blif is byte-identical for add8 (17 PI, 11007 lines), mul4, par12 and c17,
and mux16 exhausts the table identically in both.
Also record the unpartitioned ISCAS85 baseline: 1 of 11 circuits passes.
The runner now distinguishes TABLE-FULL from TIMEOUT, which turns out to
matter - only 4 circuits actually run out of time, while 6 abort within
seconds because the unique table has no resize. Those diagnostics come from
the converter's stderr and so had to be captured from the combined stdio
stream, not from yosys -l.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nXGcHc3GSLAqg1AL53LKM