RoutePortsAroundCorner¶
-
class
picazzo3.container.route_ports.
RoutePortsAroundCorner
(*args, **kwargs)¶ Routes ports around a corner of the component in a given direction.
Parameters: trace_template: ( PCell and _WaveguideTemplate ), *None allowed*
Template for all ports, defaults to TECH.PCELLS.WG.DEFAULT.When set to None, the waveguide templates of the ports will be used.
auto_transition: ( bool, bool_, bool or int )
If True, automatically transition all ports of contents to the given trace template. If False, no transitions are applied, which might lead to a discontinuity in the waveguide. Also, if trace_template is None, no transitions are applied.
port_labels: ( List with type restriction, allowed types: <type ‘str’> ), *None allowed*
Labels of the ports to be processed. Set to None to process all ports.
contents: PCell
the contents of the container: the child cell
external_port_names:
Dictionary for remapping of the port names of the contents to the external ports
name:
The unique name of the pcell
Other Parameters: trace_templates: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked
list of templates to apply to all ports
waveguides: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked
bundle: ( PCell ), locked, *None allowed*
bundle of waveguides added to the contents, generated based on the supplied waveguides list
Views
-
Layout
¶ Parameters: angle_step: float and number > 0
Angle step for rounding.
first_step_direction:
The direction to take when rounding the corner. By default it is 90 degrees off the output direction
first_step_spacing: float and number > 0
The spacing between the routes ( in the section after the first bend )
manhattan: ( bool, bool_, bool or int )
Adds rectangular blocks in the bends to avoid as much as possible non-manhattan angles.
reference_coordinate_first_step: float
The minimum 1D coordinate of the first bend of the routes
view_name: str and ( Alphanumeric string or Contains _$ )
The name of the view
max_s_bend_angle: float and ]0.0,90.0]
spacing: float
spacing between adjacent output waveguides
target_coordinate: ( float ), *None allowed*
The coordinate where the endpoints of the waveguides are aligned. An x-coordinate when routing toEAST or WEST, a y-coordinate when routing to NORTH or SOUTH. When the waveguides extend beyond thetarget coordinate, the value is ignored.
align_outputs: ( bool, bool_, bool or int )
If True, all outputs will be aligned to the outermost waveguide end, even if it extends beyond its target coordinate.
output_direction:
direction of the output waveguides. Should be EAST, WEST, NORTH or SOUTH
reference_coordinate: ( float ), *None allowed*
The coordinate where the first waveguide will be aligned. An x-coordinate if routed towards NORTH or SOUTH,a y-coordinate when routed towards EAST or WEST. If not specified, the x or y coordinate of the first port is taken.
area_layer_on: ( bool, bool_, bool or int )
When True, the waveguide area will be covered by i3.Rectangles on all cover layers.
routes:
routes along which the waveguides will be generated
contents_transformation: GenericNoDistortTransform
flatten_contents: ( bool, bool_, bool or int )
if True, it will insert the contents as elements in the layout, rather than as an Instance
bend_radius: float and number > 0
Bend radius for the auto-generated bends.
rounding_algorithm:
Rounding algorithm used to generate the bends. Can be circular, spline, ….
Other Parameters: max_s_bend_angles: locked
spacings_from_reference: locked
target_coordinates: locked
Examples
from technologies import silicon_photonics import ipkiss3.all as i3 from picazzo3.filters.ring import RingRect180DropFilter my_ring = RingRect180DropFilter() from picazzo3.container.route_ports import RoutePortsAroundCorner my_ring_routed = RoutePortsAroundCorner(contents=my_ring, port_labels=["W1", "W0"]) # ports to be routed layout = my_ring_routed.Layout(first_step_direction=i3.DIRECTION.SOUTH, # when rounding corner, go this direction first output_direction=i3.DIRECTION.EAST, # final output direction first_step_spacing=8.0) # Spacing between the waveguides. layout.visualize(annotate=True)
""" By default the area between the routes is drawn, you can override this using the area_layer_on parameter """ from technologies import silicon_photonics import ipkiss3.all as i3 from picazzo3.filters.ring import RingRect180DropFilter my_ring = RingRect180DropFilter() from picazzo3.container.route_ports import RoutePortsAroundCorner my_ring_routed = RoutePortsAroundCorner(contents=my_ring, port_labels=["W1", "W0"]) # ports to be routed layout = my_ring_routed.Layout(first_step_direction=i3.DIRECTION.SOUTH, # when rounding corner, go this direction first output_direction=i3.DIRECTION.EAST, # final output direction area_layer_on=False, first_step_spacing=8.0) # Spacing between the waveguides. layout.visualize(annotate=True)
""" Instead of E0, W0, E1, (east 0, west 0 ) ... we can also use the actual port names as port labels """ from technologies import silicon_photonics import ipkiss3.all as i3 from picazzo3.filters.ring import RingRect180DropFilter my_ring = RingRect180DropFilter() from picazzo3.container.route_ports import RoutePortsAroundCorner my_ring_routed = RoutePortsAroundCorner(contents=my_ring, port_labels=["in1", "out2"]) # ports to be routed layout = my_ring_routed.Layout(first_step_direction=i3.DIRECTION.SOUTH, # when rounding corner, go this direction first output_direction=i3.DIRECTION.EAST, # final output direction first_step_spacing=8.0) # Spacing between the waveguides. layout.visualize(annotate=True)
""" Be aware that the order of the port_labels is used to determine to the order of the created routes. If you encounter crossing routes, you might want to change the order of the labels""" from technologies import silicon_photonics import ipkiss3.all as i3 from picazzo3.filters.ring import RingRect180DropFilter my_ring = RingRect180DropFilter() layout = my_ring.Layout() from picazzo3.container.route_ports import RoutePortsAroundCorner # We first route the E0 (east0 ) port, if we had chosen # ['W1', 'W0', 'E0'] this would have resulted in crossing waveguides my_ring = RoutePortsAroundCorner(contents=layout, port_labels=["E0", "W1", "W0"]) layout = my_ring.Layout(first_step_direction=i3.DIRECTION.SOUTH, # when rounding corner, go this direction first output_direction=i3.DIRECTION.EAST, # final output direction reference_coordinate_first_step=-20.0, first_step_spacing=8.0) # Spacing between the waveguides. layout.visualize(annotate=True)
""" As most containers, RoutePortsAroundCorner supports auto transitions. This means that you can choose a trace template for the routes that's different from the one used in the contents. """ from technologies import silicon_photonics import ipkiss3.all as i3 from picazzo3.filters.ring import RingRect180DropFilter my_ring = RingRect180DropFilter() layout = my_ring.Layout() from picazzo3.container.route_ports import RoutePortsAroundCorner from picazzo3.traces.wire_wg import WireWaveguideTemplate wtpl = WireWaveguideTemplate() wtpl_layout = wtpl.Layout(core_width=.7) my_ring = RoutePortsAroundCorner(trace_template=wtpl, auto_transition=True, contents=my_ring, port_labels=["E0", "W1", "W0"]) layout = my_ring.Layout(first_step_direction=i3.DIRECTION.SOUTH, # when rounding corner, go this direction first output_direction=i3.DIRECTION.EAST, # final output direction reference_coordinate_first_step=-20.0, target_coordinate=40.0, first_step_spacing=8.0) # Spacing between the waveguides. layout.visualize(annotate=True)
"""The target_coordinate parameter can be used to specify the 'target coordinate' of the routes. This is illustrated in this example""" from technologies import silicon_photonics import ipkiss3.all as i3 from picazzo3.filters.ring import RingRect180DropFilter my_ring = RingRect180DropFilter() layout = my_ring.Layout() from picazzo3.container.route_ports import RoutePortsAroundCorner # We first route the E0 (east0 ) port, if we had chosen # ['W1', 'W0', 'E0'] this would have resulted in crossing waveguides my_ring = RoutePortsAroundCorner(contents=layout, port_labels=["E0", "W1", "W0"]) layout = my_ring.Layout(first_step_direction=i3.DIRECTION.SOUTH, # when rounding corner, go this direction first output_direction=i3.DIRECTION.EAST, # final output direction reference_coordinate_first_step=-20.0, target_coordinate=40.0, first_step_spacing=8.0) # Spacing between the waveguides. layout.visualize(annotate=True)
-