Release notes IPKISS 3.1.3

IPKISS 3.1.3 provides a new compact model framework. In addition, it contains several bugfixes and small improvements. The highlights are shown below:

  1. New compact model framework
  2. Bundled editor
  3. Custom routing in IPKISS.eda
  4. Full list of improvements and bugfixes (link to online doc)


1. New compact model framework

Redesigned model syntax

We redesigned the syntax to define compact models, to make it simpler to define, and more reliable to use. In addition, the definition of the compact model has been separated from the PCell, allowing better reuse, better performance and better scaling. The framework is backward compatible, allowing people to gradually convert to the new framework.

We did many changes in the backend to increases the robustness, performance, and stability of our compact models.

Here's a peek preview on how a waveguide model looks like in the new syntax:

import ipkiss3.all as i3

class WaveguideModel(i3.CompactModel):
    """First-order dispersion waveguide model."""
    parameters = [

    terms = [

    def calculate_smatrix(parameters, env, S):
        dneff = -(parameters.n_g - parameters.n_eff) / parameters.center_wavelength
        neff_total = parameters.n_eff + (env.wavelength - parameters.center_wavelength) * dneff
        loss = 10 ** (-parameters.loss_dB_m * parameters.length * 1e-6  / 20.0)
        S['in', 'out'] = S['out', 'in'] = exp(1j * 2 * pi / env.wavelength * neff_total * parameters.length) * loss

Adding circuit models to libraries and PDKs

With IPKISS 3.1.3, it now becomes easier to augment a PDK or library with your own compact models (or reuse existing ones). They can be defined in a separate file and linked through the new CircuitModelView of a PCell.

Demolib has been upgraded to explain how models can be added. We also have a dedicated circuit model tutorial to help device engineers get started building their own models.

Time-domain API

There is now a simple time-domain API to set up test benches and run transient simulations. See the tutorial to learn how to define time-domain models and how to run time-domain simulations.

Overall improvements on the simulation side

Besides the improved syntax, there are several other improvements

  • Model compilation is now much faster and robust, and supports more of the Python language features,
  • models can be easily debugged interactively,
  • better exception handling,
  • models that are converted to the new syntax on average run faster. For example, on the filter toolbox, a speed improvement of ~ 25% is measured for running frequency-sweep simulations.

See the changelog below for more information.


2. Bundled editor

In our continuous effort to make IPKISS easier to use, PyCharm IDE now becomes our default editor of choice. For users unfamiliar with PyCharm IDE: PyCharm is an Python editor with several important features that are useful for designing with IPKISS: powerful code completion, debugging tools, project management etc. Because of this, it fits well with our vision that photonics designers can build up their core IP as a set of modules and reuse throughout multiple projects.

By opening PyCharm from our Luceda Control Center, you have immediate access to all the code samples, and you can start new projects which are automatically set up to use the IPKISS interpreter:

Project with PyCharm

By default, samples are now installed in the user home folder, under <USER_HOME>/luceda/samples. When you create a new project in PyCharm, the default suggested location is <USER_HOME>/luceda/projects/project_name.


3. Custom routing in IPKISS.eda

PDK developers now have complete control over the way waveguides are generated inside their PDK when used in IPKISS.eda (i.e., triggered when pressing the 'generate all waveguides' macro). Different routing strategies can be defined and encoded in the PDK. See the changelog for more information on how to use it.

Project with PyCharm


4. Full list of improvements and bugfixes

This release features an updated syntax and backend for defining circuit simulation models for simulation with our circuit simulator Caphe. Get started here: circuit model tutorial. For more details check the Caphe section below.


  • The Luceda Control Center has been refreshed, and includes a PyCharm launcher. The PyCharm IDE (Python editor) is used for setting up design projects and writing IPKISS code.
  • PyCharm IDE support: when launched from the Luceda Control Center, the IPKISS / Python interpreter is set up for the user. For more info, please follow the PyCharm tutorial.
  • Samples: demolib contains a list of compact models, as an illustration for the new features in Ipkiss 3.1.3.
  • Doc: several improvements in the reference / API documentation.


  • The documentation generation of PropertyInitializer classes has changed. The signature of the compile_doc() method of MetaPropertyInitializer now has a doc argument to which any existing docstring on the class is passed. Power users who have overridden compile_doc in order to generate class documentation in their own desired format should not retrieve the original doc themselves anymore, and rather use what is passed in the new doc argument.


  • Improvement: Path elements with a variable extension are now supported and read from or written to GDSII: e.g. Path(..., path_type=PATH_TYPE.VARIABLE, extension=(1.0, 2.0)).
  • Improvement for Label elements exported to and imported from GDSII, for better interoperability with third party tools.
    • Before, Ipkiss exported and imported Label elements to GDSII TEXT elements with 'texttype' (layer datatype) fixed to 0. This works fine when only using Ipkiss but could give problems when combining multiple tools.
    • The GDSII layer datatype is now preserved during export and import of Label elements to GDSII file TEXT elements.
    • Label element height is now handled identically during GDSII export and import: specified as a magnification on the GDSII TEXT element. Note that not all third party tools support this, since this is just an interpretation of GDSII.
  • Bugfix: the straight_extension property of ShapeWindowTraceTransition is now reversed if the start and end trace templates are reversed, so the first value always refers to the start point and the second value to the end point.
  • Bugfix: GDSII STRCLASS records (used by Calma/Cadence only) are now ignored without raising an exception.
  • Improvement: in GDSCell it is now possible to ignore undefined layers in the technology's import layer map. This is controlled with the ignore_undefined_layers property of GDSCell.Layout.
  • Bugfix: TraceTransitionFromPort wrongly swapped the trace templates of the input and output port if reverse_templates=True
  • Bugfix: you can now properly compare pplayers, for example, if my_layer is TECH.PPLAYER.WG.CORE (this was previously not possible as layers could be created twice when the tech is not fully setup).
  • Explicitly set edgecolor during visualization of layout primitives. This fixes layout visualization for recent versions of matplotlib.
  • Improvement: pysics.basics.environment.Environment is now available from ipkiss3.all.
  • Improvement: ConnectComponents can now be imported with a minimal technology tree. It's now also available from ipkiss3.all.
  • Internal refactoring: CapheModelInstance is removed in favor of ModelInstance. ModelInstance can refer both to a CapheModelView and to a CircuitModelView.
  • Waveguide models by default take their length from the layout.
  • Time-domain API for circuit simulation: set up testbenches, run transient simulations, and retrieve the results.


  • Strongly improved syntax for defining compact models. See the circuit model tutorial.
  • Proper multimode support. See also the tutorial on how to define multimode models.
  • Model compilation is much faster and robust.
  • The simulation and model syntax are better separated from the simulation engine. This results in improved maintenance, robustness and performance.
  • Debug mode for debugging compact models interactively.
  • Better exception handling, causing no crashes when interrupting a simulation.
  • Reduced message verbosity when compiling models.
  • Backward compatibility has been ensured as much as possible, allowing for an easy transition from the old to the new style models. See also porting 312 --> 313.


  • Bugfix: the straight_extension parameter of the transitions between different trace templates (WireWaveguideTemplate->RibWaveguideTemplate, WireWaveguideTemplate->SocketWaveguideTemplate, WireWaveguideTemplate->ThinnedWireWaveguideTemplate) is now reversed if the trace templates were specified in reverse order.
  • Bugfix: the straight_extension parameter was not taken into account in SlottedWireWaveguideTransitionLinear and SlottedWireWaveguideTransitionLinearFromPort.
  • Bugfix: The width property trace templates that refer to other templates raised an exception.
  • Bugfix: PlaceAndConnect can now correctly identify broken links in circuits with links between electrical ports
  • Bugfix: in the containers that add rounded waveguides (FanoutPorts, RoutePortsEastWest, RoutePortsAroundCorner): the angle_step is now applied to the generated waveguides correctly, instead of defaulting to the technology value.
  • The bugfix on TraceTransitionFromPort (see above) corrects the ports of WireRibWaveguideTransitionFromPortLinear, WireRibWireWaveguideTransitionFromPortLinear, SlottedWireWaveguideTransitionFromPortLinear, WireSocketWaveguideTransitionFromPortLinear, ThinnedWireWireWaveguideTransitionFromPortLinear.
  • Remove absolute imports throughout picazzo, which caused some user code to fail if it has similar named Python files (


  • Improvement: A PDK is now allowed more fine-grained control over the way waveguides are generated inside the EDA tool (triggered when using the 'generate all waveguides' macro). The existing TECH.ROUTING.WAVEGUIDE_GENERATION_GUIDE_LAYERS (typically in the ipkiss/pdk_name/technology/ part of the PDK) now accepts a {layer: (routing_fn, wg_generation_fn)} item. layer is the IPKISS layer used for drawing the waveguide control shape. routing_fn is a function that transforms a start + end port into a shape, and wg_generation_fn returns an IPKISS layout view based on the shape (either calculated using the routing_fn, or manually drawn by the user on the waveguide control shape layer).
  • Bugfix (regression between 3.1.1 and 3.1.2): Label elements could not be exported anymore to OpenAccess.
  • Bugfix: openaccess libraries that refer to a technology now always load the technologies in the correct order. Previously, this could lead to problems when working with multiple open libraries, where pcell evaluation / waveguide generation would fail.
  • Improvement: Spaces and parentheses are filtered from Ipkiss color names upon export to display.drf files. Colors and stipples are now sorted by name.
  • Improvement: Waveguide routing layers (TECH.ROUTING.WAVEGUIDE_GENERATION_GUIDE_LAYERS) can now use reserved purposes (DRAWING, ...)

Backward compatibility notes

This release is fully compatible with Ipkiss 3.1.2, with two small exceptions:

  • the straight_extension property on transitions between different types of waveguides was previously not correctly handled.
  • waveguide lengths are now taken directly from the layout without having to set the view to 'CapheModelFromLayout'.

Please check the known backwards incompatibilities.


Starting from our extensive validated component library, we can assist you in the creation and validation of new model libraries