GDSII (GDS) is known as a CAD format for layout of ICs and MEMS. The author uses GDS for MEMS and metasurface production. GDS can also be created directly with mask CAD software such as Layout Editor and KLayout ~~ (rich) Can be converted from dxf files that can be handled by AutoCAD, Solidworks, etc. w) ~~ using Cadence, but it is convenient to apply a programming language to patterns that can be described using mathematical formulas. I have been drawing GDS in Perl for a long time with reference to JAXA Mita-sensei's page, but in recent years the CAD file size has grown. , I often feel the limits in Perl [^ 1]. Therefore, since 2019, GDS has been created in Python. Here, I will describe the know-how for creating a GDS file in Python.
Several libraries have been proposed for handling the GDSII format in Python, but my recommendation is gdspy. To enumerate the known libraries,
This section describes the environment settings for creating a gds file with gdspy on a Windows machine for the time being.
Install Anaconda 3 https://www.python.jp/install/centos/anaconda/install.html Install while watching.
Update Anaconda 3 (execute as appropriate)
From Windows-> cmd.exe (command prompt)
> conda update --all
Setting up the environment for gds If the conda environment and the pip environment are mixed it seems that something will not work, so create a new environment in Anaconda 3 just in case. Use a name such as gdsii. 3-1. Install the necessary modules for gdspy. numpy cython pip spyder
Introduction of gdspy At the URL below https://qiita.com/mckeeeen/items/d4cbe4a16a102157f40c Execute "Install packages with pip in Anaconda environment" to install gdspy.
From Windows-> cmd.exe (command prompt), execute the following. (The> line indicates the command input)
>conda info -e
# conda environments:
#
base * C:\Users\k_iwa\Anaconda3
> source activate base
<-The name here (base) is the environment for gdspy introduced in 3.
> pip install gdspy
If you have not installed the C ++ compiler environment (for example, Build Tools for Visual Studio 2019) or libraries such as cython, you can install gdspy. It doesn't work properly. If it doesn't work, uninstall it with pip uninstall gdspy
, prepare the library, and reinstall it.
[^ 1]: When it exceeds 600MB, Perl gives an error and cannot output GDS. I wasn't sure why.
Recommended Posts