v1.3.0: 修复pinmap_layout周长公式,新增PinList→PinMAP反向转换完整支持
This commit is contained in:
@@ -115,7 +115,7 @@ def validate_pinlist_for_map(
|
||||
1. **Continuity** — pin numbers must start from 1 with no gaps.
|
||||
2. **Uniqueness** — no duplicate pin numbers.
|
||||
3. **Perimeter match** — total pin count must equal
|
||||
2×rows + 2×cols − 4 (the grid perimeter).
|
||||
(rows + cols) × 2 (the grid perimeter).
|
||||
4. **Non-multiple-of-4** — if pin count is not a multiple of 4,
|
||||
a warning is issued (but conversion is not blocked).
|
||||
|
||||
@@ -158,7 +158,8 @@ def validate_pinlist_for_map(
|
||||
))
|
||||
|
||||
# ── 3. Perimeter match ───────────────────────────────────────
|
||||
expected_total = 2 * rows + 2 * cols - 4
|
||||
# 周长公式:(rows + cols) * 2
|
||||
expected_total = (rows + cols) * 2
|
||||
actual_total = len(entries)
|
||||
if actual_total != expected_total:
|
||||
result.errors.append(ValidationError(
|
||||
|
||||
Reference in New Issue
Block a user