Skip to content

Simplify API for CPW ports (single port with geometry)#33

Merged
nikosavola merged 5 commits intogdsfactory:mainfrom
EpsilonForge:cpw_ports
Feb 26, 2026
Merged

Simplify API for CPW ports (single port with geometry)#33
nikosavola merged 5 commits intogdsfactory:mainfrom
EpsilonForge:cpw_ports

Conversation

@mdmaas
Copy link
Contributor

@mdmaas mdmaas commented Feb 20, 2026

In QPDK and possibly other PDKs, the user defines a single port on a CPW line. However, the simulation needs to define two rectangles at the proper positions.

This PR modifies the existing API to match what comes from the user/PDK.

# Before (two ports per end):
sim.add_cpw_port("P2", "P1", layer="topmetal2", length=5.0)

# After (single port + geometry):
sim.add_cpw_port("o1", layer="topmetal2", s_width=20, gap_width=15, length=5.0)

Note that now, the user defines a single "o1" port on the CPW end, and then for the simulation, geometric parameters need to be set.

Future work: those parameters could be extracted from the PDK, if a cross-section is present. We had that in palace-server, and could eventually merge the functionality.

Also note that this PR is needed to support the QPDK #28.

@mdmaas
Copy link
Contributor Author

mdmaas commented Feb 20, 2026

Ouch, I made this PR on top of the local_sim branch.

Copy link
Member

@nikosavola nikosavola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can approve if #13 is merged first or the common commits are dropped with rebase

@mdmaas
Copy link
Contributor Author

mdmaas commented Feb 25, 2026

Oh, good idea @nikosavola, let me try to rebase

@mdmaas
Copy link
Contributor Author

mdmaas commented Feb 25, 2026

There, it should be clean now.

@mdmaas
Copy link
Contributor Author

mdmaas commented Feb 25, 2026

Ok, this is passing now

@nikosavola nikosavola merged commit db85193 into gdsfactory:main Feb 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants