原理图与 PCB 布局
PCB 布局
*.pcb.toml 文件:布局、走线、过孔、扇出、缝合、铺铜区、开孔、丝印、图形、测试访问和版本水印。
将原理图的封装放置在电路板上并进行布线。
name = "lna"
board = "lna"
schematic = "lna"
[[footprints]]
ref = "U1"
at = [13.0, 8.05]
rotation = 90 # degrees, counter-clockwise
# side = "bottom" # mirrors the footprint and swaps F./B. layers
label = { at = [9.9, 7.4], rotation = 90 } # move the silk reference; size = 0.8, hide = true
# mlcc = false # this part is not a ceramic capacitor, over the footprint's `mlcc`
# locked = true # `agentee place` never moves it
[[tracks]]
net = "RF_OUT"
layer = "F.Cu"
points = [[18.68, 10], [25.5, 10]]
# width = 0.36 # default: the net class width
[[vias]]
net = "GND"
at = [7.2, 8.9]
# via = "std" # a [[vias]] name from the board, default the first class via
# count = 6 # a row, like pads
# pitch = [1.2, 0]
[[fanouts]] # a via in every connected pad of a BGA
ref = "U3" # * and ? globs: ref = "*" with nets = [...] fans out every plane pad
# via = "bga" # or a list, the first reaching the pad layer; default the class vias
# skip_rings = 2 # leave the two outer rings for escape on the outer layer
# always = ["GND", "LVDS_*"] # nets that get a via even in those rings, globs allowed
# skip = ["A1", "B7"] # pads to leave alone
# skip_at = [[4.5, 3.0]] # no via at these spots (the viewer adds one when you edit a via)
# nets = ["GND", "3V3"] # only pads on these nets, globs allowed
# exclude = ["C2?", "J1"] # refs to leave out when ref is a glob; a glob never
# matches test points, a probe pad keeps no via
[[stitching]] # ground vias wherever they clear every other net and silk text
net = "GND"
# via = "std" # default the net's first class via
# pitch = "2.5mm" # grid pitch, or the spacing along a fence (default 1mm)
# outline = [[x, y], ...] # default the board outline
# margin = "0.6mm" # extra distance from the board edge
# fence = ["RF_*"] # instead of a grid: a row either side of these nets' tracks
# offset = "0.5mm" # fence row distance from the track centre, default just past
# the class coplanar gap
# skip_at = [[4.5, 3.0]] # no via at these spots (the viewer adds one when you edit a via)
[[zones]]
net = "GND"
layers = ["F.Cu", "In1.Cu", "In2.Cu", "B.Cu"]
# outline = [[x, y], ...] # default: the board outline
# clearance = 0.25 # default: the net class clearance
# priority = 1 # higher fills first; other nets' zones on the layer pour around it
# min_island_area = 2.0 # mm2; a piece touching one item of the net is kept only this big
# pad_connection = "relief" # solid (default) | relief: pads of the net join the pour by four
# spokes across a gap, so they heat like a track-fed pad;
# none: the pour keeps its clearance from the pads. A pad's
# own zone_connect wins, and BGA balls (16 or more round SMD
# pads) stay solid, since spokes starve a ball of solder heat
# relief_tht_only = true # relief on through-hole pads only, SMD pads solid (KiCad's
# thru_hole_only)
# relief_gap = "0.3mm" # default: the zone clearance
# spoke_width = "0.3mm" # default: the net class track width, at least min_width
[[cutouts]] # keep zones off an area, e.g. under an SMA centre pin;
# a hole through the board is [[outline.cutouts]] in the board file
layers = ["In1.Cu"]
points = [[0, 9], [5.4, 9], [5.4, 11], [0, 11]]
[[graphics]] # board text and lines, same keys as footprint graphics
kind = "text"
layer = "F.SilkS" # F.SilkS, B.SilkS, F.Fab or B.Fab
at = [7.4, 7.6]
# locked = true # `agentee place` never moves it
text = "RF IN"
size = 1.0 # mm, the fab minimum is in the board rules
[[artwork]] # a filled logo or icon
layer = "F.SilkS"
icon = "arrow" # built in: arrow, warning, ground, antenna, lightning, pin1, ce
# file = "logo.svg" # or any SVG, relative to this file
at = [7.4, 6.3] # centre of the artwork
height = 0.8 # mm, the width follows the aspect ratio
# rotation = 90
[test] # in-circuit and flying probe test access, all optional
# nets = ["3V3", "*RST*"] # nets that need a probe, globs, any case; default below
# exclude = ["LED_*"] # nets to leave out
# side = "B" # probe side, F or B
# through_holes = true # exposed plated through-hole pads count as access
# vias = false # vias count as access; opens the probe side mask over every via
# min_test_pad = "1.0mm" # smallest test pad
# min_test_pad_pitch = "1.27mm" # centre to centre between test pads
# min_test_pad_to_body = "1.0mm" # to another part's body on the probe side
# min_test_pad_to_edge = "3.0mm" # to the board edge and tooling holes
[place] # optional, for `agentee place`
# edges = { J1 = "left", J2 = "right" } # pin a connector to an edge: left, right, top
# (smallest y) or bottom
# keepouts = [[[0, 0], [8, 0], [8, 6], [0, 6]]] # polygons no courtyard may enter
[watermark] # optional: where the agentee version watermark goes
# at = [30, 21] # centre of the text, default a clear spot found by check
# layer = "B.SilkS" # default B.SilkS, else F.SilkS
# rotation = 90 # default 0, or 90 where only a tall gap is clear每个 PCB 布局都带有丝印文本 agentee vX.Y.Z-HASH:构建该制造文件的 agentee 版本及其源代码的短 git 哈希,如果树中有未提交的更改则为 -dirty,在 git 之外则为 unknown。它始终被绘制且无法关闭。其高度为 min_silk_text_height,居中,默认放置在 B.SilkS 上 (如果底部没有空间或电路板没有底部丝印,则放置在 F.SilkS 上),位于电路板左下角附近最近的清晰位置,如果只有高间隙适合则旋转 90 度。清晰位置避开焊盘、过孔、其他丝印文本和线条、图形和元件本体,并保持在轮廓内 min_copper_to_edge 的距离。查看器、渲染图和装配图显示它,fab-notes.txt 也命名它。如果没有清晰位置,检查报告一个 watermark 错误,包含需要清除的尺寸和最不拥挤的位置,板厂拒绝;在那里清除空间或自行设置 [watermark] at (加上 layer、rotation)。不清晰的 [watermark] 位置是一个 watermark 错误,指出它碰到的内容,没有 kind = "silk" 层的叠层是一个 watermark 错误,要求添加一个。
测试访问:默认情况下,需要探针的网络是电源网络 (具有 current 的类,或名称如 3V3、1V8、+5V、VCC*、VDD*、VBUS*、VBAT*、VIN*、VSYS*),地 (GND、*GND、GND*) 以及名称如 *RST*、*RESET*、*EN*、*PG*、*CLK*、*TX*、*RX*、*SCL*、*SDA*、*SWD*、*TCK*、*TMS*、*TDI*、*TDO* 的网络。默认值排除开关节点和稳压器反馈、软启动和降噪网络 (SW*、*_SW、LX*、FB*、SS*、NR*,匹配整个名称或其最后一个 / 段),即使其类是电源:探针的电容和到焊盘的存根会将开关噪声耦合到反馈分压器或减慢软启动或噪声滤波器,开关节点上的存根会辐射。 nets 替换该列表 (在那里命名该网络以无论如何进行探针),exclude 从中移除网络。测试点是具有参考 TP 和数字的元件,或名为 TestPoint* 的封装;像每个元件一样,它必须在原理图中。内置的 TestPoint_Pad_D1.0mm 封装 (1.0 mm 圆形 SMD 焊盘,阻焊打开,无钢网) 和 TestPoint 符号由 agentee testpoints 写入 footprints/ 和 symbols/。
agentee testpoints NAME --nets "3V3,*RST*" [--side B] [--pitch 2.54] (MCP testpoints) 为每个尚未有探针访问的匹配网络添加测试焊盘 (如果省略 --nets,网络为 [test] 默认值,阻抗和配对网络被跳过):它在探针侧寻找 --pitch 网格上靠近网络铜皮的空闲位置,保持距边缘和工艺孔 min_test_pad_to_edge,距元件本体 min_test_pad_to_body,距其他测试焊盘 --pitch,以及距其他铜皮和为其他网络放置的焊盘、存根和过孔的网络间距。它将一个连接到该网络的 TP 元件添加到命名该网络的原理图表,在布局的探针侧添加一个 [[footprints]] 条目,带有到焊盘旁过孔的短存根走线,然后使用自动布线器将每个新焊盘布线到网络的铜皮,并追加这些走线和过孔。布线器无法连接的焊盘会从原理图和布局中移除,并与未找到位置的网络一起列出。新焊盘的标签移动到清晰位置或隐藏,如果布局存储铺铜填充,则像 agentee fill 一样刷新它们。 --dry-run 报告位置而不写入。
丝印文本必须与其他丝印文本保持 0.4 mm,与丝印轮廓保持 0.2 mm,避开焊盘、过孔和其他元件的本体,并保持在电路板上。这些中的每一个都是错误,除了位于其他元件本体下的文本,那是警告。当参考标签失败时,检查命名一个通过所有规则的位置,作为 label = { at = [...] } 行以粘贴。 agentee silk NAME (MCP silk) 为您粘贴它们并重复直到标签稳定; --hide 隐藏没有清晰位置的参考,通常是 BGA 下的小型无源元件。
只有当填充块接触其网络的两个项目,或一个项目且至少为 min_island_area 时,才保留填充块;其余部分没有到达任何新项目并被移除。检查验证每个填充与其他网络:与另一网络的铺铜、走线、过孔或焊盘重叠,或间距小于清除值的填充是错误,锐角小于 30 度的铜尖被标记。
同一层上的铺铜按 priority 顺序填充,优先级相同时先填面积最小的。每个铺铜都会保持与已放置铺铜之间的间距,因此电路板全局地铺铜内部的小型开关节点或电源铺铜会被绕开,而不会与其短路。
铺铜与其他网络的过孔保持 min_via_hole_to_copper 的间距,与无电镀孔保持 min_npth_to_copper 的间距,同时也保持常规间距。圆弧绘制在真实圆的外侧,确保间隙不会短路。缝合过孔仅放置在过孔在每一跨越层上都与其他所有网络的铜皮保持间距、其孔与该铜皮保持 min_via_hole_to_copper 间距、与任意网络的贴片焊盘保持 min_hole_to_smd_pad 间距、与所有钻孔保持 min_hole_to_hole 间距、与轮廓保持边缘规则间距,且落在其所属网络铺铜区域内的位置。检查会报告放置了多少个缝合过孔。它们像普通过孔一样钻孔和绘图。
铺铜填充是精确的多边形:铺铜轮廓减去其他所有网络的铜皮(按间距扩展),并带有圆角,因此铺铜渲染和绘图时不会出现阶梯状边缘。比铺铜 min_width(默认 0.25 mm)更窄的颈部和细条会被移除,就像板厂蚀刻它们一样。当两个间距区域(反焊盘、走线和焊盘间距)之间的距离小于 min_width 时,铺铜会被切回到连接它们的直线,在间隙约 1.5 倍 min_width 范围内,因此不会留下指向间隙的存根或发丝状细腰。铺铜间距区域与电路板边缘间距、开孔或另一个铺铜填充的间距之间也适用同样的规则。
铺铜填充会被缓存:每个填充以其依赖项的哈希值为键,存储在 ~/.cache/agentee/fills 中,因此加载时只填充铜皮、间距或邻居发生变化的铺铜(设置 AGENTEE_NO_FILL_CACHE 可跳过缓存)。agentee fill NAME(MCP fill)还会将填充存储在布局文件末尾,每个铺铜和层对应一个 [[fills]] 表,因此新检出的代码无需填充即可加载;哈希值不再匹配的存储填充会被忽略,检查在 --info 下会注明这一点。导入电路板时会存储其填充。请将 [[fills]] 表留给工具处理。
仅擦过焊盘的走线(其中心线未触及焊盘)会被标记;请将其延伸至焊盘。同一网络在同一层上重叠的两段走线(平行且重叠超过一个走线宽度)是错误,因为铜皮厚度加倍了;小于 90 度的弯角会被标记为酸阱。走线在与小焊盘连接处可以收窄至低于其网络类宽度,但不小于板厂最小值,最大收窄长度为 0.5 mm(网络类 neckdown);布线器会自行绘制此类颈部(参见自动布线)。钻孔、过孔和电镀焊盘都必须保持电路板 min_hole_to_hole 的间距;检查会统计未满足间距的孔对数量并指出第一对。同一网络在同一位置的两个过孔也是错误:板厂会钻孔两次。阻焊开口是焊盘轮廓,无扩展,过孔被覆盖。不同网络(或无网络)的两个开口如果重叠或留下的阻焊桥小于 min_mask_web,则是错误,按部件对统计并指出第一处。细间距部件的焊盘也会检查:请在封装中用更窄的焊盘修复,或在板厂允许时设置更小的 min_mask_web。具有 mask_web = false 的封装,其阻焊会作为一个窗口打开覆盖其焊盘(组合开口),因此跳过其自身焊盘对的检查;其焊盘仍会与其他部件检查。
底层上的图形会镜像,以便从下方正确阅读。SVG 填充和描边会被展平为多边形;SVG 中的文本会被忽略,因此请先将其转换为路径。丝印文本和图形与参考标识符接受相同的检查:重叠、焊盘、丝印轮廓、电路板边缘。