Open
Conversation
added 5 commits
March 20, 2026 15:48
Most tools and functions now allow to explicitly specify a format for input and output. On input, the format is usually detected, but for some cases, this is not possible (e.g. DEF). So you can specify the format attached to the file name in square brackets: e.g. file.defok[def] "def" is the intended suffix, "defok" is the given one. On output, the same is possible, specifically in strmxor and strmclip: strmxor a.gds b.gds out.xor[oas]
The way to specify them is through the following environment variables: $KLAYOUT_LEF_FORMAT - LEF suffixes (default: "*.lef *.LEF *.lef.gz *.LEF.gz") $KLAYOUT_DEF_FORMAT - DEF suffixes (default: "*.def *.DEF *.def.gz *.DEF.gz") The string is a space-separated list of simple match pattern. Only "*.xyz"-style pattern are allowed currently.
…_LEF_FORMAT environment variables.
|
Whats the reasoning to use an environment variable and not an internal klayout variable that gets saved in klayoutrc ? |
Collaborator
Author
|
That's because it should apply to strm* tools as well, right? They don't have klayoutrc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The solution consists of a number of features:
Two environment variables to specify a list of formats for LEF and DEF:
In addition, you can add the desired format in form of a "virtual suffix" in square brackets to the input and output files on strmxor, strmclip and klayout:
reads a DEF file called "file.defok", and
will produce a file called "ab.xor" in OASIS format.