Post Go back to editing

Net names are not recognized in the hierarchical designs plots

Category: Software
Product Number: LTspice
Software Version: 26.0.2

Hello to the community!

It is not an issue but a feedback for the developer. Maybe they will take it into considerations in the future versions. Consider the following usecase.

I have a circuit named "power.asc". And I'm testing/debugging it in a few higher-level files named "power_test_1.asc", "power_test_2.asc" and so on. Each contains a specific scenario to evaluate. So I follow the "Hierarchy"  chapter in the help and create the "power.asy" symbol containing the ports.

A little problem is now it is impossible to name so it is used in the plot. Just V(${NODE_NUMBER}). Here is the depiction:

The "+VSYS" name is plotted as simple V(n002). Neither the "+VSYS" nor "TEST_NAME" are recognized.

It is not a big deal for most people. But recently I was preparing the report, and it took me a bunch of time to create a readable legend for the traces using Paint.
:-D 

I believe that the root cause is hidden somewhere deep in the netlist processor, so it may be a little difficult to fix. So something like an "alias name" for the trace on the plot will be highly appreciated by the strugglers like myself. The node name remains the same, but it has the human-readable name.

Thanks for your attention.

Edit Notes

Fixed a typo.
[edited by: ElShang at 6:46 PM (GMT -4) on 5 Jun 2026]
  • 1

    Hi ElShang,

    This situation is inherent in all SPICE netlists that include subcircuits, and it is a situation that has been in SPICE for all time; it is not unique to LTspice.  But you might not understand why it is necessary.

    Consider that you made a subcircuit that has a nodename "1".  Now consider that you use five instances of that subcircuit in your top-level circuit or netlist.  Clearly, they can not keep the same nodename "1", because that would short-circuit all of them.

    Also consider if you had only one instance of this subcircuit, but your top-level netlist also had a node named "1".  If it kept both with the same nodename, they would be short-circuited together.

    You would not want either of those to happen.

    Therefore, SPICE alters the nodenames you had internal to your subcircuits, when it 'flattens' the netlist into one netlist.  SPICE has always done that, and there is no way around it.

    Whether you named your internal net "1" or "+VSYS" it makes no difference.  They must be converted to new nodenames to avoid duplication, with consequent short-circuits.

    In your case, I guess the node "+VSYS" was connected to a top-level node that did not have an explicit name (or Label) attached to it, and its nodename happened to be "N002".  So that became the actual nodename of that net, both external to the subcircuit and inside it.  They are the very same net, so they must have the same nodename.  If you have nets that reach the top-level schematic, their nodenames in the top-level schematic will be used for the internal portions too, since they are the same.

    Regards,

    Andy

  • Hi again ElShang,

    A few more FYI's -

    In your picture, you show a net that has two Labels attached to it, +VSYS and TEST_NAME.  It is not a good idea to do that.  Every net or node in SPICE can have only one nodename.  By attaching two Labels, you are suggesting that it has two nodenames.  But that is impossible since it can have only one.  Fortunately, LTspice can usually figure it out.  It does that by arbitrarily choosing one of the two names and ignoring the other.  But it also remembers the other one you tried to use and it attempts to "alias" it back to the nodename that it chose.  However, there are situations where this fails.  In all cases, you should use only one nodename (one Label) attached to any net.

    Also you wrote that "it is impossible to name so it is used in the plot."  I understand the frustration, but actually that is not quite true.  Any subcircuit net that reaches a wire in the top-level schematic gets (inherits) the nodename from the top-level schematic.  Therefore, its name in the top-level schematic is the one you should use and reference in waveform plots.

    If there is confusion about finding what a subcircuit's nodename was changed to, LTspice makes it easy to avoid worrying about that.  When you have the top-level schematic and the waveform window open in LTspice, use your mouse and click on the hierarchical symbol to "move" into that subcircuit.  Now you can click on any of the wires in that lower-level schematic, and LTspice will plot it.  You don't need to know what its nodename happens to be.

    If you are creating plots for publication and need them to show specific nodenames, just make sure that each node whose waveform you want to plot comes out on a "pin" and then connects to a top-level net with a name on it.  Those top-level nodenames are the ones you will see in the plots.

    Andy

  • This situation is inherent in all SPICE netlists that include subcircuits, and it is a situation that has been in SPICE for all time; it is not unique to LTspice.  But you might not understand why it is necessary.

    Well, I thought about something like that. So that's basically a no-surprise at all.
    Basically, the "subcircuits" is the same as "module" in the programming languages. Both have some local entities, which must be duplicated in this or other wat.

    But thanks for the clarification anyway. :-) 

    In your picture, you show a net that has two Labels attached to it, +VSYS and TEST_NAME.  It is not a good idea to do that.

    Oh yeah, I have already ran into this sort of issue. I mean the one when I have two name for the same net. But this was just an example to depict what I was trying to accomplish.

    If there is confusion about finding what a subcircuit's nodename was changed to, LTspice makes it easy to avoid worrying about that.  When you have the top-level schematic and the waveform window open in LTspice, use your mouse and click on the hierarchical symbol to "move" into that subcircuit.  Now you can click on any of the wires in that lower-level schematic, and LTspice will plot it.  You don't need to know what its nodename happens to be.

    That's exactly how I peek and poke around the hierarchical design. Trying to manually find a point of interest using the V(n???) notion is like finding a needle in a haystack. Especially taking into account the node names "mangling" performed by the SPICE during netlist flattening.

    If you are creating plots for publication and need them to show specific nodenames, just make sure that each node whose waveform you want to plot comes out on a "pin" and then connects to a top-level net with a name on it. 

    True, that's a nice alternative, your suggestion is appreciated. A little issue with it may "pollute" the schematic. 

    Consider I have subcircuits A and B instantiated in the circuit "root". A and B represent distinct hardware modules and have a certain interface. This way I consider the top-level "ports" as the connectors of some sort, representing the way the modules A and B interact with each other. So creating additional ports to peek the internals makes circuitry a little "messy".

    But that's the matter of taste, of course.

    ==========

    All in all, it is clear that it is impossible to explicitly name a net in the hierarchical design using the standard SPICE facilities. But maybe in the future version, authors of LTspice will create an option to assign an "aliase" of the net/node exclusively on the plot tab. Something like this:


    This way the underlying SPICE conventions remains uncompromised.

     ==========

    Thanks for your time and good luck!

  • Hi  ,

    In your picture, you show a net that has two Labels attached to it, +VSYS and TEST_NAME.  It is not a good idea to do that.  Every net or node in SPICE can have only one nodename.  By attaching two Labels, you are suggesting that it has two nodenames.  But that is impossible since it can have only one.  Fortunately, LTspice can usually figure it out.  It does that by arbitrarily choosing one of the two names and ignoring the other.  But it also remembers the other one you tried to use and it attempts to "alias" it back to the nodename that it chose.  However, there are situations where this fails.  In all cases, you should use only one nodename (one Label) attached to any net.

    Good advice.

    LTspice does offer a workaround, namely, the jumper symbol. In this particular case, within the sub, you could use a jumper to tie the two node names together. From the help (admittedly buried):

    There is one special symbol, jumper, that does not translate into a circuit element, but is a directive to the netlist generator that there are two different names for the same electrically identical node. 

    The prefix for a jumper in LTspice is J, not to be confused with a JFET. In LTspice, the prefix for a JFET is either JN or JP. Of course, the jumper is not netlisted, so there is no confusion in the SPICE netlist, as the jumper only serves to inform LTspice's netlister. Below shows how Jumpers and JFETs coexist in LTspice.

    mike

  • Wow, that's cool. A neat feature indeed.

    Thank you for sharing!