PyCell Enhancements by He Zeng.
Usage Instructions: Place the Python and tech files in the local KLayout directory. Then, load the .lyp file in KLayout.
This document provides an overview of the classes and methods that have been added or modified by He Zeng, based on the code from IHP OpenPDK.
- Box: 91 methods
- Direction: 21 methods
- Grouping: 19 methods
- Grid: 11 methods
- Instance: 12 methods
- Donut: 15 methods
- Rect: 39 methods
- Dot: 8 methods
- Orientation: 2 methods
- ParamArray: 16 methods
- Path: 9 methods
- Pin: 6 methods
- Point: 32 methods
- PointList: 12 methods
- Polygon: 20 methods
- Range: 36 methods
- RangeConstraint: 2 methods
- ShapeFilter: 5 methods
- SnapType: 6 methods
- StepConstraint: 2 methods
- Text: 12 methods
- Transform: 9 methods
- UList: 12 methods
- Arc: 8 methods
- Segmenter: 24 methods
- ChoiceConstraint: 2 methods
- NameMapper: 2 methods
- Layer: 4 methods added (the remaining methods are from IHP OpenPDK)
- Numeric: 5 methods added (the remaining methods are from IHP OpenPDK)
- Shape:10 methods added(the remaining methods are from IHP OpenPDK)
- Dlo: 2 methods added (the remaining methods are from IHP OpenPDK)
- Tech: 1 method addded (the remaining methods are from IHP OpenPDK)
Based on the code provided by IHP OpenPDK, several classes have been modified to include additional functionalities. The following is a short list of classes and files adopted from the IHP OpenPDK.
- PyCellWrapper class: Modified the
__call__method andcoerce_parametersmethod, modified thePyCellContextclass,and adapted some methods and descriptors from the KLayout main source. - All PyCells and technology files(.lyp and .lyt files) are provided by IHP OpenPDK, the module sg13g2_pycell_lib is from IHP OpenPDK.
- using a KLayout macro file to automatically register the PyCellLib library; the PyCellLib class is from IHP OpenPDK.
- The file sg13_tech.py is from IHP OpenPDK, He Zeng make some change based on the documentation from IHP OPenPDK.
- Be aware that there are issues with the original code for
npn13G2Landnpn13G2VPyCells. Specific problems can be identified in the corresponding PyCell code. - In KLayout, PyCells are automatically registered (using the .lym macro file) and should not be run again; doing so may cause issues.
This is because the variable
Layer.techis automatically set toNoneafter the first run, preventing further retrieval of information related toLayer. If this happens, KLayout must be restarted. - In subsequent development of new classes,
importlibwith a reload function will need to be used multiple times. The main reason is that KLayout embeds Python interpreter, which do not automatically re-execute files.