place_insts

ipkiss3.all.place_insts(insts, specs=[], verify=True)

Place a series of insts according to defined placement specifications.

The supported placement specifications can be found under the i3 namespace (see also Placement reference).

Parameters:

insts: InstanceDict or dict {inst_name: PCell/Layout view}

specs: list

List of placement specifications: see ipkiss3.pcell.placement.specifications or placement reference

verify: bool

When set to True, verify that they’ve been placed as specified.

Returns:

insts: InstanceDict

Placed instances as an instance dictionary.

Examples

import ipkiss3.all as i3

class MyPCell(i3.PCell):
    class Layout(i3.LayoutView):
        def _generate_instances(self, insts):
            wg = i3.Waveguide()
            wg.Layout(shape=[(0, 0), (10, 0)])

            bend = i3.RoundedWaveguide()
            bend.Layout(shape=[(0, 0), (10, 0), (10, 10)])

            insts += i3.place_insts(
                insts={'wg1': wg, 'bend1': bend, 'bend2': bend, 'wg2': wg},
                specs=[
                    i3.Place('wg1', (5, 5)),
                    i3.FlipH('bend2'),
                    i3.Join([
                        ('wg1:out', 'bend1:in'),
                        ('bend1:out', 'bend2:in'),
                        ('bend2:out', 'wg2:in')
                    ])
                ]
            )

            return insts

        def _generate_ports(self, ports):
            ports += i3.expose_ports(self.instances, {'wg1:in': 'input', 'wg2:out': 'output'})
            return ports

pcell = MyPCell()

pcell_lo = pcell.Layout()
pcell_lo.visualize(annotate=True)
../../../_images/ipkiss3-all-place_insts-1.png