Fourteen hand-built SVG figures in the apple-design language. Grayscale carries the structure; a single blue carries the story. Every figure answers one question first — where does the blue go — then everything else stays out of the way. Copy any of them. 十四张手工 SVG 图。灰阶承担结构,唯一的蓝色承担叙事。每张图先回答一个问题——蓝给谁——其余一切退后。每张都可直接复制。
Architecture, orchestration, pipelines. Depth comes from soft shadows, never borders; the blue path is the one you are meant to follow. 架构、编排、流水线。层次靠柔影而不是边框;蓝色路径就是你该跟随的那条。
templates/diagrams/architecture.svg.
四层结构用浅灰分组,白卡靠柔影浮起。模板:templates/diagrams/architecture.svg。
templates/diagrams/hierarchy.svg.
一个协调者四个 worker;蓝描边标出唯一的焦点卡。模板:templates/diagrams/hierarchy.svg。
templates/diagrams/flow.svg.
蓝色主路径、灰色失败回流、唯一的 tint 菱形。模板:templates/diagrams/flow.svg。
templates/diagrams/function-flowchart.svg.
驱动 probe() 从上到下走蓝色;错误处理让到灰色车道,共享一个出口。模板:templates/diagrams/function-flowchart.svg。
templates/diagrams/build-pipeline.svg.
内核编译从 .config 到 boot.itb;设备树分支以灰色安静汇入,交付物戴上蓝描边。模板:templates/diagrams/build-pipeline.svg。
templates/diagrams/deployment.svg.
三个区域全是平灰;蓝色只花一次,给请求主路径——负载均衡器进 api 焦点卡,再落到 Postgres。副本数装在安静的灰 chip 里。模板:templates/diagrams/deployment.svg。
Registers, SoC blocks, bus waveforms. Where anthropic spends hues, apple spends gray values — and the datasheet reads cleaner for it. 寄存器、SoC 框图、总线波形。anthropic 用色相的地方,apple 用灰阶——数据手册反而更清爽。
templates/diagrams/soc-block.svg.
子系统是无边框灰组;唯一的蓝色路径从 CPU 经 NoC 到 DDR。模板:templates/diagrams/soc-block.svg。
0x80_0000_0000 to the host and 0x18_0000_0000 to the device. Segment widths are not to scale. Template: templates/diagrams/interconnect-map.svg.
上半是拓扑,下半是每个视角各一条地址空间,唯一那条蓝线就是全图的结论:CPU 核用一条普通 store 就写得到斜纹那一段,指针可以直接递过去,不用拷贝。加速器访问 host DDR 走的是同一个机制——画成灰的,因为一页只留一个焦点。两条带永不合并:同一块 DRAM 在 host 眼里是 0x80_0000_0000,在设备眼里是 0x18_0000_0000。段宽不按比例。模板:templates/diagrams/interconnect-map.svg。
templates/diagrams/protocol-stack.svg.
两条灰虚线是约定,不是线 —— 没有任何东西把 TLP 从一侧的传输层直接送到另一侧。虚线在这里正是留给"根本不存在的那条连接"。全图唯一一条横向实线是最底下那根 lane;蓝色那条编号 1→6 的路径,是这一页要讲的这一笔传输:一层层下去,过一次线,再一层层上来。协议分析仪只能挂在 lane 上、挂不到传输层,原因就在这张图里。模板:templates/diagrams/protocol-stack.svg。
4 GiB inside a region and start, end and size all stay readable. Symbol names are set bold, literal constants monospace: TOLUD is a name, 0xC000_0000 is only what it equals on this board. Blue goes to one thing — the remap and the two segments it joins: the gigabyte shadowed by the MMIO hole reappears above TOUUD, same DRAM, a second address. Heights are not to scale; low addresses at the bottom. Template: templates/diagrams/address-map.svg.
每条边界各拉一条引线,因为边界是一个地址、区域是一段范围 —— 把 4 GiB 写在某段中间,起点 / 终点 / 大小三种读法都成立。符号名用粗体,字面常量用等宽:TOLUD 是名字,0xC000_0000 只是它在这块板上等于多少。蓝色只给一件事 —— 那条重映射线和它连起的两段:被 MMIO 空洞盖住的那 1 GiB,在 TOUUD 之上重新露面,同一块 DRAM,第二个门牌号。高度不按比例,低地址在下。模板:templates/diagrams/address-map.svg。
templates/diagrams/glyphs.svg.
一个圆角矩形能代表任何东西,所以它单独出现时什么也没说。这里每个字形都是一个意义固定的名词:梳齿承诺"深度有限、按序进出",尺状刻度承诺"这是被序列化的字节",骑在边界上的小标签承诺"这个接口属于这块 die"。在没有那样东西的地方画上它,就是在图上写了一句假话。蓝色每个字形只点一处"活着"的状态 —— 写指针、插了卡的那个槽、link 起来的 LED。厂商 logo 一律不进:写型号文字,文件才改得动。模板:templates/diagrams/glyphs.svg。
templates/diagrams/register-bitfield.svg.
细线位格,字段用两档灰区分,真正要翻的使能位给蓝色。模板:templates/diagrams/register-bitfield.svg。
templates/diagrams/hw-timing-waveform.svg.
SPI 传输,数据信号用三档灰;片选给蓝色——传输窗口才是叙事主角。模板:templates/diagrams/hw-timing-waveform.svg。
Seven figures for what is inside the package and what the code's data points at. Grayscale carries the structure; the one blue is spent on whatever the figure is actually about — the address windows here, the traced request there. Never on both. 七张图,画封装里面长什么样、代码里的数据指向哪。结构交给灰阶;唯一的蓝留给这张图真正要讲的那一样——这里是地址窗口,那里是被追踪的那次访问。不会两样都给。
templates/diagrams/system-topology.svg.
PCIe 树和物理地址空间画在同一张图里。每根线标接口宽度和总线号,每张设备卡标 BDF 和 BAR 大小,虚线引线从卡落到地址条上属于它的那一段。拆成两张图,读者就得自己在脑子里做这个映射——而出错的恰恰是这一步。模板:templates/diagrams/system-topology.svg。
templates/diagrams/die-floorplan.svg.
二十块瓦片,每块是一个核加它自己那片缓存,瓦片之间跑互连轨,交叉点就是站点。瓦片挂在自己的站点上、不是连在轨边上——一次访问的延迟取决于跳了几站,靠的就是这个区别。徽章 1–3 追一次未命中一路走到内存控制器。模板:templates/diagrams/die-floorplan.svg。
templates/diagrams/datapath.svg.
四路组相联查找画到器件一级:地址拆分、译码器选中一组、四个比较器同时比、匹配线一边驱动多路选择器一边进或门抬起 HIT。way 1 的 valid 是 0,它的比较器永远不会成立——故意留死这一路,valid 位才讲得清。徽章 A–E。模板:templates/diagrams/datapath.svg。
templates/diagrams/packet-encap.svg.
同一个报文走过三层,画在一把 8 px/字节的标尺上,所以每根条的宽度就是它的字节数。两条竖虚线钉住最初那 80 字节:下层加的东西一律长在外面,绝不进到里面。窄到装不下标签的字段用括线引到边上写,不缩字号。模板:templates/diagrams/packet-encap.svg。
templates/diagrams/terminal-annotated.svg.
十四行真实的 PCI 枚举输出,只加标注、一个字符不改。五个徽章把行钉到右栏说明;高亮块画在文字下面,位置由字符下标算出来——每行都用 textLength 锁死了字符步进。讲的事:一个 256 MiB 的 BAR 挂在 firmware 只给了 1 MiB 的桥窗口后面,接着就是 -12。正常的 nvme 那几行是故意留在画面里的。模板:templates/diagrams/terminal-annotated.svg。
templates/diagrams/struct-graph.svg.
task_struct → mm_struct → maple tree → 三个 VMA,每根箭头从真正持有指针的那一行出发,落在目标卡片的标题栏上。起点精确到字段、终点是整个对象——这个不对称就是重点。兄弟对象只详画一个,其余只留区分它们的那几行。字段名对过 v6.6 的 include/linux/mm_types.h。模板:templates/diagrams/struct-graph.svg。
templates/diagrams/bus-fabric.svg.
主设备在轨上方、从设备在下方,桥再往下接一条更窄的轨和它自己的外设。每条引下线用斜杠加数字标位宽,轨上写跑在它上面的通道名。一次读事务去程实线、回程虚线,离轨 12 px——8 px 时实测糊进轨里看不见。图脚明写:轨是一种画法,不是拓扑论断。模板:templates/diagrams/bus-fabric.svg。
Six figures, each spending its single blue on whatever that figure is actually about — the edge grep cannot find, the frame that faulted, the sixty-five microseconds a worker waits, the new frame and its deadline, the core everyone is waiting on, the reset line and the constraint people get wrong. Never on the biggest box. 六张图,每一张都把唯一的那点蓝花在这张图真正要讲的事上——grep 找不到的那条边、出错的那一帧、worker 等的那 65 µs、新的一帧和它的 deadline、大家在等的那个核、复位线和最常被做短的那条约束。不给最大的那个框。
templates/diagrams/call-graph.svg.
三个驱动,每条边按种类画:细实线是同栈直接调用,空心箭头表示目标是运行时才定的结构体成员,金色虚线是换了执行上下文的异步交接,闪电是硬件事件,点线是完成通知往回走。结论在图脚:grep 只找得到黑色实线那几条。模板:templates/diagrams/call-graph.svg。
templates/diagrams/call-stack.svg.
九帧 oops backtrace,中间横着一条断层线。线以下是 kworker 骨架,那不是调用链——`process_one_work` 调用的是队列里排到的任何东西。你真正要找的调用者早些时候在别的上下文里跑了 `queue_work()`,它被画成旁边一张虚线幽灵卡,因为它根本不在这张栈上。模板:templates/diagrams/call-stack.svg。
templates/diagrams/runtime-timeline.svg.
一次 DMA 完成依次走过硬中断、软中断、kworker 和用户线程,共用一根微秒轴。轴下三条括线给数字:中断到 handler 8 µs,raise 到 tasklet 跑起来 6 µs,`queue_work()` 到 worker 真跑 65 µs。workqueue 不是「慢一点的 tasklet」,是晚一个数量级——worker 就是个普通线程,要排队等调度。模板:templates/diagrams/runtime-timeline.svg。
templates/diagrams/frame-pipeline.svg.
六条硬件泳道铺在一个帧周期上,下面同轴画 vsync 和 TE。内存那条拆成两根小条,因为它同时在服务两边——GPU 在写后台缓冲、扫描输出在读前台缓冲——GPU 一忙扫描输出就 underrun,原因就是这个争用。徽章 1 vsync 中断锁住帧缓冲地址,2 GPU 发出 fence,3 翻页入队,4 扫描输出结束,5 下一个 vsync 让后台缓冲上台。越过徽章 5,面板就重复上一帧。模板:templates/diagrams/frame-pipeline.svg。
templates/diagrams/multicore-calls.svg.
四条 CPU 泳道共用一根微秒轴。CPU 0 拿着自旋锁、向其余核发 IPI,然后等每一个应答。CPU 3 有一段长时间关中断,它的应答最晚到,于是 CPU 0 阻塞多久由它说了算。应答箭头必须画出来:只画扇出读作发完就走,画上应答才成为一次等待。模板:templates/diagrams/multicore-calls.svg。
templates/diagrams/power-sequence.svg.
电源轨、时钟、复位、链路状态、初始化命令、背光,按事件排而不按线性时间——约束跨了四个数量级,按真实比例画的话 10 µs 那段复位脉冲是 0 像素。括线带着不等号给真实数字,顶上那条横条说明每一段归哪个面板回调管。下电是严格逆序,每一步都要,包括那些等待。模板:templates/diagrams/power-sequence.svg。
Time-ordered views: who talks to whom, who runs where, where the data lands. Blue follows the one thing you are tracing. 按时间展开的视图:谁和谁通信、谁在哪个核上跑、数据落在哪。蓝色始终跟着你正在追踪的那一个对象。
templates/diagrams/sequence.svg.
请求走蓝色,返回走灰虚线,激活条靠柔影浮起。按编号读,值得注意的是 ④:网关在 12 ms 就应答了,那时 worker 一个 token 都还没产出——客户端于是等的是一条流,不是整次运行。模板:templates/diagrams/sequence.svg。
templates/diagrams/sched-timeline.svg.
三条 CPU 泳道;被追踪的任务跨核保持蓝色,迁移箭头画出负载均衡的动作。模板:templates/diagrams/sched-timeline.svg。
templates/diagrams/algorithm-ringbuffer.svg.
kfifo 环形缓冲:tint 格存数据,蓝色指针标出新字节落点。模板:templates/diagrams/algorithm-ringbuffer.svg。
templates/diagrams/timeline.svg.
已交付的里程碑用墨色,未到的用空心,唯一的蓝色标记现在。模板:templates/diagrams/timeline.svg。
templates/diagrams/state-machine.svg.
蓝色只属于 happy path:从入口经 Idle 和 Running 焦点卡到 Done。pause、resume、error 全留灰;reset 回流是全图唯一的虚线。模板:templates/diagrams/state-machine.svg。