Photonic Network-on-Chip Bridge¶
Module: sc_neurocore.bridges.photonic_noc
Source: src/sc_neurocore/bridges/photonic_noc.py — 806 LOC
Status (v3.14.0): 14 public exports; 198 bridges-suite tests pass
(across all 3 bridges); pure-Python; __tier__ = "research". The
gdstk dependency for GDSII layout export is soft-imported (graceful
fallback). Constants for silicon photonic loss/index match
literature defaults; not measured against a specific tape-out.
This page covers one of three speculative hardware bridges. The
sister bridges live at:
- DNA strand displacement: api/bridges/dna_mapper.md
- D-Wave / Ising annealing: planned api/bridges/quantum_annealing.md
1. What this bridge does¶
Compiles an SC neural network's adjacency matrix into a photonic network-on-chip (NoC) specification:
SC Network adjacency → Waveguide Router → MZI Compiler → Power Budget
(NxN) (Manhattan path) (gate cascade) (loss + OSNR)
↓ ↓ ↓
Topology layout WDM channels Optical SNR check
The output is a PhotonicCircuitDesign POD struct that downstream
photonic-design-automation (PDA) tools can consume — there is a
JSON exporter and an optional GDSII writer (via gdstk).
This bridge does not simulate end-to-end SC bitstream computation in the optical domain. It produces a layout + power-budget analysis; verifying that the layout actually performs the SC computation faithfully would require a physical layer simulator (Lumerical FDTD, Ansys, Synopsys OptSim) or a tape-out.
2. Public surface¶
sc_neurocore.bridges.__init__ re-exports 14 symbols from
photonic_noc.py:
| Symbol | Type | Role |
|---|---|---|
WaveguideType |
Enum |
STRIP, RIB, SLOT |
WaveguideSegment |
dataclass | One source→target waveguide path |
MZIGate |
dataclass | Mach–Zehnder interferometer SC gate |
WDMChannel |
dataclass | Wavelength-division-multiplex channel |
PhotonicCircuitDesign |
dataclass | Complete design output |
WaveguideRouter |
class | Manhattan-routing engine |
MZICompiler |
class | SC operation → MZI cascade |
WDMAssigner |
class | Per-signal wavelength assignment |
PowerBudgetAnalyzer |
class | Insertion loss + OSNR check |
SCToPhotonic |
class | Top-level orchestrator |
ThermalPhaseShifter |
class | Thermo-optic phase model |
CrosstalkAnalyzer |
class | Inter-channel crosstalk estimation |
export_photonic_json |
function | Design → JSON file |
visualize_photonic |
function | Design → ASCII / SVG-ish summary |
Module-level constants (silicon photonic defaults at 1550 nm telecom band):
| Constant | Value | Source |
|---|---|---|
_C_VACUUM |
2.998e8 m/s |
physical |
_SI_REFRACTIVE_INDEX |
3.48 |
silicon at 1550 nm |
_WAVEGUIDE_LOSS_DB_CM |
2.0 dB/cm |
typical Si photonic |
_SPLITTER_LOSS_DB |
0.3 dB |
per Y-junction |
_MZI_INSERTION_LOSS_DB |
0.5 dB |
per MZI stage |
_CROSSING_LOSS_DB |
0.08 dB |
per waveguide crossing |
_DETECTOR_SENSITIVITY_DBM |
-20.0 dBm |
minimum detectable |
_LASER_POWER_DBM |
0.0 dBm |
on-chip source |
These match published Si photonic silicon-on-insulator (SOI) process design kits at 1550 nm. They are not a specific PDK — for a real tape-out the constants must be replaced with the foundry's PDK-supplied values.
3. Top-level orchestrator: SCToPhotonic¶
class SCToPhotonic:
def __init__(self, pitch_um: float = 250.0, arm_length_um: float = 200.0): ...
def compile(
self,
adjacency: np.ndarray,
node_labels: list[str] | None = None,
gate_specs: list[dict] | None = None,
name: str = "sc_photonic",
) -> PhotonicCircuitDesign: ...
The compile pipeline (photonic_noc.py:530-587):
- Route waveguides via
WaveguideRouter.route(adjacency). - Compile MZI gates via
MZICompiler— one auto-generated MZI per output node based on adjacency density (MULif ≥2 inputs elseNOT), or an explicit list viagate_specs. - Assign WDM channels via
WDMAssigner.assign(labels). - Estimate area as
(grid * pitch_um) ** 2wheregrid = ceil(sqrt(N)).
Returns a PhotonicCircuitDesign with the routed waveguides, MZI
list, WDM channel table, and area estimate. The routing table
itself is not populated by compile; populate it explicitly with
WaveguideRouter.routing_table() if needed downstream.
4. Component classes¶
4.1 WaveguideRouter (lines 210-289)¶
Manhattan-routing engine. Produces WaveguideSegment instances
with computed length_um (Manhattan distance × pitch_um),
loss_db (length × loss_db_per_cm × 1e-4) and n_crossings
(estimated from intermediate-row count).
route(adjacency, node_labels=None) -> list[WaveguideSegment]routing_table() -> dict[(src,tgt), list[hop_idx]]
4.2 MZICompiler (lines 290-383)¶
Compiles SC computation primitives into MZI gate specifications.
Supported op strings: "MUL", "NOT", "ADD", "SCALE". Each
op maps to a phase-shift angle and arm count.
compile_gate(op, inputs, output, name) -> MZIGatecompile_network(specs: list[dict]) -> list[MZIGate]
4.3 WDMAssigner (lines 384-455)¶
DWDM-style wavelength assignment. Each signal name receives its
own channel at 1550.0 + ch_id * channel_spacing_nm. Default
spacing is 0.8 nm (100 GHz DWDM).
The assigner now caps at max_channels: int = 96 (default
follows the ITU-T G.694.1 DWDM C-band grid at 50 GHz spacing).
At the default 0.8 nm spacing the physical C-band only fits ~44
channels, so the cap is conservative; pass max_channels=0 to
disable for multi-band (C+L+S) extensions, or a larger value for
specific-foundry layouts. assign() raises ValueError when
len(signal_names) > max_channels and the cap is non-zero.
Closes task #47.
assign(signal_names: list[str], power_dbm: float = ...) -> list[WDMChannel]
4.4 PowerBudgetAnalyzer (lines 440-509)¶
Computes total insertion loss along each path and checks against the detector sensitivity floor.
analyze(design: PhotonicCircuitDesign) -> dict— returns:total_loss_db,worst_path_db,osnr_estimate_db,is_feasible: bool,detector_floor_dbm.
The analyze method (US spelling) matches the source identifier;
prose in this doc uses British English ("we analyse", "the
analyser") while the symbol stays as written.
4.5 ThermalPhaseShifter (lines 595-664)¶
Thermo-optic phase shift model. For a TiN heater on Si waveguide:
- phase_per_mw_per_um ≈ 0.025 rad/(mW·μm) (typical)
- time_constant_us ≈ 5–10 μs (TiN heater thermal time)
Used by MZIGate to convert a phase-shift target into a heater
power requirement.
4.6 CrosstalkAnalyzer (lines 665-722)¶
Estimates inter-channel crosstalk in the WDM grid based on Lorentzian filter shape and channel spacing. Returns a worst-case crosstalk-to-signal ratio in dB; flags channels that fail a configurable threshold (default −20 dB).
5. Performance — measured (this workstation)¶
Random Erdős–Rényi adjacency at p=0.1, undirected, default
SCToPhotonic compile + PowerBudgetAnalyzer.analyze:
| N | density | compile wall |
analyze wall |
#waveguides | #MZI | area (mm²) |
|---|---|---|---|---|---|---|
| 10 | 0.100 | 0.32 ms | 0.05 ms | 9 | 5 | 1.000 |
| 50 | 0.100 | 2.51 ms | 1.80 ms | 228 | 49 | 4.000 |
| 100 | 0.100 | 7.63 ms | 14.14 ms | 923 | 100 | 6.250 |
Compile cost is roughly linear in n_edges = N²·p. The power-budget
analysis is super-linear because it walks every waveguide segment's
loss contribution; for N=100 with ~1000 segments it takes 14 ms.
Both steps stay under 20 ms even at N=100, so this bridge is not the bottleneck for typical research-scale designs. For wafer-scale (N>10⁴) the routing would need a spatial-index acceleration.
6. Pipeline wiring¶
| Surface | How it's wired | Verifier |
|---|---|---|
from sc_neurocore.bridges.photonic_noc import SCToPhotonic, ... |
bridges/__init__.py re-exports all 14 symbols |
tests/test_bridges/test_photonic_noc.py |
SCToPhotonic.compile → WaveguideRouter.route → MZICompiler.compile_network → WDMAssigner.assign |
direct method calls in compile() body |
end-to-end test in the suite |
PowerBudgetAnalyzer.analyze reads design.waveguides + design.mzi_gates |
direct field access | dedicated power-budget tests |
gdstk GDSII export |
soft-imported; wrapped in if _HAS_GDSTK |
exporter tests skip when gdstk absent |
SCToPhotonic is NOT integrated with sc_neurocore.network.Network
— callers extract the connectivity matrix manually.
7. Tests¶
PYTHONPATH=src python3 -m pytest tests/test_bridges/test_photonic_noc.py -q
# (part of the 198-test bridges suite — verified 2026-04-17)
tests/test_bridges/test_photonic_noc.py is 287 lines covering
construction of every dataclass, routing on small graphs, MZI
compile of all 4 op strings, WDM assignment uniqueness, power-budget
feasibility flag, crosstalk threshold check, and end-to-end
SCToPhotonic.compile.
What is NOT covered: - gdstk GDSII export round-trip (skips silently when gdstk absent in the test env) - Wafer-scale (N>1000) routing - Real PDK constant overrides - Comparison against an external photonic simulator
8. Audit (7-point checklist)¶
| # | Dimension | Status | Detail |
|---|---|---|---|
| 1 | Pipeline wiring | ✅ PASS | All 14 symbols re-exported and tested |
| 2 | Multi-angle tests | ✅ PASS | 287-line dedicated test file, part of 198-test bridges suite |
| 3 | Rust path | ❌ FAIL | Pure Python; routing + power budget are NumPy + Python loops. Acceptable at research scale (≤ N=100 in <20 ms); not viable at wafer scale (N≥10⁴). |
| 4 | Benchmarks | ✅ PASS | §5 measured this session |
| 5 | Performance docs | ✅ PASS | §5 |
| 6 | Documentation page | ✅ PASS | This page |
| 7 | Rules followed | ⚠️ WARN | SPDX header ✅. Module-level constants are PDK-agnostic defaults, not pinned to a specific foundry — anyone running a tape-out must replace them with their PDK's values (§2). gdstk is the only soft-imported dependency; the GDSII path is otherwise untested in CI. British English in this doc; source uses US spelling for symbols (analyze, optimize) which is acceptable per the docs-vs-code rule. |
Net: 1 WARN, 1 FAIL. The WARN is a documented limitation; the FAIL is the absence of a Rust/native path that is tolerable at research scale.
9. Known issues¶
9.1 PDK-agnostic constants (§2)¶
The 8 module-level constants (_C_VACUUM through _LASER_POWER_DBM)
are literature averages for Si SOI at 1550 nm. They are NOT a
specific foundry PDK. For tape-out, replace these with the
foundry-supplied values (e.g. AIM Photonics, IMEC ePIXfab,
Tower Semiconductor) — and ideally make them configurable via a
PDKConfig dataclass rather than module globals. Tracked as
task #44.
9.2 GDSII export untested in CI¶
The gdstk dependency is soft-imported. Tests that exercise the
GDSII exporter skip when gdstk is absent — including in CI on
Python 3.12 where gdstk may not have a wheel. End-to-end GDSII
generation has not been verified against a layout-vs-schematic
(LVS) tool. Tracked as task #45.
9.3 No physical-layer simulation¶
The bridge produces a layout + a static power-budget number. It does NOT verify that the resulting MZI cascade implements the intended SC computation in the optical domain. A real validation loop would require: - FDTD or eigenmode simulation per MZI (Lumerical, Ansys, Tidy3D) - Bit-error-rate Monte Carlo against the SC reference - Process-variation sensitivity analysis
Tracked as task #46.
9.4 WaveguideRouter uses Manhattan distance only¶
Routing assumes a 2-D mesh; no 3-D or photonic-via topology. For large designs that stack waveguides via grating couplers or through-substrate vias, the routing model needs extension. Not critical at the v3.14.0 scale.
9.5 WDMAssigner cap (FIXED by task #47)¶
WDMAssigner.__init__ now accepts max_channels: int = 96
(default follows ITU-T G.694.1 DWDM C-band grid at 50 GHz
spacing). assign() raises ValueError when
len(signal_names) > max_channels and the cap is non-zero.
Pass max_channels=0 to disable for multi-band (C+L+S) designs.
Regression coverage:
tests/test_bridges/test_photonic_noc.py::TestWDMAssigner — 5
new cases (default cap=96, at-cap succeeds, above-cap raises,
explicit smaller cap raises, cap=0 disables).
10. References¶
Photonic NoC and SC computing in optics:
- Shastri B. J. et al. "Photonics for Artificial Intelligence and Neuromorphic Computing." Nature Photonics 15:102-114 (2021). Survey of MZI-based photonic neural network architectures.
- Shen Y. et al. "Deep learning with coherent nanophotonic circuits." Nature Photonics 11:441-446 (2017). The MZI-cascade-as-matrix-multiplier paper.
- Tait A. N. et al. "Neuromorphic photonic networks using silicon
photonic weight banks." Sci Rep 7:7430 (2017). WDM-based
weight banks, the basis for
WDMAssigner. - Bogaerts W. et al. "Programmable photonic circuits." Nature 586:207-216 (2020). Survey of MZI-cascade programmability.
Silicon photonic process and constants:
- Bogaerts W., Chrostowski L. "Silicon Photonics Circuit Design:
Methods, Tools and Challenges." Laser Photonics Rev 12(4):
1700237 (2018). Source for
_WAVEGUIDE_LOSS_DB_CM,_MZI_INSERTION_LOSS_DBtypical values. - Mashanovich G. Z. et al. "Low-loss silicon waveguides for the
mid-infrared." Optics Express 19(8):7112-7119 (2011). The
_SI_REFRACTIVE_INDEX = 3.48figure at 1550 nm.
Internal:
- Bridges sister:
api/bridges/dna_mapper.md - Bridges package overview: see
bridges/__init__.pydocstring - Network connectivity (input to
compile):api/network.md
11. Auto-rendered API¶
sc_neurocore.bridges.photonic_noc
¶
Photonic NoC bridge for SC bitstream networks.
Compiles SC neural networks into photonic network-on-chip interconnect specifications, modeling:
- Waveguide routing — optical paths between processing elements
- MZI-based gates — Mach-Zehnder interferometer SC computation
- Wavelength-division multiplexing — parallel bitstream channels
- Power budget analysis — insertion loss, crosstalk, optical SNR
- GDSII layout export — photonic design automation integration
Architecture¶
::
SC Network → Waveguide Router → MZI Compiler → Power Budget
↓ ↓ ↓ ↓
Populations Topology MZI cascade Loss model
Projections Routing table WDM channels OSNR check
Dependencies¶
numpy— requiredgdstk— optional, soft-imported for GDSII export
WaveguideType
¶
Bases: Enum
Photonic waveguide type.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
74 75 76 77 78 79 | |
WaveguideSegment
dataclass
¶
A single waveguide path segment.
Attributes¶
source : int Source node index. target : int Target node index. length_um : float Physical length in micrometers. wavelength_nm : float Operating wavelength (default 1550 nm). loss_db : float Total insertion loss for this segment. n_crossings : int Number of waveguide crossings. wg_type : WaveguideType Waveguide geometry type.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
MZIGate
dataclass
¶
Mach-Zehnder interferometer gate specification.
Models a single MZI stage implementing an SC computing operation via thermo-optic or electro-optic phase shifting.
Attributes¶
gate_id : str Unique gate identifier. operation : str Gate operation type (AND, OR, NOT, MUL, ADD). input_ports : list[int] Input waveguide port indices. output_port : int Output waveguide port index. phase_shift_rad : float Applied phase shift in radians. arm_length_um : float MZI arm length in micrometers. insertion_loss_db : float Total insertion loss. extinction_ratio_db : float On/off extinction ratio.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
WDMChannel
dataclass
¶
Wavelength-division multiplexing channel.
Attributes¶
channel_id : int Channel index. wavelength_nm : float Center wavelength. bandwidth_nm : float Channel bandwidth (default 0.8 nm for DWDM). signal_name : str Associated SC signal name. power_dbm : float Launch power.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
PhotonicCircuitDesign
dataclass
¶
Complete photonic NoC design.
Attributes¶
name : str Design name. waveguides : list[WaveguideSegment] All waveguide segments. mzi_gates : list[MZIGate] All MZI computing stages. wdm_channels : list[WDMChannel] WDM channel assignments. n_nodes : int Number of processing element nodes. routing_table : dict[tuple[int, int], list[int]] Hop-by-hop routing table. total_area_um2 : float Estimated chip area.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
WaveguideRouter
¶
Route waveguides between SC network nodes.
Uses a mesh topology with shortest-path (Manhattan) routing.
Parameters¶
pitch_um : float Node-to-node pitch in micrometers (default 250). loss_db_per_cm : float Waveguide propagation loss (default 2.0 dB/cm).
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
route(adjacency, node_labels=None)
¶
Route waveguides for an SC network adjacency matrix.
Parameters¶
adjacency : np.ndarray N×N weight matrix. node_labels : list[str] | None Optional node labels.
Returns¶
list[WaveguideSegment]
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
MZICompiler
¶
Compile SC operations into MZI gate cascades.
Maps SC gates to photonic MZI operations: - AND/MUL → MZI with π/2 phase shift (coherent multiplication) - OR/ADD → Y-junction combiner - NOT → MZI with π phase shift (bar state)
Parameters¶
arm_length_um : float Default MZI arm length (default 200 μm).
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | |
compile_gate(gate_type, input_ports, output_port, gate_id='')
¶
Compile a single SC gate to an MZI specification.
Parameters¶
gate_type : str Gate operation (AND, OR, NOT, MUL, ADD, THRESHOLD). input_ports : list[int] Input waveguide port indices. output_port : int Output waveguide port index. gate_id : str Unique identifier.
Returns¶
MZIGate
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |
compile_network(gates)
¶
Compile a list of SC gate specs into MZI cascade.
Parameters¶
gates : list[dict]
Each: type, inputs (list[int]), output (int).
Returns¶
list[MZIGate]
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | |
WDMAssigner
¶
Assign WDM channels to SC signal paths.
Parameters¶
base_wavelength_nm : float
Starting wavelength (default 1550.0 nm).
channel_spacing_nm : float
Channel spacing (default 0.8 nm for 100 GHz DWDM).
max_channels : int
Hard cap on the number of channels the assigner will emit.
Default 96 follows the ITU-T G.694.1 DWDM C-band grid at
50 GHz spacing (~0.4 nm). At the default 0.8 nm spacing the
physical C-band (~1530-1565 nm, ~35 nm) only fits ~44
channels — the cap protects callers from silently spilling
into invalid wavelengths. Pass a larger value (or
max_channels=0 to disable) for multi-band (C+L+S)
designs.
Raises¶
ValueError
From :meth:assign when len(signal_names) exceeds
max_channels and max_channels > 0.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | |
assign(signal_names, power_dbm=_LASER_POWER_DBM)
¶
Assign a WDM channel to each signal.
Parameters¶
signal_names : list[str] SC signal names. power_dbm : float Launch power per channel.
Returns¶
list[WDMChannel]
Raises¶
ValueError
If len(signal_names) > self._max_channels and the
cap is non-zero. See class-level max_channels.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | |
PowerBudgetAnalyzer
¶
Optical power budget and OSNR analysis.
Computes end-to-end power budget for each path in the photonic circuit, flagging paths that exceed the detector sensitivity.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | |
analyze(design, laser_power_dbm=_LASER_POWER_DBM, detector_sensitivity_dbm=_DETECTOR_SENSITIVITY_DBM)
¶
Run power budget analysis.
Returns¶
dict
paths, worst_margin_db, n_failed, total_loss_db.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | |
SCToPhotonic
¶
Top-level compiler: SC network → photonic NoC design.
Parameters¶
pitch_um : float Mesh pitch (default 250 μm). arm_length_um : float MZI arm length (default 200 μm).
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | |
compile(adjacency, node_labels=None, gate_specs=None, name='sc_photonic')
¶
Compile SC network into a photonic design.
Parameters¶
adjacency : np.ndarray N×N weight matrix. node_labels : list[str] | None Node labels. gate_specs : list[dict] | None Optional MZI gate specifications. name : str Design name.
Returns¶
PhotonicCircuitDesign
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | |
ThermalPhaseShifter
¶
Thermo-optic phase shifter model for MZI tuning.
Parameters¶
heater_length_um : float Heater length (default 100 μm). dn_dt : float Thermo-optic coefficient (default 1.86e-4 K⁻¹ for Si). thermal_resistance_kw : float Heater thermal resistance (default 10 K/mW).
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | |
power_for_phase(phase_rad, wavelength_nm=1550.0)
¶
Compute electrical power needed for a given phase shift.
Returns¶
float Required power in milliwatts.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
651 652 653 654 655 656 657 658 659 660 661 662 | |
analyze_design(design)
¶
Compute total power budget for all MZI phase shifters.
Returns¶
dict Per-gate power and total.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | |
CrosstalkAnalyzer
¶
Analyze inter-channel crosstalk in WDM systems.
Parameters¶
adjacent_xt_db : float Adjacent-channel crosstalk (default -25 dB).
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 | |
analyze(channels)
¶
Analyze crosstalk between WDM channels.
Returns¶
dict
worst_xt_db, per_channel, osnr_db.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 | |
export_photonic_json(design, path)
¶
Export photonic design to JSON.
Parameters¶
design : PhotonicCircuitDesign The design to export. path : str Output file path.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 | |
visualize_photonic(design)
¶
Generate ASCII visualization of a photonic design.
Returns¶
str Multi-line ASCII representation.
Source code in src/sc_neurocore/bridges/photonic_noc.py
| Python | |
|---|---|
803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 | |