Get and Set methods for SPICE parameters #180
Closed
jevillegasd
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I made this code to extend the Componnet class with get and set methods for the Component SPICE parameters: https://github.com/jevillegasd/SiEPIC-Tools/tree/extend_component
I don't know if this is the best way to go around this. What do you think???
Why?
I was thinking of options to set and get SPICE parameters in a way that is less manual than directly writing the text labels only. So I thought of extending the Component class to allow to do so. This is with reference to the question I had # 249 in the EBeam PDK (SiEPIC/SiEPIC_EBeam_PDK#249).
The get method here basically is just a wrapper of the params property, but the set method checks if there is a Text cell with the SPICE parameters, changes that text and updates the component.param property. If no TextCell is found, then it just creates one.
If this function is called outside of a PCell declaration itself, then whatever it's done is basically replaced or erased by the original cell information when it gets re-instantiated, so it would only be permanent on static cells. Still, I think it would be a useful method to for example update the waveguide parameters in the Waveguide PCell (usually this is defined in the PDK, but the SPICE parameters are defined inside the SiEPIC.utils layout calls).
This shouldn't have any compatibility issues since they are new methods. Although I did add a semicolon erasing step to the params_dict method.
How to use
One could in essence now override SPICE parameters by calling the new method with either a dictionary or a string. Again those parameters are not really maintained unless the method is called inside the function that generates the PCell. It can be tested with a code like this
This is especially useful for waveguide Pcells, whose produce method can now include a SPICE overriding, using something like:
Beta Was this translation helpful? Give feedback.
All reactions