Hi,
My question is quite simple and I may be missing some information while searching the forum. Since I couldn't find the answer I am posting this.
Actually, I am a first year PhD student and I am trying to develop a layout file to be sent to the foundry. So I chose K layout for this task. But, I am seeing the GUI for layout designing. I would prefer if I could use scripts to design the layout. So I only found one discussion https://www.klayout.de/forum/comments.php?DiscussionID=47&page=1#Item_4 regarding this.
my problem is, I couldn't go to edit script mode or something like that. All I see is a graphical designing window where I can drag/drop and design. I want to know how to switch my design into scripting mode?
I am using KLayout 0.25 in Windows 10 (x64).
Thanks!
Bishal
Comments
Macros > Macro development (F5)
http://www.klayout.de/doc-qt4/programming/index.html
In KLayout version 0.25.x there is another (slightly more complicated way) to do coding by creating standalone (or dependent) packages
http://www.klayout.de/package_cookbook.html
https://sami.klayout.org/
But I'd just start with pressing F5.
So I am using Python, and for that PyCharm is the best environment I know of (I've been using Emacs but these days PyCharm rules).
The little issue is that the Klayout pya module is not a conventional module under Python. So you have to define the interpreter as something like (a batch file in Windows or shell script in Linux):
#! /bin/bash
/usr/bin/klayout -b -r $@
and then have PyCharm find this file as an interpreter. This way I can take advantage of the many features PyCharm provides. Since I am good with Python this is by far the fastest way for me to get stuff done. Compared to PyCharm the usual IC CAD scripting environments are stone age.
You still need to run DRC either yourself or have the foundry do it.
Good luck, Erwin
Hi Bishal,
Since you are working on photonics, I refer you to our photonics-specific add-ons for KLayout, SiEPIC-EBeam-PDK and SiEPIC-Tools. It is available in Tools | Package Manager, then find these packages.
You may also be interested in a photonics course where you design your devices/circuits in KLayout, and we fabricate & test them for you:
https://www.edx.org/course/silicon-photonics-design-fabrication-ubcx-phot1x
I have followed your book as well as tried the SiEPIC-EBeam PDK too but I do have my own optimized grating coupler, bends and other structure. So, I was looking for some way of connecting mine components directly as like as in your example file.
I couldn't understand how the pins are mapped and how does it connect to the waveguides automatically?
Hi Bishal,
I'll write up some documentation how to do this. The easiest would be to edit the existing library and put your own polygons in the cells. On the wiki there is a slightly out of date description of the requirements for pins so that snapping works correctly.
I will look forward to the release of your documentation.
Bishal,
Here are some notes on how to import your components into SiEPIC-Tools. Again, I suggest starting with an existing PDK (e.g., EBeam or GSiP), and creating new component following the convention described here: