ChildCellProperty
- class ipkiss3.all.ChildCellProperty
Property for assigning a Child PCell
Accepts both a PCell and a View, if a view is assigned the corresponding cell is retrieved and assigned to the property. If a ChildCellProperty is a member of a PCell class, it will automatically create corresponding ChildViewProperties in all the View classes of that Pcell class, with restrictions matching the view type.
See also
Examples
import ipkiss3.all as i3 class Child(i3.PCell): class Layout(i3.LayoutView): def _generate_elements(self, elems): elems += i3.Rectangle(layer=i3.Layer(0), box_size=(10, 2)) elems += i3.Boundary(layer=i3.Layer(1), shape=[(-6, 4), (10, 4), (10, 10)]) return elems def _generate_ports(self, ports): ports += i3.OpticalPort(name="child_in", position=(-5, 0)) return ports class Parent(i3.PCell): child = i3.ChildCellProperty(doc="Child cell of Parent") class Layout(i3.LayoutView): def _generate_elements(self, elems): elems += i3.Rectangle(layer=i3.Layer(0), box_size=(10, 1), center=(0, 2)) return elems def _generate_instances(self, insts): insts += i3.SRef(reference=self.child, name="child") return insts def _generate_ports(self, ports): ports += self.instances["child"].ports["child_in"].modified_copy(name="in") ports += i3.OpticalPort(position=(5, 2), name="out") return ports child = Child() test = Parent(child=child) test_lay = test.Layout() test_lay.visualize(annotate=True)
- allow_none
- default
- doc
- preprocess
- restriction
- fdef_name