Each chip keeps its own book 每块芯片,各有一本册子
Each chip looks after its own memory, and numbers it from its own zero. Two books, two number ones. 每块芯片管着自己那片内存,门牌号各自从 0 开始编。两本册子,各有各的 0 号。
Like two neighbourhoods 就像两个小区
Two neighbourhoods, each numbering its houses from one. Build a road between them and the numbers still do not merge. 两个小区,各自从 1 号开始编门牌。中间修一条路,门牌号照样不会合并。
Say you live at number 1 on the left. Your neighbour across the road also lives at number 1 — their own number 1. Tell a courier “go to number 1” and they will stop at yours, because yours is the only book they carry. The road does not fix that. Someone has to write the other side's houses into your book, under numbers of your own. 你住左边 1 号。路对面那家也住 1 号——他们自己的 1 号。你跟快递说「送到 1 号」,他会停在你家,因为他手上只有你这本册子。那条路解决不了这件事。得有人把对面那几栋,用你这本册子里的号,另外写进来一次。
The wire is through. The numbers are not. 线是通的,号是不通的
Hand the CPU a number and it looks it up in its own book. The card's numbers are simply not in there. 给 CPU 一个号,它只会在自己那本册子里翻。显卡那本上的号,它这本里根本没有。
0x8000_0000 in the CPU's book, 0x0000_0000 in the card's. Two numbers, one place. Widths here are not to scale, and each book is shown with two ranges where a real one has dozens.
一张图,两半一起看。上面是那根线,下面是两本册子。紫箭头是 CPU 在读——它落在自己那本册子里,落在那段斜纹上。那段斜纹和显卡的显存是同一块硅:在 CPU 的册子上写 0x8000_0000,在显卡自己的册子上写 0x0000_0000。两个号,一个地方。图上段宽不按比例,每本册子只画了两段,真的有几十段。
Open a stretch of your own numbers 在自己那本上,开出一段号
Nothing moves house. Someone just writes the card's memory into the CPU's book, under numbers the CPU already understands. 谁也没搬家。只是有人把显卡那片内存,用 CPU 本来就认识的号,另外记进了 CPU 这本册子。
0x8000_0000, and every number in there points at the card's memory instead. No byte was copied to make this happen — the numbers were handed out, once, at start-up. Hatching means the same thing everywhere on this page: this stretch is not local.
同一本册子,开之前和开之后。前半截是 CPU 自己的内存,一动没动。后半截原来空着,现在划出来标上 0x8000_0000,这一段里的每个号,指的都是显卡那边的内存。做这件事一个字节都没搬——只是开机时把号分了一次。斜纹在这一页里始终是同一个意思:这一段不是本地的。
Two ways to get the bytes 拿到那些字节,有两条路
This is what the whole page is for: with the stretch open, one ordinary read reaches across. Without it, you copy first, then read your copy. 这一页就是为了这件事:号段开了,一条普通的读指令就够到对面。没开,就得先搬一份到自己这边,再读那份。