diff --git a/lib/solvers/ChipPartitionsSolver/ChipPartitionsSolver.ts b/lib/solvers/ChipPartitionsSolver/ChipPartitionsSolver.ts index 8335b60..1ea8d38 100644 --- a/lib/solvers/ChipPartitionsSolver/ChipPartitionsSolver.ts +++ b/lib/solvers/ChipPartitionsSolver/ChipPartitionsSolver.ts @@ -15,7 +15,7 @@ import type { GraphicsObject } from "graphics-debug" import { stackGraphicsHorizontally } from "graphics-debug" import { visualizeInputProblem } from "lib/solvers/LayoutPipelineSolver/visualizeInputProblem" import { doBasicInputProblemLayout } from "lib/solvers/LayoutPipelineSolver/doBasicInputProblemLayout" -import type { DecouplingCapGroup } from "../IdentifyDecouplingCapsSolver/IdentifyDecouplingCapsSolver" +import type { DecouplingCapGroup } from "lib/types/DecouplingCapGroup" export class ChipPartitionsSolver extends BaseSolver { inputProblem: InputProblem @@ -41,45 +41,20 @@ export class ChipPartitionsSolver extends BaseSolver { /** * Creates partitions by: - * - Separating each decoupling capacitor group into its own partition (caps only, excluding the main chip) - * - Partitioning remaining chips by connected components through strong pin connections + * - Partitioning chips by connected components through strong pin connections */ private createPartitions(inputProblem: InputProblem): InputProblem[] { const chipIds = Object.keys(inputProblem.chipMap) - // 1) Build decoupling-cap-only partitions (exclude the main chip for each group) - const decapChipIdSet = new Set() - const decapGroupPartitions: ChipId[][] = [] - - if (this.decouplingCapGroups && this.decouplingCapGroups.length > 0) { - for (const group of this.decouplingCapGroups) { - const capsOnly: ChipId[] = [] - for (const capId of group.decouplingCapChipIds) { - if (inputProblem.chipMap[capId]) { - capsOnly.push(capId) - } - } - // Only add a partition if there are at least two caps present in the inputProblem - if (capsOnly.length >= 2) { - decapGroupPartitions.push(capsOnly) - // Mark these caps as handled by decoupling-cap partitions - for (const capId of capsOnly) { - decapChipIdSet.add(capId) - } - } - } - } - - // 2) Build adjacency graph for NON-decap chips based on strong pin connections - const nonDecapChipIds = chipIds.filter((id) => !decapChipIdSet.has(id)) + // 1) Build adjacency graph for all chips based on strong pin connections const adjacencyMap = new Map>() - // Initialize adjacency map for non-decap chips - for (const chipId of nonDecapChipIds) { + // Initialize adjacency map + for (const chipId of chipIds) { adjacencyMap.set(chipId, new Set()) } - // Add edges based on strong pin connections, but exclude any edges touching decap chips + // Add edges based on strong pin connections for (const [connKey, isConnected] of Object.entries( inputProblem.pinStrongConnMap, )) { @@ -91,42 +66,28 @@ export class ChipPartitionsSolver extends BaseSolver { const owner1 = this.findPinOwner(pin1Id!, inputProblem) const owner2 = this.findPinOwner(pin2Id!, inputProblem) - // Only connect non-decap chips - if ( - owner1 && - owner2 && - owner1 !== owner2 && - !decapChipIdSet.has(owner1) && - !decapChipIdSet.has(owner2) - ) { + if (owner1 && owner2 && owner1 !== owner2) { adjacencyMap.get(owner1)!.add(owner2) adjacencyMap.get(owner2)!.add(owner1) } } - // 3) Find connected components among non-decap chips using DFS + // 2) Find connected components using DFS const visited = new Set() - const nonDecapPartitions: ChipId[][] = [] + const chipPartitions: ChipId[][] = [] - for (const componentId of nonDecapChipIds) { + for (const componentId of chipIds) { if (!visited.has(componentId)) { const partition = this.dfs(componentId, adjacencyMap, visited) if (partition.length > 0) { - nonDecapPartitions.push(partition) + chipPartitions.push(partition) } } } - return [ - ...decapGroupPartitions.map((partition) => - this.createInputProblemFromPartition(partition, inputProblem, { - partitionType: "decoupling_caps", - }), - ), - ...nonDecapPartitions.map((partition) => - this.createInputProblemFromPartition(partition, inputProblem), - ), - ] + return chipPartitions.map((partition) => + this.createInputProblemFromPartition(partition, inputProblem), + ) } /** @@ -248,6 +209,24 @@ export class ChipPartitionsSolver extends BaseSolver { } } + // Add relevant decoupling cap groups + const relevantDecapGroups: DecouplingCapGroup[] = [] + if (this.decouplingCapGroups) { + for (const group of this.decouplingCapGroups) { + if (partition.includes(group.mainChipId)) { + const capsInPartition = group.decouplingCapChipIds.filter((id) => + partition.includes(id), + ) + if (capsInPartition.length > 0) { + relevantDecapGroups.push({ + ...group, + decouplingCapChipIds: capsInPartition, + }) + } + } + } + } + return { ...originalProblem, chipMap, @@ -257,6 +236,7 @@ export class ChipPartitionsSolver extends BaseSolver { netConnMap, isPartition: true, partitionType: opts?.partitionType, + decouplingCapGroups: relevantDecapGroups, } } diff --git a/lib/solvers/IdentifyDecouplingCapsSolver/IdentifyDecouplingCapsSolver.ts b/lib/solvers/IdentifyDecouplingCapsSolver/IdentifyDecouplingCapsSolver.ts index 5c503e0..fb7ce4f 100644 --- a/lib/solvers/IdentifyDecouplingCapsSolver/IdentifyDecouplingCapsSolver.ts +++ b/lib/solvers/IdentifyDecouplingCapsSolver/IdentifyDecouplingCapsSolver.ts @@ -14,17 +14,11 @@ import type { PinId, Chip, } from "lib/types/InputProblem" +import type { DecouplingCapGroup } from "lib/types/DecouplingCapGroup" import { getColorFromString } from "lib/utils/getColorFromString" import { doBasicInputProblemLayout } from "../LayoutPipelineSolver/doBasicInputProblemLayout" import { visualizeInputProblem } from "../LayoutPipelineSolver/visualizeInputProblem" -export interface DecouplingCapGroup { - decouplingCapGroupId: string - mainChipId: ChipId - netPair: [NetId, NetId] - decouplingCapChipIds: ChipId[] -} - /** * Identify decoupling capacitor groups based on specific criteria: * 1. Component has exactly 2 pins and restricted rotation (0/180 only or no rotation) @@ -139,11 +133,32 @@ export class IdentifyDecouplingCapsSolver extends BaseSolver { return [a as NetId, b as NetId] } + /** Find the specific pin on the main chip and on the capacitor that are connected */ + private findConnectionDetailsForCap( + capChip: Chip, + mainChipId: ChipId, + ): { mainPinId: PinId; capPinId: PinId } | null { + for (const pinId of capChip.pins) { + for (const [connKey, connected] of Object.entries( + this.inputProblem.pinStrongConnMap, + )) { + if (!connected) continue + const [a, b] = connKey.split("-") as [PinId, PinId] + if (a === pinId && b.startsWith(`${mainChipId}.`)) + return { mainPinId: b, capPinId: a } + if (b === pinId && a.startsWith(`${mainChipId}.`)) + return { mainPinId: a, capPinId: b } + } + } + return null + } + /** Adds a decoupling capacitor to the group for the given main chip and net pair */ private addToGroup( mainChipId: ChipId, netPair: [NetId, NetId], capChipId: ChipId, + connection: { mainPinId: PinId; capPinId: PinId }, ) { const [n1, n2] = netPair const groupKey = `${mainChipId}__${n1}__${n2}` @@ -154,12 +169,14 @@ export class IdentifyDecouplingCapsSolver extends BaseSolver { mainChipId, netPair: [n1, n2], decouplingCapChipIds: [], + capToMainPinMap: {}, } this.groupsByMainChipId.set(groupKey, group) this.outputDecouplingCapGroups.push(group) } if (!group.decouplingCapChipIds.includes(capChipId)) { group.decouplingCapChipIds.push(capChipId) + group.capToMainPinMap[capChipId] = connection } } @@ -197,7 +214,11 @@ export class IdentifyDecouplingCapsSolver extends BaseSolver { (net2?.isGround && net1?.isPositiveVoltageSource) if (!isDecouplingNetPair) return - this.addToGroup(mainChipId, netPair, currentChip.chipId) + // Find the specific connection details + const connection = this.findConnectionDetailsForCap(currentChip, mainChipId) + if (!connection) return + + this.addToGroup(mainChipId, netPair, currentChip.chipId, connection) } override visualize(): GraphicsObject { diff --git a/lib/solvers/PackInnerPartitionsSolver/SingleInnerPartitionPackingSolver.ts b/lib/solvers/PackInnerPartitionsSolver/SingleInnerPartitionPackingSolver.ts index 88db103..4541b13 100644 --- a/lib/solvers/PackInnerPartitionsSolver/SingleInnerPartitionPackingSolver.ts +++ b/lib/solvers/PackInnerPartitionsSolver/SingleInnerPartitionPackingSolver.ts @@ -28,6 +28,19 @@ export class SingleInnerPartitionPackingSolver extends BaseSolver { declare activeSubSolver: PackSolver2 | null pinIdToStronglyConnectedPins: Record + private macroComponents: Map< + string, + { + mainChipId: ChipId + caps: Array<{ + chipId: ChipId + relX: number + relY: number + rotation: number + }> + } + > = new Map() + constructor(params: { partitionInputProblem: PartitionInputProblem pinIdToStronglyConnectedPins: Record @@ -71,10 +84,117 @@ export class SingleInnerPartitionPackingSolver extends BaseSolver { pinIdToStronglyConnectedPins: this.pinIdToStronglyConnectedPins, }).pinToNetworkMap - // Create pack components for each chip - const packComponents = Object.entries( + const handledChipIds = new Set() + const packComponents: any[] = [] + + // Group decap groups by mainChipId + const groupsByMainChip = new Map() + for (const group of this.partitionInputProblem.decouplingCapGroups || []) { + if (!groupsByMainChip.has(group.mainChipId)) + groupsByMainChip.set(group.mainChipId, []) + groupsByMainChip.get(group.mainChipId)!.push(group) + } + + const gap = this.partitionInputProblem.decouplingCapsGap || 0.2 + + for (const [mainChipId, groups] of groupsByMainChip.entries()) { + const mainChip = this.partitionInputProblem.chipMap[mainChipId] + if (!mainChip) continue + + const macroPads: any[] = [] + const capsInMacro: any[] = [] + + // Add main chip pads + for (const pinId of mainChip.pins) { + const pin = this.partitionInputProblem.chipPinMap[pinId] + if (!pin) continue + const networkId = pinToNetworkMap.get(pinId) || `${pinId}_isolated` + macroPads.push({ + padId: pinId, + networkId: networkId, + type: "rect" as const, + offset: { x: pin.offset.x, y: pin.offset.y }, + size: { x: PIN_SIZE, y: PIN_SIZE }, + }) + } + // Add main chip body + macroPads.push({ + padId: `${mainChipId}_body`, + networkId: `${mainChipId}_body_disconnected`, + type: "rect" as const, + offset: { x: 0, y: 0 }, + size: { x: mainChip.size.x, y: mainChip.size.y }, + }) + + // Add caps + for (const group of groups) { + for (const capChipId of group.decouplingCapChipIds) { + const cap = this.partitionInputProblem.chipMap[capChipId] + const { mainPinId, capPinId } = group.capToMainPinMap[capChipId] + const mainPin = this.partitionInputProblem.chipPinMap[mainPinId] + const capPin = this.partitionInputProblem.chipPinMap[capPinId] + if (!cap || !mainPin || !capPin) continue + + // Align the capacitor pin with the main chip pin, adding a gap + // We want: relPos + capPin.offset = mainPin.offset + sideVector * gap + let relX = mainPin.offset.x - capPin.offset.x + let relY = mainPin.offset.y - capPin.offset.y + + if (mainPin.side === "x-") relX -= gap + else if (mainPin.side === "x+") relX += gap + else if (mainPin.side === "y-") relY -= gap + else if (mainPin.side === "y+") relY += gap + + capsInMacro.push({ chipId: capChipId, relX, relY, rotation: 0 }) + + // Add cap pads to macro + for (const cPinId of cap.pins) { + const cPin = this.partitionInputProblem.chipPinMap[cPinId] + if (cPin) { + const networkId = + pinToNetworkMap.get(cPinId) || `${cPinId}_isolated` + macroPads.push({ + padId: cPinId, + networkId: networkId, + type: "rect" as const, + offset: { x: relX + cPin.offset.x, y: relY + cPin.offset.y }, + size: { x: PIN_SIZE, y: PIN_SIZE }, + }) + } + } + // Add cap body to macro + macroPads.push({ + padId: `${capChipId}_body`, + networkId: `${capChipId}_body_disconnected`, + type: "rect" as const, + offset: { x: relX, y: relY }, + size: { x: cap.size.x, y: cap.size.y }, + }) + + handledChipIds.add(capChipId) + } + } + + packComponents.push({ + componentId: `macro_${mainChipId}`, + pads: macroPads, + availableRotationDegrees: mainChip.availableRotations || [ + 0, 90, 180, 270, + ], + }) + handledChipIds.add(mainChipId) + this.macroComponents.set(`macro_${mainChipId}`, { + mainChipId, + caps: capsInMacro, + }) + } + + // Create pack components for each remaining chip + const remainingChips = Object.entries( this.partitionInputProblem.chipMap, - ).map(([chipId, chip]) => { + ).filter(([chipId]) => !handledChipIds.has(chipId)) + + for (const [chipId, chip] of remainingChips) { // Create pads for all pins of this chip const pads: Array<{ padId: string @@ -121,12 +241,12 @@ export class SingleInnerPartitionPackingSolver extends BaseSolver { }, }) - return { + packComponents.push({ componentId: chipId, pads, availableRotationDegrees: chip.availableRotations || [0, 90, 180, 270], - } - }) + }) + } let minGap = this.partitionInputProblem.chipGap if (this.partitionInputProblem.partitionType === "decoupling_caps") { @@ -147,15 +267,40 @@ export class SingleInnerPartitionPackingSolver extends BaseSolver { const chipPlacements: Record = {} for (const packedComponent of packedComponents) { - const chipId = packedComponent.componentId - - chipPlacements[chipId] = { - x: packedComponent.center.x, - y: packedComponent.center.y, - ccwRotationDegrees: - packedComponent.ccwRotationOffset || - packedComponent.ccwRotationDegrees || - 0, + const compId = packedComponent.componentId + const x = packedComponent.center.x + const y = packedComponent.center.y + const rot = + packedComponent.ccwRotationOffset || + packedComponent.ccwRotationDegrees || + 0 + + if (compId.startsWith("macro_")) { + const macro = this.macroComponents.get(compId)! + // Main chip is at (x, y) with rotation rot + chipPlacements[macro.mainChipId] = { x, y, ccwRotationDegrees: rot } + + // Caps are at relative positions + for (const cap of macro.caps) { + // Rotate relative offset + const rad = (rot * Math.PI) / 180 + const cos = Math.cos(rad) + const sin = Math.sin(rad) + const rotatedX = cap.relX * cos - cap.relY * sin + const rotatedY = cap.relX * sin + cap.relY * cos + + chipPlacements[cap.chipId] = { + x: x + rotatedX, + y: y + rotatedY, + ccwRotationDegrees: (cap.rotation + rot) % 360, + } + } + } else { + chipPlacements[compId] = { + x, + y, + ccwRotationDegrees: rot, + } } } diff --git a/lib/types/DecouplingCapGroup.ts b/lib/types/DecouplingCapGroup.ts new file mode 100644 index 0000000..a069a5d --- /dev/null +++ b/lib/types/DecouplingCapGroup.ts @@ -0,0 +1,16 @@ +import type { ChipId, NetId, PinId } from "./InputProblem" + +export interface DecouplingCapGroup { + decouplingCapGroupId: string + mainChipId: ChipId + netPair: [NetId, NetId] + decouplingCapChipIds: ChipId[] + /** Map of decoupling cap chip id to connection details */ + capToMainPinMap: Record< + ChipId, + { + mainPinId: PinId + capPinId: PinId + } + > +} diff --git a/lib/types/InputProblem.ts b/lib/types/InputProblem.ts index 38e9f75..cc7ac56 100644 --- a/lib/types/InputProblem.ts +++ b/lib/types/InputProblem.ts @@ -1,5 +1,6 @@ import type { Point, Bounds } from "@tscircuit/math-utils" import type { Side } from "./Side" +import type { DecouplingCapGroup } from "./DecouplingCapGroup" export type PinId = string export type ChipId = string @@ -49,4 +50,5 @@ export type InputProblem = { export interface PartitionInputProblem extends InputProblem { isPartition?: true partitionType?: "default" | "decoupling_caps" + decouplingCapGroups?: DecouplingCapGroup[] } diff --git a/pages/LayoutPipelineSolver/LayoutPipelineSolver06.page.tsx b/pages/LayoutPipelineSolver/LayoutPipelineSolver06.page.tsx index c0767bb..6f37655 100644 --- a/pages/LayoutPipelineSolver/LayoutPipelineSolver06.page.tsx +++ b/pages/LayoutPipelineSolver/LayoutPipelineSolver06.page.tsx @@ -1,880 +1,5 @@ -import type { PackInput } from "calculate-packing" import { LayoutPipelineDebugger } from "lib/components/LayoutPipelineDebugger" -import type { InputProblem } from "lib/index" - -export const problem: InputProblem = { - chipMap: { - U3: { - chipId: "U3", - pins: [ - "U3.1", - "U3.2", - "U3.3", - "U3.4", - "U3.5", - "U3.6", - "U3.7", - "U3.8", - "U3.9", - "U3.10", - "U3.11", - "U3.12", - "U3.13", - "U3.14", - "U3.15", - "U3.16", - "U3.17", - "U3.18", - "U3.19", - "U3.20", - "U3.21", - "U3.22", - "U3.23", - "U3.24", - "U3.25", - "U3.26", - "U3.27", - "U3.28", - "U3.29", - "U3.30", - "U3.31", - "U3.32", - "U3.33", - "U3.34", - "U3.35", - "U3.36", - "U3.37", - "U3.38", - "U3.39", - "U3.40", - "U3.41", - "U3.42", - "U3.43", - "U3.44", - "U3.45", - "U3.46", - "U3.47", - "U3.48", - "U3.49", - "U3.50", - "U3.51", - "U3.52", - "U3.53", - "U3.54", - "U3.55", - "U3.56", - "U3.57", - ], - size: { - x: 3, - y: 8.400000000000004, - }, - availableRotations: [0, 90, 180, 270], - }, - C12: { - chipId: "C12", - pins: ["C12.1", "C12.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - C14: { - chipId: "C14", - pins: ["C14.1", "C14.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - C8: { - chipId: "C8", - pins: ["C8.1", "C8.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - C13: { - chipId: "C13", - pins: ["C13.1", "C13.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - C15: { - chipId: "C15", - pins: ["C15.1", "C15.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - C19: { - chipId: "C19", - pins: ["C19.1", "C19.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - C18: { - chipId: "C18", - pins: ["C18.1", "C18.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - C7: { - chipId: "C7", - pins: ["C7.1", "C7.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - C9: { - chipId: "C9", - pins: ["C9.1", "C9.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - C10: { - chipId: "C10", - pins: ["C10.1", "C10.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - C11: { - chipId: "C11", - pins: ["C11.1", "C11.2"], - size: { - x: 0.53, - y: 1.06, - }, - availableRotations: [0], - }, - }, - chipPinMap: { - "U3.1": { - pinId: "U3.1", - offset: { - x: -1.9, - y: 1.2000000000000015, - }, - side: "x-", - }, - "U3.2": { - pinId: "U3.2", - offset: { - x: -1.9, - y: -1.8000000000000007, - }, - side: "x-", - }, - "U3.3": { - pinId: "U3.3", - offset: { - x: -1.9, - y: -2.000000000000001, - }, - side: "x-", - }, - "U3.4": { - pinId: "U3.4", - offset: { - x: -1.9, - y: -2.200000000000001, - }, - side: "x-", - }, - "U3.5": { - pinId: "U3.5", - offset: { - x: -1.9, - y: -2.4000000000000012, - }, - side: "x-", - }, - "U3.6": { - pinId: "U3.6", - offset: { - x: -1.9, - y: -2.6000000000000014, - }, - side: "x-", - }, - "U3.7": { - pinId: "U3.7", - offset: { - x: -1.9, - y: -2.8000000000000016, - }, - side: "x-", - }, - "U3.8": { - pinId: "U3.8", - offset: { - x: -1.9, - y: -3.0000000000000018, - }, - side: "x-", - }, - "U3.9": { - pinId: "U3.9", - offset: { - x: -1.9, - y: -3.200000000000002, - }, - side: "x-", - }, - "U3.10": { - pinId: "U3.10", - offset: { - x: -1.9, - y: 1.0000000000000013, - }, - side: "x-", - }, - "U3.11": { - pinId: "U3.11", - offset: { - x: -1.9, - y: -3.400000000000002, - }, - side: "x-", - }, - "U3.12": { - pinId: "U3.12", - offset: { - x: -1.9, - y: -3.6000000000000023, - }, - side: "x-", - }, - "U3.13": { - pinId: "U3.13", - offset: { - x: -1.9, - y: -3.8000000000000025, - }, - side: "x-", - }, - "U3.14": { - pinId: "U3.14", - offset: { - x: -1.9, - y: -4.000000000000002, - }, - side: "x-", - }, - "U3.15": { - pinId: "U3.15", - offset: { - x: 1.9, - y: -0.5000000000000009, - }, - side: "x+", - }, - "U3.16": { - pinId: "U3.16", - offset: { - x: 1.9, - y: -0.7000000000000011, - }, - side: "x+", - }, - "U3.17": { - pinId: "U3.17", - offset: { - x: 1.9, - y: -0.9000000000000012, - }, - side: "x+", - }, - "U3.18": { - pinId: "U3.18", - offset: { - x: 1.9, - y: -1.1000000000000014, - }, - side: "x+", - }, - "U3.19": { - pinId: "U3.19", - offset: { - x: 1.9, - y: -1.3000000000000014, - }, - side: "x+", - }, - "U3.20": { - pinId: "U3.20", - offset: { - x: 1.9, - y: -1.9000000000000015, - }, - side: "x+", - }, - "U3.21": { - pinId: "U3.21", - offset: { - x: 1.9, - y: -2.1000000000000014, - }, - side: "x+", - }, - "U3.22": { - pinId: "U3.22", - offset: { - x: -1.9, - y: 0.8000000000000012, - }, - side: "x-", - }, - "U3.23": { - pinId: "U3.23", - offset: { - x: -1.9, - y: 2.8000000000000016, - }, - side: "x-", - }, - "U3.24": { - pinId: "U3.24", - offset: { - x: 1.9, - y: -2.7000000000000015, - }, - side: "x+", - }, - "U3.25": { - pinId: "U3.25", - offset: { - x: 1.9, - y: -2.9000000000000012, - }, - side: "x+", - }, - "U3.26": { - pinId: "U3.26", - offset: { - x: 1.9, - y: -3.1000000000000014, - }, - side: "x+", - }, - "U3.27": { - pinId: "U3.27", - offset: { - x: 1.9, - y: 0.0999999999999992, - }, - side: "x+", - }, - "U3.28": { - pinId: "U3.28", - offset: { - x: 1.9, - y: 0.2999999999999994, - }, - side: "x+", - }, - "U3.29": { - pinId: "U3.29", - offset: { - x: 1.9, - y: 0.49999999999999956, - }, - side: "x+", - }, - "U3.30": { - pinId: "U3.30", - offset: { - x: 1.9, - y: 0.6999999999999997, - }, - side: "x+", - }, - "U3.31": { - pinId: "U3.31", - offset: { - x: 1.9, - y: 0.8999999999999995, - }, - side: "x+", - }, - "U3.32": { - pinId: "U3.32", - offset: { - x: 1.9, - y: 1.0999999999999996, - }, - side: "x+", - }, - "U3.33": { - pinId: "U3.33", - offset: { - x: -1.9, - y: 0.600000000000001, - }, - side: "x-", - }, - "U3.34": { - pinId: "U3.34", - offset: { - x: 1.9, - y: 1.2999999999999998, - }, - side: "x+", - }, - "U3.35": { - pinId: "U3.35", - offset: { - x: 1.9, - y: 1.5, - }, - side: "x+", - }, - "U3.36": { - pinId: "U3.36", - offset: { - x: 1.9, - y: 1.7000000000000002, - }, - side: "x+", - }, - "U3.37": { - pinId: "U3.37", - offset: { - x: 1.9, - y: 1.9000000000000004, - }, - side: "x+", - }, - "U3.38": { - pinId: "U3.38", - offset: { - x: 1.9, - y: 2.500000000000001, - }, - side: "x+", - }, - "U3.39": { - pinId: "U3.39", - offset: { - x: 1.9, - y: 2.700000000000001, - }, - side: "x+", - }, - "U3.40": { - pinId: "U3.40", - offset: { - x: 1.9, - y: 2.9000000000000012, - }, - side: "x+", - }, - "U3.41": { - pinId: "U3.41", - offset: { - x: 1.9, - y: 3.1000000000000014, - }, - side: "x+", - }, - "U3.42": { - pinId: "U3.42", - offset: { - x: -1.9, - y: 0.4000000000000008, - }, - side: "x-", - }, - "U3.43": { - pinId: "U3.43", - offset: { - x: -1.9, - y: -1.6000000000000005, - }, - side: "x-", - }, - "U3.44": { - pinId: "U3.44", - offset: { - x: -1.9, - y: 2.0000000000000018, - }, - side: "x-", - }, - "U3.45": { - pinId: "U3.45", - offset: { - x: -1.9, - y: 1.8000000000000016, - }, - side: "x-", - }, - "U3.46": { - pinId: "U3.46", - offset: { - x: -1.9, - y: -1.4000000000000004, - }, - side: "x-", - }, - "U3.47": { - pinId: "U3.47", - offset: { - x: -1.9, - y: -1.2000000000000002, - }, - side: "x-", - }, - "U3.48": { - pinId: "U3.48", - offset: { - x: -1.9, - y: -1, - }, - side: "x-", - }, - "U3.49": { - pinId: "U3.49", - offset: { - x: -1.9, - y: 0.20000000000000062, - }, - side: "x-", - }, - "U3.50": { - pinId: "U3.50", - offset: { - x: -1.9, - y: 2.600000000000002, - }, - side: "x-", - }, - "U3.51": { - pinId: "U3.51", - offset: { - x: -1.9, - y: 3.0000000000000018, - }, - side: "x-", - }, - "U3.52": { - pinId: "U3.52", - offset: { - x: -1.9, - y: 3.200000000000002, - }, - side: "x-", - }, - "U3.53": { - pinId: "U3.53", - offset: { - x: -1.9, - y: 3.4000000000000017, - }, - side: "x-", - }, - "U3.54": { - pinId: "U3.54", - offset: { - x: -1.9, - y: 3.600000000000002, - }, - side: "x-", - }, - "U3.55": { - pinId: "U3.55", - offset: { - x: -1.9, - y: 3.8000000000000016, - }, - side: "x-", - }, - "U3.56": { - pinId: "U3.56", - offset: { - x: -1.9, - y: 4.000000000000002, - }, - side: "x-", - }, - "U3.57": { - pinId: "U3.57", - offset: { - x: -1.9, - y: -0.39999999999999947, - }, - side: "x-", - }, - "C12.1": { - pinId: "C12.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C12.2": { - pinId: "C12.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - "C14.1": { - pinId: "C14.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C14.2": { - pinId: "C14.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - "C8.1": { - pinId: "C8.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C8.2": { - pinId: "C8.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - "C13.1": { - pinId: "C13.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C13.2": { - pinId: "C13.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - "C15.1": { - pinId: "C15.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C15.2": { - pinId: "C15.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - "C19.1": { - pinId: "C19.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C19.2": { - pinId: "C19.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - "C18.1": { - pinId: "C18.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C18.2": { - pinId: "C18.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - "C7.1": { - pinId: "C7.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C7.2": { - pinId: "C7.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - "C9.1": { - pinId: "C9.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C9.2": { - pinId: "C9.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - "C10.1": { - pinId: "C10.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C10.2": { - pinId: "C10.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - "C11.1": { - pinId: "C11.1", - offset: { - x: -3.469446951953614e-17, - y: 0.55, - }, - side: "y+", - }, - "C11.2": { - pinId: "C11.2", - offset: { - x: 3.469446951953614e-17, - y: -0.55, - }, - side: "y-", - }, - }, - netMap: { - V3_3: { - netId: "V3_3", - isPositiveVoltageSource: true, - }, - V1_1: { - netId: "V1_1", - isPositiveVoltageSource: true, - }, - GND: { - netId: "GND", - isGround: true, - }, - }, - pinStrongConnMap: { - "U3.1-C12.1": true, - "C12.1-U3.1": true, - "U3.10-C14.1": true, - "C14.1-U3.10": true, - "U3.22-C8.1": true, - "C8.1-U3.22": true, - "U3.33-C13.1": true, - "C13.1-U3.33": true, - "U3.42-C15.1": true, - "C15.1-U3.42": true, - "U3.49-C19.1": true, - "C19.1-U3.49": true, - "U3.23-C18.1": true, - "C18.1-U3.23": true, - "U3.50-C7.1": true, - "C7.1-U3.50": true, - "C11.1-U3.43": true, - "U3.43-C11.1": true, - "C10.1-U3.44": true, - "U3.44-C10.1": true, - }, - netConnMap: { - "U3.1-V3_3": true, - "U3.10-V3_3": true, - "U3.22-V3_3": true, - "U3.33-V3_3": true, - "U3.42-V3_3": true, - "U3.49-V3_3": true, - "C12.1-V3_3": true, - "C14.1-V3_3": true, - "C8.1-V3_3": true, - "C13.1-V3_3": true, - "C15.1-V3_3": true, - "C19.1-V3_3": true, - "U3.23-V1_1": true, - "U3.50-V1_1": true, - "C18.1-V1_1": true, - "C7.1-V1_1": true, - "C9.1-V1_1": true, - "C12.2-GND": true, - "C14.2-GND": true, - "C8.2-GND": true, - "C13.2-GND": true, - "C15.2-GND": true, - "C19.2-GND": true, - "C18.2-GND": true, - "C7.2-GND": true, - "C9.2-GND": true, - "C10.2-GND": true, - "C11.2-GND": true, - }, - chipGap: 0.6, - decouplingCapsGap: 0.2, - partitionGap: 1.2, -} +import { problem } from "./LayoutPipelineSolver06.problem" export default function LayoutPipelineSolver06Page() { return diff --git a/pages/LayoutPipelineSolver/LayoutPipelineSolver06.problem.ts b/pages/LayoutPipelineSolver/LayoutPipelineSolver06.problem.ts new file mode 100644 index 0000000..2edd21a --- /dev/null +++ b/pages/LayoutPipelineSolver/LayoutPipelineSolver06.problem.ts @@ -0,0 +1,875 @@ +import type { InputProblem } from "lib/index" + +export const problem: InputProblem = { + chipMap: { + U3: { + chipId: "U3", + pins: [ + "U3.1", + "U3.2", + "U3.3", + "U3.4", + "U3.5", + "U3.6", + "U3.7", + "U3.8", + "U3.9", + "U3.10", + "U3.11", + "U3.12", + "U3.13", + "U3.14", + "U3.15", + "U3.16", + "U3.17", + "U3.18", + "U3.19", + "U3.20", + "U3.21", + "U3.22", + "U3.23", + "U3.24", + "U3.25", + "U3.26", + "U3.27", + "U3.28", + "U3.29", + "U3.30", + "U3.31", + "U3.32", + "U3.33", + "U3.34", + "U3.35", + "U3.36", + "U3.37", + "U3.38", + "U3.39", + "U3.40", + "U3.41", + "U3.42", + "U3.43", + "U3.44", + "U3.45", + "U3.46", + "U3.47", + "U3.48", + "U3.49", + "U3.50", + "U3.51", + "U3.52", + "U3.53", + "U3.54", + "U3.55", + "U3.56", + "U3.57", + ], + size: { + x: 3, + y: 8.400000000000004, + }, + availableRotations: [0, 90, 180, 270], + }, + C12: { + chipId: "C12", + pins: ["C12.1", "C12.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + C14: { + chipId: "C14", + pins: ["C14.1", "C14.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + C8: { + chipId: "C8", + pins: ["C8.1", "C8.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + C13: { + chipId: "C13", + pins: ["C13.1", "C13.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + C15: { + chipId: "C15", + pins: ["C15.1", "C15.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + C19: { + chipId: "C19", + pins: ["C19.1", "C19.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + C18: { + chipId: "C18", + pins: ["C18.1", "C18.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + C7: { + chipId: "C7", + pins: ["C7.1", "C7.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + C9: { + chipId: "C9", + pins: ["C9.1", "C9.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + C10: { + chipId: "C10", + pins: ["C10.1", "C10.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + C11: { + chipId: "C11", + pins: ["C11.1", "C11.2"], + size: { + x: 0.53, + y: 1.06, + }, + availableRotations: [0], + }, + }, + chipPinMap: { + "U3.1": { + pinId: "U3.1", + offset: { + x: -1.9, + y: 1.2000000000000015, + }, + side: "x-", + }, + "U3.2": { + pinId: "U3.2", + offset: { + x: -1.9, + y: -1.8000000000000007, + }, + side: "x-", + }, + "U3.3": { + pinId: "U3.3", + offset: { + x: -1.9, + y: -2.000000000000001, + }, + side: "x-", + }, + "U3.4": { + pinId: "U3.4", + offset: { + x: -1.9, + y: -2.200000000000001, + }, + side: "x-", + }, + "U3.5": { + pinId: "U3.5", + offset: { + x: -1.9, + y: -2.4000000000000012, + }, + side: "x-", + }, + "U3.6": { + pinId: "U3.6", + offset: { + x: -1.9, + y: -2.6000000000000014, + }, + side: "x-", + }, + "U3.7": { + pinId: "U3.7", + offset: { + x: -1.9, + y: -2.8000000000000016, + }, + side: "x-", + }, + "U3.8": { + pinId: "U3.8", + offset: { + x: -1.9, + y: -3.0000000000000018, + }, + side: "x-", + }, + "U3.9": { + pinId: "U3.9", + offset: { + x: -1.9, + y: -3.200000000000002, + }, + side: "x-", + }, + "U3.10": { + pinId: "U3.10", + offset: { + x: -1.9, + y: 1.0000000000000013, + }, + side: "x-", + }, + "U3.11": { + pinId: "U3.11", + offset: { + x: -1.9, + y: -3.400000000000002, + }, + side: "x-", + }, + "U3.12": { + pinId: "U3.12", + offset: { + x: -1.9, + y: -3.6000000000000023, + }, + side: "x-", + }, + "U3.13": { + pinId: "U3.13", + offset: { + x: -1.9, + y: -3.8000000000000025, + }, + side: "x-", + }, + "U3.14": { + pinId: "U3.14", + offset: { + x: -1.9, + y: -4.000000000000002, + }, + side: "x-", + }, + "U3.15": { + pinId: "U3.15", + offset: { + x: 1.9, + y: -0.5000000000000009, + }, + side: "x+", + }, + "U3.16": { + pinId: "U3.16", + offset: { + x: 1.9, + y: -0.7000000000000011, + }, + side: "x+", + }, + "U3.17": { + pinId: "U3.17", + offset: { + x: 1.9, + y: -0.9000000000000012, + }, + side: "x+", + }, + "U3.18": { + pinId: "U3.18", + offset: { + x: 1.9, + y: -1.1000000000000014, + }, + side: "x+", + }, + "U3.19": { + pinId: "U3.19", + offset: { + x: 1.9, + y: -1.3000000000000014, + }, + side: "x+", + }, + "U3.20": { + pinId: "U3.20", + offset: { + x: 1.9, + y: -1.9000000000000015, + }, + side: "x+", + }, + "U3.21": { + pinId: "U3.21", + offset: { + x: 1.9, + y: -2.1000000000000014, + }, + side: "x+", + }, + "U3.22": { + pinId: "U3.22", + offset: { + x: -1.9, + y: 0.8000000000000012, + }, + side: "x-", + }, + "U3.23": { + pinId: "U3.23", + offset: { + x: -1.9, + y: 2.8000000000000016, + }, + side: "x-", + }, + "U3.24": { + pinId: "U3.24", + offset: { + x: 1.9, + y: -2.7000000000000015, + }, + side: "x+", + }, + "U3.25": { + pinId: "U3.25", + offset: { + x: 1.9, + y: -2.9000000000000012, + }, + side: "x+", + }, + "U3.26": { + pinId: "U3.26", + offset: { + x: 1.9, + y: -3.1000000000000014, + }, + side: "x+", + }, + "U3.27": { + pinId: "U3.27", + offset: { + x: 1.9, + y: 0.0999999999999992, + }, + side: "x+", + }, + "U3.28": { + pinId: "U3.28", + offset: { + x: 1.9, + y: 0.2999999999999994, + }, + side: "x+", + }, + "U3.29": { + pinId: "U3.29", + offset: { + x: 1.9, + y: 0.49999999999999956, + }, + side: "x+", + }, + "U3.30": { + pinId: "U3.30", + offset: { + x: 1.9, + y: 0.6999999999999997, + }, + side: "x+", + }, + "U3.31": { + pinId: "U3.31", + offset: { + x: 1.9, + y: 0.8999999999999995, + }, + side: "x+", + }, + "U3.32": { + pinId: "U3.32", + offset: { + x: 1.9, + y: 1.0999999999999996, + }, + side: "x+", + }, + "U3.33": { + pinId: "U3.33", + offset: { + x: -1.9, + y: 0.600000000000001, + }, + side: "x-", + }, + "U3.34": { + pinId: "U3.34", + offset: { + x: 1.9, + y: 1.2999999999999998, + }, + side: "x+", + }, + "U3.35": { + pinId: "U3.35", + offset: { + x: 1.9, + y: 1.5, + }, + side: "x+", + }, + "U3.36": { + pinId: "U3.36", + offset: { + x: 1.9, + y: 1.7000000000000002, + }, + side: "x+", + }, + "U3.37": { + pinId: "U3.37", + offset: { + x: 1.9, + y: 1.9000000000000004, + }, + side: "x+", + }, + "U3.38": { + pinId: "U3.38", + offset: { + x: 1.9, + y: 2.500000000000001, + }, + side: "x+", + }, + "U3.39": { + pinId: "U3.39", + offset: { + x: 1.9, + y: 2.700000000000001, + }, + side: "x+", + }, + "U3.40": { + pinId: "U3.40", + offset: { + x: 1.9, + y: 2.9000000000000012, + }, + side: "x+", + }, + "U3.41": { + pinId: "U3.41", + offset: { + x: 1.9, + y: 3.1000000000000014, + }, + side: "x+", + }, + "U3.42": { + pinId: "U3.42", + offset: { + x: -1.9, + y: 0.4000000000000008, + }, + side: "x-", + }, + "U3.43": { + pinId: "U3.43", + offset: { + x: -1.9, + y: -1.6000000000000005, + }, + side: "x-", + }, + "U3.44": { + pinId: "U3.44", + offset: { + x: -1.9, + y: 2.0000000000000018, + }, + side: "x-", + }, + "U3.45": { + pinId: "U3.45", + offset: { + x: -1.9, + y: 1.8000000000000016, + }, + side: "x-", + }, + "U3.46": { + pinId: "U3.46", + offset: { + x: -1.9, + y: -1.4000000000000004, + }, + side: "x-", + }, + "U3.47": { + pinId: "U3.47", + offset: { + x: -1.9, + y: -1.2000000000000002, + }, + side: "x-", + }, + "U3.48": { + pinId: "U3.48", + offset: { + x: -1.9, + y: -1, + }, + side: "x-", + }, + "U3.49": { + pinId: "U3.49", + offset: { + x: -1.9, + y: 0.20000000000000062, + }, + side: "x-", + }, + "U3.50": { + pinId: "U3.50", + offset: { + x: -1.9, + y: 2.600000000000002, + }, + side: "x-", + }, + "U3.51": { + pinId: "U3.51", + offset: { + x: -1.9, + y: 3.0000000000000018, + }, + side: "x-", + }, + "U3.52": { + pinId: "U3.52", + offset: { + x: -1.9, + y: 3.200000000000002, + }, + side: "x-", + }, + "U3.53": { + pinId: "U3.53", + offset: { + x: -1.9, + y: 3.4000000000000017, + }, + side: "x-", + }, + "U3.54": { + pinId: "U3.54", + offset: { + x: -1.9, + y: 3.600000000000002, + }, + side: "x-", + }, + "U3.55": { + pinId: "U3.55", + offset: { + x: -1.9, + y: 3.8000000000000016, + }, + side: "x-", + }, + "U3.56": { + pinId: "U3.56", + offset: { + x: -1.9, + y: 4.000000000000002, + }, + side: "x-", + }, + "U3.57": { + pinId: "U3.57", + offset: { + x: -1.9, + y: -0.39999999999999947, + }, + side: "x-", + }, + "C12.1": { + pinId: "C12.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C12.2": { + pinId: "C12.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + "C14.1": { + pinId: "C14.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C14.2": { + pinId: "C14.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + "C8.1": { + pinId: "C8.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C8.2": { + pinId: "C8.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + "C13.1": { + pinId: "C13.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C13.2": { + pinId: "C13.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + "C15.1": { + pinId: "C15.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C15.2": { + pinId: "C15.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + "C19.1": { + pinId: "C19.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C19.2": { + pinId: "C19.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + "C18.1": { + pinId: "C18.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C18.2": { + pinId: "C18.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + "C7.1": { + pinId: "C7.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C7.2": { + pinId: "C7.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + "C9.1": { + pinId: "C9.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C9.2": { + pinId: "C9.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + "C10.1": { + pinId: "C10.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C10.2": { + pinId: "C10.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + "C11.1": { + pinId: "C11.1", + offset: { + x: -3.469446951953614e-17, + y: 0.55, + }, + side: "y+", + }, + "C11.2": { + pinId: "C11.2", + offset: { + x: 3.469446951953614e-17, + y: -0.55, + }, + side: "y-", + }, + }, + netMap: { + V3_3: { + netId: "V3_3", + isPositiveVoltageSource: true, + }, + V1_1: { + netId: "V1_1", + isPositiveVoltageSource: true, + }, + GND: { + netId: "GND", + isGround: true, + }, + }, + pinStrongConnMap: { + "U3.1-C12.1": true, + "C12.1-U3.1": true, + "U3.10-C14.1": true, + "C14.1-U3.10": true, + "U3.22-C8.1": true, + "C8.1-U3.22": true, + "U3.33-C13.1": true, + "C13.1-U3.33": true, + "U3.42-C15.1": true, + "C15.1-U3.42": true, + "U3.49-C19.1": true, + "C19.1-U3.49": true, + "U3.23-C18.1": true, + "C18.1-U3.23": true, + "U3.50-C7.1": true, + "C7.1-U3.50": true, + "C11.1-U3.43": true, + "U3.43-C11.1": true, + "C10.1-U3.44": true, + "U3.44-C10.1": true, + }, + netConnMap: { + "U3.1-V3_3": true, + "U3.10-V3_3": true, + "U3.22-V3_3": true, + "U3.33-V3_3": true, + "U3.42-V3_3": true, + "U3.49-V3_3": true, + "C12.1-V3_3": true, + "C14.1-V3_3": true, + "C8.1-V3_3": true, + "C13.1-V3_3": true, + "C15.1-V3_3": true, + "C19.1-V3_3": true, + "U3.23-V1_1": true, + "U3.50-V1_1": true, + "C18.1-V1_1": true, + "C7.1-V1_1": true, + "C9.1-V1_1": true, + "C12.2-GND": true, + "C14.2-GND": true, + "C8.2-GND": true, + "C13.2-GND": true, + "C15.2-GND": true, + "C19.2-GND": true, + "C18.2-GND": true, + "C7.2-GND": true, + "C9.2-GND": true, + "C10.2-GND": true, + "C11.2-GND": true, + }, + chipGap: 0.6, + decouplingCapsGap: 0.2, + partitionGap: 1.2, +} diff --git a/tests/IdentifyDecouplingCapsSolver/IdentifyDecouplingCapsSolver06.test.ts b/tests/IdentifyDecouplingCapsSolver/IdentifyDecouplingCapsSolver06.test.ts index 615957c..6502a50 100644 --- a/tests/IdentifyDecouplingCapsSolver/IdentifyDecouplingCapsSolver06.test.ts +++ b/tests/IdentifyDecouplingCapsSolver/IdentifyDecouplingCapsSolver06.test.ts @@ -1,6 +1,6 @@ import { test, expect } from "bun:test" import { IdentifyDecouplingCapsSolver } from "../../lib/solvers/IdentifyDecouplingCapsSolver/IdentifyDecouplingCapsSolver" -import { problem } from "../../pages/LayoutPipelineSolver/LayoutPipelineSolver06.page.tsx" +import { problem } from "../../pages/LayoutPipelineSolver/LayoutPipelineSolver06.problem" test("IdentifyDecouplingCapsSolver identifies decoupling capacitor groups from LayoutPipelineSolver06", () => { const solver = new IdentifyDecouplingCapsSolver(problem)