Skip to main content

python library to generate GDS layouts

Project description

gdsfactory 6.90.3

docs PyPI Conda Version Dockerhub PyPI Python issues forks GitHub stars Downloads Downloads Downloads MIT codecov black Binder Colab

logo

gdsfactory is a python library to design chips (Photonics, Analog, Quantum, MEMs, ...), 3D objects for 3D printing or PCBs. It's like Android or Linux for hardware design.

You can describe your hardware in code (python or YAML), verify them (DRC, simulation, extraction) and validate them (to make sure they meet the specifications after fabrication).

workflow

It provides you and end to end design flow to:

  • Design (Layout, Simulation, Optimization)
    • Define Components using parametric cells functions in python or YAML.
    • Test component settings, ports and geometry to avoid unwanted regressions.
    • Capture design intent in a schematic.
  • Verify (DRC, DFM, LVS)
    • Run simulations directly from the layout thanks to the simulation interfaces. No need to draw the geometry more than once.
      • Run Component simulations (solve modes, FDTD, EME, TCAD, thermal ...)
      • Run Circuit simulations from the Component netlist (Sparameters, Spice ...)
      • Build Component models and study Design For Manufacturing.
    • Create DRC rule decks in Klayout.
    • Ensure complex layouts match their design intent (Layout Versus Schematic).
  • Validate
    • Define layout and test protocols simultaneously, so when the chips come back you already know how to test and analyze them.
    • Model extraction: extract the important parameters for each component.
    • Build a data pipeline from raw data, to structured data and dashboards for monitoring your chip performance.

As input, you write python or YAML code.

As output you write a GDSII or OASIS file that you can send to your foundry for fabrication. It also exports component settings (for measurement and data analysis) and netlists (for circuit simulations) in YAML.

layout_to_components

flow

It provides you a common syntax for design (KLayout, gdstk, Ansys Lumerical, tidy3d, MEEP, MPB, DEVSIM, SAX, MEOW ...), verification and validation.

tool interfaces

Multiple foundries have gdsfactory PDKs available. Talk to your foundry to access their gdsfactory PDK as some are only provided under NDA:

You can also access:

Installation

You have 2 options to install gdsfactory:

1. Installation for new users

If you don't have python installed on your system you can download the gdsfactory installer that includes python3, miniconda and all gdsfactory plugins.

You can also install python with mamba package manager (faster than conda):

OS Architecture Download
Linux x86_64 (amd64) Mambaforge-Linux-x86_64
Linux aarch64 (arm64) Mambaforge-Linux-aarch64
Linux ppc64le (POWER8/9) Mambaforge-Linux-ppc64le
OS X x86_64 Mambaforge-MacOSX-x86_64
OS X arm64 (Apple Silicon) Mambaforge-MacOSX-arm64
Windows x86_64 Mambaforge-Windows-x86_64

Once you have python installed, open Anaconda Prompt and then install the latest gdsfactory using pip.

anaconda prompt

pip install gdsfactory --upgrade
gf install klayout-integration

Then you need to restart Klayout to make sure you activate the klayout gdsfactory integration.

2. Installation for developers

For developers you need to fork the GitHub repository, git clone it (download it), git add, git commit, git push your improvement. Then pull request your changes to the main branch from the GitHub website. For that you can install gdsfactory locally on your computer in -e edit mode.

git clone https://github.com/gdsfactory/gdsfactory.git
cd gdsfactory
pip install -e . pre-commit
pre-commit install
gf install klayout-integration

Update gdsfactory

  • Users can pip install gdsfactory --upgrade
  • Developers can git pull the GitHub repository you downloaded and installed on your computer.

Some PDKs may require a specific versions of gdsfactory, so make sure you install the correct gdsfactory version specified in the pyproject.toml file. This will automatically happen when you install gdsfactory as one of the PDK dependencies. For example pip install gf180 will install the latest gdsfactory version that has been tested for the GlobalFoundries180 PDK.

This code will tell you which gdsfactory you are using:

import gdsfactory as gf

gf.config.print_version()

Plugins

You need to install the plugins separately.

You can install most plugins with:

pip install "gdsfactory[full,gmsh,tidy3d,devsim,meow,database]" --upgrade

Or you can install only the ones you need.

  • pip install "gdsfactory[full]" for 3D rendering.
  • pip install "gdsfactory[tidy3d]" tidy3d plugin for FDTD simulations on the cloud.
  • pip install "gdsfactory[gmsh]" for mesh plugins.
  • pip install "gdsfactory[devsim]" for TCAD simulations.
  • pip install "gdsfactory[meow]" for EME (Eigen Mode Expansion) simulations.
  • mamba install pymeep=*=mpi_mpich_* -y for open source FDTD MEEP simulations. Notice that it works for MacOS and Linux, so for Windows you need to use the WSL (Windows Subsystem for Linux).

Docker container

Alternatively, one may use the pre-built Docker image from hub.docker.com/r/joamatab/gdsfactory or build it yourself with:

docker build -t joamatab/gdsfactory .

For example, VS Code supports development inside a container, see Developing inside a Container for details.

Getting started

Testimonals

"I've used gdsfactory since 2017 for all my chip tapeouts. I love that it is fast, easy to use, and easy to extend. It's the only tool that allows us to have an end-to-end chip design flow (design, verification and validation)."

Joaquin Matres - Google

"I've relied on gdsfactory for several tapeouts over the years. It's the only tool I've found that gives me the flexibility and scalability I need for a variety of projects."

Alec Hammond - Meta Reality Labs Research

"The best photonics layout tool I've used so far and it is leaps and bounds ahead of any commercial alternatives out there. Feels like gdsfactory is freeing photonics."

Hasitha Jayatilleka - LightIC Technologies

"As an academic working on large scale silicon photonics at CMOS foundries I've used gdsfactory to go from nothing to full-reticle layouts rapidly (in a few days). I particularly appreciate the full-system approach to photonics, with my layout being connected to circuit simulators which are then connected to device simulators. Moving from legacy tools such as gdspy and phidl to gdsfactory has sped up my workflow at least an order of magnitude."

Alex Sludds - MIT

"I use gdsfactory for all of my photonic tape-outs. The Python interface makes it easy to version control individual photonic components as well as entire layouts, while integrating seamlessly with KLayout and most standard photonic simulation tools, both open-source and commercial.

Thomas Dorch - Freedom Photonics

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gdsfactory-6.90.3.tar.gz (749.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gdsfactory-6.90.3-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file gdsfactory-6.90.3.tar.gz.

File metadata

  • Download URL: gdsfactory-6.90.3.tar.gz
  • Upload date:
  • Size: 749.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for gdsfactory-6.90.3.tar.gz
Algorithm Hash digest
SHA256 59a051af7cd1584650ff3c67a9f420c287b4540125bfddb987e79f3f671519f2
MD5 7cbc4e1791a68b5feed6a512816d9b65
BLAKE2b-256 6c8b5138230593f32b5b1ed8b6335b6169c18d92249c902939101130804c6c1b

See more details on using hashes here.

File details

Details for the file gdsfactory-6.90.3-py3-none-any.whl.

File metadata

  • Download URL: gdsfactory-6.90.3-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for gdsfactory-6.90.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d300c0d8544cd2ff5a3f37f5f3ee6bbccb0aa8091896f86128b7554550f61833
MD5 50da536d7d8e010813475fb87b991ada
BLAKE2b-256 bf426697afdd23b551f9629355e159f07075957958bb18fc795d07b8133c8cd5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page