Offset PE nodes in cube_view to avoid overlapping routers
PE nodes are shifted 1.2mm above (top half) or below (bottom half) their assigned router position. PE size reduced to 1.4x0.7mm. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -946,13 +946,17 @@ def _build_cube_view(spec: dict) -> ViewGraph:
|
||||
) if mesh_data else {}
|
||||
|
||||
pe_idx = 0
|
||||
pe_offset_y = 1.2 # mm offset to avoid overlapping router node
|
||||
for corner in corners:
|
||||
is_top = corner in ("NW", "NE")
|
||||
for ci in range(pe_per_corner):
|
||||
pid = f"pe{pe_idx}"
|
||||
px, py = corner_pos[corner][ci]
|
||||
# Offset PE above (top) or below (bottom) its router
|
||||
py_view = py - pe_offset_y if is_top else py + pe_offset_y
|
||||
nodes[pid] = Node(
|
||||
id=pid, kind="pe", impl="",
|
||||
attrs={"corner": corner}, pos_mm=(px, py),
|
||||
attrs={"corner": corner}, pos_mm=(px, py_view),
|
||||
label=f"PE{pe_idx}",
|
||||
)
|
||||
pe_idx += 1
|
||||
|
||||
@@ -157,7 +157,7 @@ def _compute_node_sizes(
|
||||
w_mm, h_mm = _KIND_SIZE.get(node.kind, (_DEFAULT_NODE_W, _DEFAULT_NODE_H))
|
||||
# For cube view, use smaller PE nodes
|
||||
if view.name == "cube" and node.kind == "pe":
|
||||
w_mm, h_mm = 1.8, 1.0
|
||||
w_mm, h_mm = 1.4, 0.7
|
||||
if view.name == "pe":
|
||||
w_mm, h_mm = 2.5, 1.4
|
||||
sizes[nid] = (w_mm * scale, h_mm * scale)
|
||||
|
||||
Reference in New Issue
Block a user