Skip to content

Commit

Permalink
Merge pull request #34 from flaport/sax0.11-compatibility
Browse files Browse the repository at this point in the history
FIX: Adopt new Sax backend format
  • Loading branch information
flaport committed Jan 18, 2024
2 parents 4fd78dd + f944162 commit 4d4bcea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions meow/eme/sax.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sax
from sax.backends import circuit_backends
from sax.utils import get_ports
from sax.saxtypes import scoo

from ..base_model import _array
from ..cell import Cell
Expand Down Expand Up @@ -114,8 +115,10 @@ def compute_s_matrix_sax(

# TODO: fix SAX Multimode to reduce this ad-hoc SAX-hacking.
net = _get_netlist(propagations, interfaces)
_, analyze_circuit, evaluate_circuit = circuit_backends[sax_backend]
analyzed = analyze_circuit(net["connections"], net["ports"])
analyze_instances, analyze_circuit, evaluate_circuit = circuit_backends[sax_backend]
# TODO: use analyze_instances instead of manually converting to scoo
net["instances"] = {k: scoo(v) for k, v in net["instances"].items()}
analyzed = analyze_circuit(net["instances"], net["connections"], net["ports"])
S, port_map = sax.sdense(
evaluate_circuit(
analyzed,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies = [
"numpy>=1.24",
"packaging",
"pydantic>=2",
"sax>=0.10.1",
"sax>=0.11.1",
"scipy",
"shapely",
"tidy3d>=2.4.0",
Expand Down

0 comments on commit 4d4bcea

Please sign in to comment.