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]
Parents
  • 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!

Reply
  • 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!

Children
No Data

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.