LayoutView

The Layout View of a parametric cell defines the drawings which are needed to obtain masks for fabrication of the IC. For more information visit our guide.

class ipkiss3.all.LayoutView
Parameters:
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

flatten(level=-1)

Flattens this LayoutView in place. (recursive)

Parameters:
levelHow many levels deep should the hierarchy be flattened. -1 means all levels (default)
flat_copy(level=-1)

Creates a flat copy of a layout, in a new cell.

Parameters:
level: How many levels deep should the hierarchy be flattened. -1 means all levels (default)
write_gdsii(filename_or_stream, unit=None, grid=None, layer_map=None, filter=None, timestamp=None)

Writes a LayoutView, including all its dependencies to a GDSII file.

Parameters:
filename_or_streamstring , file object

When a string is provided, a file object will be created When a stream of file object is passed, this will be used The file object should be binary and set in write mode.

unitpositive number

The User units to be used in the GDSII file. By default, the value is extracted from TECH.METRICS.UNIT

gridpositive number

The database units (grid) to be used in the GDSII file. By default, the value is extracted from TECH.METRICS.GRID the user unit should be an integer multiple of the grid

layer_mapdict or LayerMap object

A dictionary-like object to map the IPKISS layers onto GDSII layer numbers and data-types.

filter: Filter

Optional, a filter to be applied instead of the default.

timestamp: datetime.datetime or None

Optional, a fixed timestamp to apply to the library and all cells written. If None, the current date and time will be used.

Returns:
When running from a script, the method returns nothing.
When running in an IPython Notebook, the method returns a FileLink object that the user can use to
download the generated GDSII file.
visualize(canvas_size=None, box=None, show=True, display_styles=None, default_display_style=None, annotate=False, labels=True, figure=None, legacy=False, grid=True)

Visualize a layout.

Parameters:
canvas_size: list

Size of the canvas: [width, height]

show: boolean

Show the image, default is True.

display_styles: DisplayStyleSet

The display style set, default is TECH.DISPLAY.DEFAULT_DISPLAY_STYLE_SET.

default_display_style: DisplayStyle

The default display style in case a layer is not associated with one, the default is DisplayStyle(alpha=0.4).

annotate: boolean

Whether to annotate the ports, default is False.

labels: boolean

Whether to show the labels, default is True.

figure: Figure

Reuse an existing matplotlib Figure. By default, a new Figure will be created.

legacy: boolean

Use the legacy version of visualize, default is False.

grid: boolean

Show the gridlines, default is True.

Returns:
A matplotlib Figure.
cross_section(cross_section_path, process_flow=None, path_origin=0.0)

Generate a cross section of the LayoutView along a path

Parameters:
cross_section_path: i3.Shape

shape, in layout coordinates, along which to take the cross-section

process_flow: VFabricationProcessFlow

virtual fabrication process flow. If not specified (None), TECH.VFABRICATION.PROCESS_FLOW will be used

path_origin: float

origin to use for the ordinate axis of the cross-section

visualize_3d_x_crosssection(x_co, resolution=10)

Generate a 3D cross-section along the y axis at a given x coordinate.

visualize_3d_y_crosssection(y_co, resolution=10)

Generate a 3D cross-section along the x axis at a given y coordinate.

visualize_2d(show=True, save_to_image=False, save_to_image_path='./', save_to_image_filename_without_ext=None, fig_size_factor=0.1, enter_mainloop=True, enter_tk_mainloop=None, aspect_ratio_equal=True, size=None, process_flow=None, legend_position='right', **kwargs)

Visualize a top-down view of the virtually fabricated layout.

Parameters:
enter_mainloopboolean

When True, hold the program flow until the figure has been closed by the user. When False, you have to manually plot the figure. This can be done by doing >>> from matplotlib.pyplot import show >>> show()

showboolean

Not used at the moment.

enter_tk_mainloopboolean

Deprecated. Use enter_mainloop.

save_to_imageboolean

When True, save the visualization as an svg + png image, in the save_to_image_path folder. All parameters below influence where / how the image is stored.

save_to_image_pathstring

Path to save the image to, when save_to_image==True.

save_to_image_filename_without_extstring

If not used (default = None), use the name of the component as filename. If a string, use that name.

fig_size_factorfloat

Deprecated, do not use.

aspect_ratio_equalboolean

When True, keep the aspect ratio of the saved image.

sizetuple of floats (float, float)

The width / height of the saved figure (in inches).

process_flow: VFabricationProcessFlow

The process flow to use. If not specified (None), TECH.VFABRICATION.PROCESS_FLOW will be used.

legend_position: str

Position of the legend relative to the figure, the options are “top”, “bottom”, “left”, “right”. The default value is “right”.

kwargs: dict

Any keyword arguments to SimulationVolumeVisualization2D

to_canvas(project_dir=None, project_name=None, library_name=None, show=True, annotate=None, netlist_extraction_settings=None, verbose=False)

Open a schematic representation of the layout in IPKISS Canvas.

Parameters:
project_dir: Path

Directory where the project and library files will be stored. When None, use the current working directory.

project_name: Optional[str]

Name of the project. When None, use the cell name.

library_name: Optional[str]

Name of the library that will contain the cell. When None, use the project name. In this case, the iclib and icproject will have the same name.

show: bool

When True (default), open IPKISS Canvas after exporting the PCell. If Canvas is already open, the design will be refreshed (check out the guide in the documentation for more details).

annotate: Optional[Dict]

A list of annotation functions to be used for specified view classes: {view_type: [annotation_function1, annotation_function2, …], …} The pcell and each of its subcells will be annotated with the specified annotation functions. If the layout view matches multiple view types, all specified annotation functions will be applied. If annotate is None, the default annotations will be used. To remove annotations, specify an empty dict.

netlist_extraction_settings: NetlistExtractionSettings

Settings that influence how the netlist is extracted. If None, by default extract electrical connections.

verbose: bool

When True, print some useful information about the export (i.e., schematic diffs when exporting to the same project)