M_CPU/SRAM placement via pos_mm in topology.yaml (nearest router)

Component placement uses mm coordinates in topology.yaml, mesh_gen
finds the nearest router automatically. M_CPU moved to pos_mm=[7.5,2.0]
(→ r0c2), SRAM at pos_mm=[1.5,9.0] (→ r3c0).

No hardcoded router references in topology config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 00:48:20 -07:00
parent 3ea4fa90f8
commit 7640635f90
4 changed files with 38 additions and 16 deletions
+6 -6
View File
@@ -158,9 +158,9 @@ def test_pe_dma_to_router():
def test_command_path_m_cpu_router_pe_cpu():
es = _edge_set(_graph())
cp = "sip0.cube0"
# m_cpu <-> r2c0 (bidirectional command)
assert (f"{cp}.m_cpu", f"{cp}.r2c0") in es
assert (f"{cp}.r2c0", f"{cp}.m_cpu") in es
# m_cpu <-> r0c2 (bidirectional command)
assert (f"{cp}.m_cpu", f"{cp}.r0c2") in es
assert (f"{cp}.r0c2", f"{cp}.m_cpu") in es
# router -> pe_cpu for each PE (command kind)
assert (f"{cp}.r0c0", f"{cp}.pe0.pe_cpu") in es
assert (f"{cp}.r5c5", f"{cp}.pe7.pe_cpu") in es
@@ -416,8 +416,8 @@ def test_cube_view_hbm_router():
def test_cube_view_m_cpu_router():
"""Cube view: m_cpu connects to its router r2c0."""
"""Cube view: m_cpu connects to its router r0c2."""
v = _graph().cube_view
ves = {(e.src, e.dst) for e in v.edges}
assert ("m_cpu", "r2c0") in ves
assert ("r2c0", "m_cpu") in ves
assert ("m_cpu", "r0c2") in ves
assert ("r0c2", "m_cpu") in ves