design_suggest_partition
Computes a min-cut partition of a design plan into balanced functional groups by minimizing crossing nets, helping decide schematic sheet or PCB room groupings.
Instructions
Suggest how to split a design into balanced functional groups.
Computes a min-cut partition (Kernighan-Lin style) of the plan's
components into n_groups balanced groups that MINIMISE the number
of nets crossing between groups -- so each group is internally
well-connected and few signals span the boundary. Use it to group a
PCB into functional ROOMS, or to decide how to break a design with
SEPARABLE blocks across schematic sheets.
Note: a HUB-centric design (one IC fanning out to many peripherals)
does not separate cleanly -- the hub is connected to everything, so
the cut stays high and per-sheet density barely drops. Partitioning
helps when the netlist has genuinely distinct functional blocks; read
cut_nets (low = clean) and group_sizes to judge before acting.
Power/ground rails (nets touching more than max_fanout parts) are
excluded from the connectivity graph -- they route as planes and
connect nearly everything, so the split follows the SIGNAL structure.
Pure data; touches nothing. Assign the returned groups to part
sheet (or zone) fields yourself if you act on the suggestion.
Args: plan_json: A DesignPlan (dict or JSON string). n_groups: Number of groups to split into (default 2). max_fanout: Nets above this pin count are treated as rails and ignored for partitioning (default 8).
Returns:
{ok, n_groups, groups: {idx: [refdes...]}, cut_nets, boundary_nets: [names...], group_sizes, summary}. cut_nets
is how many nets cross the boundary (lower is cleaner);
boundary_nets names them -- those become cross-sheet labels or
off-sheet connectors if you split there.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n_groups | No | ||
| plan_json | Yes | ||
| max_fanout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||