Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    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 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).


    • CommentAuthordavidnhutch
    • CommentTimeDec 29th 2017 edited

    Macros > Macro development (F5)

    In KLayout version 0.25.x there is another (slightly more complicated way) to do coding by creating standalone (or dependent) packages

    But I'd just start with pressing F5.

    Thank you for the reply. I will take a look at it.. :)
    • CommentAuthorejprinz
    • CommentTimeDec 30th 2017
    Hi Bishal, what currently works for me is as follows. I also don't like to do manual layout, it only makes sense in very space constrained situations and for highly regular designs (memories). For test structures scripts work better for me.
    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
    Thank you ejprinz.
    • CommentAuthorlukasc
    • CommentTimeJan 6th 2018 edited

    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: