Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic SBend #153

Open
lukasc-ubc opened this issue Jul 9, 2021 · 6 comments
Open

Automatic SBend #153

lukasc-ubc opened this issue Jul 9, 2021 · 6 comments

Comments

@lukasc-ubc
Copy link
Member

Automatically detect when an SBend is needed in the Waveguide.

@jevillegasd
Copy link
Contributor

For this, should it insert an SBend PCell on site (ask the user?) or generate an SBend curve as part of the waveguide?

@mustafacc
Copy link
Member

I think either is okay. It can be implemented in a similar manner to compound waveguides in which a taper cell is automatically instantiated
https://github.com/SiEPIC/SiEPIC_EBeam_PDK/blob/a45f05eab1f27c842352d5f0ab44987876b52a99/klayout_dot_config/tech/EBeam/WAVEGUIDES.xml#L232

What do you think?

@jevillegasd
Copy link
Contributor

SBends PCells are pretty generic provided the PDK has a Cell for it, so it should be possible to insert the cell as the compound does without the need to specifying it in the waveguides.xml.

But I think it might be easier to just use the geometry.bezier.parallel function to add the bend in place as a list of points to append to the ones that define the wg polygon.

I guess there still needs to be a minimum SBend radius to be calculated from the original bending radius?

jevillegasd added a commit to jevillegasd/SiEPIC-Tools that referenced this issue Aug 19, 2022
Inserts waveguide bends SiEPIC#153  as part of the guiding line that generates the waveguide. The SBend takes precedence over the creation of normal bends where it's possible to install them, but they are only placed provided a normal bend doesn't fit. It uses the Bezier Parallel function from SiEPIC.utils.geometry, but I had to do a weird import for the optimizer for it to work on my end.
@jevillegasd
Copy link
Contributor

jevillegasd commented Aug 20, 2022

  • With the changes I made, because I'm modifying layout_waveguide2(), opening an older file would insert SBends wherever they are found, as long as they were created after merge master into 0.4 #118 . This is probably an unwanted behavior, so to avoid it I could include a 'insert sbend' parameter in the waveguide PCell, and check whether that parameter exists or not before inserting the SBend. What do you think? This of course affects only sections that had errors on the bends (that couldn't fit normal bends) but could fit an SBend. This was included in merged version of Automatic Waveguide SBend #179

  • The use of the 'optimal' sBend methods also makes the process very slow, especially when the debugger is open.

@jevillegasd
Copy link
Contributor

Hey @lukasc-ubc I think we can close this issue, addressed in #179. However, the current version of the automatic SBends uses the bezier_parallel function that is pretty slow. So maybe an uodate on either to make it more efficeint will help its usage be more smooth.

Waveguide definitions need only to include the follwoing parameter to allow for automatic sbends:

<sbends>y</sbends>

@lukasc-ubc
Copy link
Member Author

@jevillegasd I really like the automated SBends.

In terms of performance, I added some lrcache functions late last year. Can you check if that improved the performance?

For verification, indeed we need to remove the min-radius error for cases where the sbend is instantiated.

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

No branches or pull requests

3 participants