Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can download the latest Python release from the official website, or use a package manager (for example, your distribution's default in Linux or Homebrew in macOS). Make sure python is accessible by terminal. Using an IDE, such as Visual Studio Code (free), is recommended.

If you manage multiple projects and are hesitant to modify your environment, you can for example use pyenv.

...

Code Block
languagebash
pip3 install phidl

In addition to PHIDL, you may need maths packages to calculate your device's geometry. The most common such package is numpy.

Scripting a GDSII file

Although this page should be sufficient to get you started, it's well worth it to have a look at the full PHIDL documentation. The tutorials are a great place to learn its various functions. The geometry reference lists all inbuilt geometry types, including important aids such as text and and lithography test structures. Make sure you go through its contents: the inbuilt types can save you a large amount of time.

...

That said, job file preparation software for e-beam and photolithography (such as LayoutBEAMER, or that on the Heidelberg mask writers workstation) wll let you move a pattern's origin wherever you need it.

Running on Korat and Minx

PHIDL and necessary packages have been installed on CNF's Korat and Minx servers, which are accessible from ThinLinc clients in the cleanroom, CAD room or remotely through the Cornell VPN. Links to Korat and Minx terminals are found in the "Applications > CNF" menu. In either terminal, cd to the folder containing your script file(s), e.g. filename.py, and type:

Code Block
languagebash
bash
export PYTHONPATH=/usr/local/phidl/lib64/python3.6/site-packages:/usr/local/phidl/lib/python3.6/site-packages:$PYTHONPATH
ipython3 -i filename.py

If your code is structured like the examples above, a .gds file will be saved, and a plot of your layout will be displayed.

Alternatives to PHIDL

Another CNF resource is JetStream, a Java GDSII library.

...