@tscircuit/capacity-autorouter 0.0.740 → 0.0.742

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -86,12 +86,24 @@ interface SimpleRouteBus {
86
86
  busId: string
87
87
  connectionNames: string[] // Ordered SimpleRouteConnection names
88
88
  maxLengthSkew?: number // Maximum routed-length difference in millimeters
89
+ traceWidth?: number // Resolved copper width in millimeters
90
+ allowedLayers?: string[] // Legal routing layers, including terminal layers
91
+ }
92
+
93
+ interface DifferentialPair {
94
+ connectionNames: [string, string]
95
+ lengthTolerance: number // Maximum pair skew in millimeters
96
+ traceGap?: number // Resolved edge-to-edge copper gap in millimeters
97
+ maxUncoupledLength?: number // Maximum uncoupled length in millimeters
89
98
  }
90
99
  ```
91
100
 
92
101
  `maxLengthSkew` records the maximum permitted routed-length difference for the
93
102
  bus. Bus metadata is preserved in the output so routing implementations can
94
103
  apply the constraint without losing the original membership or ordering.
104
+ `traceWidth`, `traceGap`, and `allowedLayers` are resolved routing geometry;
105
+ stackup-aware impedance targets should be converted to these dimensions before
106
+ creating SimpleRouteJson.
95
107
 
96
108
  Via-in-pad repair is disabled by default because it generally requires filled
97
109
  and capped vias. Set `allowViaInPad: true` only when the fabrication process
package/dist/index.d.ts CHANGED
@@ -15,8 +15,8 @@ export { DrcError, DrcEvaluator, DrcSnapshot, GlobalDrcBranchPortfolioSolver, Gl
15
15
  import { DatasetSample, HighDensityRepairSolver } from 'high-density-repair02';
16
16
  import { LayerMergeMode, ConvexRegionsComputeResult, SerializedPolyHyperGraph } from 'pcb-poly-hyper-graph';
17
17
  import { PolyHyperGraphLoadResult, PolyHyperGraphSolver } from 'tiny-hypergraph-poly/lib/index';
18
- import { PostProcessingSolver } from '@tscircuit/length-matching-solver';
19
18
  import { PowerTraceExpanderOptions, PowerTraceExpanderSolver } from '@tscircuit/power-trace-expander';
19
+ import { PostProcessingSolverParams, PostProcessingSolver, PostProcessingSolverOutput } from '@tscircuit/length-matching-solver';
20
20
 
21
21
  interface CacheProvider {
22
22
  isSyncCache: boolean;
@@ -135,7 +135,12 @@ interface SimpleRouteJson {
135
135
  }
136
136
  interface DifferentialPair {
137
137
  connectionNames: [string, string];
138
+ /** Maximum permitted routed-length difference in millimeters. */
138
139
  lengthTolerance: number;
140
+ /** Resolved edge-to-edge copper gap in millimeters. */
141
+ traceGap?: number;
142
+ /** Maximum permitted length routed without pair coupling, in millimeters. */
143
+ maxUncoupledLength?: number;
139
144
  }
140
145
  interface SimpleRouteBus {
141
146
  busId: BusId;
@@ -143,6 +148,10 @@ interface SimpleRouteBus {
143
148
  connectionNames: string[];
144
149
  /** Maximum permitted routed-length difference in millimeters. */
145
150
  maxLengthSkew?: number;
151
+ /** Resolved copper width in millimeters for members without an override. */
152
+ traceWidth?: number;
153
+ /** Layers on which this bus may be routed, including its terminal layers. */
154
+ allowedLayers?: string[];
146
155
  }
147
156
  interface Obstacle {
148
157
  obstacleId?: string;
@@ -5787,6 +5796,26 @@ declare class PowerTraceExpansionSolver extends BaseSolver {
5787
5796
  visualize(): GraphicsObject;
5788
5797
  }
5789
5798
 
5799
+ /**
5800
+ * Keeps post-processing optional at the autorouter integration boundary.
5801
+ *
5802
+ * The length-matching package deliberately reports an infeasible coupled pair
5803
+ * as an error. Pipeline7 already has valid independently-routed copper at this
5804
+ * point, so an infeasible pair must preserve that copper instead of failing the
5805
+ * entire autoroute.
5806
+ */
5807
+ declare class SafePostProcessingSolver extends BaseSolver {
5808
+ readonly inputProblem: PostProcessingSolverParams;
5809
+ readonly postProcessingSolver: PostProcessingSolver;
5810
+ usedFallback: boolean;
5811
+ constructor(inputProblem: PostProcessingSolverParams);
5812
+ getSolverName(): string;
5813
+ _step(): void;
5814
+ getConstructorParams(): [PostProcessingSolverParams];
5815
+ getOutput(): PostProcessingSolverOutput;
5816
+ visualize(): GraphicsObject;
5817
+ }
5818
+
5790
5819
  interface CapacityMeshSolverOptions$3 {
5791
5820
  capacityDepth?: number;
5792
5821
  targetMinCapacity?: number;
@@ -5829,7 +5858,7 @@ declare class AutoroutingPipelineSolver7_MultiGraph extends BaseSolver {
5829
5858
  strawSolver?: StrawSolver;
5830
5859
  deadEndSolver?: DeadEndSolver;
5831
5860
  traceSimplificationSolver?: TraceSimplificationSolver;
5832
- postProcessingSolver?: PostProcessingSolver;
5861
+ lengthMatchingPostProcessingSolver?: SafePostProcessingSolver;
5833
5862
  powerTraceExpansionSolver?: PowerTraceExpansionSolver;
5834
5863
  availableSegmentPointSolver?: AvailableSegmentPointSolver;
5835
5864
  portPointPathingSolver?: TinyHypergraphPortPointPathingSolver;
@@ -5860,7 +5889,7 @@ declare class AutoroutingPipelineSolver7_MultiGraph extends BaseSolver {
5860
5889
  sharedEdgeSegmentsWithNecessaryCrampedPortPoints?: SharedEdgeSegment[];
5861
5890
  highDensityNodePortPoints?: NodeWithPortPoints[];
5862
5891
  cacheProvider: CacheProvider | null;
5863
- pipelineDef: (PipelineStep$3<typeof PreprocessSimpleRouteJsonSolver$1> | PipelineStep$3<typeof ComponentDetectionSolver> | PipelineStep$3<typeof EscapeViaLocationSolver> | PipelineStep$3<typeof NetToPointPairsSolver2_OffBoardConnection> | PipelineStep$3<typeof MultiGraphTopologyPlannerSolver> | PipelineStep$3<typeof TopologyMergingSolver> | PipelineStep$3<typeof NodeDimensionSubdivisionSolver> | PipelineStep$3<typeof CapacityMeshEdgeSolver2_NodeTreeOptimization> | PipelineStep$3<typeof AvailableSegmentPointSolver> | PipelineStep$3<typeof MultiTargetNecessaryCrampedPortPointSolver> | PipelineStep$3<typeof TinyHypergraphPortPointPathingSolver> | PipelineStep$3<typeof UniformPortDistributionSolver> | PipelineStep$3<typeof HighDensitySolver> | PipelineStep$3<typeof HighDensityForceImproveSolver> | PipelineStep$3<typeof Pipeline4HighDensityRepairSolver> | PipelineStep$3<typeof MultipleHighDensityRouteStitchSolver3> | PipelineStep$3<typeof TraceSimplificationSolver> | PipelineStep$3<typeof TraceWidthSolver> | PipelineStep$3<typeof GlobalDrcForceImproveSolver> | PipelineStep$3<typeof GlobalDrcBranchPortfolioSolver> | PipelineStep$3<typeof PostProcessingSolver> | PipelineStep$3<typeof PowerTraceExpansionSolver>)[];
5892
+ pipelineDef: (PipelineStep$3<typeof PreprocessSimpleRouteJsonSolver$1> | PipelineStep$3<typeof ComponentDetectionSolver> | PipelineStep$3<typeof EscapeViaLocationSolver> | PipelineStep$3<typeof NetToPointPairsSolver2_OffBoardConnection> | PipelineStep$3<typeof MultiGraphTopologyPlannerSolver> | PipelineStep$3<typeof TopologyMergingSolver> | PipelineStep$3<typeof NodeDimensionSubdivisionSolver> | PipelineStep$3<typeof CapacityMeshEdgeSolver2_NodeTreeOptimization> | PipelineStep$3<typeof AvailableSegmentPointSolver> | PipelineStep$3<typeof MultiTargetNecessaryCrampedPortPointSolver> | PipelineStep$3<typeof TinyHypergraphPortPointPathingSolver> | PipelineStep$3<typeof UniformPortDistributionSolver> | PipelineStep$3<typeof HighDensitySolver> | PipelineStep$3<typeof HighDensityForceImproveSolver> | PipelineStep$3<typeof Pipeline4HighDensityRepairSolver> | PipelineStep$3<typeof MultipleHighDensityRouteStitchSolver3> | PipelineStep$3<typeof TraceSimplificationSolver> | PipelineStep$3<typeof TraceWidthSolver> | PipelineStep$3<typeof GlobalDrcForceImproveSolver> | PipelineStep$3<typeof GlobalDrcBranchPortfolioSolver> | PipelineStep$3<typeof SafePostProcessingSolver> | PipelineStep$3<typeof PowerTraceExpansionSolver>)[];
5864
5893
  constructor(srj: SimpleRouteJson, opts?: CapacityMeshSolverOptions$3);
5865
5894
  private setSimpleRouteJson;
5866
5895
  getConstructorParams(): readonly [SimpleRouteJson, CapacityMeshSolverOptions$3];
@@ -6051,7 +6080,7 @@ declare class AutoroutingPipelineSolver9_PreloadedTraceGraph extends BaseSolver
6051
6080
  strawSolver?: StrawSolver;
6052
6081
  deadEndSolver?: DeadEndSolver;
6053
6082
  traceSimplificationSolver?: TraceSimplificationSolver;
6054
- postProcessingSolver?: PostProcessingSolver;
6083
+ lengthMatchingPostProcessingSolver?: PostProcessingSolver;
6055
6084
  availableSegmentPointSolver?: AvailableSegmentPointSolver;
6056
6085
  portPointPathingSolver?: TinyHypergraphPortPointPathingSolver;
6057
6086
  multiSectionPortPointOptimizer?: MultiSectionPortPointOptimizer;