expose_ports

ipkiss3.all.expose_ports(instances, port_name_map=None, optical='explicit', electrical='explicit')

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

Parameters:

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

instances for which to expose the ports

port_name_map: dict

mapping of instance port names to external port names For instance: {“inst1:in1”: “in”, “inst1:out1”: “out”}

optical: str, either ‘explicit’ or ‘all’

String, defines which optical ports to expose. Default is ‘explicit’. If ‘explicit’, only the optical ports specified in ‘port_name_map’ will be exposed. If ‘all’, all the unconnected optical ports will be exposed and renamed as ‘inst-name_port-name’ unless specified otherwise in ‘port_name_map’.

electrical: str, either ‘explicit’, ‘all’ or ‘unconnected’

String, defines which electrical ports to expose. Default is ‘explicit’. If ‘explicit’, only the electrical ports specified in ‘port_name_map’ will be exposed. If not, ‘all’ or ‘unconnected’ electrical ports will be exposed and renamed as ‘inst-name_port-name’ unless specified otherwise in ‘port_name_map’.

Returns:

ports: PortList

List of external ports.

Examples

>>> ports = i3.expose_ports(insts, {
>>>     'inst1:in1': 'in',
>>>     'inst1:out1': 'out',
>>> })
>>> ports = i3.expose_ports(insts, optical='all', electrical='all')