Add probe CLI improvements, D2H read, UCIe/HBM tuning, BW sweep

- Probe CLI: restructured output (tables first, routes below), per-hop
  timestamps, split cross-cube into best/worst cases, D2H read section
- UCIe overhead: 1ns -> 8ns per port (16ns per crossing) to fix
  cross-cube-best < cross-half latency inversion
- HBM efficiency: added efficiency=0.8 factor to hbm_ctrl, reducing
  effective BW from 256 to 204.8 GB/s
- Multi-size BW sweep: saturation tables (4KB-1MB) for all probe cases
- Probe default data size: 4KB -> 32KB for more realistic measurements
- IOChiplet NOC + D2H topology and tests
- NOC mesh, xbar, BW occupancy components and tests
- Cube mesh visualization diagram

278 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 01:16:18 -07:00
parent 6f43807900
commit d75da439c6
24 changed files with 3456 additions and 501 deletions
+17 -6
View File
@@ -2,7 +2,7 @@
## Status
Proposed
Accepted
## Context
@@ -43,22 +43,33 @@ Each directed edge (src → dst) results in:
---
### D2. Wire process (propagation delay)
### D2. Wire process (propagation delay + BW occupancy)
For each directed edge (src, dst) in the topology graph, a SimPy wire process
models propagation delay:
models propagation delay and BW occupancy:
```python
def wire_process(env, out_port, in_port, delay_ns):
def wire_process(env, out_port, in_port, delay_ns, bw_gbs):
available_at = 0.0
while True:
cmd = yield out_port.get()
if bw_gbs > 0:
nbytes = getattr(cmd, "nbytes", 0)
if nbytes > 0:
wait = available_at - env.now
if wait > 0:
yield env.timeout(wait)
available_at = env.now + (nbytes / bw_gbs)
yield env.timeout(delay_ns)
yield in_port.put(cmd)
```
Wire processes are started at engine initialization.
BW constraints are enforced by the sending component's out_port capacity or token model,
not by the wire process itself.
Each directed edge maintains an `available_at` timestamp tracking when the link
becomes free for the next transaction. When a transaction occupies a link, the
next transaction on the same directed link must wait until occupancy clears
(back-to-back serialization). TX and RX directions are independent (separate
wire processes with separate `available_at` state).
---
+451
View File
@@ -0,0 +1,451 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1050 980" font-family="monospace">
<title>CUBE Internal Architecture: NOC Router Mesh + Components</title>
<rect width="1050" height="980" rx="8" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1"/>
<text x="525" y="28" text-anchor="middle" font-size="16" font-weight="bold" fill="#1e293b">CUBE INTERNAL ARCHITECTURE</text>
<text x="525" y="46" text-anchor="middle" font-size="11" fill="#64748b">17.0 x 14.0 mm | 6x6 Router Mesh | 8 PEs (~5mm2) | HBM 9x5mm | UCIe N/S/E/W x4</text>
<defs>
<marker id="ah" viewBox="0 0 10 10" refX="10" refY="5" markerWidth="5" markerHeight="5" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" fill="#059669"/>
</marker>
<marker id="ah_orange" viewBox="0 0 10 10" refX="10" refY="5" markerWidth="5" markerHeight="5" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" fill="#ea580c"/>
</marker>
</defs>
<!-- ══ CUBE BOUNDARY ══ -->
<rect x="50" y="62" width="950" height="770" rx="10" fill="none" stroke="#334155" stroke-width="3"/>
<text x="60" y="80" font-size="10" fill="#334155" font-weight="bold">CUBE 17.0 x 14.0 mm</text>
<!-- Grid origin: row/col positions for 6x6 mesh -->
<g transform="translate(180, 170)">
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- NOC 2D MESH — the mesh of routers IS the NOC -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- ══ Row 0 routers ══ -->
<circle cx="0" cy="0" r="16" fill="#3b82f6" stroke="#1d4ed8" stroke-width="2"/>
<text x="0" y="4" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r0c0</text>
<circle cx="140" cy="0" r="16" fill="#3b82f6" stroke="#1d4ed8" stroke-width="2"/>
<text x="140" y="4" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r0c1</text>
<circle cx="280" cy="0" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="280" y="4" text-anchor="middle" font-size="6" fill="#475569">r0c2</text>
<circle cx="420" cy="0" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="420" y="4" text-anchor="middle" font-size="6" fill="#475569">r0c3</text>
<circle cx="560" cy="0" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="560" y="4" text-anchor="middle" font-size="6" fill="#475569">r0c4</text>
<circle cx="700" cy="0" r="16" fill="#8b5cf6" stroke="#6d28d9" stroke-width="2"/>
<text x="700" y="4" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r0c5</text>
<!-- ══ Row 1 routers ══ -->
<circle cx="0" cy="95" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="0" y="99" text-anchor="middle" font-size="6" fill="#475569">r1c0</text>
<circle cx="140" cy="95" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="140" y="99" text-anchor="middle" font-size="6" fill="#475569">r1c1</text>
<circle cx="280" cy="95" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="280" y="99" text-anchor="middle" font-size="6" fill="#475569">r1c2</text>
<circle cx="420" cy="95" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="420" y="99" text-anchor="middle" font-size="6" fill="#475569">r1c3</text>
<circle cx="560" cy="95" r="16" fill="#3b82f6" stroke="#1d4ed8" stroke-width="2"/>
<text x="560" y="99" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r1c4</text>
<circle cx="700" cy="95" r="16" fill="#3b82f6" stroke="#1d4ed8" stroke-width="2"/>
<text x="700" y="99" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r1c5</text>
<!-- ══ Row 2 routers (HBM row, sides only) ══ -->
<circle cx="0" cy="215" r="16" fill="#f59e0b" stroke="#d97706" stroke-width="2"/>
<text x="0" y="219" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r2c0</text>
<circle cx="140" cy="215" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="140" y="219" text-anchor="middle" font-size="6" fill="#475569">r2c1</text>
<!-- r2c2, r2c3 excluded (HBM) -->
<circle cx="560" cy="215" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="560" y="219" text-anchor="middle" font-size="6" fill="#475569">r2c4</text>
<circle cx="700" cy="215" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="700" y="219" text-anchor="middle" font-size="6" fill="#475569">r2c5</text>
<!-- ══ Row 3 routers (HBM row, sides only) ══ -->
<circle cx="0" cy="310" r="16" fill="#f59e0b" stroke="#d97706" stroke-width="2"/>
<text x="0" y="314" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r3c0</text>
<circle cx="140" cy="310" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="140" y="314" text-anchor="middle" font-size="6" fill="#475569">r3c1</text>
<!-- r3c2, r3c3 excluded (HBM) -->
<circle cx="560" cy="310" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="560" y="314" text-anchor="middle" font-size="6" fill="#475569">r3c4</text>
<circle cx="700" cy="310" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="700" y="314" text-anchor="middle" font-size="6" fill="#475569">r3c5</text>
<!-- ══ Row 4 routers ══ -->
<circle cx="0" cy="425" r="16" fill="#3b82f6" stroke="#1d4ed8" stroke-width="2"/>
<text x="0" y="429" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r4c0</text>
<circle cx="140" cy="425" r="16" fill="#3b82f6" stroke="#1d4ed8" stroke-width="2"/>
<text x="140" y="429" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r4c1</text>
<circle cx="280" cy="425" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="280" y="429" text-anchor="middle" font-size="6" fill="#475569">r4c2</text>
<circle cx="420" cy="425" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="420" y="429" text-anchor="middle" font-size="6" fill="#475569">r4c3</text>
<circle cx="560" cy="425" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="560" y="429" text-anchor="middle" font-size="6" fill="#475569">r4c4</text>
<circle cx="700" cy="425" r="16" fill="#8b5cf6" stroke="#6d28d9" stroke-width="2"/>
<text x="700" y="429" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r4c5</text>
<!-- ══ Row 5 routers ══ -->
<circle cx="0" cy="520" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="0" y="524" text-anchor="middle" font-size="6" fill="#475569">r5c0</text>
<circle cx="140" cy="520" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="140" y="524" text-anchor="middle" font-size="6" fill="#475569">r5c1</text>
<circle cx="280" cy="520" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="280" y="524" text-anchor="middle" font-size="6" fill="#475569">r5c2</text>
<circle cx="420" cy="520" r="12" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="420" y="524" text-anchor="middle" font-size="6" fill="#475569">r5c3</text>
<circle cx="560" cy="520" r="16" fill="#3b82f6" stroke="#1d4ed8" stroke-width="2"/>
<text x="560" y="524" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r5c4</text>
<circle cx="700" cy="520" r="16" fill="#3b82f6" stroke="#1d4ed8" stroke-width="2"/>
<text x="700" y="524" text-anchor="middle" font-size="7" fill="white" font-weight="bold">r5c5</text>
<!-- ══ Mesh links (horizontal) ══ -->
<!-- Row 0 -->
<line x1="30" y1="0" x2="110" y2="0" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="170" y1="0" x2="250" y2="0" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="310" y1="0" x2="390" y2="0" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="450" y1="0" x2="530" y2="0" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="590" y1="0" x2="670" y2="0" stroke="#d1d5db" stroke-width="1.5"/>
<!-- Row 1 -->
<line x1="30" y1="95" x2="110" y2="95" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="170" y1="95" x2="250" y2="95" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="310" y1="95" x2="390" y2="95" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="450" y1="95" x2="530" y2="95" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="590" y1="95" x2="670" y2="95" stroke="#d1d5db" stroke-width="1.5"/>
<!-- Row 2 (sides only) -->
<line x1="30" y1="215" x2="110" y2="215" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="590" y1="215" x2="670" y2="215" stroke="#d1d5db" stroke-width="1.5"/>
<!-- Row 3 (sides only) -->
<line x1="30" y1="310" x2="110" y2="310" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="590" y1="310" x2="670" y2="310" stroke="#d1d5db" stroke-width="1.5"/>
<!-- Row 4 -->
<line x1="30" y1="425" x2="110" y2="425" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="170" y1="425" x2="250" y2="425" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="310" y1="425" x2="390" y2="425" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="450" y1="425" x2="530" y2="425" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="590" y1="425" x2="670" y2="425" stroke="#d1d5db" stroke-width="1.5"/>
<!-- Row 5 -->
<line x1="30" y1="520" x2="110" y2="520" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="170" y1="520" x2="250" y2="520" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="310" y1="520" x2="390" y2="520" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="450" y1="520" x2="530" y2="520" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="590" y1="520" x2="670" y2="520" stroke="#d1d5db" stroke-width="1.5"/>
<!-- ══ Mesh links (vertical) ══ -->
<!-- Col 0 -->
<line x1="0" y1="30" x2="0" y2="65" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="0" y1="125" x2="0" y2="185" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="0" y1="245" x2="0" y2="280" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="0" y1="340" x2="0" y2="395" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="0" y1="455" x2="0" y2="490" stroke="#d1d5db" stroke-width="1.5"/>
<!-- Col 1 -->
<line x1="140" y1="30" x2="140" y2="65" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="140" y1="125" x2="140" y2="185" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="140" y1="245" x2="140" y2="280" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="140" y1="340" x2="140" y2="395" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="140" y1="455" x2="140" y2="490" stroke="#d1d5db" stroke-width="1.5"/>
<!-- Col 2 (skip HBM zone) -->
<line x1="280" y1="30" x2="280" y2="65" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="280" y1="455" x2="280" y2="490" stroke="#d1d5db" stroke-width="1.5"/>
<!-- Col 3 (skip HBM zone) -->
<line x1="420" y1="30" x2="420" y2="65" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="420" y1="455" x2="420" y2="490" stroke="#d1d5db" stroke-width="1.5"/>
<!-- Col 4 -->
<line x1="560" y1="30" x2="560" y2="65" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="560" y1="125" x2="560" y2="185" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="560" y1="245" x2="560" y2="280" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="560" y1="340" x2="560" y2="395" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="560" y1="455" x2="560" y2="490" stroke="#d1d5db" stroke-width="1.5"/>
<!-- Col 5 -->
<line x1="700" y1="30" x2="700" y2="65" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="700" y1="125" x2="700" y2="185" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="700" y1="245" x2="700" y2="280" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="700" y1="340" x2="700" y2="395" stroke="#d1d5db" stroke-width="1.5"/>
<line x1="700" y1="455" x2="700" y2="490" stroke="#d1d5db" stroke-width="1.5"/>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- PE routers → XBAR_TOP (90-degree angled paths, no mesh overlap) -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- r0c0(PE0) → XBAR_TOP left edge: down then right -->
<path d="M 0 16 V 156 H 150" fill="none" stroke="#f97316" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#ah_orange)"/>
<!-- r0c1(PE1) → XBAR_TOP left edge: down then right -->
<path d="M 140 16 V 150 H 150" fill="none" stroke="#f97316" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#ah_orange)"/>
<!-- r1c4(PE2) → XBAR_TOP right edge: down then left -->
<path d="M 560 107 V 150 H 550" fill="none" stroke="#f97316" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#ah_orange)"/>
<!-- r1c5(PE3) → XBAR_TOP right edge: down then left -->
<path d="M 700 107 V 156 H 550" fill="none" stroke="#f97316" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#ah_orange)"/>
<!-- ══ XBAR_TOP node ══ -->
<rect x="150" y="145" width="400" height="22" rx="5" fill="#f97316" stroke="#ea580c" stroke-width="2"/>
<text x="350" y="160" text-anchor="middle" font-size="9" fill="white" font-weight="bold">XBAR_TOP | xbar_v1 | 2.0ns</text>
<!-- ══ XBAR_TOP → HBM0-3 arrows (2.5mm) ══ -->
<line x1="225" y1="167" x2="225" y2="198" stroke="#059669" stroke-width="1.5" marker-end="url(#ah)"/>
<line x1="320" y1="167" x2="320" y2="198" stroke="#059669" stroke-width="1.5" marker-end="url(#ah)"/>
<line x1="415" y1="167" x2="415" y2="198" stroke="#059669" stroke-width="1.5" marker-end="url(#ah)"/>
<line x1="475" y1="167" x2="475" y2="198" stroke="#059669" stroke-width="1.5" marker-end="url(#ah)"/>
<text x="510" y="190" font-size="6" fill="#059669">2.5mm each</text>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- HBM ZONE — 9.0 x 5.0 mm, 8 independent controllers -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<rect x="145" y="195" width="410" height="152" rx="8" fill="#f0fdf4" stroke="#047857" stroke-width="2"/>
<text x="350" y="211" text-anchor="middle" font-size="9" fill="#047857" font-weight="bold">HBM 9.0 x 5.0 mm | hbm_ctrl_v1 x 8</text>
<!-- HBM0-3 (top half, XBAR_TOP serves) -->
<rect x="168" y="218" width="85" height="28" rx="4" fill="#047857" stroke="#065f46" stroke-width="1.5"/>
<text x="210" y="236" text-anchor="middle" font-size="8" fill="white" font-weight="bold">HBM0</text>
<rect x="260" y="218" width="85" height="28" rx="4" fill="#047857" stroke="#065f46" stroke-width="1.5"/>
<text x="302" y="236" text-anchor="middle" font-size="8" fill="white" font-weight="bold">HBM1</text>
<rect x="352" y="218" width="85" height="28" rx="4" fill="#047857" stroke="#065f46" stroke-width="1.5"/>
<text x="394" y="236" text-anchor="middle" font-size="8" fill="white" font-weight="bold">HBM2</text>
<rect x="444" y="218" width="85" height="28" rx="4" fill="#047857" stroke="#065f46" stroke-width="1.5"/>
<text x="486" y="236" text-anchor="middle" font-size="8" fill="white" font-weight="bold">HBM3</text>
<!-- Exclusion zone label -->
<text x="350" y="270" text-anchor="middle" font-size="7" fill="#ef4444">Router exclusion: r2c2, r2c3, r3c2, r3c3</text>
<!-- HBM4-7 (bottom half, XBAR_BOT serves) -->
<rect x="168" y="282" width="85" height="28" rx="4" fill="#065f46" stroke="#064e3b" stroke-width="1.5"/>
<text x="210" y="300" text-anchor="middle" font-size="8" fill="white" font-weight="bold">HBM4</text>
<rect x="260" y="282" width="85" height="28" rx="4" fill="#065f46" stroke="#064e3b" stroke-width="1.5"/>
<text x="302" y="300" text-anchor="middle" font-size="8" fill="white" font-weight="bold">HBM5</text>
<rect x="352" y="282" width="85" height="28" rx="4" fill="#065f46" stroke="#064e3b" stroke-width="1.5"/>
<text x="394" y="300" text-anchor="middle" font-size="8" fill="white" font-weight="bold">HBM6</text>
<rect x="444" y="282" width="85" height="28" rx="4" fill="#065f46" stroke="#064e3b" stroke-width="1.5"/>
<text x="486" y="300" text-anchor="middle" font-size="8" fill="white" font-weight="bold">HBM7</text>
<!-- ══ XBAR_BOT → HBM4-7 arrows (2.5mm) ══ -->
<line x1="225" y1="373" x2="225" y2="315" stroke="#059669" stroke-width="1.5" marker-end="url(#ah)"/>
<line x1="320" y1="373" x2="320" y2="315" stroke="#059669" stroke-width="1.5" marker-end="url(#ah)"/>
<line x1="415" y1="373" x2="415" y2="315" stroke="#059669" stroke-width="1.5" marker-end="url(#ah)"/>
<line x1="475" y1="373" x2="475" y2="315" stroke="#059669" stroke-width="1.5" marker-end="url(#ah)"/>
<text x="510" y="350" font-size="6" fill="#059669">2.5mm each</text>
<!-- ══ XBAR_BOT node ══ -->
<rect x="150" y="355" width="400" height="22" rx="5" fill="#f97316" stroke="#ea580c" stroke-width="2"/>
<text x="350" y="370" text-anchor="middle" font-size="9" fill="white" font-weight="bold">XBAR_BOT | xbar_v1 | 2.0ns</text>
<!-- PE routers → XBAR_BOT (90-degree angled paths, no mesh overlap) -->
<!-- r4c0(PE4) → XBAR_BOT left edge: up then right -->
<path d="M 0 409 V 366 H 150" fill="none" stroke="#f97316" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#ah_orange)"/>
<!-- r4c1(PE5) → XBAR_BOT left edge: up then right -->
<path d="M 140 409 V 360 H 150" fill="none" stroke="#f97316" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#ah_orange)"/>
<!-- r5c4(PE6) → XBAR_BOT right edge: up then left -->
<path d="M 560 508 V 360 H 550" fill="none" stroke="#f97316" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#ah_orange)"/>
<!-- r5c5(PE7) → XBAR_BOT right edge: up then left -->
<path d="M 700 508 V 366 H 550" fill="none" stroke="#f97316" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#ah_orange)"/>
<!-- ══ XBAR Bridge connections: XBAR_TOP ↔ XBAR BRG ↔ XBAR_BOT ══ -->
<!-- XBAR BRG LEFT (outside HBM, left side) -->
<line x1="100" y1="160" x2="100" y2="370" stroke="#a78bfa" stroke-width="2.5" stroke-dasharray="8,4"/>
<!-- Horizontal connector: BRG LEFT → XBAR_TOP left edge -->
<line x1="100" y1="156" x2="150" y2="156" stroke="#a78bfa" stroke-width="2" stroke-dasharray="6,3"/>
<!-- Horizontal connector: BRG LEFT → XBAR_BOT left edge -->
<line x1="100" y1="366" x2="150" y2="366" stroke="#a78bfa" stroke-width="2" stroke-dasharray="6,3"/>
<rect x="72" y="248" width="56" height="30" rx="4" fill="#ede9fe" stroke="#a78bfa" stroke-width="1.5"/>
<text x="100" y="259" text-anchor="middle" font-size="6" fill="#7c3aed" font-weight="bold">XBAR BRG</text>
<text x="100" y="272" text-anchor="middle" font-size="7" fill="#7c3aed" font-weight="bold">LEFT</text>
<text x="60" y="263" text-anchor="end" font-size="6" fill="#7c3aed">3mm</text>
<!-- XBAR BRG RIGHT (outside HBM, right side) -->
<line x1="600" y1="160" x2="600" y2="370" stroke="#a78bfa" stroke-width="2.5" stroke-dasharray="8,4"/>
<!-- Horizontal connector: BRG RIGHT → XBAR_TOP right edge -->
<line x1="600" y1="156" x2="550" y2="156" stroke="#a78bfa" stroke-width="2" stroke-dasharray="6,3"/>
<!-- Horizontal connector: BRG RIGHT → XBAR_BOT right edge -->
<line x1="600" y1="366" x2="550" y2="366" stroke="#a78bfa" stroke-width="2" stroke-dasharray="6,3"/>
<rect x="572" y="248" width="56" height="30" rx="4" fill="#ede9fe" stroke="#a78bfa" stroke-width="1.5"/>
<text x="600" y="259" text-anchor="middle" font-size="6" fill="#7c3aed" font-weight="bold">XBAR BRG</text>
<text x="600" y="272" text-anchor="middle" font-size="7" fill="#7c3aed" font-weight="bold">RIGHT</text>
<text x="640" y="263" font-size="6" fill="#7c3aed">3mm</text>
<!-- ══ M_CPU (r2c0) and SRAM (r3c0) ══ -->
<rect x="-42" y="233" width="84" height="18" rx="4" fill="#f59e0b" stroke="#d97706" stroke-width="1.5"/>
<text x="0" y="246" text-anchor="middle" font-size="8" fill="white" font-weight="bold">M_CPU</text>
<rect x="-42" y="322" width="84" height="18" rx="4" fill="#f59e0b" stroke="#d97706" stroke-width="1.5"/>
<text x="0" y="335" text-anchor="middle" font-size="8" fill="white" font-weight="bold">SRAM</text>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- PEs at physical corner positions (~5mm2 blocks) with wire -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- PE0 (NW) → r0c0: 0mm -->
<rect x="-42" y="-62" width="84" height="40" rx="6" fill="#ef4444" stroke="#dc2626" stroke-width="1.5"/>
<text x="0" y="-42" text-anchor="middle" font-size="9" fill="white" font-weight="bold">PE0</text>
<text x="0" y="-32" text-anchor="middle" font-size="7" fill="#fecaca">NW · 0mm</text>
<line x1="0" y1="-22" x2="0" y2="-16" stroke="#ef4444" stroke-width="2"/>
<!-- PE1 (NW) → r0c1: 0mm -->
<rect x="98" y="-62" width="84" height="40" rx="6" fill="#ef4444" stroke="#dc2626" stroke-width="1.5"/>
<text x="140" y="-42" text-anchor="middle" font-size="9" fill="white" font-weight="bold">PE1</text>
<text x="140" y="-32" text-anchor="middle" font-size="7" fill="#fecaca">NW · 0mm</text>
<line x1="140" y1="-22" x2="140" y2="-16" stroke="#ef4444" stroke-width="2"/>
<!-- PE2 (NE) physical top → r1c4: 4.0mm wire -->
<rect x="518" y="-62" width="84" height="40" rx="6" fill="#ef4444" stroke="#dc2626" stroke-width="1.5"/>
<text x="560" y="-42" text-anchor="middle" font-size="9" fill="white" font-weight="bold">PE2</text>
<text x="560" y="-32" text-anchor="middle" font-size="7" fill="#fecaca">NE · 4.0mm</text>
<line x1="560" y1="-22" x2="560" y2="79" stroke="#ef4444" stroke-width="2" stroke-dasharray="5,3"/>
<text x="572" y="30" font-size="7" fill="#dc2626" font-weight="bold">4mm</text>
<!-- PE3 (NE) physical top → r1c5: 4.0mm wire -->
<rect x="658" y="-62" width="84" height="40" rx="6" fill="#ef4444" stroke="#dc2626" stroke-width="1.5"/>
<text x="700" y="-42" text-anchor="middle" font-size="9" fill="white" font-weight="bold">PE3</text>
<text x="700" y="-32" text-anchor="middle" font-size="7" fill="#fecaca">NE · 4.0mm</text>
<line x1="700" y1="-22" x2="700" y2="79" stroke="#ef4444" stroke-width="2" stroke-dasharray="5,3"/>
<text x="712" y="30" font-size="7" fill="#dc2626" font-weight="bold">4mm</text>
<!-- PE4 (SW) physical bottom → r4c0: 4.0mm wire -->
<rect x="-42" y="556" width="84" height="40" rx="6" fill="#ef4444" stroke="#dc2626" stroke-width="1.5"/>
<text x="0" y="576" text-anchor="middle" font-size="9" fill="white" font-weight="bold">PE4</text>
<text x="0" y="586" text-anchor="middle" font-size="7" fill="#fecaca">SW · 4.0mm</text>
<line x1="0" y1="556" x2="0" y2="441" stroke="#ef4444" stroke-width="2" stroke-dasharray="5,3"/>
<text x="12" y="500" font-size="7" fill="#dc2626" font-weight="bold">4mm</text>
<!-- PE5 (SW) physical bottom → r4c1: 4.0mm wire -->
<rect x="98" y="556" width="84" height="40" rx="6" fill="#ef4444" stroke="#dc2626" stroke-width="1.5"/>
<text x="140" y="576" text-anchor="middle" font-size="9" fill="white" font-weight="bold">PE5</text>
<text x="140" y="586" text-anchor="middle" font-size="7" fill="#fecaca">SW · 4.0mm</text>
<line x1="140" y1="556" x2="140" y2="441" stroke="#ef4444" stroke-width="2" stroke-dasharray="5,3"/>
<text x="152" y="500" font-size="7" fill="#dc2626" font-weight="bold">4mm</text>
<!-- PE6 (SE) → r5c4: 0mm -->
<rect x="518" y="556" width="84" height="40" rx="6" fill="#ef4444" stroke="#dc2626" stroke-width="1.5"/>
<text x="560" y="576" text-anchor="middle" font-size="9" fill="white" font-weight="bold">PE6</text>
<text x="560" y="586" text-anchor="middle" font-size="7" fill="#fecaca">SE · 0mm</text>
<line x1="560" y1="556" x2="560" y2="536" stroke="#ef4444" stroke-width="2"/>
<!-- PE7 (SE) → r5c5: 0mm -->
<rect x="658" y="556" width="84" height="40" rx="6" fill="#ef4444" stroke="#dc2626" stroke-width="1.5"/>
<text x="700" y="576" text-anchor="middle" font-size="9" fill="white" font-weight="bold">PE7</text>
<text x="700" y="586" text-anchor="middle" font-size="7" fill="#fecaca">SE · 0mm</text>
<line x1="700" y1="556" x2="700" y2="536" stroke="#ef4444" stroke-width="2"/>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- UCIe-E: c0→r0c5, c1→r1c5, c2→r4c5, c3→r5c5 -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<rect x="762" y="225" width="52" height="110" rx="5" fill="#ede9fe" stroke="#8b5cf6" stroke-width="1.5"/>
<text x="788" y="242" text-anchor="middle" font-size="8" fill="#6d28d9" font-weight="bold">UCIe-E</text>
<rect x="768" y="250" width="40" height="14" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="788" y="260" text-anchor="middle" font-size="6" fill="white">c0</text>
<rect x="768" y="268" width="40" height="14" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="788" y="278" text-anchor="middle" font-size="6" fill="white">c1</text>
<rect x="768" y="286" width="40" height="14" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="788" y="296" text-anchor="middle" font-size="6" fill="white">c2</text>
<rect x="768" y="304" width="40" height="14" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="788" y="314" text-anchor="middle" font-size="6" fill="white">c3</text>
<!-- E conn lines (90-degree, spaced vertical segments + stub into router) -->
<!-- c0→r0c5: up far, outer track x=742 -->
<path d="M 768 257 H 742 V 0 H 716" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<!-- c1→r1c5: up near, inner track x=730 -->
<path d="M 768 275 H 730 V 95 H 716" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<!-- c2→r4c5: down near, inner track x=730 -->
<path d="M 768 293 H 730 V 425 H 716" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<!-- c3→r5c5: down far, outer track x=742 -->
<path d="M 768 311 H 742 V 520 H 716" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- UCIe-W: c0→r0c0, c1→r1c0, c2→r4c0, c3→r5c0 -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<rect x="-124" y="225" width="52" height="110" rx="5" fill="#ede9fe" stroke="#8b5cf6" stroke-width="1.5"/>
<text x="-98" y="242" text-anchor="middle" font-size="8" fill="#6d28d9" font-weight="bold">UCIe-W</text>
<rect x="-118" y="250" width="40" height="14" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="-98" y="260" text-anchor="middle" font-size="6" fill="white">c0</text>
<rect x="-118" y="268" width="40" height="14" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="-98" y="278" text-anchor="middle" font-size="6" fill="white">c1</text>
<rect x="-118" y="286" width="40" height="14" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="-98" y="296" text-anchor="middle" font-size="6" fill="white">c2</text>
<rect x="-118" y="304" width="40" height="14" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="-98" y="314" text-anchor="middle" font-size="6" fill="white">c3</text>
<!-- W conn lines (90-degree, spaced vertical segments + stub into router) -->
<!-- c0→r0c0: up far, outer track x=-42 -->
<path d="M -72 257 H -42 V 0 H -16" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<!-- c1→r1c0: up near, inner track x=-30 -->
<path d="M -72 275 H -30 V 95 H -16" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<!-- c2→r4c0: down near, inner track x=-30 -->
<path d="M -72 293 H -30 V 425 H -16" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<!-- c3→r5c0: down far, outer track x=-42 -->
<path d="M -72 311 H -42 V 520 H -16" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- UCIe-N: c0→r0c0, c1→r0c1, c2→r0c4, c3→r0c5 -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<rect x="210" y="-108" width="280" height="26" rx="5" fill="#ede9fe" stroke="#8b5cf6" stroke-width="1.5"/>
<text x="240" y="-92" font-size="8" fill="#6d28d9" font-weight="bold">UCIe-N</text>
<rect x="310" y="-104" width="32" height="16" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="326" y="-93" text-anchor="middle" font-size="6" fill="white">c0</text>
<rect x="348" y="-104" width="32" height="16" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="364" y="-93" text-anchor="middle" font-size="6" fill="white">c1</text>
<rect x="396" y="-104" width="32" height="16" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="412" y="-93" text-anchor="middle" font-size="6" fill="white">c2</text>
<rect x="440" y="-104" width="32" height="16" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="456" y="-93" text-anchor="middle" font-size="6" fill="white">c3</text>
<!-- N conn lines (90-degree) -->
<path d="M 326 -82 V -50 H 0 V -16" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<path d="M 364 -82 V -44 H 140 V -16" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<path d="M 412 -82 V -44 H 560 V -14" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<path d="M 456 -82 V -50 H 700 V -16" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- UCIe-S: c0→r5c0, c1→r5c1, c2→r5c4, c3→r5c5 -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<rect x="210" y="636" width="280" height="26" rx="5" fill="#ede9fe" stroke="#8b5cf6" stroke-width="1.5"/>
<text x="240" y="652" font-size="8" fill="#6d28d9" font-weight="bold">UCIe-S</text>
<rect x="310" y="640" width="32" height="16" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="326" y="651" text-anchor="middle" font-size="6" fill="white">c0</text>
<rect x="348" y="640" width="32" height="16" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="364" y="651" text-anchor="middle" font-size="6" fill="white">c1</text>
<rect x="396" y="640" width="32" height="16" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="412" y="651" text-anchor="middle" font-size="6" fill="white">c2</text>
<rect x="440" y="640" width="32" height="16" rx="2" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1"/>
<text x="456" y="651" text-anchor="middle" font-size="6" fill="white">c3</text>
<!-- S conn lines (90-degree) -->
<path d="M 326 636 V 572 H 0 V 536" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<path d="M 364 636 V 566 H 140 V 536" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<path d="M 412 636 V 566 H 560 V 536" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
<path d="M 456 636 V 572 H 700 V 536" fill="none" stroke="#8b5cf6" stroke-width="1.2" stroke-dasharray="4,3"/>
</g>
<!-- ══ Legend ══ -->
<g transform="translate(60, 890)">
<text x="0" y="0" font-size="11" font-weight="bold" fill="#1e293b">Legend</text>
<circle cx="10" cy="20" r="7" fill="#3b82f6" stroke="#1d4ed8" stroke-width="1.5"/>
<text x="22" y="24" font-size="8" fill="#475569">PE Router</text>
<circle cx="105" cy="20" r="7" fill="#e2e8f0" stroke="#94a3b8" stroke-width="1.5"/>
<text x="117" y="24" font-size="8" fill="#475569">Relay</text>
<circle cx="170" cy="20" r="7" fill="#8b5cf6" stroke="#6d28d9" stroke-width="1.5"/>
<text x="182" y="24" font-size="8" fill="#475569">UCIe Router</text>
<circle cx="260" cy="20" r="7" fill="#f59e0b" stroke="#d97706" stroke-width="1.5"/>
<text x="272" y="24" font-size="8" fill="#475569">M_CPU/SRAM</text>
<line x1="365" y1="20" x2="390" y2="20" stroke="#d1d5db" stroke-width="1.5"/>
<text x="395" y="24" font-size="8" fill="#475569">Mesh Link</text>
<line x1="465" y1="20" x2="490" y2="20" stroke="#a78bfa" stroke-width="2.5" stroke-dasharray="8,4"/>
<text x="495" y="24" font-size="8" fill="#475569">Bridge</text>
<rect x="545" y="13" width="30" height="12" rx="3" fill="#f97316" stroke="#ea580c" stroke-width="1"/>
<text x="580" y="24" font-size="8" fill="#475569">XBAR</text>
<rect x="615" y="13" width="30" height="12" rx="3" fill="#047857" stroke="#065f46" stroke-width="1"/>
<text x="650" y="24" font-size="8" fill="#475569">HBM Ctrl</text>
<rect x="720" y="13" width="30" height="12" rx="3" fill="#ef4444" stroke="#dc2626" stroke-width="1"/>
<text x="755" y="24" font-size="8" fill="#475569">PE (~5mm2)</text>
<rect x="820" y="13" width="30" height="12" rx="3" fill="#ede9fe" stroke="#8b5cf6" stroke-width="1.5"/>
<text x="855" y="24" font-size="8" fill="#475569">UCIe Port</text>
<!-- Data path -->
<text x="0" y="48" font-size="7" fill="#64748b">Data path: PE_DMA --(wire)--> NOC (router mesh) --(0mm)--> XBAR_TOP/BOT --(2.5mm)--> HBM_CTRL</text>
<text x="0" y="58" font-size="7" fill="#64748b">Cross-half: NOC -> XBAR_TOP -> Bridge(3mm) -> XBAR_BOT -> HBM4-7 (routing_weight=100mm penalty steers Dijkstra)</text>
<text x="0" y="72" font-size="7" fill="#dc2626">PE wire distance: NW/SE = 0mm (co-located with router), NE/SW = 4.0mm (auto-computed from physical position)</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 36 KiB

+2 -2
View File
@@ -44,9 +44,9 @@ This models arbitration, protocol processing, pipeline stages, etc.
| fabric switch | 5.0 | Packet arbitration |
| xbar | 2.0 | Crossbar arbitration |
| xbar bridge | 1.0 | Bridge traversal between xbar halves |
| ucie | 1.0 | UCIe protocol overhead per port |
| ucie | 8.0 | UCIe protocol overhead per port (TX or RX; 16ns per crossing) |
| noc (2D mesh) | 0.0 | Hop delay modeled internally via manhattan distance |
| hbm_ctrl | 0.0 | Access time captured in drain_ns |
| hbm_ctrl | 0.0 | Access time via drain_ns; efficiency=0.8 reduces edge BW (256→204.8) |
| pe_cpu | 2.0 | Command dispatch |
| pe_scheduler | 1.0 | PE-internal scheduling |
| pe_gemm/math | 0.0 | Placeholder; will use flops-based model |