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
+27 -21
View File
@@ -75,58 +75,60 @@ def test_resolve_nonexistent_node():
def test_path_local_hbm_same_half():
"""PE0 -> slice0 (local): pe_dma -> xbar.pe0 -> hbm_ctrl.slice0 (no chain hops)."""
"""PE0 -> slice0 (local): pe_dma -> noc -> xbar_top -> hbm_ctrl.slice0."""
g = _graph()
router = PathRouter(g)
path = router.find_path("sip0.cube0.pe0", "sip0.cube0.hbm_ctrl.slice0")
assert path[0] == "sip0.cube0.pe0.pe_dma"
assert "sip0.cube0.xbar.pe0" in path
assert "sip0.cube0.noc" in path
assert "sip0.cube0.xbar_top" in path
assert path[-1] == "sip0.cube0.hbm_ctrl.slice0"
# local access: no bridge and no chain traversal (shortest path = 3 nodes)
assert not any("bridge" in n for n in path)
assert len(path) == 3 # pe_dma → xbar.pe0 → slice0
assert len(path) == 4 # pe_dma → noc → xbar_top → slice0
# ── PathRouter: same-half remote HBM ────────────────────────────────
def test_path_same_half_remote_hbm():
"""PE0 -> slice1: same-half chain traversal pe0→pe1, no bridge."""
"""PE0 -> slice1: same-half via noc → xbar_top, no bridge."""
g = _graph()
router = PathRouter(g)
path = router.find_path("sip0.cube0.pe0", "sip0.cube0.hbm_ctrl.slice1")
assert path[0] == "sip0.cube0.pe0.pe_dma"
assert "sip0.cube0.xbar.pe0" in path # enter at pe0
assert "sip0.cube0.xbar.pe1" in path # chain hop to pe1
assert "sip0.cube0.noc" in path
assert "sip0.cube0.xbar_top" in path
assert path[-1] == "sip0.cube0.hbm_ctrl.slice1"
assert not any("bridge" in n for n in path)
assert len(path) == 4 # pe_dma → xbar.pe0 → xbar.pe1 → slice1
assert len(path) == 4 # pe_dma → noc → xbar_top → slice1
# ── PathRouter: cross-half HBM ──────────────────────────────────────
def test_path_cross_half_hbm():
"""PE0 -> slice4 (cross-half): pe_dma → xbar.pe0 → bridge.left → xbar.pe4 → slice4."""
"""PE0 -> slice4 (cross-half): pe_dma → noc → xbar_top → bridge → xbar_bot → slice4."""
g = _graph()
router = PathRouter(g)
path = router.find_path("sip0.cube0.pe0", "sip0.cube0.hbm_ctrl.slice4")
assert path[0] == "sip0.cube0.pe0.pe_dma"
assert "sip0.cube0.xbar.pe0" in path
assert "sip0.cube0.xbar_top" in path
assert any("bridge" in n for n in path), "cross-half HBM must traverse bridge"
assert "sip0.cube0.xbar.pe4" in path
assert "sip0.cube0.xbar_bot" in path
assert path[-1] == "sip0.cube0.hbm_ctrl.slice4"
# Shortest cross-half path: pe_dma → xbar.pe0 → bridge.left → xbar.pe4 → slice4
assert len(path) == 5
assert len(path) == 6 # pe_dma → noc → xbar_top → bridge → xbar_bot → slice4
def test_path_cross_half_requires_bridge():
"""PE4 (bottom) -> slice2 (top) requires bridge traversal."""
def test_path_cross_half_via_xbar_top():
"""PE4 (bottom) -> slice2 (top) goes through xbar_top via NOC.
NOC connects directly to xbar_top (low routing weight), so
bottom PEs access top-half HBM through noc → xbar_top.
"""
g = _graph()
router = PathRouter(g)
path = router.find_path("sip0.cube0.pe4", "sip0.cube0.hbm_ctrl.slice2")
assert any("bridge" in n for n in path), "cross-half HBM must traverse bridge"
assert any("xbar.pe" in n for n in path)
assert "sip0.cube0.xbar_top" in path
assert path[-1] == "sip0.cube0.hbm_ctrl.slice2"
@@ -141,16 +143,20 @@ def test_cross_half_distance_greater():
assert dist_cross > dist_local
def test_path_same_half_remote_longer():
"""Same-half remote HBM (PE0->slice3) has greater distance than local (PE0->slice0)."""
def test_path_same_half_same_distance():
"""Same-half HBM slices (PE0->slice0 vs PE0->slice3) have same distance.
With xbar_top/bot, all top-half slices are equidistant via noc → xbar_top.
"""
g = _graph()
router = PathRouter(g)
_, dist_local = router.find_path_with_distance(
"sip0.cube0.pe0", "sip0.cube0.hbm_ctrl.slice0")
_, dist_remote = router.find_path_with_distance(
"sip0.cube0.pe0", "sip0.cube0.hbm_ctrl.slice3")
assert dist_remote > dist_local, (
f"same-half remote ({dist_remote:.2f}mm) must > local ({dist_local:.2f}mm)"
assert dist_remote == dist_local, (
f"same-half slices should have equal distance: "
f"slice0={dist_local:.2f}mm, slice3={dist_remote:.2f}mm"
)