All Projects → gdsfactory → gdsfactory

gdsfactory / gdsfactory

Licence: MIT License
Python package to generate GDS layouts.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to gdsfactory

OpenROAD-flow-scripts
OpenROAD's scripts implementing an RTL-to-GDS Flow. Documentation at https://openroad-flow-scripts.readthedocs.io/en/latest/
Stars: ✭ 124 (+226.32%)
Mutual labels:  eda, gdsii
MatlabGDSPhotonicsToolbox
This is a Matlab library of functions to facilitate the design of Photonics Integrated Circuits GDS layout.
Stars: ✭ 62 (+63.16%)
Mutual labels:  gds, photonics
Devices.jl
Julia package for CAD of superconducting devices operating at microwave frequencies.
Stars: ✭ 16 (-57.89%)
Mutual labels:  gds, gdsii
gdstk
Gdstk (GDSII Tool Kit) is a C++/Python library for creation and manipulation of GDSII and OASIS files.
Stars: ✭ 171 (+350%)
Mutual labels:  eda, gdsii
stats for soil survey
S4SS: Statistics for Soil Survey
Stars: ✭ 21 (-44.74%)
Mutual labels:  eda
fdtd
A 3D electromagnetic FDTD simulator written in Python
Stars: ✭ 195 (+413.16%)
Mutual labels:  photonics
rust-vcd
Read and write VCD (Value Change Dump) files in Rust
Stars: ✭ 23 (-39.47%)
Mutual labels:  eda
copper
An open source PCB editor in rust
Stars: ✭ 26 (-31.58%)
Mutual labels:  eda
2019CCF
2019 CCF
Stars: ✭ 16 (-57.89%)
Mutual labels:  eda
nthu-route
VLSI EDA Global Router
Stars: ✭ 35 (-7.89%)
Mutual labels:  eda
CQELight
CQELight is an entreprise grade extensible and customisable framework for creating software with CQRS, DDD & Event Sourcing patterns
Stars: ✭ 21 (-44.74%)
Mutual labels:  eda
AMC
AMC: Asynchronous Memory Compiler
Stars: ✭ 31 (-18.42%)
Mutual labels:  eda
Market-Mix-Modeling
Market Mix Modelling for an eCommerce firm to estimate the impact of various marketing levers on sales
Stars: ✭ 31 (-18.42%)
Mutual labels:  eda
basic-image-eda
A simple image dataset EDA tool (CLI / Code)
Stars: ✭ 51 (+34.21%)
Mutual labels:  eda
PeakRDL-uvm
Generate UVM register model from compiled SystemRDL input
Stars: ✭ 25 (-34.21%)
Mutual labels:  eda
Incoherent-Light-Simulation
Simulation of the propagation of incoherent light, aiming to illustrate the concept of spatial coherence.
Stars: ✭ 98 (+157.89%)
Mutual labels:  photonics
gocells
Event Based Applications [DEPRECATED]
Stars: ✭ 69 (+81.58%)
Mutual labels:  eda
modesolverpy
Photonic mode solver with a simple interface.
Stars: ✭ 47 (+23.68%)
Mutual labels:  photonics
Springboard-Data-Science-Immersive
No description or website provided.
Stars: ✭ 52 (+36.84%)
Mutual labels:  eda
Exploratory Data Analysis Visualization Python
Data analysis and visualization with PyData ecosystem: Pandas, Matplotlib Numpy, and Seaborn
Stars: ✭ 78 (+105.26%)
Mutual labels:  eda

gdsfactory 4.4.6

docs pypi issues forks GitHub stars Downloads Downloads Downloads MIT codecov black Binder

gdsfactory is an EDA (electronics design automation) tool to Layout Integrated Circuits. It is build on top of phidl, gdspy and klayout and provides you with functions to build your GDSII components, PDKs and masks for different foundries.

You just need to adapt the functions to your foundry and build your own library of elements (see UBC PDK example).

gdsfactory provides you with functions that you can use to:

  • define components, circuits and masks in python or YAML
  • add routes between components
  • ensure you can build complex systems by testing settings, ports and GDS geometry

As input, you describe your layouts in python or YAML code.

As output it creates a GDSII file which is the most common filetype used by CMOS foundries. It also can output components settings (that you can use for measurement and data analysis) or netlists (for circuit simulations). You can also easily adapt this metadata output files to your needs.

For Photonics IC layout I used IPKISS for 7 years.

IPKISS is quite slow when working with large layouts, so in 2019 I stopped using it.

Then I tried all the commercial (Luceda, Cadence, Synopsys) and open source EDA tools (phidl, gdspy, picwriter, klayout-zero-pdk, nazca) looking for a fast and easy to use workflow.

The metrics for the benchmark were:

  1. Fast
  2. Easy to use
  3. Maintained / Documented / Popular

PHIDL was the outstanding winner thanks to its speed, code beauty and easy of use, and is written on top of gdspy (which came second), so you can also leverage all the goodies from gdspy.

Gdsfactory also leverages klayout and gdspy libraries for some functions.

What nice things come from phidl?

  • functional programming that follow UNIX philosophy
  • nice API to create and modify Components
  • Easy definition of paths, cross-sections and extrude them into Components
  • Easy definition of ports, to connect components. Ports in phidl have name, position, width and orientation (in degrees)
    • gdsfactory expands phidl ports with layer, port_type (optical, electrical, vertical_te, vertical_tm ...) and cross_section
    • gdsfactory adds renaming ports functions (clockwise, counter_clockwise ...)

What nice things come from klayout?

  • GDS viewer. gdsfactory can send GDS files directly to klayout, you just need to have klayout open
  • layer colormaps for showing in klayout, matplotlib, trimesh (using the same colors)
  • fast boolean xor to avoid geometric regressions on Components geometry. Klayout booleans are faster than gdspy ones
  • basic DRC checks

What functionality does gdsfactory provide you on top phidl/gdspy/klayout?

  • @cell decorator for decorating functions that create components
    • autonames Components with a unique name that depends on the input parameters
    • avoids duplicated names and faster runtime implementing a cache. If you try to call the same component function with the same parameters, you get the component directly from the cache.
    • automatically adds cell parameters into a component.info (full, default, changed) as well as any other info metadata (polarization, wavelength, test_protocol, simulation_settings ...)
    • writes component metadata in YAML including port information (name, position, width, orientation, type, layer)
  • routing functions where the routes are composed of configurable bends and straight sections (for circuit simulations you want to maintain the route bends and straight settings)
    • get_route: for single routes between component ports
    • get_route_from_steps: for single routes between ports where we define the steps or bends
    • get_bundle: for bundles of routes (river routing)
    • get_bundle_path_length_match: for routes that need to keep the same path length
    • get_route(auto_widen=True): for routes that expand to wider waveguides to reduce loss and phase errors
    • get_route(impossible route): for impossible routes it raises a warning and returns a FlexPath on an error layer
  • testing framework to avoid unwanted regressions
    • checks geometric GDS changes by making a boolean difference between GDS cells
    • checks metadata changes, including port location and component settings
  • large library of photonics and electrical components that you can easily customize to your technology
  • read components from GDS, numpy, YAML
  • export components to GDS, YAML or 3D (trimesh, STL ...)
  • export netlist in YAML format
  • plugins to compute Sparameters using for example Lumerical, meep or tidy3d

How can you learn more?

gdsfactory is written in python and requires some basic knowledge of python. If you are new to python you can find many free online resources to learn:

Installation

First, you need to install klayout to visualize the GDS files that you create.

gdsfactory works for python versions 3.7, 3.8 and 3.9 in Windows, MacOs and Linux. Github runs all the tests at least once a day for different versions of python (3.7, 3.8, 3.9)

If you are on Windows, I recommend you install gdspy with Anaconda3, Miniconda3 or mamba (faster conda alternative) and pip for gdsfactory. I also recommend you install the gdsfactory link to klayout gf tool install

mamba install gdspy -y
pip install gdsfactory[full]
gf tool install

Mamba is a faster alternative to conda, if you don't want to install mamba, you can also replace mamba install gdspy with conda install -c conda-forge gdspy -y

For Linux and MacOs you can also install gdsfactory without Anaconda3:

pip install gdsfactory[full]
gf tool install

Or you can install the development version if you plan to contribute to gdsfactory:

git clone https://github.com/gdsfactory/gdsfactory.git --shallow-exclude=gh-pages
cd gdsfactory
make install

To summarize: There are 2 methods to install gdsfactory

  1. For users, pip install gdsfactory will download it from PyPi (python package index)
  2. For developers, git clone it from GitHub to your computer and link the library to your python with make install

For updating:

  1. Users need to pip install gdsfactory --upgrade to install the latest release available.
  2. Developers need to git pull from GitHub to get the latest changes.

After installing it you should be able to import gdsfactory as gf from a python script.

  • gdsfactory
    • components: define a basic library of generic components that you can customize
    • gdsdiff: hash geometry and show differences by displaying boolean operations in klayout
    • klayout: klayout generic tech layers and klive macro
    • klive: stream GDS directly to klayout
    • ports: to connect components
    • routing: add waveguides to connect components
    • samples: python tutorial
    • tests:
  • docs/notebooks: jupyter-notebooks based tutorial

Documentation

Plugins

We try to keep gdsfactory core with minimum dependencies. So when you run pip install gdsfactory you do not install any plugins by default. If you want to install gdsfactory together with all the plugins you can run

pip install gdsfactory[full]

Here are some of the plugins that you can use in gdsfactory:

Trimesh

For (3D rendering and STL export)

pip install trimesh

Lumerical FDTD

For simulating Sparameters using FDTD.

meep / mpb

Open source FDTD / mode simulations. You to install meep and MPB with conda:

conda install -c conda-forge pymeep=*=mpi_mpich_* -y

or mamba (faster conda)

mamba install pymeep=*=mpi_mpich_* -y

Works only on Mac, Linux or windows WSL

SAX

Circuit simulations with optimization capabilities. You can install sax with pip install sax

Works only on Mac, Linux or windows WSL

tidy3d

For fast FDTD GPU based simulations on the cloud. Requires you to create an account on their website

CHANGELOG

gdsfactory keeps a general changelog as well as for each individual component

By default each component has an empty changelog and starts with version '0.0.1'

  • major:
    • position of ports changes. Affects position of ports. High level circuits may not work.
  • minor
    • affects a physical layer. Footprint is the same. it fits, but may not work the same.
  • patch: (decoration or formalities)
    • smaller changes
    • name change

You will need to manually bump the version and document any changes

@gf.cell
def my_component():
    c = gf.Component()

    c.version = "0.0.2"
    c.changelog += " # 0.0.2 increase default length to 11um "

Acks

gdsfactory top contributors:

  • Joaquin Matres (Google): maintainer
  • Damien Bonneau (PsiQ): cell decorator, Component routing functions, Klayout placer
  • Pete Shadbolt (PsiQ): Klayout auto-placer, Klayout GDS interface (klive)
  • Troy Tamas (Rockley): get_route_from_steps, netlist driven flow (from_yaml)
  • Floris Laporte (Rockley): netlist extraction and circuit simulation interface with SAX
  • Alec Hammond (Georgia Tech): Meep and MPB interface
  • Simon Bilodeau (Princeton): Meep FDTD write Sparameters
  • Thomas Dorch (Freedom Photonics): for Meep's material database access, MPB sidewall angles, and add_pin_path

Open source heroes:

  • Matthias Köfferlein (Germany): for Klayout
  • Lucas Heitzmann (University of Campinas, Brazil): for gdspy
  • Adam McCaughan (NIST): for phidl
  • Alex Tait (Queens University): for lytest
  • Thomas Ferreira de Lima (NEC): for pip install klayout

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].