feat(Xyce): expand environment variables when using 'include', 'lib' and 'include script' - #1610
Merged
ra3xdh merged 3 commits intoMar 29, 2026
Merged
Conversation
Generic helper function to expand environment variables in a given string.
Manually expand environment variables when using Xyce for '.LIB', '.INCLUDE' and 'include script'. This allows for easier portability and implements the same kind of functionality that NGSpice natively supports.
Owner
|
The CI for Win-arm64 (clang) is failing with strange error in |
Contributor
Author
|
Are you able to trigger a CI build on |
Owner
|
The fail is surely not related to this PR. I am merging this. |
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.
What
Expands environment variables when using Xyce as the default simulator and in the case where one uses either '.INCLUDE', '.LIB' and 'include script' blocks in Qucs-S.
Why
This is to make the schematics slightly more portable, by allowing for env. variables rather than using absolute paths.
This also makes it closer to what NGSpice currently supports (natively).
Example
Using the IHP PDK as a reference in this case, when using an include script such as:
And when looking at the netlist, I now get:
where:
$PDK_ROOT=/home/torleif/git/OSIC/IHP-Open-PDK/$PDK=ihp-sg13g2In
currentthis wouldn't be able to be simulated in Xyce, since it doesn't expand environment variables natively (unlike NGSpice).This is also tested on
.LIBand.INCLUDEblocks: