Skip to main content

python port of the Klayout xsection project

Project description

klayout_pyxs 0.1.13

docs pypi MIT black Downloads Downloads Downloads

This is a python port of the XSection project (https://github.com/klayoutmatthias/xsection).

The goal of this project is to provide an add-on to KLayout (www.klayout.de) to create and visualize a realistic cross-section view for VLSI designs supporting a wide range of technology options.

User Documentation

For the project description see klayout_pyxs Project Home Page.

Project Files

The basic structure is:

  • docs The documentation
  • klayout_pyxs The python package sources
  • pymacros The python .lym macros files for KLayout
  • samples Some sample files
  • tests Test sources and golden data
  • xs2pyxs xs to pyxs conversion scripts

The docs folder contains the .rst files and images for the documentation pages. See rendered version here.

The klayout_pyxs folder contains the python package which includes the cross-section generation engine.

The pymacros folder contains with the actual KLayout macros code, pyxs.lym.

The samples folder holds a few files for playing around.

The tests folder contains some regression tests for the package. To run the tests, make sure "klayout" or "klayout_app" (in Windows) is in your path and use

$ cd tests
$ ./run_tests.sh

or (from e.g. git bash console on Windows)

$ cd tests
$ bash run_tests_windows.sh

The xs2pyxs folder contains a shell script which helps converting Ruby-based .xs scripts to .pyxs scripts. It performs necessary but not sufficient string replacements. Depending on the .xs script complexity, more changes are likely to be needed.

Installation for users

You can install the module

pip install klayout_pyxs

And the klayout macro from klayout package manager.

Installation for developers

To run .pyxs scripts from the KLayout menu, klayout_pyxs package and python macros file have to be installed to the KLayout folders. According to KLayout documentation, they should go to the "pymacros" and "python" folders in KLayout's user specific application folder. In Windows, it is $USERPROFILE/KLayout.

If you are using Python 2.7 in your KLayout distribution, you need six package installed.

Windows

In Windows, do the following (the commands should be run from e.g. git bash console). Tested on KLayout 0.25.3 and 0.25.7.

  1. Check if $USERPROFILE/KLayout exists and is used by the KLayout to store macros. Run

    $ ls $USERPROFILE/KLayout
    

    If no error reported, continue with 1. If there is an error, you need to find a location of KLayout's user specific application folder with pymacros, python folders and use it in further commands.

  2. Clone klayout_pyxs repository into any source folder:

    $ git clone https://github.com/dimapu/klayout_pyxs.git klayout_pyxs_repo
    
  3. Copy klayout_pyxs_repo/pymacros/pyxs.lym to $USERPROFILE/KLayout/pymacros/pyxs.lym

    $ cp klayout_pyxs_repo/pymacros/pyxs.lym $USERPROFILE/KLayout/pymacros/pyxs.lym
    
  4. Copy klayout_pyxs_repo/klayout_pyxs/. to $USERPROFILE/KLayout/python/klayout_pyxs

    $ mkdir $USERPROFILE/KLayout/python/klayout_pyxs
    $ cp klayout_pyxs_repo/klayout_pyxs/*.py $USERPROFILE/KLayout/python/klayout_pyxs
    

Now, run Klayout. In the Tools menu, you should see pyxs > Load pyxs script.

Linux / Mac OS

Run

$ make install

Now, run Klayout. In the Tools menu, you should see pyxs > Load pyxs script.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

klayout_pyxs-0.1.13.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

klayout_pyxs-0.1.13-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file klayout_pyxs-0.1.13.tar.gz.

File metadata

  • Download URL: klayout_pyxs-0.1.13.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for klayout_pyxs-0.1.13.tar.gz
Algorithm Hash digest
SHA256 d7a36da1cd56cc8a8cde9c339cedda339b1e36efa61f4d0f85b1ddba98e0c3a4
MD5 63ec58c23672a3730a7419315eccff8f
BLAKE2b-256 dc44140987dace403f153491b19a7d1184b29b4b717d659df358c37618c2e1d6

See more details on using hashes here.

File details

Details for the file klayout_pyxs-0.1.13-py3-none-any.whl.

File metadata

File hashes

Hashes for klayout_pyxs-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 6e80dbcf80da741ed161f41e4899fd6f6b72b820df1a91ad4343367a9ad16121
MD5 ec7c9c59c1f705d70b02266ac25a94a8
BLAKE2b-256 082eb56d8d6c5ddfe1b4f67df78e5ace896adfcb118f3927cf2259af8470d72a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page