All Projects → heitzmann → gdstk

heitzmann / gdstk

Licence: BSL-1.0 license
Gdstk (GDSII Tool Kit) is a C++/Python library for creation and manipulation of GDSII and OASIS files.

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to gdstk

spydrnet
A flexible framework for analyzing and transforming FPGA netlists. Official repository.
Stars: ✭ 49 (-71.35%)
Mutual labels:  eda, cad
Limbo
Library for VLSI CAD Design Useful parsers and solvers' api are implemented.
Stars: ✭ 84 (-50.88%)
Mutual labels:  eda, cad
Devices.jl
Julia package for CAD of superconducting devices operating at microwave frequencies.
Stars: ✭ 16 (-90.64%)
Mutual labels:  cad, gdsii
OpenROAD-flow-scripts
OpenROAD's scripts implementing an RTL-to-GDS Flow. Documentation at https://openroad-flow-scripts.readthedocs.io/en/latest/
Stars: ✭ 124 (-27.49%)
Mutual labels:  eda, gdsii
Vtr Verilog To Routing
Verilog to Routing -- Open Source CAD Flow for FPGA Research
Stars: ✭ 466 (+172.51%)
Mutual labels:  eda, cad
act
ACT hardware description language and core tools.
Stars: ✭ 53 (-69.01%)
Mutual labels:  eda, cad
pykicad
Library for working with KiCAD file formats
Stars: ✭ 46 (-73.1%)
Mutual labels:  eda, cad
Librepcb
A powerful, innovative and intuitive EDA tool for everyone!
Stars: ✭ 1,173 (+585.96%)
Mutual labels:  eda, cad
tatum
Tatum: A Fast, Flexible Static Timing Analysis (STA) Engine for Digital Circuits
Stars: ✭ 35 (-79.53%)
Mutual labels:  eda, cad
gdsfactory
Python package to generate GDS layouts.
Stars: ✭ 38 (-77.78%)
Mutual labels:  eda, gdsii
Workcraft
Toolset to capture, simulate, synthesize and verify graph models
Stars: ✭ 27 (-84.21%)
Mutual labels:  eda, cad
Opentimer
A High-performance Timing Analysis Tool for VLSI Systems
Stars: ✭ 213 (+24.56%)
Mutual labels:  eda, cad
GoogleMap Demo
GoogleMap一些常用API总结库
Stars: ✭ 24 (-85.96%)
Mutual labels:  polygons
DigitalComm.jl
Julia module for digital communication tools.
Stars: ✭ 25 (-85.38%)
Mutual labels:  eda
eventcatalog
Discover, Explore and Document your Event Driven Architectures powered by Markdown.
Stars: ✭ 392 (+129.24%)
Mutual labels:  eda
30DayMapChallenge
My contributions to the #30DayMapChallenge 2019, a daily challenge focusing on spatial visualizations happening throughout November.
Stars: ✭ 170 (-0.58%)
Mutual labels:  polygons
range3
Range Software - Finite Element Analysis
Stars: ✭ 31 (-81.87%)
Mutual labels:  cad
Dockerize-EDA
[WIP] Dockerize Synopsys/Cadence EDA tools
Stars: ✭ 57 (-66.67%)
Mutual labels:  eda
kicad-jlcpcb-tools
Plugin to generate BOM + CPL files for JLCPCB, assigning LCSC part numbers directly from the plugin, query the JLCPCB parts database, lookup datasheets and much more.
Stars: ✭ 537 (+214.04%)
Mutual labels:  eda
paramak
Create parametric 3D fusion reactor CAD and neutronics models
Stars: ✭ 40 (-76.61%)
Mutual labels:  cad

GDSTK README

Boost Software License - Version 1.0 Tests Runner Publish Docs Downloads

Gdstk (GDSII Tool Kit) is a C++ library for creation and manipulation of GDSII and OASIS files. It is also available as a Python module meant to be a successor to Gdspy.

Key features for the creation of complex CAD layouts are included:

  • Boolean operations on polygons (AND, OR, NOT, XOR) based on clipping algorithm
  • Polygon offset (inward and outward rescaling of polygons)
  • Efficient point-in-polygon solutions for large array sets

Typical applications of Gdstk are in the fields of electronic chip design, planar lightwave circuit design, and mechanical engineering.

Documentation

The complete documentation is available here.

The source files can be found in the docs directory.

Installation

C++ library only

The C++ library is meant to be used by including it in your own source code.

If you prefer to install a static library, the included CMakeLists.txt should be a good starting option (use -DCMAKE_INSTALL_PREFIX=path to control the installation path):

cmake -S . -B build
cmake --build build --target install

The library depends on zlib.

Python wrapper

The Python module can be installed via Conda (recommended) or compiled directly from source. It depends on:

Conda

Windows users are suggested to install via Conda using the available conda-forge recipe. The recipe works on MacOS and Linux as well.

To install in a new Conda environment:

# Create a new conda environment named gdstk
conda create -n gdstk -c conda-forge --strict-channel-priority
# Activate the new environment
conda activate gdstk
# Install gdstk
conda install gdstk

To use an existing environment, make sure it is configured to prioritize the conda-forge channel:

# Configure the conda-forge channel
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
# Install gdstk
conda install gdstk

From source

The module must be linked aginst zlib. The included CMakeLists.txt file can be used as a guide.

Installation from source should follow the usual method (there is no need to compile the static library beforehand):

python setup.py install

Support

Help support Gdstk development by donating via PayPal or sponsoring me on GitHub.

Benchmarks

The benchmarks directory contains a few tests to compare the performance gain of the Python interface versus Gdspy. They are only for reference; the real improvement is heavily dependent on the type of layout and features used. If maximal performance is important, the library should be used directly from C++, without the Python interface.

Timing results were obtained with Python 3.10 on an Intel Core i7-3820. They represent the best average time to run each function out of 16 sets of 8 runs each.

Benchmark Gdspy 1.6.12 Gdstk 0.9.0 Gain
10k_rectangles 84.3 ms 5.03 ms 16.7
1k_circles 309 ms 233 ms 1.33
boolean-offset 223 μs 43.4 μs 5.13
bounding_box 35.4 ms 171 μs 207
curves 1.66 ms 30.3 μs 54.8
flatten 566 μs 8.7 μs 65.1
flexpath 2.98 ms 15.8 μs 188
flexpath-param 2.79 ms 626 μs 4.45
fracture 965 μs 611 μs 1.58
inside 162 μs 31.6 μs 5.14
read_gds 3.04 ms 95 μs 32
read_rawcells 445 μs 60.1 μs 7.4
robustpath 202 μs 9.05 μs 22.3

Memory usage per object for 100000 objects:

Object Gdspy 1.6.12 Gdstk 0.9.0 Reduction
Rectangle 521 B 232 B 56%
Circle (r = 10) 1.69 kB 1.27 kB 25%
FlexPath segment 1.5 kB 439 B 71%
FlexPath arc 2.27 kB 1.49 kB 34%
RobustPath segment 2.87 kB 919 B 69%
RobustPath arc 2.63 kB 919 B 66%
Label 419 B 215 B 49%
Reference 156 B 182 B -16%
Reference (array) 186 B 184 B 1%
Cell 437 B 231 B 47%
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].