印刷电路板布局的顺序优化装填
Sequential Optimal Packing for PCB Placement

原始链接: https://blog.autorouting.com/p/sequential-optimal-packing-for-pcb

有效的芯片放置对于成功的PCB设计至关重要,它影响着布线复杂度、信号完整性和电源管理。简单的自动封装算法,如最小化空间或力导向方法,往往无法产生可布线的电路板。捕捉人类设计需求——例如端口位置或元件邻近性——是关键,但指定这些需求可能很复杂。 顺序最优封装 (SOP) 提供了一种解决方案。这种确定性算法一次放置一个芯片,根据可定制的“成本函数”选择“最佳”位置,该函数反映了设计意图(例如,最小化走线长度)。SOP速度快,易于可视化和调试,使得理解每个放置决策变得简单。 虽然SOP存在局限性——初始封装顺序会影响结果,并且无法始终实现全局优化——但可以通过使用“硬化”约束来优化放置。作者提倡将SOP作为PCB设计软件中的基本算法,类似于CSS Grid等布局工具,并鼓励进一步开发和社区参与。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 PCB 布局顺序最优打包 (autorouting.com) 3小时前,seveibar 发布,4点赞 | 隐藏 | 过去 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

Placing chips on a PCB is a difficult and consequential task. The way you place chips dramatically impacts how difficult it will be to route the PCB. There are signal integrity and power management issues with creating long paths between different components. The size of the PCB or where ports appear often is a design requirement that has to be considered and in some cases- pushed back on.

How does automatic placement fare? If you use a regular packing algorithm that minimizes the space usage, you will create a board that is nearly impossible to route. If you use a force-directed packing, where the netlist forms springs that pull chips close together based on their connections, you’ll get an unusual shape and suffer local minimums (it’s also wildly unpredictable)

When we’re thinking about packing algorithms, the first concern should be capturing human design requirements. The algorithm should, as closely as possible, understand statements like:

How do we capture these requirements? In tscircuit, they are captured through <group>/<subcircuit> tags with different layoutMode properties, also coordinate specifications like pcbLeftEdgeX=calc(board.minx + 2mm). In some cases, the entire layout can be resolved by ordering the computations properly, but more often than not, this way of specification is arduous for the user and inflexible as a design grows.

For underspecified placements, Sequential Optimal Packing is a fast, deterministic and legible solution for packing. It allows us to capture “flexible” design constraints in a predictable way.

Sequential Optimal packing sequentially packs chips in the Pack Order. Each time it packs a new chip, it selects the Optimal position based on the Cost Function. The Cost Function is established from the design intent for that specific chip.

Here’s the algorithm in a nutshell:

Simple!

This algorithm can be made fast because you can quickly compute a boundary along our existing packed chips and pads, then find the Cost Function minimum along each segment of the boundary.

In the animation below, you can see the algorithm in action. The lines from pin to pad help show what the components of the Cost Function are. You can think of the Cost Function as “summing” the lengths of all the lines or taking the minimum of all the line lengths as the cost.

Sequential optimal packing is easy to understand and visualize. You can easily watch each component pack one by one and vary the pack order or optimal packing function to achieve a desired outcome. Every individual packing decision is easy to understand.

If you are using tscircuit, you can debug the packing algorithm using the “Solvers” tab.

Sequential optimal packing is also extremely compatible with other layout mechanisms, like when you want to have a group of components that are in a reference configuration (from a datasheet) but should be packed together. You can also layout pre-computed positions before you begin packing- it’s compatible with partially packed existing layouts.

Sequential optimal packing is flawed in two major ways:

Both of these issues can be mitigated by treating sequential optimal placements as an initial approximation, then refining by “hardening” constraints. e.g. if you know you want a decoupling capacitor in an exact position relative to a chip, encode that such that the chip and decoupling capacitor are packed together. LLM loops can easily adapt the design intent representation to do this!

Sequential Optimal Packing is one of the key algorithms that should be included in the standard constraint algorithms for PCB design. It is highly debuggable, easy to understand, and can be tweaked in a feedback loop until you reach a global optimal placement. It should be a fundamental algorithm, similar to flexbox or CSS Grid, baked into every PCB engine.

If you’re interested in algorithm development, join our discord or follow me on twitter.

联系我们 contact @ memedata.com