Ports Reference

Ports are locations on the layout where connections are made. Each port has a name and a location. In IPKISS there are optical ports for the connection of optical waveguides or fibers or electrical ports for the connection with electrical wires.

class MyPCell(i3.PCell):
    class Layout(i3.LayoutView):

        def _generate_ports(self, ports):
            ports += i3.OpticalPort(name="in", position=(0.0,0.0), angle=180.0)
            ports += i3.OpticalPort(name="out1", position=(8.0,3.0), angle=0.0)
            ports += i3.OpticalPort(name="out2", position=(8.0,-3.0), angle=0.0)
            return ports

Optical Ports

OpticalPort In-plane Port in the Optical Domain
VerticalOpticalPort Out-of-plane Port in the Optical Domain inclination angle should be off-zero.
OpticalPortProperty Property type for storing an OpticalPort

Electrical Ports

ElectricalPort Port in the electrical domain.
ElectricalPortProperty Property type for storing an ElectricalPort

Create Ports

When creating a circuit, you can use i3.expose_ports to easily expose the ports of the instances.

class MyPCell(i3.PCell):
    class Layout(i3.LayoutView):

        def _generate_instances(self, insts):
           insts += i3.SRef(reference=self.wg, name='wg1')
           insts += i3.SRef(reference=self.wg, name='wg2', position=(30, 0))
           return insts

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

           return ports
expose_ports Expose ports of a list of instances by copying and renaming the instance-ports specified in the port name map.