Build Status

PHIDL

PHotonic and Integrated Device Layout - GDS CAD layout and geometry creation for photonic and superconducting circuits

pg.packer(D_list, spacing = 1.25, aspect_ratio = (2,1))

phidl example image

Installation / requirements

About PHIDL

fiddle (verb) - /ˈfidl/ - to make minor manual movements, especially to adjust something

PHIDL is an open-source GDS-based CAD tool for Python 2 and 3 which extends and simplifies the excellent gdspy. It strives to simplify GDSII geometry creation by making the design process layout-driven, rather than coordinate-driven. The base installation includes a large library of simple shapes (e.g. rectangles, circles), photonic structures (e.g. sine curve waveguides), and superconducting nanowire shapes (e.g. single photon detectors) which are fully parameterized. It also has a built-in quick-plotting function based on Qt (or matplotlib) which allows you view the state of any GDS object, useful when scripting geometry-making functions. It also has a very thorough tutorial as well which will walk you through the process of getting acquainted with PHIDL.

The purpose of PHIDL is to fill a void in the GDS design space: creation of elements in a simple, layout-driven, parameterized way, without a large amount of code overhead. Many GDS tools exist, but they tend to fall in one of two categories: (1) GUI-based layout tools with ad-hoc scripting interfaces, or (2) full-featured Cadence-style layout software which requires 30 lines of boilerplate/overhead code just to draw a simple ring.

The goal is to bring the usability of Illustrator / Inkscape drawing programs to the GDS scripting world. Like Python itself, it aims to be readable, and intuitive. For instance, when building a geometry you don't have to worry about what the exact coordinates are anymore. If you want to separate two ellipses in the x direction by 5 units, you can do things like this:

ellipse1.xmin = ellipse2.xmax + 5

or if you want to move then rotate one ellipse by 45 degrees you can do

ellipse2.move([1,7]).rotate(45)

There's a few dozen shortcuts like this that make life easier built into PHIDL--they're simple, but they make a world of difference when you just want to e.g. space a ring resonator some distance from a waveguide without having to track each and every coordinate of the shape.

phidl example image

There's also a "port" functionality which allows you to snap together geometry like Legos without caring about where exactly the absolute coordinates of either geometry is. For instance, connecting the above misaligned rectangles is a two-line command:

phidl example image

It also allows you to do things like add text and create smooth or straight routing curves between "ports" of different devices, convenient for making electrical or optical connections:

phidl example image phidl example image

Other useful functionality available are standard operations like booleans:

phidl example image

and less standard ones like creating outlines. A whole layout can be outlined directly in the GDS without requiring you to use Beamer (useful for positive-tone resist structures):

pg.outline(D, distance = 0.7, layer = 4)

phidl example image

The geometry library also has useful resolution test-structures built into it, for instance

pg.litho_calipers(num_notches = 7, offset_per_notch = 0.1)
pg.litho_steps(line_widths = [1,2,4,8,16])
pg.litho_star(num_lines = 16, line_width = 3)

phidl example image

There are also handy functions to help pack shapes into as small an area as possible:

pg.packer(D_list, spacing = 1.25, aspect_ratio = (2,1))

phidl example image

You can also do things like create a backing fill to make sure the resist develops uniformly while still creating a solid ground plane, with user-defined margins. Below is an image of a device which needed a ground plane. A single-line fill function was able to fill the required area (purple), electrically connecting all of the ground structures together:

phidl example image

Changelog

1.3.0 (May 5, 2020)

New features

Changes

Bugfixes

1.2.2 (January 17, 2020)

Bugfixes

1.2.1 (January 13, 2020)

New features

Changes

Bugfixes

1.2.0 (December 1, 2019)

New features

Changes

Bugfixes

1.1.0 (October 16, 2019)

New features

Changes

Bugfixes

1.0.3 (May 23, 2019)

Bugfixes

1.0.2 (March 26, 2019)

New features

Changes

Bugfixes

1.0.1 (Jan 21, 2019)

New features

Bugfixes

1.0.0 (Jan 14, 2019)

New features

Changes

0.9.0 (Oct 9, 2018)

New features

Bugfixes

0.8.10 (August 23, 2018)

Bugfixes

0.8.9 (July 24, 2018)

New features

Bugfixes

0.8.8 (July 19, 2018)

New features

Bugfixes

0.8.7 (July 11, 2018)

Bugfixes

0.8.6 (July 9, 2018)

New features

Changes

Bugfixes

0.8.5 (June 15, 2018)

New features

Bugfixes

0.8.4 (June 6, 2018)

New features

Changes

Bugfixes

0.8.2 (Apr 19, 2018)

New features

Changes

Bugfixes

0.8.1 (Feb 7, 2018)

New features

Changes

Bugfixes

0.8.0 (Dec 6, 2017)

New features

Changes

Bugfixes

0.7.1 (August 28, 2017)

New features

Changes

Bugfixes

0.7.0 (May 26, 2017)

New features

Changes

Bugfixes

0.6.5 (Apr 3, 2017)

New features

Changes

Bugfixes

0.6.4 (Feb 21, 2017)

New features

0.6.3 (Jan 23, 2017)

Bugfixes

0.6.2 (Jan 13, 2017)

New features

Changes

Bugfixes

0.6.1 (Jan 9, 2017)

New features

Changes

Bugfixes

0.6.0 (Dec 13, 2016)

Changes

New features

Bugfixes

0.5.6 (Dec 12, 2016)

Bugfixes

Changes

New features

0.5.5

Bugfixes

0.5.4 (Dec 5, 2016)

Changes

Bugfixes

0.5.3 (Nov 22, 2016)

New features

Changes

0.4.1 (Nov 3, 2016)

0.3.0 (Sep 12, 2016)