From: Obada Mahdi <omahdi@gm...> - 2013-07-10 05:21:58
I have recently submitted a bug report, see
The concern is how 'A' lines are rewritten when splicing in a
subcircuit. It would appear that any reference starting with 'v' or
'V' is being treated as a special case, rewriting it to
"v.<subckt-name>.<original-name>", but if those references are net
names, some of which might be referenced elsewhere within the same
subcircuit, they are not rewritten in this manner and are only subject
to the normal subcircuit substitution, prefixing them with
"<subckt-name>", which will break circuit topology.
I am new to [ng]spice, and I wonder why these special rename rules
have been implemented (e.g. prefixing certain identifiers with "v."
and the like) in the first place. It appears that the parser tries to
distinguish between nets and nodes in certain cases, but bases its
decision solely on syntactic patterns, causing problems like the one
When I encountered the aforementioned issue, I was trying to find a
solution to fix it, but realised that I lack the experience to even
understand why certain rewrite rules are in place to begin with. Any
insight into the inner workings of the ngspice parser are appreciated,
but that can be considered a very low-priority request. Thanks
everyone for the ongoing efforts in maintaining this project!