class ipkiss3.all.NetlistFromLayout

Netlist extraction from a layout view.

This allows to extract the netlist based on layout information.

The optical nets are extracted by comparing whether the optical ports in the layout are connecting. An optical port is connected when they touch, have opposite angle, and their trace template matches. The latter is important to ensure there’s no error in user’s design.

By default, electrical nets are only created for exposed electrical ports, but not for connectivity between instances inside the circuit.

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

Other Parameters:
layout_view: _LayoutView, locked

Layout view on which this netlist is based


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)])

            # Place 2 waveguides which are connected (output of wg1 is connected to input of wg2)
            insts += i3.SRef(name='wg1', reference=wg, position=(0, 0))
            insts += i3.SRef(name='wg2', reference=wg, position=(10, 0))

            return insts

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

    class Netlist(i3.NetlistFromLayout):

pcell = MyPCell()

nl = pcell.Netlist()

# This will print:

# netlist:
# --------
# instances:
#     - wg1 : <Single instance in netlist of WG_TRACE_1>
#     - wg2 : <Single instance in netlist of WG_TRACE_1>

# terms:
#     - input
#     - output

# nets:
#     - output-wg2:out: <OpticalLink output to wg2:out>
#     - input-wg1:in: <OpticalLink input to wg1:in>
#     - wg1:out-wg2:in: <OpticalLink wg1:out to wg2:in>