Cube-view: UCIe components inside cube boundary with port boxes
- UCIe-N/S/E/W drawn as component blocks inside cube boundary (inset 3mm from edge) - Each UCIe has c0-c3 connection ports as color-coded boxes inside - Connector lines from each port box to its attached router - Removed old UCIe rendering that placed blocks outside cube Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+82
-74
@@ -133,45 +133,24 @@
|
|||||||
<line x1="685" y1="685" x2="835" y2="685" stroke="#475569" stroke-width="1" opacity="0.4"/>
|
<line x1="685" y1="685" x2="835" y2="685" stroke="#475569" stroke-width="1" opacity="0.4"/>
|
||||||
<circle cx="135" cy="135" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="135" cy="135" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="135" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c0</text>
|
<text x="135" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c0</text>
|
||||||
<rect x="83" y="107" width="32" height="16" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
<rect x="119" y="107" width="32" height="16" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
||||||
<text x="99" y="118" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE0</text>
|
<text x="135" y="118" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE0</text>
|
||||||
<line x1="99" y1="123" x2="135" y2="127" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
<line x1="135" y1="123" x2="135" y2="127" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
||||||
<rect x="38" y="130" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="49" y="138" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-W.c0</text>
|
|
||||||
<line x1="60" y1="135" x2="127" y2="135" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<rect x="124" y="50" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="135" y="58" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-N.c0</text>
|
|
||||||
<line x1="135" y1="60" x2="135" y2="127" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="285" cy="135" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="285" cy="135" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="285" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c1</text>
|
<text x="285" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c1</text>
|
||||||
<rect x="261" y="113" width="22" height="10" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
<rect x="269" y="107" width="32" height="16" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
||||||
<text x="272" y="121" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE1</text>
|
<text x="285" y="118" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE1</text>
|
||||||
<line x1="272" y1="123" x2="285" y2="127" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
<line x1="285" y1="123" x2="285" y2="127" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
||||||
<rect x="274" y="50" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="285" y="58" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-N.c1</text>
|
|
||||||
<line x1="285" y1="60" x2="285" y2="127" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="435" cy="135" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
<circle cx="435" cy="135" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
||||||
<text x="435" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c2</text>
|
<text x="435" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c2</text>
|
||||||
<circle cx="585" cy="135" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
<circle cx="585" cy="135" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
||||||
<text x="585" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c3</text>
|
<text x="585" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c3</text>
|
||||||
<circle cx="685" cy="135" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="685" cy="135" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="685" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c4</text>
|
<text x="685" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c4</text>
|
||||||
<rect x="674" y="50" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="685" y="58" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-N.c2</text>
|
|
||||||
<line x1="685" y1="60" x2="685" y2="127" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="835" cy="135" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="835" cy="135" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="835" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c5</text>
|
<text x="835" y="138" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r0c5</text>
|
||||||
<rect x="910" y="130" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="921" y="138" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-E.c0</text>
|
|
||||||
<line x1="910" y1="135" x2="843" y2="135" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<rect x="824" y="50" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="835" y="58" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-N.c3</text>
|
|
||||||
<line x1="835" y1="60" x2="835" y2="127" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="135" cy="260" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="135" cy="260" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="135" y="263" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r1c0</text>
|
<text x="135" y="263" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r1c0</text>
|
||||||
<rect x="38" y="255" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="49" y="263" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-W.c1</text>
|
|
||||||
<line x1="60" y1="260" x2="127" y2="260" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="285" cy="260" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
<circle cx="285" cy="260" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
||||||
<text x="285" y="263" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r1c1</text>
|
<text x="285" y="263" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r1c1</text>
|
||||||
<circle cx="435" cy="260" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
<circle cx="435" cy="260" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
||||||
@@ -180,21 +159,18 @@
|
|||||||
<text x="585" y="263" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r1c3</text>
|
<text x="585" y="263" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r1c3</text>
|
||||||
<circle cx="685" cy="260" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="685" cy="260" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="685" y="263" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r1c4</text>
|
<text x="685" y="263" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r1c4</text>
|
||||||
<rect x="674" y="238" width="22" height="10" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
<rect x="669" y="232" width="32" height="16" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
||||||
<text x="685" y="246" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE2</text>
|
<text x="685" y="243" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE2</text>
|
||||||
<line x1="685" y1="248" x2="685" y2="252" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
<line x1="685" y1="248" x2="685" y2="252" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
||||||
<circle cx="835" cy="260" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="835" cy="260" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="835" y="263" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r1c5</text>
|
<text x="835" y="263" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r1c5</text>
|
||||||
<rect x="811" y="238" width="22" height="10" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
<rect x="819" y="232" width="32" height="16" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
||||||
<text x="822" y="246" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE3</text>
|
<text x="835" y="243" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE3</text>
|
||||||
<line x1="822" y1="248" x2="835" y2="252" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
<line x1="835" y1="248" x2="835" y2="252" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
||||||
<rect x="910" y="255" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="921" y="263" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-E.c1</text>
|
|
||||||
<line x1="910" y1="260" x2="843" y2="260" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="135" cy="335" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="135" cy="335" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="135" y="338" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r2c0</text>
|
<text x="135" y="338" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r2c0</text>
|
||||||
<rect x="99" y="330" width="22" height="10" rx="3" fill="#451a03" stroke="#f59e0b" stroke-width="1"/>
|
<rect x="89" y="327" width="32" height="16" rx="3" fill="#451a03" stroke="#f59e0b" stroke-width="1"/>
|
||||||
<text x="110" y="338" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#f59e0b">M_CPU</text>
|
<text x="105" y="338" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#f59e0b">M_CPU</text>
|
||||||
<line x1="121" y1="335" x2="127" y2="335" stroke="#f59e0b" stroke-width="1" opacity="0.6"/>
|
<line x1="121" y1="335" x2="127" y2="335" stroke="#f59e0b" stroke-width="1" opacity="0.6"/>
|
||||||
<circle cx="285" cy="335" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
<circle cx="285" cy="335" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
||||||
<text x="285" y="338" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r2c1</text>
|
<text x="285" y="338" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r2c1</text>
|
||||||
@@ -204,8 +180,8 @@
|
|||||||
<text x="835" y="338" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r2c5</text>
|
<text x="835" y="338" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r2c5</text>
|
||||||
<circle cx="135" cy="485" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="135" cy="485" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="135" y="488" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r3c0</text>
|
<text x="135" y="488" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r3c0</text>
|
||||||
<rect x="99" y="480" width="22" height="10" rx="3" fill="#1c1917" stroke="#d97706" stroke-width="1"/>
|
<rect x="89" y="477" width="32" height="16" rx="3" fill="#1c1917" stroke="#d97706" stroke-width="1"/>
|
||||||
<text x="110" y="488" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#d97706">SRAM</text>
|
<text x="105" y="488" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#d97706">SRAM</text>
|
||||||
<line x1="121" y1="485" x2="127" y2="485" stroke="#d97706" stroke-width="1" opacity="0.6"/>
|
<line x1="121" y1="485" x2="127" y2="485" stroke="#d97706" stroke-width="1" opacity="0.6"/>
|
||||||
<circle cx="285" cy="485" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
<circle cx="285" cy="485" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
||||||
<text x="285" y="488" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r3c1</text>
|
<text x="285" y="488" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r3c1</text>
|
||||||
@@ -215,16 +191,13 @@
|
|||||||
<text x="835" y="488" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r3c5</text>
|
<text x="835" y="488" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r3c5</text>
|
||||||
<circle cx="135" cy="560" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="135" cy="560" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="135" y="563" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r4c0</text>
|
<text x="135" y="563" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r4c0</text>
|
||||||
<rect x="111" y="572" width="22" height="10" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
<rect x="119" y="572" width="32" height="16" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
||||||
<text x="122" y="580" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE4</text>
|
<text x="135" y="583" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE4</text>
|
||||||
<line x1="122" y1="572" x2="135" y2="568" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
<line x1="135" y1="572" x2="135" y2="568" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
||||||
<rect x="38" y="555" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="49" y="563" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-W.c2</text>
|
|
||||||
<line x1="60" y1="560" x2="127" y2="560" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="285" cy="560" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="285" cy="560" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="285" y="563" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r4c1</text>
|
<text x="285" y="563" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r4c1</text>
|
||||||
<rect x="274" y="572" width="22" height="10" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
<rect x="269" y="572" width="32" height="16" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
||||||
<text x="285" y="580" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE5</text>
|
<text x="285" y="583" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE5</text>
|
||||||
<line x1="285" y1="572" x2="285" y2="568" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
<line x1="285" y1="572" x2="285" y2="568" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
||||||
<circle cx="435" cy="560" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
<circle cx="435" cy="560" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
||||||
<text x="435" y="563" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r4c2</text>
|
<text x="435" y="563" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r4c2</text>
|
||||||
@@ -234,45 +207,24 @@
|
|||||||
<text x="685" y="563" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r4c4</text>
|
<text x="685" y="563" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r4c4</text>
|
||||||
<circle cx="835" cy="560" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="835" cy="560" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="835" y="563" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r4c5</text>
|
<text x="835" y="563" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r4c5</text>
|
||||||
<rect x="910" y="555" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="921" y="563" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-E.c2</text>
|
|
||||||
<line x1="910" y1="560" x2="843" y2="560" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="135" cy="685" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="135" cy="685" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="135" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c0</text>
|
<text x="135" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c0</text>
|
||||||
<rect x="38" y="680" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="49" y="688" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-W.c3</text>
|
|
||||||
<line x1="60" y1="685" x2="127" y2="685" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<rect x="124" y="760" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="135" y="768" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-S.c0</text>
|
|
||||||
<line x1="135" y1="760" x2="135" y2="693" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="285" cy="685" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="285" cy="685" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="285" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c1</text>
|
<text x="285" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c1</text>
|
||||||
<rect x="274" y="760" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="285" y="768" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-S.c1</text>
|
|
||||||
<line x1="285" y1="760" x2="285" y2="693" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="435" cy="685" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
<circle cx="435" cy="685" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
||||||
<text x="435" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c2</text>
|
<text x="435" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c2</text>
|
||||||
<circle cx="585" cy="685" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
<circle cx="585" cy="685" r="8" fill="#334155" stroke="#475569" stroke-width="1"/>
|
||||||
<text x="585" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c3</text>
|
<text x="585" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c3</text>
|
||||||
<circle cx="685" cy="685" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="685" cy="685" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="685" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c4</text>
|
<text x="685" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c4</text>
|
||||||
<rect x="661" y="697" width="22" height="10" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
<rect x="669" y="697" width="32" height="16" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
||||||
<text x="672" y="705" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE6</text>
|
<text x="685" y="708" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE6</text>
|
||||||
<line x1="672" y1="697" x2="685" y2="693" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
<line x1="685" y1="697" x2="685" y2="693" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
||||||
<rect x="674" y="760" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="685" y="768" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-S.c2</text>
|
|
||||||
<line x1="685" y1="760" x2="685" y2="693" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<circle cx="835" cy="685" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
<circle cx="835" cy="685" r="8" fill="#475569" stroke="#64748b" stroke-width="1"/>
|
||||||
<text x="835" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c5</text>
|
<text x="835" y="688" text-anchor="middle" font-family="monospace" font-size="6" fill="white">r5c5</text>
|
||||||
<rect x="798" y="697" width="22" height="10" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
<rect x="819" y="697" width="32" height="16" rx="3" fill="#2d1f3d" stroke="#a855f7" stroke-width="1"/>
|
||||||
<text x="809" y="705" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE7</text>
|
<text x="835" y="708" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#a855f7">PE7</text>
|
||||||
<line x1="809" y1="697" x2="835" y2="693" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
<line x1="835" y1="697" x2="835" y2="693" stroke="#a855f7" stroke-width="1" opacity="0.6"/>
|
||||||
<rect x="910" y="680" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="921" y="688" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-E.c3</text>
|
|
||||||
<line x1="910" y1="685" x2="843" y2="685" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<rect x="824" y="760" width="22" height="10" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1"/>
|
|
||||||
<text x="835" y="768" text-anchor="middle" font-family="monospace" font-size="6" font-weight="bold" fill="#8b5cf6">UCIe-S.c3</text>
|
|
||||||
<line x1="835" y1="760" x2="835" y2="693" stroke="#8b5cf6" stroke-width="1" opacity="0.6"/>
|
|
||||||
<line x1="135" y1="143" x2="324" y2="289" stroke="#10b981" stroke-width="1.5" opacity="0.6" stroke-dasharray="4,3"/>
|
<line x1="135" y1="143" x2="324" y2="289" stroke="#10b981" stroke-width="1.5" opacity="0.6" stroke-dasharray="4,3"/>
|
||||||
<text x="239" y="216" font-family="monospace" font-size="6" fill="#10b98188">256GB/s</text>
|
<text x="239" y="216" font-family="monospace" font-size="6" fill="#10b98188">256GB/s</text>
|
||||||
<line x1="285" y1="143" x2="431" y2="289" stroke="#10b981" stroke-width="1.5" opacity="0.6" stroke-dasharray="4,3"/>
|
<line x1="285" y1="143" x2="431" y2="289" stroke="#10b981" stroke-width="1.5" opacity="0.6" stroke-dasharray="4,3"/>
|
||||||
@@ -289,6 +241,62 @@
|
|||||||
<text x="622" y="604" font-family="monospace" font-size="6" fill="#10b98188">256GB/s</text>
|
<text x="622" y="604" font-family="monospace" font-size="6" fill="#10b98188">256GB/s</text>
|
||||||
<line x1="835" y1="677" x2="646" y2="531" stroke="#10b981" stroke-width="1.5" opacity="0.6" stroke-dasharray="4,3"/>
|
<line x1="835" y1="677" x2="646" y2="531" stroke="#10b981" stroke-width="1.5" opacity="0.6" stroke-dasharray="4,3"/>
|
||||||
<text x="751" y="604" font-family="monospace" font-size="6" fill="#10b98188">256GB/s</text>
|
<text x="751" y="604" font-family="monospace" font-size="6" fill="#10b98188">256GB/s</text>
|
||||||
|
<rect x="210" y="120" width="18" height="580" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.8"/>
|
||||||
|
<text x="219" y="117" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-W</text>
|
||||||
|
<rect x="212" y="122" width="14" height="143" rx="2" fill="#818cf8" opacity="0.7"/>
|
||||||
|
<text x="219" y="196" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
||||||
|
<line x1="226" y1="194" x2="127" y2="135" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="212" y="266" width="14" height="143" rx="2" fill="#a78bfa" opacity="0.7"/>
|
||||||
|
<text x="219" y="340" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
||||||
|
<line x1="226" y1="338" x2="127" y2="260" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="212" y="410" width="14" height="143" rx="2" fill="#c084fc" opacity="0.7"/>
|
||||||
|
<text x="219" y="484" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
||||||
|
<line x1="226" y1="482" x2="127" y2="560" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="212" y="554" width="14" height="143" rx="2" fill="#e879f9" opacity="0.7"/>
|
||||||
|
<text x="219" y="628" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
||||||
|
<line x1="226" y1="626" x2="127" y2="685" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="120" y="210" width="730" height="18" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.8"/>
|
||||||
|
<text x="485" y="207" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-N</text>
|
||||||
|
<rect x="122" y="212" width="180" height="14" rx="2" fill="#818cf8" opacity="0.7"/>
|
||||||
|
<text x="212" y="222" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
||||||
|
<line x1="212" y1="226" x2="135" y2="127" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="304" y="212" width="180" height="14" rx="2" fill="#a78bfa" opacity="0.7"/>
|
||||||
|
<text x="394" y="222" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
||||||
|
<line x1="394" y1="226" x2="285" y2="127" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="485" y="212" width="180" height="14" rx="2" fill="#c084fc" opacity="0.7"/>
|
||||||
|
<text x="575" y="222" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
||||||
|
<line x1="575" y1="226" x2="685" y2="127" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="666" y="212" width="180" height="14" rx="2" fill="#e879f9" opacity="0.7"/>
|
||||||
|
<text x="757" y="222" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
||||||
|
<line x1="757" y1="226" x2="835" y2="127" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="742" y="120" width="18" height="580" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.8"/>
|
||||||
|
<text x="751" y="117" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-E</text>
|
||||||
|
<rect x="744" y="122" width="14" height="143" rx="2" fill="#818cf8" opacity="0.7"/>
|
||||||
|
<text x="751" y="196" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
||||||
|
<line x1="744" y1="194" x2="843" y2="135" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="744" y="266" width="14" height="143" rx="2" fill="#a78bfa" opacity="0.7"/>
|
||||||
|
<text x="751" y="340" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
||||||
|
<line x1="744" y1="338" x2="843" y2="260" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="744" y="410" width="14" height="143" rx="2" fill="#c084fc" opacity="0.7"/>
|
||||||
|
<text x="751" y="484" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
||||||
|
<line x1="744" y1="482" x2="843" y2="560" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="744" y="554" width="14" height="143" rx="2" fill="#e879f9" opacity="0.7"/>
|
||||||
|
<text x="751" y="628" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
||||||
|
<line x1="744" y1="626" x2="843" y2="685" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="120" y="592" width="730" height="18" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.8"/>
|
||||||
|
<text x="485" y="589" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-S</text>
|
||||||
|
<rect x="122" y="594" width="180" height="14" rx="2" fill="#818cf8" opacity="0.7"/>
|
||||||
|
<text x="212" y="604" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
||||||
|
<line x1="212" y1="594" x2="135" y2="693" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="304" y="594" width="180" height="14" rx="2" fill="#a78bfa" opacity="0.7"/>
|
||||||
|
<text x="394" y="604" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
||||||
|
<line x1="394" y1="594" x2="285" y2="693" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="485" y="594" width="180" height="14" rx="2" fill="#c084fc" opacity="0.7"/>
|
||||||
|
<text x="575" y="604" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
||||||
|
<line x1="575" y1="594" x2="685" y2="693" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
||||||
|
<rect x="666" y="594" width="180" height="14" rx="2" fill="#e879f9" opacity="0.7"/>
|
||||||
|
<text x="757" y="604" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
||||||
|
<line x1="757" y1="594" x2="835" y2="693" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="60" y="865" width="10" height="10" rx="2" fill="#3b82f6" stroke="#475569" stroke-width="0.5"/>
|
<rect x="60" y="865" width="10" height="10" rx="2" fill="#3b82f6" stroke="#475569" stroke-width="0.5"/>
|
||||||
<text x="74" y="874" font-family="monospace" font-size="8" fill="#94a3b8">PE Router</text>
|
<text x="74" y="874" font-family="monospace" font-size="8" fill="#94a3b8">PE Router</text>
|
||||||
<rect x="147" y="865" width="10" height="10" rx="2" fill="#f59e0b" stroke="#475569" stroke-width="0.5"/>
|
<rect x="147" y="865" width="10" height="10" rx="2" fill="#f59e0b" stroke="#475569" stroke-width="0.5"/>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@@ -599,11 +599,7 @@ def _render_cube_view_svg(view: ViewGraph, spec: dict) -> str:
|
|||||||
blocks.append(("M_CPU", "mcpu", _COMP_STYLE["mcpu"]))
|
blocks.append(("M_CPU", "mcpu", _COMP_STYLE["mcpu"]))
|
||||||
if "sram" in attach:
|
if "sram" in attach:
|
||||||
blocks.append(("SRAM", "sram", _COMP_STYLE["sram"]))
|
blocks.append(("SRAM", "sram", _COMP_STYLE["sram"]))
|
||||||
ucie_items = [a for a in attach if a.startswith("ucie_")]
|
# UCIe handled separately below
|
||||||
for ui in ucie_items:
|
|
||||||
direction = ui.split(".")[0].replace("ucie_", "").upper()
|
|
||||||
conn = ui.split(".")[1] if "." in ui else ""
|
|
||||||
blocks.append((f"UCIe-{direction}.{conn}", "ucie", _COMP_STYLE["ucie"]))
|
|
||||||
|
|
||||||
# Position blocks outward from router (away from cube center)
|
# Position blocks outward from router (away from cube center)
|
||||||
for bi, (label, kind, style) in enumerate(blocks):
|
for bi, (label, kind, style) in enumerate(blocks):
|
||||||
@@ -611,29 +607,7 @@ def _render_cube_view_svg(view: ViewGraph, spec: dict) -> str:
|
|||||||
# Use left/right offset for multiple blocks on same router
|
# Use left/right offset for multiple blocks on same router
|
||||||
offset_x = (bi - (len(blocks) - 1) / 2) * (blk_w + 4)
|
offset_x = (bi - (len(blocks) - 1) / 2) * (blk_w + 4)
|
||||||
|
|
||||||
if kind == "ucie":
|
if kind in ("mcpu", "sram"):
|
||||||
# UCIe: place flush against cube edge at router position
|
|
||||||
direction = label.split("-")[1].split(".")[0] if "-" in label else ""
|
|
||||||
ucie_w, ucie_h = 22, 10 # smaller blocks for UCIe ports
|
|
||||||
if direction == "N":
|
|
||||||
bx = px - ucie_w / 2
|
|
||||||
by = pad - ucie_h # flush against top edge
|
|
||||||
blk_w, blk_h = ucie_w, ucie_h
|
|
||||||
elif direction == "S":
|
|
||||||
bx = px - ucie_w / 2
|
|
||||||
by = pad + cube_h * scale # flush against bottom edge
|
|
||||||
blk_w, blk_h = ucie_w, ucie_h
|
|
||||||
elif direction == "W":
|
|
||||||
bx = pad - ucie_w # flush against left edge
|
|
||||||
by = py - ucie_h / 2
|
|
||||||
blk_w, blk_h = ucie_w, ucie_h
|
|
||||||
elif direction == "E":
|
|
||||||
bx = pad + cube_w * scale # flush against right edge
|
|
||||||
by = py - ucie_h / 2
|
|
||||||
blk_w, blk_h = ucie_w, ucie_h
|
|
||||||
else:
|
|
||||||
bx, by = px - blk_w / 2, py - r_size - blk_h - 4
|
|
||||||
elif kind in ("mcpu", "sram"):
|
|
||||||
# M_CPU/SRAM: place to the left of router (avoid mesh overlap)
|
# M_CPU/SRAM: place to the left of router (avoid mesh overlap)
|
||||||
bx = px - r_size - blk_w - 6
|
bx = px - r_size - blk_w - 6
|
||||||
by = py - blk_h / 2 + bi * (blk_h + 2)
|
by = py - blk_h / 2 + bi * (blk_h + 2)
|
||||||
@@ -659,33 +633,7 @@ def _render_cube_view_svg(view: ViewGraph, spec: dict) -> str:
|
|||||||
f'font-weight="bold" fill="{style["text"]}">{_escape(label)}</text>'
|
f'font-weight="bold" fill="{style["text"]}">{_escape(label)}</text>'
|
||||||
)
|
)
|
||||||
# Connector line: block → router
|
# Connector line: block → router
|
||||||
if kind == "ucie":
|
if kind in ("mcpu", "sram"):
|
||||||
# Line from block edge toward router
|
|
||||||
if direction == "N":
|
|
||||||
parts.append(
|
|
||||||
f' <line x1="{bx + blk_w / 2:.0f}" y1="{by + blk_h:.0f}" '
|
|
||||||
f'x2="{px:.0f}" y2="{py - r_size:.0f}" '
|
|
||||||
f'stroke="{style["stroke"]}" stroke-width="1" opacity="0.6"/>'
|
|
||||||
)
|
|
||||||
elif direction == "S":
|
|
||||||
parts.append(
|
|
||||||
f' <line x1="{bx + blk_w / 2:.0f}" y1="{by:.0f}" '
|
|
||||||
f'x2="{px:.0f}" y2="{py + r_size:.0f}" '
|
|
||||||
f'stroke="{style["stroke"]}" stroke-width="1" opacity="0.6"/>'
|
|
||||||
)
|
|
||||||
elif direction == "W":
|
|
||||||
parts.append(
|
|
||||||
f' <line x1="{bx + blk_w:.0f}" y1="{by + blk_h / 2:.0f}" '
|
|
||||||
f'x2="{px - r_size:.0f}" y2="{py:.0f}" '
|
|
||||||
f'stroke="{style["stroke"]}" stroke-width="1" opacity="0.6"/>'
|
|
||||||
)
|
|
||||||
elif direction == "E":
|
|
||||||
parts.append(
|
|
||||||
f' <line x1="{bx:.0f}" y1="{by + blk_h / 2:.0f}" '
|
|
||||||
f'x2="{px + r_size:.0f}" y2="{py:.0f}" '
|
|
||||||
f'stroke="{style["stroke"]}" stroke-width="1" opacity="0.6"/>'
|
|
||||||
)
|
|
||||||
elif kind in ("mcpu", "sram"):
|
|
||||||
# Horizontal connector (block right edge → router left edge)
|
# Horizontal connector (block right edge → router left edge)
|
||||||
parts.append(
|
parts.append(
|
||||||
f' <line x1="{bx + blk_w:.0f}" y1="{by + blk_h / 2:.0f}" '
|
f' <line x1="{bx + blk_w:.0f}" y1="{by + blk_h / 2:.0f}" '
|
||||||
@@ -735,6 +683,143 @@ def _render_cube_view_svg(view: ViewGraph, spec: dict) -> str:
|
|||||||
f'{agg_bw:.0f}GB/s</text>'
|
f'{agg_bw:.0f}GB/s</text>'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# ── UCIe port components (inside cube boundary, on edges) ──
|
||||||
|
# Collect UCIe connections per direction
|
||||||
|
ucie_by_dir: dict[str, list[tuple[str, str, float, float]]] = {} # dir → [(conn, rkey, rx, ry)]
|
||||||
|
for rkey, rval in routers.items():
|
||||||
|
if rval is None:
|
||||||
|
continue
|
||||||
|
rx, ry = rval["pos_mm"]
|
||||||
|
for a in rval.get("attach", []):
|
||||||
|
if not a.startswith("ucie_"):
|
||||||
|
continue
|
||||||
|
parts_a = a.split(".")
|
||||||
|
direction = parts_a[0].replace("ucie_", "").upper()
|
||||||
|
conn = parts_a[1] if len(parts_a) > 1 else "c0"
|
||||||
|
ucie_by_dir.setdefault(direction, []).append((conn, rkey, rx, ry))
|
||||||
|
|
||||||
|
ucie_colors = ["#818cf8", "#a78bfa", "#c084fc", "#e879f9"]
|
||||||
|
ucie_port_inset = 3 # mm inset from cube edge
|
||||||
|
|
||||||
|
for direction, conns in ucie_by_dir.items():
|
||||||
|
conns.sort(key=lambda x: x[0]) # sort by conn name
|
||||||
|
n_conn = len(conns)
|
||||||
|
|
||||||
|
# UCIe component box position (inside cube, along edge)
|
||||||
|
if direction == "N":
|
||||||
|
# Horizontal bar along top edge
|
||||||
|
# Find X span from attached routers
|
||||||
|
xs = [mm2px(rx, ry)[0] for _, _, rx, ry in conns]
|
||||||
|
ux1 = min(xs) - 15
|
||||||
|
ux2 = max(xs) + 15
|
||||||
|
uw = ux2 - ux1
|
||||||
|
uh = 18
|
||||||
|
ux = ux1
|
||||||
|
uy = pad + ucie_port_inset * scale
|
||||||
|
elif direction == "S":
|
||||||
|
xs = [mm2px(rx, ry)[0] for _, _, rx, ry in conns]
|
||||||
|
ux1 = min(xs) - 15
|
||||||
|
ux2 = max(xs) + 15
|
||||||
|
uw = ux2 - ux1
|
||||||
|
uh = 18
|
||||||
|
ux = ux1
|
||||||
|
uy = pad + cube_h * scale - ucie_port_inset * scale - uh
|
||||||
|
elif direction == "W":
|
||||||
|
ys = [mm2px(rx, ry)[1] for _, _, rx, ry in conns]
|
||||||
|
uy1 = min(ys) - 15
|
||||||
|
uy2 = max(ys) + 15
|
||||||
|
uw = 18
|
||||||
|
uh = uy2 - uy1
|
||||||
|
ux = pad + ucie_port_inset * scale
|
||||||
|
uy = uy1
|
||||||
|
elif direction == "E":
|
||||||
|
ys = [mm2px(rx, ry)[1] for _, _, rx, ry in conns]
|
||||||
|
uy1 = min(ys) - 15
|
||||||
|
uy2 = max(ys) + 15
|
||||||
|
uw = 18
|
||||||
|
uh = uy2 - uy1
|
||||||
|
ux = pad + cube_w * scale - ucie_port_inset * scale - uw
|
||||||
|
uy = uy1
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# UCIe component background
|
||||||
|
parts.append(
|
||||||
|
f' <rect x="{ux:.0f}" y="{uy:.0f}" '
|
||||||
|
f'width="{uw:.0f}" height="{uh:.0f}" '
|
||||||
|
f'rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.8"/>'
|
||||||
|
)
|
||||||
|
# UCIe label
|
||||||
|
if direction in ("N", "S"):
|
||||||
|
parts.append(
|
||||||
|
f' <text x="{ux + uw / 2:.0f}" y="{uy - 3:.0f}" text-anchor="middle" '
|
||||||
|
f'font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">'
|
||||||
|
f'UCIe-{direction}</text>'
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
parts.append(
|
||||||
|
f' <text x="{ux + uw / 2:.0f}" y="{uy - 3:.0f}" text-anchor="middle" '
|
||||||
|
f'font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">'
|
||||||
|
f'UCIe-{direction}</text>'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Connection port boxes inside UCIe component
|
||||||
|
for ci, (conn, rkey, crx, cry) in enumerate(conns):
|
||||||
|
c_color = ucie_colors[ci % len(ucie_colors)]
|
||||||
|
if direction in ("N", "S"):
|
||||||
|
# Horizontal layout
|
||||||
|
cw = max((uw - 4) / n_conn - 1, 6)
|
||||||
|
ch = uh - 4
|
||||||
|
cx = ux + 2 + ci * (cw + 1)
|
||||||
|
cy = uy + 2
|
||||||
|
else:
|
||||||
|
# Vertical layout
|
||||||
|
cw = uw - 4
|
||||||
|
ch = max((uh - 4) / n_conn - 1, 6)
|
||||||
|
cx = ux + 2
|
||||||
|
cy = uy + 2 + ci * (ch + 1)
|
||||||
|
|
||||||
|
parts.append(
|
||||||
|
f' <rect x="{cx:.0f}" y="{cy:.0f}" '
|
||||||
|
f'width="{cw:.0f}" height="{ch:.0f}" '
|
||||||
|
f'rx="2" fill="{c_color}" opacity="0.7"/>'
|
||||||
|
)
|
||||||
|
# Connection label
|
||||||
|
lx = cx + cw / 2
|
||||||
|
ly_t = cy + ch / 2 + 3
|
||||||
|
parts.append(
|
||||||
|
f' <text x="{lx:.0f}" y="{ly_t:.0f}" text-anchor="middle" '
|
||||||
|
f'font-family="monospace" font-size="5" fill="white">'
|
||||||
|
f'{conn}</text>'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Connector line: port box → attached router
|
||||||
|
rpx, rpy = mm2px(crx, cry)
|
||||||
|
if direction == "N":
|
||||||
|
parts.append(
|
||||||
|
f' <line x1="{lx:.0f}" y1="{cy + ch:.0f}" '
|
||||||
|
f'x2="{rpx:.0f}" y2="{rpy - r_size:.0f}" '
|
||||||
|
f'stroke="{c_color}" stroke-width="1" opacity="0.5"/>'
|
||||||
|
)
|
||||||
|
elif direction == "S":
|
||||||
|
parts.append(
|
||||||
|
f' <line x1="{lx:.0f}" y1="{cy:.0f}" '
|
||||||
|
f'x2="{rpx:.0f}" y2="{rpy + r_size:.0f}" '
|
||||||
|
f'stroke="{c_color}" stroke-width="1" opacity="0.5"/>'
|
||||||
|
)
|
||||||
|
elif direction == "W":
|
||||||
|
parts.append(
|
||||||
|
f' <line x1="{cx + cw:.0f}" y1="{cy + ch / 2:.0f}" '
|
||||||
|
f'x2="{rpx - r_size:.0f}" y2="{rpy:.0f}" '
|
||||||
|
f'stroke="{c_color}" stroke-width="1" opacity="0.5"/>'
|
||||||
|
)
|
||||||
|
elif direction == "E":
|
||||||
|
parts.append(
|
||||||
|
f' <line x1="{cx:.0f}" y1="{cy + ch / 2:.0f}" '
|
||||||
|
f'x2="{rpx + r_size:.0f}" y2="{rpy:.0f}" '
|
||||||
|
f'stroke="{c_color}" stroke-width="1" opacity="0.5"/>'
|
||||||
|
)
|
||||||
|
|
||||||
# ── Legend ──
|
# ── Legend ──
|
||||||
ly = h_px - 35
|
ly = h_px - 35
|
||||||
legend_items = [
|
legend_items = [
|
||||||
|
|||||||
Reference in New Issue
Block a user