ipkiss3.all.place_and_route(insts, specs=None, strict=True)

Function to place and route a series of instances with the help of placement specifications and connectors.

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

Always be as specific as possible when providing the placement specifications. The placement engine will change the positions of instances that are specified in the specifications list.

For instance, if you have multiple specs without using Place, that tells the placement engine that the location of the full circuit (or at least that one instance) is not important. The instances will still be placed relative to each other as specified, but their position might change when you add more specs. By using Place, you anchor your circuit.

insts: InstanceDict or dict

Dictionary of the form {inst_name: PCell/Layout view}.

specs: Iterable

List of placement specifications and connector specifications between ports.

strict: bool

If True, any routing error will raise an exception and stop the program flow. If False, any routing error will give a warning and draw a straight line on an error layer. See i3.ConnectLogical for more information.

insts: InstanceDict

Dictionary of the placed instances and the created waveguides.

See also


Convenience PCell that uses place_and_route internally.

ConnectManhattan, ConnectBend, ConnectManhattanTapered, ConnectLogical, Circuit


from technologies import silicon_photonics
import ipkiss3.all as i3
from picazzo3.wg.splitters import WgYSplitter, WgYCombiner

class MyPCell(i3.PCell):
    class Layout(i3.LayoutView):
        def _generate_instances(self, insts):
            insts += i3.place_and_route(
                    'splitter': WgYSplitter(),
                    'combiner': WgYCombiner()
                    i3.Place('splitter', (0, 0)),
                    i3.PlaceRelative('combiner', 'splitter', (30, 20)),
                    i3.ConnectManhattan('splitter:arm1', 'combiner:arm1', "wg_name", bend_radius=5.0),
            return insts

        def _generate_ports(self, ports):
            ports += i3.expose_ports(self.instances, {'splitter:center': 'input', 'combiner:center': 'output'})
            return ports

pcell = MyPCell()
pcell_lo = pcell.Layout()