Calibre to KLayout layer file conversion script

edited September 2018 in General

Hallo,

Nick van Beurden from NXP Semiconductors provided a perl script that converts Calibre color map files to KLayout layer properties files.

The script can be obtained here: (https://github.com/klayoutmatthias/calibre2klayout).

Here is how to run it:

 perl calibre2klayout.pl -input calibrelayerfile.txt -verbose

Thanks for providing the script, Nick!

Best regards,

Matthias

Comments

  • edited November -1
    Apparently your calibre layer map file looks different.
    What is the structure you assume in the file?

    Ours look like this:
    2.20 blue @<somePath>/calibre/v1.1.6/bitmaps/blank.xbm RX_label 1 1

    Regards
    Johannes
  • edited November -1

    Ho Johannes,

    apparently the script does not support custom dither pattern, like the one being specified with the @... notation.

    I'll try to enhance the script, although I already noticed some differences between Calibre and KLayout in that respect.

    Best regards,

    Matthias

  • edited November -1
    I had started to write a python script for conversion, but the it came to my mind to check here also... My initial goal was to just fill in the layer names into the xml file.

    But there might be more interesting things. Doing just a quick search, I failed to find a description of the calibre properties file, e.g. what's the purpose of the last two numbers?
    Cheers
    Johannes
  • edited November -1

    Hi Johannes,

    Unfortunately, I am not familiar with the format of the Calibre layer file. Is there anybody who can help out?

    Matthias

  • edited November -1
    Hi,

    Maybe I can help. The last 2 columns appear to have the following function: Switch for visibility, pen width.

    Feel free to add the custom dither to the perl script and share it again. Addition of this should be quite straightforward.

    Regards,

    Nick
  • edited March 2011
    This script became inaccessible.
    Somebody can send it to atitov@sitronics.com , please?
  • edited January 2013

    The link is working again.

  • edited November -1
    Hi,

    Thanks for sharing.
    Does anyone have the same script to convert from Cadence tech file ?

    Is there a web page to describe the layers file lines meaning :
    <properties>
    <frame-color>#ff80a8</frame-color>
    <fill-color>#ff80a8</fill-color>
    <frame-brightness>0</frame-brightness>
    <fill-brightness>0</fill-brightness>
    <dither-pattern>I9</dither-pattern>
    <visible>true</visible>
    <transparent>false</transparent>
    <width/>
    <marked>false</marked>
    <animation>0</animation>
    <name>Nwell</name>
    <source>1/0@1</source>
    </properties>
  • edited June 2011

    Hi okguy,

    Providing a Cadence tech file import is on my todo list. I have received a script regarding that topic already and I'll check whether I can make that script public.

    Regarding the format of the layer properties file, it's pretty straightforward in the simple (linear) case. There is no web site yet that describes the format. However, the fields are self-explaining hopefully:

    • frame-color and fill-color: colors of the frame and fill area of the layout in HTML notation
    • frame-brightness and fill-brightness: a relative brightness enhancement (in percent) for frame and fill color
    • dither-pattern: the fill pattern used (Ix is one of the internally defined patterns, other numbers describe custom patterns which are stored elsewhere in the layer properties file
    • visible: whether the layer is visible or not (true or false)
    • width: the line width (in your case the default is used)
    • marked: whether the object's vertexes are marked with a "+"
    • animation: a code describing whether the layer is animated (blinking, scrolling)
    • name: the display string of the entry in the layer list
    • source: the layer and datatype and layout index where the layer's layout data is taken from (1/0@1 is the layer 1, datatype 0 of the first layout). The layer source string can also be used to specify transformations for example. A comprehensive description is found here.

    If you group layers, a tree-like hierarchy appears in the layer properties file. The same is true if you add tabs to the layer panel. Custom fill pattern are stored in a separate section at the end of the file.

    Hopefully that helps.

    Best regards,

    Matthias

Sign In or Register to comment.