"As stub lengths increase won't the attenuation increase and lead to less ringing?"
Yes, although the effects are very minor due to the relatively low resistance of the interconnects (copper in most cases). Sometimes you can help this situation by putting 10 ohm or 20 ohm resistors in series with the stubs that serve to dampen the reflections. But you really have to model your entire interface to see how much this gains you.
As to the effect of stub length on ringing, I thought I had posted some Hyperlynx simulations previously that showed this. I will try to locate the post or re-post those results here.
EDIT1:
As stubs lengths get longer, at some point, depending on the frequencies of concern, they no longer act like stubs but rather act like transmission line segments. When this happens, at the junction of the main transmission line and the long stub, the signal "sees" an impedance that's half that of each transmission line segment. This is cause by having effectively two transmission lines in parallel. So you're going to get a significant reflection at this junction, back to the source.
EDIT2 - To answer Trilok's question
The following discussion of stubs assumes a single frequency signal, because it makes the discussions a bit easier. But keep in mind that for a square wave or even an edge, many frequencies are involved, and so the explanation is not quite as straightforward. Also, this applies to all frequencies, the only difference being the physical lengths at which they become apparent.
If the stub is short compared to the frequency of interest, then it just acts like a lumped-circuit. For a stub length less than ~1/20 of the wavelength, reflections come back to the main bus within the rise/fall time of the signal, and all you see is a little perturbation of the rising or falling edge.
With a stub length of ¼ wavelength, the reflections come back to the main bus 180 deg out of phase. This cancels out the signal on the bus, causing the classic “suck out” at that frequency. In an ideal case, the receiver sees no signal at this frequency.
Conversely, if the stub length is ½ the wavelength, the reflected signal comes back shifted 360 deg, so is in phase with the signal on the main bus, and adds to the amplitude.
You can extend this analysis to stubs that are multiples of ¼ wavelength or ½ wavelength. With longer length stubs, the resistive losses start to come into play. Note that resistive losses depend on frequency because high speed signals want to travel on the surface of a conductor and surface roughness of a copper trace can increase that resistance apart from what you might expect just from the resistivity of the conductor.
Now what if the stub is infinitely long? You get no reflection from the end (since the signal never reaches the end), but there is that impedance discontinuity I mentioned at the junction of the main bus and the stub. If the main bus is designed for 50 ohm impedance (close to 100 ohm differential impedance), as is the infinitely long stub, then at that junction the signal “sees” an impedance of 25 ohms (single ended), ~50 ohms diff, and so there is a partial (1/3) reflection at that junction back to the source.
Finally. The following picture, from one of Dr. Eric Bogatin’s Rule-of-Thumb papers, illustrates the suck-out effect of a stub (in this case an 0.2 in via) as a function of frequency.
